Class MultiResidue
- All Implemented Interfaces:
ROLS
,Serializable
,Cloneable
,Comparable<Residue>
,MutableTreeNode
,TreeNode
- Since:
- 1.0
- Author:
- Will Tollefson, Michael J. Schnieders
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ffx.potential.bonded.Residue
Residue.ResidueType, Residue.SSType
-
Field Summary
Fields inherited from class ffx.potential.bonded.Residue
Ramachandran
Fields inherited from class ffx.potential.bonded.MSGroup
angleTime, angleTorsionTime, bondTime, improperTorsionTime, outOfPlaneBendTime, piOrbitalTorsionTime, stretchBendTime, stretchTorsionTime, torsionTime, torsionTorsionTime, ureyBradleyTime
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
Fields inherited from interface ffx.potential.bonded.ROLS
MaxLengthScale
-
Constructor Summary
ConstructorDescriptionMultiResidue
(Residue residue, ForceField forceField) Constructor for MultiResidue. -
Method Summary
Modifier and TypeMethodDescriptionAbstract method that should specify how to add various MSNodes subclasses (such as Atoms, Residues and Polymers) to the MSGroupvoid
addResidue
(Residue newResidue) addResidue.void
assignBondedTerms
(ForceField forceField) assignBondedTermscreateJoint
(Bond bond, MSGroup group1, MSGroup group2, ForceField forceField) Create a joint between two chemical groups.createJoint
(MSGroup group1, MSGroup group2, ForceField forceField) Joiner joins Moieties m1 and m2 and returns the Geometry objects formed in a Joint.boolean
void
finalize
(boolean finalizeGeometry, ForceField forceField) Abstract method that should specify how to finalize a MSGroupvoid
This method constructs a List of atoms which are under-constrained.getActive.getAminoAcid3.Returns the MultiScaleGroup's angles FNode.Returns the AtomNode.getAtomNode
(int index) Returns the MSNode at the given index.Returns the AtomNode specified by the String n.Returns a List of the AtomNode's children.getBond
(int index) Returns the Bond at the supplied index.Returns the Bond with the given id.getBonds()
Returns the MultiScaleGroup's bonds FNode.double[]
Returns the MultiScaleGroup's center as a double[3].Returns a copy of this MultiResidue's consideredResidues array.Returns the MultiScaleGroup's dangling Atoms list.Returns a list of this MultiResidue's inactive residues.double[]
getMultiScaleCenter
(boolean w) This method finds the Geometrical center of this MultiScaleGroup, or the atomicWeight-weighted center if w is set to true, and returns it as a double[3].getName()
Returns the name of this MSNode.int
getResidueCount.Rotamer[]
Return all currently set rotamers.Returns a list of side chain atoms; for our purposes, nucleic acid side chain atoms are the sugar and the phosphate.Returns the MultiScaleGroup's terms FNode.Returns the MultiScaleGroup's Torsion MSNode.Returns a list of atoms liable to change during dead-end elimination repacking.int
hashCode()
boolean
Returns true if the MultiScaleGroup is finalized.void
reOrderAtomsvoid
revertState
(ResidueState state) revertState.boolean
setActiveResidue
(int i) Request the ith residue be set active.boolean
Method may be redundant with requestSetActiveResidue.boolean
setActiveResidue
(Residue residue) Setter for the fieldactiveResidue
.void
Sets the Angles node to t.void
Sets the Moieties node to t.void
Sets the Bonds node to t.void
setCenter
(double[] d) Set the value of Center to d.void
setColor
(RendererCache.ColorModel newColorModel, org.jogamp.vecmath.Color3f color, org.jogamp.java3d.Material mat) setColorvoid
setDanglingAtoms
(List<Atom> a) Sets the MultiScaleGroup's danglingAtoms member toa
.void
setFinalized
(boolean t) Specifies whether the MultiScaleGroup has been finalized.void
Sets the Out-of-Plane Bend node to t.void
Sets the MultiScaleGroup's Pi-Orbital Torsion node to t.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.void
Sets the Stretch-Bends node to t.void
Sets the MultiScaleGroup's terms node to t.void
Sets the MultiScaleGroup's torsion node to t.void
Sets the MultiScaleGroup's Torsion-Torsion node to t.void
Sets the Urey-Bradley node to t.void
setView
(RendererCache.ViewModel newViewModel, List<org.jogamp.java3d.BranchGroup> newShapes) setViewstoreState.toString()
void
update()
updatevoid
updateAtomsvoid
updateBondsMethods inherited from class ffx.potential.bonded.Residue
compareTo, drawLabel, getBackboneAtoms, getChainID, getNextResidue, getNucleicAcid3, getNucleicAcid3, getPreviousResidue, getReferenceAtom, getResidueNumber, getResidueType, getRotamer, getSegID, getTitrationUtils, initializeDefaultAtomicCoordinates, print, setChainID, setName, setNumber, setRotamer, setRotamers, setSegID, setTitrationUtils, storeCoordinateArray, toFormattedString, toString
Methods inherited from class ffx.potential.bonded.MSGroup
getAtomByName, removeLeaves, setAngleTorsions, setImproperTorsions, setStretchTorsions
Methods inherited from class ffx.potential.bonded.MSNode
contains, destroy, getAngleList, getAngleTorsionList, getAtomList, getAtomList, getBondList, getCenter, getChildList, getExtent, getImproperTorsionList, getList, getList, getMSCount, getMSNode, getMW, getOutOfPlaneBendList, getPiOrbitalTorsionList, getStretchBendList, getStretchTorsionList, getTorsionList, getTorsionTorsionList, getTotalMass, getUreyBradleyList, isSelected, removeChild, setSelected
Methods 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
-
Constructor Details
-
MultiResidue
Constructor for MultiResidue.- Parameters:
residue
- aResidue
object.forceField
- aForceField
object.
-
-
Method Details
-
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.
-
addResidue
addResidue.- Parameters:
newResidue
- aResidue
object.
-
assignBondedTerms
assignBondedTerms- Overrides:
assignBondedTerms
in classMSGroup
- Parameters:
forceField
- the ForceField to use when creating bonded terms.
-
createJoint
Create a joint between two chemical groups.- Overrides:
createJoint
in classMSGroup
- Parameters:
bond
- Bondgroup1
- aMSGroup
object.group2
- aMSGroup
object.forceField
- the ForceField parameters to use when creating the joint.- Returns:
- Joint the created Joint.
-
createJoint
Joiner joins Moieties m1 and m2 and returns the Geometry objects formed in a Joint.- Overrides:
createJoint
in classMSGroup
- Parameters:
group1
- aMSGroup
object.group2
- aMSGroup
object.forceField
- the ForceField parameters to use when creating the joint.- Returns:
- a
Joint
object.
-
equals
MSNode equality := same class and same name. Consider replacing with a Comparator<MSNode> for cases where non-reference equality is desired.
Overridden equals method that return true if object is not equals to this, is of the same class, has the same parent Polymer, the same sequence number, the same ResidueType, and the same AA3/NA3.
-
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.
-
findDangelingAtoms
public void findDangelingAtoms()This method constructs a List of atoms which are under-constrained. (i.e. They can except more bonds)- Overrides:
findDangelingAtoms
in classMSGroup
-
getActive
getActive.- Returns:
- a
Residue
object.
-
getAminoAcid3
getAminoAcid3.Returns the AminoAcid3 of the active residue.
- Overrides:
getAminoAcid3
in classResidue
- Returns:
- a
AminoAcidUtils.AminoAcid3
object.
-
getAngles
Returns the MultiScaleGroup's angles FNode. -
setAngles
Sets the Angles node to t. -
getAtomNode
Returns the AtomNode.- Overrides:
getAtomNode
in classMSGroup
- Returns:
- a
MSNode
object.
-
setAtomNode
Sets the Moieties node to t.- Overrides:
setAtomNode
in classMSGroup
- Parameters:
t
- aMSNode
object.
-
getAtomNode
Returns the MSNode at the given index.- Overrides:
getAtomNode
in classMSGroup
- Parameters:
index
- The index of the AtomNode to return.- Returns:
- a
MSNode
object.
-
getAtomNode
Returns the AtomNode specified by the String n.- Overrides:
getAtomNode
in classMSGroup
- Parameters:
n
- aString
object.- Returns:
- a
MSNode
object.
-
getAtomNodeList
Returns a List of the AtomNode's children.- Overrides:
getAtomNodeList
in classMSGroup
- Returns:
- a
List
object.
-
getBond
Returns the Bond with the given id. -
getBond
Returns the Bond at the supplied index. -
getBonds
Returns the MultiScaleGroup's bonds FNode. -
setBonds
Sets the Bonds node to t. -
getCenter
public double[] getCenter()Returns the MultiScaleGroup's center as a double[3]. -
setCenter
public void setCenter(double[] d) Set the value of Center to d. -
getConsideredResidues
Returns a copy of this MultiResidue's consideredResidues array.- Returns:
- a new List of the considered residues.
-
getDanglingAtoms
Returns the MultiScaleGroup's dangling Atoms list.- Overrides:
getDanglingAtoms
in classMSGroup
- Returns:
- a
List
object.
-
setDanglingAtoms
Sets the MultiScaleGroup's danglingAtoms member toa
.- Overrides:
setDanglingAtoms
in classMSGroup
- Parameters:
a
- aList
object.
-
getInactive
Returns a list of this MultiResidue's inactive residues. Adding/removing from the returned list does nothing.- Returns:
- a new List of inactive residues.
-
getMultiScaleCenter
public double[] getMultiScaleCenter(boolean w) This method finds the Geometrical center of this MultiScaleGroup, or the atomicWeight-weighted center if w is set to true, and returns it as a double[3].- Overrides:
getMultiScaleCenter
in classMSGroup
- Parameters:
w
- a boolean.- Returns:
- an array of double.
-
getName
Returns the name of this MSNode. -
getResidueCount
public int getResidueCount()getResidueCount.- Returns:
- The number of residues in this MultiResidue.
-
getRotamers
Return all currently set rotamers.- Overrides:
getRotamers
in classResidue
- 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.
- Overrides:
setRotamers
in classResidue
- Parameters:
library
- Rotamer library to use- Returns:
- An array of Rotamer.
-
getSideChainAtoms
Returns a list of side chain atoms; for our purposes, nucleic acid side chain atoms are the sugar and the phosphate.- Overrides:
getSideChainAtoms
in classResidue
- Returns:
- List of side chain (or nucleic backbone) atoms.
-
getTermNode
Returns the MultiScaleGroup's terms FNode.- Overrides:
getTermNode
in classMSGroup
- Returns:
- a
MSNode
object.
-
getTorsions
Returns the MultiScaleGroup's Torsion MSNode.- Overrides:
getTorsions
in classMSGroup
- Returns:
- a
MSNode
object.
-
setTorsions
Sets the MultiScaleGroup's torsion node to t.- Overrides:
setTorsions
in classMSGroup
- Parameters:
t
- aMSNode
object.
-
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 all atoms (all atoms are variable during DEE).
- Overrides:
getVariableAtoms
in classResidue
- Returns:
- Atoms changeable during DEE.
-
hashCode
public int hashCode() -
isFinalized
public boolean isFinalized()Returns true if the MultiScaleGroup is finalized.- Overrides:
isFinalized
in classMSGroup
- Returns:
- a boolean.
-
setFinalized
public void setFinalized(boolean t) Specifies whether the MultiScaleGroup has been finalized.- Overrides:
setFinalized
in classMSGroup
- Parameters:
t
- a boolean.
-
reOrderAtoms
public void reOrderAtoms()reOrderAtoms- Overrides:
reOrderAtoms
in classMSGroup
-
setActiveResidue
public boolean setActiveResidue(int i) Request the ith residue be set active.- Parameters:
i
- The index of the residue to set active.- Returns:
- true if the ith residue was set active, false otherwise.
-
setActiveResidue
Setter for the fieldactiveResidue
.- Parameters:
residue
- aResidue
object.- Returns:
- a boolean.
-
setActiveResidue
Method may be redundant with requestSetActiveResidue. Will not function correctly if there is more than one residue of type UNK (unknown).- Parameters:
aa
- aAminoAcidUtils.AminoAcid3
object.- Returns:
- True if successful
-
setColor
public void setColor(RendererCache.ColorModel newColorModel, org.jogamp.vecmath.Color3f color, org.jogamp.java3d.Material mat) setColor- Specified by:
setColor
in interfaceROLS
- Overrides:
setColor
in classResidue
- Parameters:
newColorModel
- aRendererCache.ColorModel
object.color
- aColor3f
object.mat
- aMaterial
object.
-
setOutOfPlaneBends
Sets the Out-of-Plane Bend node to t.- Overrides:
setOutOfPlaneBends
in classMSGroup
- Parameters:
t
- aMSNode
object.
-
setPiOrbitalTorsions
Sets the MultiScaleGroup's Pi-Orbital Torsion node to t.- Overrides:
setPiOrbitalTorsions
in classMSGroup
- Parameters:
t
- aMSNode
object.
-
setStretchBends
Sets the Stretch-Bends node to t.- Overrides:
setStretchBends
in classMSGroup
- Parameters:
t
- aMSNode
object.
-
setTerms
Sets the MultiScaleGroup's terms node to t. -
setTorsionTorsions
Sets the MultiScaleGroup's Torsion-Torsion node to t.- Overrides:
setTorsionTorsions
in classMSGroup
- Parameters:
t
- aMSNode
object.
-
setUreyBradleys
Sets the Urey-Bradley node to t.- Overrides:
setUreyBradleys
in classMSGroup
- Parameters:
t
- aMSNode
object.
-
setView
public void setView(RendererCache.ViewModel newViewModel, List<org.jogamp.java3d.BranchGroup> newShapes) setView -
storeState
storeState.Publicly accessible method for storing a MultiResidue state.
- Overrides:
storeState
in classResidue
- Returns:
- a
ResidueState
object.
-
toString
Overridden toString method returns the MSNode's name
Returns the MSGroup's name.
-
update
public void update()update -
updateAtoms
public void updateAtoms()updateAtoms- Overrides:
updateAtoms
in classMSGroup
-
updateBonds
public void updateBonds()updateBonds- Overrides:
updateBonds
in classMSGroup
-
revertState
Description copied from class:Residue
revertState.- Overrides:
revertState
in classResidue
- Parameters:
state
- aResidueState
object.
-