Package ffx.potential.bonded
Class Residue
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
ffx.potential.bonded.MSNode
ffx.potential.bonded.MSGroup
ffx.potential.bonded.Residue
- All Implemented Interfaces:
ROLS,Serializable,Cloneable,Comparable<Residue>,MutableTreeNode,TreeNode
- Direct Known Subclasses:
MultiResidue
The Residue class represents individual amino acids or nucleic acid bases.
- Since:
- 1.0
- Author:
- Michael J. Schnieders, Jacob M. Litman
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumResidue type [NA, AA, UNK].static enum -
Field Summary
FieldsFields inherited from class ffx.potential.bonded.MSGroup
angleTime, angleTorsionTime, bondTime, improperTorsionTime, outOfPlaneBendTime, piOrbitalTorsionTime, stretchBendTime, stretchTorsionTime, torsionTime, torsionTorsionTime, ureyBradleyTimeFields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObjectFields inherited from interface ffx.potential.bonded.ROLS
MaxLengthScale -
Constructor Summary
ConstructorsConstructorDescriptionResidue(int num, Residue.ResidueType residueType) Default Constructor where num is this Residue's position in the Polymer.Residue(String name, int resNumber, MSNode atoms, Residue.ResidueType residueType, ForceField forceField) As above, with atoms being a MSNode with this Residue's atoms as child nodesResidue(String name, int num, Residue.ResidueType residueType) Name is the residue's 3 letter abbreviation and num is its position in the Polymer.Residue(String name, int resNumber, Residue.ResidueType residueType, Character chainID, String segID) Name is the residue's 3 letter abbreviation and num is its position in the Polymer.Residue(String name, Residue.ResidueType residueType) Constructor for Residue. -
Method Summary
Modifier and TypeMethodDescriptionAbstract method that should specify how to add various MSNodes subclasses (such as Atoms, Residues and Polymers) to the MSGroupintvoiddrawLabel(org.jogamp.java3d.Canvas3D canvas, org.jogamp.java3d.J3DGraphics2D g2d, org.jogamp.java3d.Node node) drawLabelbooleanvoidfinalize(boolean finalizeGeometry, ForceField forceField) Abstract method that should specify how to finalize a MSGroupgetAminoAcid3.Returns a list of backbone atoms; for our purposes, nucleic acid backbone atoms are those of the nucleobase.Returns this Residues Parent Polymer name.Returns the Residue bonded to this Residue at this Residue's 3' or C-terminal end.getNucleicAcid3.getNucleicAcid3(boolean matchShortName) Returns the NucleicAcid3 corresponding to this Residue, with additional robust checking for 1- or 2-letter names.Returns the Residue bonded to this Residue at this Residue's 5' or N-terminal end.Returns a reference Atom for a Residue, primarily intended for rough distance calculations.intReturns this Residue's sequence number.Getter for the fieldresidueType.Get the current rotamer.Rotamer[]Return all currently set rotamers.getSegID()Getter for the fieldsegID.Returns a list of side chain atoms; for our purposes, nucleic acid side chain atoms are the sugar and the phosphate.Returns a list of atoms liable to change during dead-end elimination repacking.inthashCode()voidInitializes this (presumably nucleic acid) Residue's C1s, O4s, C4s, O3sNorth, and O3sSouth default coordinates based on default PDB atom locations; to preserve rotamer independence, this must be called before any NA rotamers are applied.booleanvoidprint()Prints the MSNode's namevoidrevertState(ResidueState state) revertState.voidsetAtomInitial(Atom atomInitial) voidSetter for the fieldchainID.voidsetColor(RendererCache.ColorModel newColorModel, org.jogamp.vecmath.Color3f color, org.jogamp.java3d.Material mat) setColorvoidSets the name of this NodeObject to n.voidsetNumber(int n) setNumbervoidsetRotamer(Rotamer rotamer) Set the current rotamer.Rotamer[]Sets the original coordinate rotamers for titratable residues RotamerLibrary's original coordinates rotamer flag has been set.Rotamer[]setRotamers(RotamerLibrary library) Resets the rotamers for this residue, potentially incorporating the original coordinates if RotamerLibrary's original coordinates rotamer flag has been set.voidSetter for the fieldsegID.voidsetTitrateConformers(boolean titrateConformers) voidsetTitrationUtils(TitrationUtils titrationUtils) double[][]Returns the coordinates of all atoms in this Residue as a 2D array.storeState.toFormattedString(boolean addResType, boolean addChainID) Formats this residue with some optional inclusions.toString()A descriptive string based on a given rotamer.Methods inherited from class ffx.potential.bonded.MSGroup
assignBondedTerms, createJoint, createJoint, findDangelingAtoms, getAngles, getAtomByName, getAtomNode, getAtomNode, getAtomNode, getAtomNodeList, getBond, getBond, getBonds, getCenter, getDanglingAtoms, getMultiScaleCenter, getTermNode, getTorsions, isFinalized, removeLeaves, reOrderAtoms, setAngles, setAngleTorsions, setAtomNode, setBonds, setCenter, setDanglingAtoms, setFinalized, setImproperTorsions, setOutOfPlaneBends, setPiOrbitalTorsions, setStretchBends, setStretchTorsions, setTerms, setTorsions, setTorsionTorsions, setUreyBradleys, setView, update, updateAtoms, updateBondsMethods inherited from class ffx.potential.bonded.MSNode
contains, destroy, getAngleList, getAngleTorsionList, getAtomList, getAtomList, getBondList, getCenter, getChildList, getExtent, getImproperTorsionList, getList, getList, getMSCount, getMSNode, getMW, getName, getOutOfPlaneBendList, getPiOrbitalTorsionList, getStretchBendList, getStretchTorsionList, getTorsionList, getTorsionTorsionList, getTotalMass, getUreyBradleyList, isSelected, removeChild, setSelectedMethods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
-
Field Details
-
Ramachandran
ConstantRamachandran="new String[17]"
-
-
Constructor Details
-
Residue
Default Constructor where num is this Residue's position in the Polymer.- Parameters:
num- The residue number.residueType- The residue type.
-
Residue
Constructor for Residue.- Parameters:
name- The residue name.residueType- The residue type.
-
Residue
Name is the residue's 3 letter abbreviation and num is its position in the Polymer.- Parameters:
name- The residue name.num- The residue number.residueType- The residue type.
-
Residue
public Residue(String name, int resNumber, Residue.ResidueType residueType, Character chainID, String segID) Name is the residue's 3 letter abbreviation and num is its position in the Polymer.- Parameters:
name- The residue name.resNumber- The residue number.residueType- The residue type.chainID- The chain ID.segID- The segment ID.
-
Residue
public Residue(String name, int resNumber, MSNode atoms, Residue.ResidueType residueType, ForceField forceField) As above, with atoms being a MSNode with this Residue's atoms as child nodes- Parameters:
name- The residue name.resNumber- The residue number.atoms- aMSNodeobject.residueType- The residue type.forceField- the ForceField to use when created bonded terms.
-
-
Method Details
-
isTitrateConformers
public boolean isTitrateConformers() -
setTitrateConformers
public void setTitrateConformers(boolean titrateConformers) -
getAtomInitial
-
setAtomInitial
-
setName
Description copied from class:MSNodeSets the name of this NodeObject to n. -
addMSNode
Abstract method that should specify how to add various MSNodes subclasses (such as Atoms, Residues and Polymers) to the MSGroupAllows adding Atoms to the Residue.
-
compareTo
- Specified by:
compareToin interfaceComparable<Residue>
-
drawLabel
public void drawLabel(org.jogamp.java3d.Canvas3D canvas, org.jogamp.java3d.J3DGraphics2D g2d, org.jogamp.java3d.Node node) drawLabel -
equals
MSNode equality := same class and same name. Consider replacing with a Comparator<MSNode> for cases where non-reference equality is desired.
-
finalize
Abstract method that should specify how to finalize a MSGroupThe Finalize method should be called once all atoms have been added to the Residue. Geometry objects (Bonds, Angles, etc) are then formed, followed by a determination of under-constrained (Dangling) atoms.
-
setTitrationUtils
-
getTitrationUtils
-
getAminoAcid3
getAminoAcid3.- Returns:
- a
AminoAcidUtils.AminoAcid3object.
-
getBackboneAtoms
Returns a list of backbone atoms; for our purposes, nucleic acid backbone atoms are those of the nucleobase.- Returns:
- List of backbone (or nucleobase) atoms.
-
getChainID
Returns this Residues Parent Polymer name.- Returns:
- a
Characterobject.
-
setChainID
Setter for the fieldchainID.- Parameters:
c- aCharacterobject.
-
setSegID
Setter for the fieldsegID.- Parameters:
segID- The segID to use.
-
getNextResidue
Returns the Residue bonded to this Residue at this Residue's 3' or C-terminal end. Any use of this method to add Residues to a sliding window or similar MUST not add that residue if that residue has no Rotamers, as several algorithms (such as the distance matrix) assume that all Residues being optimized have Rotamers.- Returns:
- The next Residue.
-
getNucleicAcid3
getNucleicAcid3.- Returns:
- a
NucleicAcidUtils.NucleicAcid3object.
-
getNucleicAcid3
Returns the NucleicAcid3 corresponding to this Residue, with additional robust checking for 1- or 2-letter names.- Parameters:
matchShortName- Try to match 1- or 2-letter names (e.g. A to ADE).- Returns:
- a
NucleicAcidUtils.NucleicAcid3object.
-
getPreviousResidue
Returns the Residue bonded to this Residue at this Residue's 5' or N-terminal end. Any use of this method to add Residues to a sliding window or similar MUST not add that residue if that residue has no Rotamers, as several algorithms (such as the distance matrix) assume that all Residues being optimized have Rotamers.- Returns:
- The previous Residue.
-
getReferenceAtom
Returns a reference Atom for a Residue, primarily intended for rough distance calculations. This atom should be roughly centrally located within the residue, and be invariant.- Returns:
- A reference Atom.
-
getResidueNumber
public int getResidueNumber()Returns this Residue's sequence number.- Returns:
- The sequence number.
-
getResidueType
Getter for the fieldresidueType.- Returns:
- a
Residue.ResidueTypeobject.
-
getRotamer
Get the current rotamer.- Returns:
- a
Rotamerobject.
-
setRotamer
Set the current rotamer.- Parameters:
rotamer- aRotamerobject.
-
getRotamers
Return all currently set rotamers.- Returns:
- All current rotamers for this residue.
-
setRotamers
Resets the rotamers for this residue, potentially incorporating the original coordinates if RotamerLibrary's original coordinates rotamer flag has been set.Any rotamers that were set previously are deleted.
- Parameters:
library- Rotamer library to use- Returns:
- An array of Rotamer.
-
setRotamers
Sets the original coordinate rotamers for titratable residues RotamerLibrary's original coordinates rotamer flag has been set.Any rotamers that were set previously are deleted.
- Returns:
- An array of Rotamer.
-
getSegID
Getter for the fieldsegID.- Returns:
- a
Stringobject.
-
getSideChainAtoms
Returns a list of side chain atoms; for our purposes, nucleic acid side chain atoms are the sugar and the phosphate.- Returns:
- List of side chain (or nucleic backbone) atoms.
-
getVariableAtoms
Returns a list of atoms liable to change during dead-end elimination repacking. For ordinary amino acids: side chain atoms. For ordinary nucleic acids: sugar/phosphate backbone atoms. MultiResidue over-rides this to return all atoms (as backbone atom types are non-constant).- Returns:
- Atoms changeable during DEE.
-
hashCode
public int hashCode() -
initializeDefaultAtomicCoordinates
public void initializeDefaultAtomicCoordinates()Initializes this (presumably nucleic acid) Residue's C1s, O4s, C4s, O3sNorth, and O3sSouth default coordinates based on default PDB atom locations; to preserve rotamer independence, this must be called before any NA rotamers are applied. -
print
public void print()Prints the MSNode's namePrints the MultiScaleGroup's Atoms and Bonds.
Prints "Residue Number: x" to stdout.
-
revertState
revertState.- Parameters:
state- aResidueStateobject.
-
setColor
public void setColor(RendererCache.ColorModel newColorModel, org.jogamp.vecmath.Color3f color, org.jogamp.java3d.Material mat) setColor- Specified by:
setColorin interfaceROLS- Overrides:
setColorin classMSGroup- Parameters:
newColorModel- aRendererCache.ColorModelobject.color- aColor3fobject.mat- aMaterialobject.
-
setNumber
public void setNumber(int n) setNumber- Parameters:
n- The residue number.
-
storeCoordinateArray
public double[][] storeCoordinateArray()Returns the coordinates of all atoms in this Residue as a 2D array.- Returns:
- the coordinates of all atoms in this Residue as a 2D array.
-
storeState
storeState.- Returns:
- a
ResidueStateobject.
-
toFormattedString
Formats this residue with some optional inclusions.[residue type]-[chain ID]ResNumber-Name.
- Parameters:
addResType- Include the residue typeaddChainID- Include the chain ID.- Returns:
- A descriptive string.
-
toString
A descriptive string based on a given rotamer.[chain ID]ResNumber-RotamerName.
- Parameters:
rotamer- The rotamer to use.- Returns:
- A descriptive string.
-
toString
Overridden toString method returns the MSNode's name
Returns the MSGroup's name.
-