|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.sdsc.mbt.StructureMap
This class implements a derived data map for a Structure object. It generates a number of hierarchical links, indexes, and generally provides access to the numerous relationships that exists between chains, fragments (secondary structure conformations), residues, atoms, and bonds for a Structure. The map enables one to "walk" a Structure's backbone, and finds "gaps" in the map (ie: segments of chains which are not spanned by Conformation objects). The set of map relationships that are managed by this class are suitable for applications and viewers to construct more spacially/biologically meaningful representations and displays.
This class provides a number of different "entry points" to traverse the underlying Structure data. The one an application should choose depeonds mostly on what the application wishes to accomplish. For example, while a basic sequence viewer might simply walk the raw list of residues (ie: by calling getResidueCount and getResidue in a loop) another sequence viewer may want to obtain residues by walking each chain (ie: by calling getChainCount, plus getChain and chain.getResidue in a nested loop) so that it knows where the residues of one chain ends and another begins. Again, its entirely up to the application.
StructureComponent
,
StructureComponentRegistry
Field Summary | |
boolean |
bondOrderImported
|
boolean |
bondOrderUserAssigned
|
boolean |
chargesUserAssigned
|
boolean |
forceFieldTypesSet
|
static double |
hBondCutoff
|
int |
MIN_ATOMS_FOR_FRAGMENTS
|
Constructor Summary | |
StructureMap(Structure structure)
Constructs a StructureMap object for a given Structure. |
Method Summary | |
void |
addAtom(Atom added,
Atom bonded,
Bond b,
boolean assignName)
|
void |
addAtom(Atom added,
Atom bonded,
Bond b,
int number)
|
void |
addAtom(Atom added,
Residue target,
boolean assignName)
|
void |
addAtom(Atom atom,
Residue residue,
int position,
java.lang.String chainId)
Adds a new atom with the specified position of the residue (if new) |
void |
addAtom(Atom atom,
Residue residue,
java.lang.String chainId)
Simply add an atom to the records don't assign bonds (they may be added later), and assign number based on the current numbering in the structure residue is a new Residue object that will be added to the structure (subsequent atoms may be added to the same residue from the calling method) |
void |
addBond(Bond bond)
Add a Bond to the StructureMap. |
void |
addBonds(java.util.Vector bondVector)
Add a vector of Bond objects to the StructureMap. |
void |
addStructure(StructureMap map)
This method incorporates a new structure (fragment) into this structure by importing all data structures and updating names |
void |
calculateBounds()
|
boolean |
computePhiPsi()
This method calculates phi-psi angles for the protein structure and saves the values in the hashmaps If the structure contains no amino acids, false is returned. |
void |
computePhiPsi(Residue r,
java.util.HashMap transformed)
|
void |
deriveBondOrders()
This method walks over all bonds in the structure and calculates orders based on their geometry |
java.util.Vector |
detectBonds()
This method detects missing bonds without removing any existing ones. |
void |
detectLigandBonds()
|
void |
generateBonds()
Generate a complete set of Bond objects from the Atom records. |
void |
generateFragments()
Generate secondary structure fragments for the Structure. |
java.util.Vector |
getAngleConnections()
Get all combination of three atoms connected through the central atom and forming an angle Each item is an array of three Atoms |
Atom |
getAtom(int atomIndex)
Get the Atom at the specified index. |
double[] |
getAtomCoordinateAverage()
Return the coordinate average for a Structure's atom coordinates. |
double[][] |
getAtomCoordinateBounds()
Return the coordinate bounds for a Structure's atom coordinates. |
int |
getAtomCount()
Return the total Atom count extracted from the Structure. |
int |
getAtomIndex(Atom atom)
Get the index of the specified Atom. |
java.util.Vector |
getAtoms()
|
java.util.Vector |
getAtoms(Atom atom)
|
java.util.Hashtable |
getAtomToAtoms()
|
java.util.Hashtable |
getAtomToBonds()
|
Bond |
getBond(int bondIndex)
Get the Bond at the specified index. |
int |
getBondCount()
Get a count of bonds contained in this StructureMap. |
int |
getBondIndex(Bond bond)
Get the index of the specified Bond. |
java.util.Vector |
getBonds()
|
java.util.Vector |
getBonds(Atom atom)
Return a Vector of all Bond objects connected to the given Atom object. |
java.util.Vector |
getBonds(Bond bond)
Return a Vector of bonds that are neighbors of the argument |
java.util.Vector |
getBonds(java.util.Vector atomVector)
Return a Vector of all Bond objects connected to the given Atom objects. |
java.util.Hashtable |
getBondToBonds()
|
java.util.Hashtable |
getBondUniqueness()
|
double[] |
getCenter()
|
Chain |
getChain(Atom atom)
Get the Chain object to which this Atom belongs. |
Chain |
getChain(int chainIndex)
Return the Chain at the given chain index. |
Chain |
getChain(java.lang.String chainId)
Get the Chain object given its ID. |
java.util.Hashtable |
getChainById()
|
int |
getChainCount()
Return the chain count extracted from the Structure. |
int |
getChainIndex(Chain chain)
Get the index of the specified Chain. |
java.util.Vector |
getChains()
Return the chains from the Structure. |
java.util.Vector |
getChildren(java.lang.Object object)
Return the Structure or StructureComponent children objects. |
java.util.Vector |
getEndResidues()
|
boolean |
getFillDisorderedGaps()
Should we "fill in" the disordered residue gaps with random coil when we load fragments? |
Fragment |
getFragment(int fragmentIndex)
Get the Fragment at the specified index. |
int |
getFragmentCount()
Return the total Fragment count extracted from the Structure. |
int |
getFragmentIndex(Fragment fragment)
Get the index of the specified Fragment. |
java.util.Vector |
getFragments()
|
int |
getLigandCount()
Return the ligand (het group) count. |
Residue |
getLigandResidue(int ligandIndex)
Return the Residue for a given ligand index. |
java.util.Vector |
getLigands()
|
double[] |
getMaxCoordinate()
|
double[] |
getMinCoordinate()
|
java.util.Vector |
getNonBondedConnections()
Returns a Vector of arrays with pairs of atoms that don't form bonds |
java.util.Vector |
getParents(java.lang.Object object)
Return the StructureComponent parent objects. |
java.util.HashMap |
getPhiMap()
|
java.util.HashMap |
getPsiMap()
|
double[] |
getPsiPhi(Residue r)
|
Residue |
getResidue(Atom atom)
Get the Residue object to which this Atom belongs. |
Residue |
getResidue(int residueIndex)
Return the start Atom index for a given residue index. |
Residue |
getResidue(java.lang.String chainAndResidue)
Get the Residue object by its chain and residue id. |
java.util.Hashtable |
getResidueByChainAndResidueId()
|
int |
getResidueCount()
Return the residue count extracted from the Structure. |
int |
getResidueIndex(Residue residue)
Get the index of the specified Residue. |
java.util.Vector |
getResidues()
|
Structure |
getStructure()
Returns the Structure object used to construct this StructureMap. |
StructureStyles |
getStructureStyles()
Return the StructureStyles object that describes the style (authored) attributes needed to produce consistant views of StructureMap elements. |
java.util.Vector |
getTorsionConnections()
|
boolean |
inRing(Atom atom,
int ringSize)
|
boolean |
isBondOrderImported()
|
boolean |
isBondOrderUserAssigned()
|
boolean |
isChargesUserAssigned()
|
void |
removeAllBonds()
Remove all Bond objects from the StructureMap. |
void |
removeAtom(Atom atom)
This method removes an atom from the structure |
void |
removeBond(Bond bond)
Remove a Bond from the StructureMap. |
void |
removeBond(int bondIndex)
Remove a Bond from the StructureMap. |
void |
setCenter(double[] c)
|
void |
setFillDisorderedGaps(boolean state)
Should we "fill in" the disordered residue gaps with random coil when we load fragments? |
void |
setResidueId(Residue residue,
int n)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public boolean bondOrderImported
public boolean bondOrderUserAssigned
public boolean chargesUserAssigned
public int MIN_ATOMS_FOR_FRAGMENTS
public static double hBondCutoff
public boolean forceFieldTypesSet
Constructor Detail |
public StructureMap(Structure structure)
Method Detail |
public double[] getMaxCoordinate()
public double[] getMinCoordinate()
public double[] getCenter()
public void setCenter(double[] c)
public void setResidueId(Residue residue, int n)
public void generateFragments()
public Structure getStructure()
public double[][] getAtomCoordinateBounds()
These bounding values are used in several parts of the toolkit including:
coordinateBounds[0][0] = min x
coordinateBounds[0][1] = min y
coordinateBounds[0][2] = min z
coordinateBounds[1][0] = max x
coordinateBounds[1][1] = max y
coordinateBounds[1][2] = max z
public double[] getAtomCoordinateAverage()
double[0] = x
double[1] = y
double[2] = z
public java.util.Vector getAtoms(Atom atom)
public int getAtomCount()
public Atom getAtom(int atomIndex)
public int getAtomIndex(Atom atom)
public Residue getResidue(Atom atom)
public Chain getChain(Atom atom)
public Chain getChain(java.lang.String chainId)
public int getBondCount()
public Bond getBond(int bondIndex)
public int getBondIndex(Bond bond)
public void addBond(Bond bond)
public void addAtom(Atom added, Residue target, boolean assignName)
public void addAtom(Atom added, Atom bonded, Bond b, boolean assignName)
public void addAtom(Atom atom, Residue residue, java.lang.String chainId)
atom
- residue
- public void addAtom(Atom atom, Residue residue, int position, java.lang.String chainId)
atom
- residue
- position
- 1-based location of the residue in the chainpublic void addAtom(Atom added, Atom bonded, Bond b, int number)
public void addBonds(java.util.Vector bondVector)
public void removeBond(Bond bond)
public void removeBond(int bondIndex)
public void removeAllBonds()
public java.util.Vector getBonds(Atom atom)
public java.util.Vector getBonds(Bond bond)
bond
-
public java.util.Vector getBonds(java.util.Vector atomVector)
public void generateBonds()
public java.util.Vector detectBonds()
public void detectLigandBonds()
public int getLigandCount()
public Residue getLigandResidue(int ligandIndex)
public int getResidueCount()
public Residue getResidue(int residueIndex)
public Residue getResidue(java.lang.String chainAndResidue)
public int getResidueIndex(Residue residue) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public int getFragmentCount()
public Fragment getFragment(int fragmentIndex)
public int getFragmentIndex(Fragment fragment)
public int getChainCount()
public Chain getChain(int chainIndex)
public int getChainIndex(Chain chain)
public StructureStyles getStructureStyles()
public java.util.Vector getChildren(java.lang.Object object)
public java.util.Vector getChains()
public final java.util.Vector getAtoms()
public final java.util.Hashtable getAtomToAtoms()
public final java.util.Hashtable getAtomToBonds()
public final boolean isBondOrderImported()
public final boolean isBondOrderUserAssigned()
public final java.util.Vector getBonds()
public final java.util.Hashtable getBondToBonds()
public final java.util.Hashtable getBondUniqueness()
public final java.util.Hashtable getChainById()
public final boolean isChargesUserAssigned()
public final java.util.Vector getFragments()
public final java.util.Vector getLigands()
public final java.util.Hashtable getResidueByChainAndResidueId()
public final java.util.Vector getResidues()
public java.util.Vector getParents(java.lang.Object object)
public void setFillDisorderedGaps(boolean state)
public boolean getFillDisorderedGaps()
public void deriveBondOrders()
public boolean inRing(Atom atom, int ringSize)
public void removeAtom(Atom atom)
public void addStructure(StructureMap map)
map
- public void calculateBounds()
public java.util.Vector getAngleConnections()
public java.util.Vector getTorsionConnections()
public java.util.Vector getNonBondedConnections()
public boolean computePhiPsi()
public void computePhiPsi(Residue r, java.util.HashMap transformed)
public java.util.HashMap getPhiMap()
public java.util.HashMap getPsiMap()
public java.util.Vector getEndResidues()
public double[] getPsiPhi(Residue r)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |