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
Nested Classes -
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
ConstructorsConstructorDescriptionMolecularAssembly(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 TypeMethodDescriptionvoidaddHeaderLine(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 MSGroupvoidapplyRandomDensity(double ucDensity) Applies a randomly drawn density to a molecular system's crystal.voidapplyRandomSymOp(double x) Randomizes position in the unit cell of each molecule by applying a Cartesian SymOp with a random translation.voidcenter()centervoidcenterAt(double[] d) centerAtvoidcenterView(boolean rot, boolean trans) centerViewvoidCompute fractional coordinates.voidcreateBoxvoiddeleteMolecule(Molecule molecule) deleteMoleculebooleandestroy()destroyvoiddetach()detachvoidfinalize(boolean finalizeGroups, ForceField forceField) Abstract method that should specify how to finalize a MSGroupfindAtomintCount 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.BranchGroupGetter for the fieldbranchGroup.getChainString[]getChainNamesPolymer[]getChainsdoublegetCharge(boolean alwaysLog) Sums up charge of the system, checking nonstandard residues for non-unitary charges.getCrystalintGetter for the fieldcurrentCycle.intGetter for the fieldcycles.doublegetExtentgetFile()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.doublegetMass()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.Vector3dGetter for the fieldoffset.org.jogamp.java3d.TransformGroupGetter for the fieldoriginToRot.getParallelTeam.getPolymer(Character chainID, String segID, boolean create) getPolymerGetter for the fieldpotentialEnergy.org.apache.commons.configuration2.CompositeConfigurationGetter for the fieldproperties.getResidueListorg.jogamp.java3d.TransformGroupgetTransformGroupgetWater()getWaterorg.jogamp.java3d.NodegetWireFramebooleanisVisibleorg.jogamp.java3d.BranchGrouploadVRML()loadVRMLvoidMoves the center of all chemical entities into the primary unit cell.voidmoveCenter(double[] d) moveCentervoidMove to fractional coordinates.protected voidremoveLeavesvoidrotateAbout(org.jogamp.vecmath.Vector3d v) Rotate about a point in given in the System's Local CoordinatesvoidsceneGraphChange(List<org.jogamp.java3d.BranchGroup> newShapes) sceneGraphChangevoidsetAlternateLocation(Character alternateLocation) Set the alternate location.voidsetArchiveFile(File archiveFile) Set the File for writing out an archive.voidsetChainIDAndRenumberMolecules(Character chainID) This method sets all HETATM molecules, including water and ions, to use the given chainID and then renumbers the molecules.voidsetColor(RendererCache.ColorModel newColorModel, org.jogamp.vecmath.Color3f color, org.jogamp.java3d.Material mat) setColorvoidsetCrystal(Crystal crystal) Set the Crystal for the Potential of this MolecularAssembly.voidsetCurrentCycle(int c) Setter for the fieldcurrentCycle.voidsetCycles(int c) Setter for the fieldcycles.voidSetter for the fieldfile.voidsetForceField(ForceField forceField) Setter for the fieldforceField.voidSetter for the fieldfractionalMode.voidsetOffset(org.jogamp.vecmath.Vector3d o) Setter for the fieldoffset.voidsetPotential(ForceFieldEnergy potentialEnergy) setPotentialvoidsetView(RendererCache.ViewModel newViewModel, List<org.jogamp.java3d.BranchGroup> newShapes) setViewvoidsetWireWidth(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, updateBondsMethods 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, 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
-
forceField
-
-
Constructor Details
-
MolecularAssembly
Constructor for MolecularAssembly.- Parameters:
name- aStringobject.
-
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- aMoleculeobject.
-
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
Atomobjects.
-
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
Atomobjects.
-
getAtomFromWireVertex
getAtomFromWireVertex- Parameters:
i- a int.- Returns:
- a
Atomobject.
-
getBackBoneAtoms
getBackBoneAtoms- Returns:
- a
Listobject.
-
getBranchGroup
public org.jogamp.java3d.BranchGroup getBranchGroup()Getter for the fieldbranchGroup.- Returns:
- a
BranchGroupobject.
-
getChain
getChain -
getChainNames
getChainNames- Returns:
- an array of
Stringobjects.
-
getChains
getChains- Returns:
- an array of
Polymerobjects.
-
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
Crystalobject.
-
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
Fileobject.
-
setFile
Setter for the fieldfile.- Parameters:
file- aFileobject.
-
getArchiveFile
Getter for the fieldarchiveFile.- Returns:
- a
Fileobject.
-
setArchiveFile
Set the File for writing out an archive.- Parameters:
archiveFile- The archive file.
-
getForceField
Getter for the fieldforceField.- Returns:
- a
ForceFieldobject.
-
setForceField
Setter for the fieldforceField.- Parameters:
forceField- aForceFieldobject.
-
getFractionalMode
Getter for the fieldfractionalMode.- Returns:
- a
MolecularAssembly.FractionalModeobject.
-
setFractionalMode
Setter for the fieldfractionalMode.- Parameters:
mode- aMolecularAssembly.FractionalModeobject.
-
getHeaderLines
Gets the header lines associated with this MolecularAssembly (particularly for PDB)- Returns:
- Header lines.
-
getIons
Getter for the fieldions.- Returns:
- a
Listobject.
-
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
Listobject.
-
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
Listobject.
-
getOffset
public org.jogamp.vecmath.Vector3d getOffset()Getter for the fieldoffset.- Returns:
- a
Vector3dobject.
-
setOffset
public void setOffset(org.jogamp.vecmath.Vector3d o) Setter for the fieldoffset.- Parameters:
o- aVector3dobject.
-
getOriginToRot
public org.jogamp.java3d.TransformGroup getOriginToRot()Getter for the fieldoriginToRot.- Returns:
- a
TransformGroupobject.
-
getParallelTeam
getParallelTeam.- Returns:
- a
ParallelTeamobject.
-
getPolymer
getPolymer -
getPotentialEnergy
Getter for the fieldpotentialEnergy.- Returns:
- a
ForceFieldEnergyobject.
-
getProperties
public org.apache.commons.configuration2.CompositeConfiguration getProperties()Getter for the fieldproperties.- Returns:
- a
CompositeConfigurationobject.
-
getResidueList
getResidueList- Returns:
- a
Listobject.
-
getTransformGroup
public org.jogamp.java3d.TransformGroup getTransformGroup()getTransformGroup- Returns:
- a
TransformGroupobject.
-
getWater
getWater- Returns:
- a
Listobject.
-
getWireFrame
public org.jogamp.java3d.Node getWireFrame()getWireFrame- Returns:
- a
Nodeobject.
-
isVisible
public boolean isVisible()isVisible- Returns:
- a boolean.
-
loadVRML
public org.jogamp.java3d.BranchGroup loadVRML()loadVRML- Returns:
- a
BranchGroupobject.
-
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- aListobject.
-
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.
-
setPotential
setPotential- Parameters:
potentialEnergy- aForceFieldEnergyobject.
-
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:
removeLeavesin classMSGroup
-