Package ffx.potential
Class MolecularAssembly
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
ffx.potential.bonded.MSNode
ffx.potential.bonded.MSGroup
ffx.potential.MolecularAssembly
- All Implemented Interfaces:
ROLS
,Serializable
,Cloneable
,MutableTreeNode
,TreeNode
- Direct Known Subclasses:
FFXSystem
The MolecularAssembly class is a collection of Polymers, Hetero Molecules, Ions and Water
- Since:
- 1.0
- Author:
- Michael J. Schnieders
- See Also:
-
Nested Class Summary
-
Field Summary
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
ConstructorDescriptionMolecularAssembly
(String name) Constructor for MolecularAssembly.MolecularAssembly
(String name, MSNode Polymers) Constructor for MolecularAssembly.MolecularAssembly
(String name, MSNode Polymers, org.apache.commons.configuration2.CompositeConfiguration properties) Constructor for MolecularAssembly. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHeaderLine
(String line) Adds a header line to this MolecularAssembly (particularly for PDB formats)Abstract method that should specify how to add various MSNodes subclasses (such as Atoms, Residues and Polymers) to the MSGroupvoid
applyRandomDensity
(double ucDensity) Applies a randomly drawn density to a molecular system's crystal.void
applyRandomSymOp
(double x) Randomizes position in the unit cell of each molecule by applying a Cartesian SymOp with a random translation.void
center()
centervoid
centerAt
(double[] d) centerAtvoid
centerView
(boolean rot, boolean trans) centerViewvoid
Compute fractional coordinates.void
createBoxvoid
deleteMolecule
(Molecule molecule) deleteMoleculeboolean
destroy()
destroyvoid
detach()
detachvoid
finalize
(boolean finalizeGroups, ForceField forceField) Abstract method that should specify how to finalize a MSGroupfindAtomint
Count the number of fractional coordinate entities in the system.Atom[]
getActiveAtomArrayGets all bonded entities in this MolecularAssembly, where an entity can be a polymer, molecule, monoatomic ion, or monoatomic gas (i.e. noble gas atoms).Get the alternate location.Getter for the fieldarchiveFile
.Atom[]
Return an Array of all atoms in the System.getAtomFromWireVertex
(int i) getAtomFromWireVertexgetBackBoneAtomsorg.jogamp.java3d.BranchGroup
Getter for the fieldbranchGroup
.getChainString[]
getChainNamesPolymer[]
getChainsdouble
getCharge
(boolean alwaysLog) Sums up charge of the system, checking nonstandard residues for non-unitary charges.getCrystalint
Getter for the fieldcurrentCycle
.int
Getter for the fieldcycles
.double
getExtentgetFile()
Getter for the fieldfile
.Getter for the fieldforceField
.Getter for the fieldfractionalMode
.String[]
Gets the header lines associated with this MolecularAssembly (particularly for PDB)getIons()
Getter for the fieldions
.double
getMass()
getMass.Molecule[]
int[]
This method assigns a unique integer to every molecule in the MolecularAssembly beginning at 0.Getter for the fieldmolecules
.boolean[]
Construct a boolean orray of flags to indicate atoms treated by a neural network.getNodeListorg.jogamp.vecmath.Vector3d
Getter for the fieldoffset
.org.jogamp.java3d.TransformGroup
Getter for the fieldoriginToRot
.getParallelTeam.getPolymer
(Character chainID, String segID, boolean create) getPolymerGetter for the fieldpotentialEnergy
.org.apache.commons.configuration2.CompositeConfiguration
Getter for the fieldproperties
.getResidueListorg.jogamp.java3d.TransformGroup
getTransformGroupgetWater()
getWaterorg.jogamp.java3d.Node
getWireFrameboolean
isVisibleorg.jogamp.java3d.BranchGroup
loadVRML()
loadVRMLvoid
Moves the center of all chemical entities into the primary unit cell.void
moveCenter
(double[] d) moveCentervoid
Move to fractional coordinates.protected void
removeLeavesvoid
rotateAbout
(org.jogamp.vecmath.Vector3d v) Rotate about a point in given in the System's Local Coordinatesvoid
sceneGraphChange
(List<org.jogamp.java3d.BranchGroup> newShapes) sceneGraphChangevoid
setAlternateLocation
(Character alternateLocation) Set the alternate location.void
setArchiveFile
(File archiveFile) Set the File for writing out an archive.void
setChainIDAndRenumberMolecules
(Character chainID) This method sets all HETATM molecules, including water and ions, to use the given chainID and then renumbers the molecules.void
setColor
(RendererCache.ColorModel newColorModel, org.jogamp.vecmath.Color3f color, org.jogamp.java3d.Material mat) setColorvoid
setCrystal
(Crystal crystal) Set the Crystal for the Potential of this MolecularAssembly.void
setCurrentCycle
(int c) Setter for the fieldcurrentCycle
.void
setCycles
(int c) Setter for the fieldcycles
.void
Setter for the fieldfile
.void
setForceField
(ForceField forceField) Setter for the fieldforceField
.void
Setter for the fieldfractionalMode
.void
setOffset
(org.jogamp.vecmath.Vector3d o) Setter for the fieldoffset
.void
setPotential
(ForceFieldEnergy potentialEnergy) setPotentialvoid
setView
(RendererCache.ViewModel newViewModel, List<org.jogamp.java3d.BranchGroup> newShapes) setViewvoid
setWireWidth
(float f) setWireWidthMethods 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, print, reOrderAtoms, setAngles, setAngleTorsions, setAtomNode, setBonds, setCenter, setDanglingAtoms, setFinalized, setImproperTorsions, setOutOfPlaneBends, setPiOrbitalTorsions, setStretchBends, setStretchTorsions, setTerms, setTorsions, setTorsionTorsions, setUreyBradleys, toString, update, updateAtoms, updateBonds
Methods inherited from class ffx.potential.bonded.MSNode
contains, drawLabel, equals, getAngleList, getAngleTorsionList, getAtomList, getAtomList, getBondList, getCenter, getChildList, getImproperTorsionList, getList, getList, getMSCount, getMSNode, getMW, getName, getOutOfPlaneBendList, getPiOrbitalTorsionList, getStretchBendList, getStretchTorsionList, getTorsionList, getTorsionTorsionList, getTotalMass, getUreyBradleyList, hashCode, isSelected, removeChild, setName, 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
-
Field Details
-
forceField
-
-
Constructor Details
-
MolecularAssembly
Constructor for MolecularAssembly.- Parameters:
name
- aString
object.
-
MolecularAssembly
Constructor for MolecularAssembly. -
MolecularAssembly
public MolecularAssembly(String name, MSNode Polymers, org.apache.commons.configuration2.CompositeConfiguration properties) Constructor for MolecularAssembly.
-
-
Method Details
-
setAlternateLocation
Set the alternate location.- Parameters:
alternateLocation
- The alternate location.
-
getAlternateLocation
Get the alternate location.- Returns:
- The alternate location.
-
addHeaderLine
Adds a header line to this MolecularAssembly (particularly for PDB formats)- Parameters:
line
- Line to add.
-
addMSNode
Abstract method that should specify how to add various MSNodes subclasses (such as Atoms, Residues and Polymers) to the MSGroup -
applyRandomDensity
public void applyRandomDensity(double ucDensity) Applies a randomly drawn density to a molecular system's crystal.- Parameters:
ucDensity
- Target density.
-
applyRandomSymOp
public void applyRandomSymOp(double x) Randomizes position in the unit cell of each molecule by applying a Cartesian SymOp with a random translation.- Parameters:
x
- SymOp with translation range -x/2 .. x/2 (0 for random placement in the unit cell, negative for no SymOp)
-
center
public void center()center -
centerAt
public void centerAt(double[] d) centerAt- Parameters:
d
- an array of double.
-
centerView
public void centerView(boolean rot, boolean trans) centerView- Parameters:
rot
- a boolean.trans
- a boolean.
-
computeFractionalCoordinates
public void computeFractionalCoordinates()Compute fractional coordinates. -
createBox
public void createBox()createBox -
deleteMolecule
deleteMolecule- Parameters:
molecule
- aMolecule
object.
-
destroy
public boolean destroy()destroy -
detach
public void detach()detach -
finalize
Abstract method that should specify how to finalize a MSGroup -
findAtom
findAtom -
fractionalCount
public int fractionalCount()Count the number of fractional coordinate entities in the system. If fractionalMode is MOLECULE, then the count is equal to the number of molecules. If fractionalMode is ATOM, then the count is the number of atoms. Otherwise the count is zero.- Returns:
- The number of fractional coordinate entities.
-
getActiveAtomArray
getActiveAtomArray- Returns:
- an array of active
Atom
objects.
-
getAllBondedEntities
Gets all bonded entities in this MolecularAssembly, where an entity can be a polymer, molecule, monoatomic ion, or monoatomic gas (i.e. noble gas atoms).- Returns:
- All bonded groups of atoms and all singleton atoms.
-
getAtomArray
Return an Array of all atoms in the System.- Returns:
- an array of
Atom
objects.
-
getAtomFromWireVertex
getAtomFromWireVertex- Parameters:
i
- a int.- Returns:
- a
Atom
object.
-
getBackBoneAtoms
getBackBoneAtoms- Returns:
- a
List
object.
-
getBranchGroup
public org.jogamp.java3d.BranchGroup getBranchGroup()Getter for the fieldbranchGroup
.- Returns:
- a
BranchGroup
object.
-
getChain
getChain -
getChainNames
getChainNames- Returns:
- an array of
String
objects.
-
getChains
getChains- Returns:
- an array of
Polymer
objects.
-
getCharge
public double getCharge(boolean alwaysLog) Sums up charge of the system, checking nonstandard residues for non-unitary charges.- Parameters:
alwaysLog
- Log non-unitary charge warnings for all nodes- Returns:
- System charge
-
getCrystal
getCrystal- Returns:
- a
Crystal
object.
-
setCrystal
Set the Crystal for the Potential of this MolecularAssembly.- Parameters:
crystal
- Crystal instance.
-
getCurrentCycle
public int getCurrentCycle()Getter for the fieldcurrentCycle
.- Returns:
- a int.
-
setCurrentCycle
public void setCurrentCycle(int c) Setter for the fieldcurrentCycle
.- Parameters:
c
- a int.
-
getCycles
public int getCycles()Getter for the fieldcycles
.- Returns:
- a int.
-
setCycles
public void setCycles(int c) Setter for the fieldcycles
.- Parameters:
c
- a int.
-
getExtent
public double getExtent()getExtent -
getFile
Getter for the fieldfile
.- Returns:
- a
File
object.
-
setFile
Setter for the fieldfile
.- Parameters:
file
- aFile
object.
-
getArchiveFile
Getter for the fieldarchiveFile
.- Returns:
- a
File
object.
-
setArchiveFile
Set the File for writing out an archive.- Parameters:
archiveFile
- The archive file.
-
getForceField
Getter for the fieldforceField
.- Returns:
- a
ForceField
object.
-
setForceField
Setter for the fieldforceField
.- Parameters:
forceField
- aForceField
object.
-
getFractionalMode
Getter for the fieldfractionalMode
.- Returns:
- a
MolecularAssembly.FractionalMode
object.
-
setFractionalMode
Setter for the fieldfractionalMode
.- Parameters:
mode
- aMolecularAssembly.FractionalMode
object.
-
getHeaderLines
Gets the header lines associated with this MolecularAssembly (particularly for PDB)- Returns:
- Header lines.
-
getIons
Getter for the fieldions
.- Returns:
- a
List
object.
-
getMass
public double getMass()getMass.- Returns:
- a double.
-
getNeuralNetworkIdentity
public boolean[] getNeuralNetworkIdentity()Construct a boolean orray of flags to indicate atoms treated by a neural network.- Returns:
- The boolean orray of flags to indicate atoms treated by a neural network.
-
getMoleculeNumbers
public int[] getMoleculeNumbers()This method assigns a unique integer to every molecule in the MolecularAssembly beginning at 0. An integer array with these values for each atom is returned.- Returns:
- an array of molecule numbers for each atom.
-
getMolecules
Getter for the fieldmolecules
.- Returns:
- a
List
object.
-
getMoleculeArray
-
setChainIDAndRenumberMolecules
This method sets all HETATM molecules, including water and ions, to use the given chainID and then renumbers the molecules.If there is a polymer with the given chainID, then numbering begins after the final ResID. Otherwise numbering begins at 1.
This is useful for producing consistent PDB file output.
- Parameters:
chainID
- The Character chainID to use for all HETATM molecules.
-
getNodeList
getNodeList- Returns:
- a
List
object.
-
getOffset
public org.jogamp.vecmath.Vector3d getOffset()Getter for the fieldoffset
.- Returns:
- a
Vector3d
object.
-
setOffset
public void setOffset(org.jogamp.vecmath.Vector3d o) Setter for the fieldoffset
.- Parameters:
o
- aVector3d
object.
-
getOriginToRot
public org.jogamp.java3d.TransformGroup getOriginToRot()Getter for the fieldoriginToRot
.- Returns:
- a
TransformGroup
object.
-
getParallelTeam
getParallelTeam.- Returns:
- a
ParallelTeam
object.
-
getPolymer
getPolymer -
getPotentialEnergy
Getter for the fieldpotentialEnergy
.- Returns:
- a
ForceFieldEnergy
object.
-
getProperties
public org.apache.commons.configuration2.CompositeConfiguration getProperties()Getter for the fieldproperties
.- Returns:
- a
CompositeConfiguration
object.
-
getResidueList
getResidueList- Returns:
- a
List
object.
-
getTransformGroup
public org.jogamp.java3d.TransformGroup getTransformGroup()getTransformGroup- Returns:
- a
TransformGroup
object.
-
getWater
getWater- Returns:
- a
List
object.
-
getWireFrame
public org.jogamp.java3d.Node getWireFrame()getWireFrame- Returns:
- a
Node
object.
-
isVisible
public boolean isVisible()isVisible- Returns:
- a boolean.
-
loadVRML
public org.jogamp.java3d.BranchGroup loadVRML()loadVRML- Returns:
- a
BranchGroup
object.
-
moveAllIntoUnitCell
public void moveAllIntoUnitCell()Moves the center of all chemical entities into the primary unit cell. Somewhat experimental feature; use with caution. -
moveCenter
public void moveCenter(double[] d) moveCenter- Parameters:
d
- an array of double.
-
moveToFractionalCoordinates
public void moveToFractionalCoordinates()Move to fractional coordinates. -
rotateAbout
public void rotateAbout(org.jogamp.vecmath.Vector3d v) Rotate about a point in given in the System's Local Coordinates- Parameters:
v
- Vector3d
-
sceneGraphChange
sceneGraphChange- Parameters:
newShapes
- aList
object.
-
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 classMSGroup
- Parameters:
newColorModel
- aRendererCache.ColorModel
object.color
- aColor3f
object.mat
- aMaterial
object.
-
setPotential
setPotential- Parameters:
potentialEnergy
- aForceFieldEnergy
object.
-
setView
public void setView(RendererCache.ViewModel newViewModel, List<org.jogamp.java3d.BranchGroup> newShapes) setView -
setWireWidth
public void setWireWidth(float f) setWireWidth- Parameters:
f
- a float.
-
removeLeaves
protected void removeLeaves()removeLeaves- Overrides:
removeLeaves
in classMSGroup
-