|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.structure.StructureTools
public class StructureTools
A class that provides some tool methods.
Field Summary | |
---|---|
static String[] |
backboneAtomNames
The names of the Atoms that form the backbone. |
static String |
caAtomName
The Atom name of C-alpha atoms. |
static String |
cbAtomName
|
static Logger |
logger
|
static String |
nAtomName
|
static String |
oAtomName
|
static Pattern |
pdbNumRangeRegex
Pattern to describe subranges. |
static Character |
UNKNOWN_GROUP_LABEL
|
Constructor Summary | |
---|---|
StructureTools()
|
Method Summary | |
---|---|
static Atom[] |
cloneCAArray(Atom[] ca)
Provides an equivalent copy of Atoms in a new array. |
static Group[] |
cloneGroups(Atom[] ca)
Clone a set of CA Atoms, but returns the parent groups |
static Character |
convert_3code_1code(String code3)
convert three character amino acid codes into single character e.g. |
static String |
convertAtomsToSeq(Atom[] atoms)
|
static Atom[] |
duplicateCA2(Atom[] ca2)
Utility method for working with circular permutations. |
static List<Bond> |
findBonds(Group group,
List<Group> groups)
|
static Character |
get1LetterCode(String groupCode3)
convert a three letter code into single character. |
static Atom[] |
getAtomArray(Chain c,
String[] atomNames)
Returns an array of the requested Atoms from the Structure object. |
static Atom[] |
getAtomArray(Structure s,
String[] atomNames)
Returns an array of the requested Atoms from the Structure object. |
static Atom[] |
getAtomArrayAllModels(Structure s,
String[] atomNames)
Returns an array of the requested Atoms from the Structure object. |
static Atom[] |
getAtomCAArray(Chain c)
Returns an Atom array of the CA atoms. |
static Atom[] |
getAtomCAArray(Structure s)
Returns an Atom array of the CA atoms. |
static Atom[] |
getBackboneAtomArray(Structure s)
Returns an Atom array of the MainChain atoms. |
static Group |
getGroupByPDBResidueNumber(Structure struc,
ResidueNumber pdbResNum)
Get a group represented by a ResidueNumber. |
static List<Group> |
getGroupsWithinShell(Structure structure,
Group group,
double distance,
boolean includeWater)
|
static int |
getNrAtoms(Structure s)
Count how many number of Atoms are contained within a Structure object. |
static int |
getNrGroups(Structure s)
Count how many groups are contained within a structure object. |
static ResidueNumber |
getPDBResidueNumber(Group g)
Deprecated. replaced by Group.getResidueNumber() |
static Structure |
getReducedStructure(Structure s,
int chainNr)
Reduce a structure to provide a smaller representation. |
static Structure |
getReducedStructure(Structure s,
String chainId)
Reduce a structure to provide a smaller representation . |
static Structure |
getSubRanges(Structure s,
String ranges)
In addition to the functionality provided by getReducedStructure also provides a way to specify sub-regions of a structure with the following specification: ranges can be surrounded by ( and ). |
static boolean |
isNucleotide(String groupCode3)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String caAtomName
public static final String nAtomName
public static final String oAtomName
public static final String cbAtomName
public static final String[] backboneAtomNames
public static final Character UNKNOWN_GROUP_LABEL
public static Logger logger
public static final Pattern pdbNumRangeRegex
getSubRanges(Structure, String)
Constructor Detail |
---|
public StructureTools()
Method Detail |
---|
public static final int getNrAtoms(Structure s)
s
- the structure object
public static final int getNrGroups(Structure s)
s
- the structure object
public static final Atom[] getAtomArray(Structure s, String[] atomNames)
AminoAcid
or HetatomImpl
group.
For structures with more than one model, only model 0 will be used.
s
- the structure to get the atoms fromatomNames
- contains the atom names to be used.
public static final Atom[] getAtomArrayAllModels(Structure s, String[] atomNames)
getAtomArray(Structure, String[])
this method iterates over all chains.
Iterates over all chains and groups
and checks if the requested atoms are in this group, no matter if this is a AminoAcid
or HetatomImpl
group.
For structures with more than one model, only model 0 will be used.
s
- the structure to get the atoms fromatomNames
- contains the atom names to be used.
public static final Atom[] getAtomArray(Chain c, String[] atomNames)
c
- the Chain to get the atoms fromatomNames
- contains the atom names to be used.
public static final Atom[] getAtomCAArray(Chain c)
c
- the structure object
public static final Atom[] cloneCAArray(Atom[] ca) throws StructureException
ca
- array of CA atoms
StructureException
public static Group[] cloneGroups(Atom[] ca)
ca
- Atom array
public static Atom[] duplicateCA2(Atom[] ca2) throws StructureException
ca2
- atom array
StructureException
public static Atom[] getAtomCAArray(Structure s)
s
- the structure object
public static Atom[] getBackboneAtomArray(Structure s)
s
- the structure object
public static final Character convert_3code_1code(String code3) throws UnknownPdbAminoAcidException
code3
- a three character amino acid representation String
IllegalSymbolException
UnknownPdbAminoAcidException
public static final Character get1LetterCode(String groupCode3)
groupCode3
- three letter representation
public static final boolean isNucleotide(String groupCode3)
public static final Structure getReducedStructure(Structure s, String chainId) throws StructureException
s
- chainId
-
StructureException
public static final Structure getReducedStructure(Structure s, int chainNr) throws StructureException
s
- chainNr
- can be -1 to request all chains of model 0, otherwise will only add chain at this position
StructureException
public static final Structure getSubRanges(Structure s, String ranges) throws StructureException
s
- The full structureranges
- A comma-seperated list of ranges, optionally surrounded by parentheses
StructureException
public static final String convertAtomsToSeq(Atom[] atoms)
public static final ResidueNumber getPDBResidueNumber(Group g)
g
- Group object
public static final Group getGroupByPDBResidueNumber(Structure struc, ResidueNumber pdbResNum) throws StructureException
struc
- a Structure
pdbResNum
- a ResidueNumber
StructureException
- if the group cannot be found.public static List<Group> getGroupsWithinShell(Structure structure, Group group, double distance, boolean includeWater)
public static List<Bond> findBonds(Group group, List<Group> groups)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |