Class MSGroup

All Implemented Interfaces:
ROLS, Serializable, Cloneable, MutableTreeNode, TreeNode
Direct Known Subclasses:
MolecularAssembly, Molecule, Polymer, Residue

public abstract class MSGroup extends MSNode
The MSGroup class has one sub-node containing atoms, and one that contains molecular mechanics/geometry terms.
Since:
1.0
Author:
Michael J. Schnieders
See Also:
  • Field Details

    • bondTime

      protected static long bondTime
      Constant bondTime=0
    • angleTime

      protected static long angleTime
      Constant angleTime=0
    • stretchBendTime

      protected static long stretchBendTime
      Constant stretchBendTime=0
    • ureyBradleyTime

      protected static long ureyBradleyTime
      Constant ureyBradleyTime=0
    • outOfPlaneBendTime

      protected static long outOfPlaneBendTime
      Constant outOfPlaneBendTime=0
    • torsionTime

      protected static long torsionTime
      Constant torsionTime=0
    • stretchTorsionTime

      protected static long stretchTorsionTime
      Constant stretchTorsionTime=0
    • angleTorsionTime

      protected static long angleTorsionTime
      Constant angleTorsionTime=0
    • piOrbitalTorsionTime

      protected static long piOrbitalTorsionTime
      Constant piOrbitalTorsionTime=0
    • torsionTorsionTime

      protected static long torsionTorsionTime
      Constant torsionTorsionTime=0
    • improperTorsionTime

      protected static long improperTorsionTime
      Constant torsionTorsionTime=0
  • Constructor Details

    • MSGroup

      public MSGroup()
      Default Constructor initializes a MultiScaleGroup and a few of its sub-nodes.
    • MSGroup

      public MSGroup(String n)
      Constructs a MultiScaleGroup object with name n.
      Parameters:
      n - a String object.
    • MSGroup

      public MSGroup(String n, MSNode node)
      Constructs a MultiScaleGroup object with name n and sets its AtomGroup node equals to node.
      Parameters:
      n - a String object.
      node - a MSNode object.
  • Method Details

    • addMSNode

      public abstract MSNode addMSNode(MSNode m)
      Abstract method that should specify how to add various MSNodes subclasses (such as Atoms, Residues and Polymers) to the MSGroup
      Parameters:
      m - a MSNode object.
      Returns:
      a MSNode object.
    • assignBondedTerms

      public void assignBondedTerms(ForceField forceField)
      assignBondedTerms
      Parameters:
      forceField - the ForceField to use when creating bonded terms.
    • createJoint

      public Joint createJoint(Bond bond, MSGroup group1, MSGroup group2, ForceField forceField)
      Create a joint between two chemical groups.
      Parameters:
      bond - Bond
      group1 - a MSGroup object.
      group2 - a MSGroup object.
      forceField - the ForceField parameters to use when creating the joint.
      Returns:
      Joint the created Joint.
    • createJoint

      public Joint createJoint(MSGroup group1, MSGroup group2, ForceField forceField)
      Joiner joins Moieties m1 and m2 and returns the Geometry objects formed in a Joint.
      Parameters:
      group1 - a MSGroup object.
      group2 - a MSGroup object.
      forceField - the ForceField parameters to use when creating the joint.
      Returns:
      a Joint object.
    • finalize

      public abstract void finalize(boolean finalizeGroups, ForceField forceField)
      Abstract method that should specify how to finalize a MSGroup
      Parameters:
      finalizeGroups - a boolean.
      forceField - the ForceField parameters to use when finalizing the MSGroup.
    • findDangelingAtoms

      public void findDangelingAtoms()
      This method constructs a List of atoms which are under-constrained. (i.e. They can except more bonds)
    • getAngles

      public MSNode getAngles()
      Returns the MultiScaleGroup's angles FNode.
      Returns:
      a MSNode object.
    • setAngles

      public void setAngles(MSNode t)
      Sets the Angles node to t.
      Parameters:
      t - a MSNode object.
    • getAtomByName

      public Atom getAtomByName(String n, boolean caseInsensitive)
      getAtomByName.
      Parameters:
      n - a String object.
      caseInsensitive - a boolean.
      Returns:
      a Atom object.
    • getAtomNode

      public MSNode getAtomNode()
      Returns the AtomNode.
      Returns:
      a MSNode object.
    • setAtomNode

      public void setAtomNode(MSNode t)
      Sets the Moieties node to t.
      Parameters:
      t - a MSNode object.
    • getAtomNode

      public MSNode getAtomNode(int index)
      Returns the MSNode at the given index.
      Parameters:
      index - The index of the AtomNode to return.
      Returns:
      a MSNode object.
    • getAtomNode

      public MSNode getAtomNode(String n)
      Returns the AtomNode specified by the String n.
      Parameters:
      n - a String object.
      Returns:
      a MSNode object.
    • getAtomNodeList

      public List<MSNode> getAtomNodeList()
      Returns a List of the AtomNode's children.
      Returns:
      a List object.
    • getBond

      public Bond getBond(int index)
      Returns the Bond at the supplied index.
      Parameters:
      index - The index of the Bond to return.
      Returns:
      a Bond object.
    • getBond

      public Bond getBond(String id)
      Returns the Bond with the given id.
      Parameters:
      id - a String object.
      Returns:
      a Bond object.
    • getBonds

      public MSNode getBonds()
      Returns the MultiScaleGroup's bonds FNode.
      Returns:
      a MSNode object.
    • setBonds

      public void setBonds(MSNode t)
      Sets the Bonds node to t.
      Parameters:
      t - a MSNode object.
    • getCenter

      public double[] getCenter()
      Returns the MultiScaleGroup's center as a double[3].
      Returns:
      an array of double.
    • setCenter

      public void setCenter(double[] d)
      Set the value of Center to d.
      Parameters:
      d - an array of double.
    • getDanglingAtoms

      public List<Atom> getDanglingAtoms()
      Returns the MultiScaleGroup's dangling Atoms list.
      Returns:
      a List object.
    • setDanglingAtoms

      public void setDanglingAtoms(List<Atom> a)
      Sets the MultiScaleGroup's danglingAtoms member to a.
      Parameters:
      a - a List object.
    • 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].
      Parameters:
      w - a boolean.
      Returns:
      an array of double.
    • getTermNode

      public MSNode getTermNode()
      Returns the MultiScaleGroup's terms FNode.
      Returns:
      a MSNode object.
    • getTorsions

      public MSNode getTorsions()
      Returns the MultiScaleGroup's Torsion MSNode.
      Returns:
      a MSNode object.
    • setTorsions

      public void setTorsions(MSNode t)
      Sets the MultiScaleGroup's torsion node to t.
      Parameters:
      t - a MSNode object.
    • isFinalized

      public boolean isFinalized()
      Returns true if the MultiScaleGroup is finalized.
      Returns:
      a boolean.
    • setFinalized

      public void setFinalized(boolean t)
      Specifies whether the MultiScaleGroup has been finalized.
      Parameters:
      t - a boolean.
    • print

      public void print()
      Prints the MSNode's name

      Prints the MultiScaleGroup's Atoms and Bonds.

      Overrides:
      print in class MSNode
    • reOrderAtoms

      public void reOrderAtoms()
      reOrderAtoms
    • setAngleTorsions

      public void setAngleTorsions(MSNode t)
      Sets the MultiScaleGroup's angle-torsion node to t.
      Parameters:
      t - a MSNode object.
    • setColor

      public void setColor(RendererCache.ColorModel newColorModel, org.jogamp.vecmath.Color3f color, org.jogamp.java3d.Material mat)
      setColor
      Specified by:
      setColor in interface ROLS
      Overrides:
      setColor in class MSNode
      Parameters:
      newColorModel - a RendererCache.ColorModel object.
      color - a Color3f object.
      mat - a Material object.
    • setImproperTorsions

      public void setImproperTorsions(MSNode t)
      Sets the ImproperTorsion node to t.
      Parameters:
      t - a MSNode object.
    • setOutOfPlaneBends

      public void setOutOfPlaneBends(MSNode t)
      Sets the Out-of-Plane Bend node to t.
      Parameters:
      t - a MSNode object.
    • setPiOrbitalTorsions

      public void setPiOrbitalTorsions(MSNode t)
      Sets the MultiScaleGroup's Pi-Orbital Torsion node to t.
      Parameters:
      t - a MSNode object.
    • setStretchBends

      public void setStretchBends(MSNode t)
      Sets the Stretch-Bends node to t.
      Parameters:
      t - a MSNode object.
    • setStretchTorsions

      public void setStretchTorsions(MSNode t)
      Sets the MultiScaleGroup's stretch-torsion node to t.
      Parameters:
      t - a MSNode object.
    • setTerms

      public void setTerms(MSNode t)
      Sets the MultiScaleGroup's terms node to t.
      Parameters:
      t - a MSNode object.
    • setTorsionTorsions

      public void setTorsionTorsions(MSNode t)
      Sets the MultiScaleGroup's Torsion-Torsion node to t.
      Parameters:
      t - a MSNode object.
    • setUreyBradleys

      public void setUreyBradleys(MSNode t)
      Sets the Urey-Bradley node to t.
      Parameters:
      t - a MSNode object.
    • setView

      public void setView(RendererCache.ViewModel newViewModel, List<org.jogamp.java3d.BranchGroup> newShapes)
      setView
      Specified by:
      setView in interface ROLS
      Overrides:
      setView in class MSNode
      Parameters:
      newViewModel - a RendererCache.ViewModel object.
      newShapes - a List object.
    • toString

      public String toString()

      Overridden toString method returns the MSNode's name

      Returns the MSGroup's name.

      Overrides:
      toString in class MSNode
    • update

      public void update()
      update
      Specified by:
      update in interface ROLS
      Overrides:
      update in class MSNode
    • updateAtoms

      public void updateAtoms()
      updateAtoms
    • updateBonds

      public void updateBonds()
      updateBonds
    • removeLeaves

      protected void removeLeaves()
      removeLeaves