Class MSNode

All Implemented Interfaces:
ROLS, Serializable, Cloneable, MutableTreeNode, TreeNode
Direct Known Subclasses:
Atom, BondedTerm, Joint, MSGroup, MSRoot, ROLSP

public class MSNode extends DefaultMutableTreeNode implements ROLS
The MSNode class forms the basic unit that all data classes extend.
Since:
1.0
Author:
Michael J. Schnieders
See Also:
  • Field Details Link icon

    • selected Link icon

      protected boolean selected
      True if this node is selected.
  • Constructor Details Link icon

    • MSNode Link icon

      public MSNode()
      Default MSNode Constructor
    • MSNode Link icon

      public MSNode(String n)
      Constructs a MSNode with the name n.
      Parameters:
      n - a String object.
    • MSNode Link icon

      public MSNode(String n, int multiScaleLevel)
      Constructor for MSNode.
      Parameters:
      n - a String object.
      multiScaleLevel - The multiscale level of this node.
  • Method Details Link icon

    • contains Link icon

      public MSNode contains(MSNode msNode)
      If this MSNode or any MSNode below it equals the argument, that MSNode is returned.
      Parameters:
      msNode - a MSNode object.
      Returns:
      a MSNode object.
    • destroy Link icon

      public boolean destroy()
      destroy
      Returns:
      a boolean.
    • drawLabel Link icon

      public void drawLabel(org.jogamp.java3d.Canvas3D graphics, org.jogamp.java3d.J3DGraphics2D g2d, org.jogamp.java3d.Node node)
      drawLabel
      Specified by:
      drawLabel in interface ROLS
      Parameters:
      graphics - a Canvas3D object.
      g2d - a J3DGraphics2D object.
      node - a Node object.
    • equals Link icon

      public boolean equals(Object o)

      MSNode equality := same class and same name. Consider replacing with a Comparator<MSNode> for cases where non-reference equality is desired.

      Overrides:
      equals in class Object
    • getAngleList Link icon

      public List<Angle> getAngleList()
      Returns a List of all Angles below the present MSNode.
      Returns:
      a List object.
    • getAngleTorsionList Link icon

      public List<AngleTorsion> getAngleTorsionList()
      Returns a List of all AngleTorsions below the present MSNode.
      Returns:
      a List object.
    • getAtomList Link icon

      public List<Atom> getAtomList()
      Returns a List of all Atoms below the present MSNode.
      Returns:
      a new List object.
    • getAtomList Link icon

      public List<Atom> getAtomList(boolean originalOrder)
      getAtomList.
      Parameters:
      originalOrder - a boolean.
      Returns:
      a List object.
    • getBondList Link icon

      public List<Bond> getBondList()
      Returns a List of all Bonds below the present MSNode.
      Returns:
      a List object.
    • getCenter Link icon

      public double[] getCenter(boolean w)
      getCenter
      Specified by:
      getCenter in interface ROLS
      Parameters:
      w - a boolean.
      Returns:
      an array of double.
    • getChildList Link icon

      public List<MSNode> getChildList()
      Returns a List of the MSNode's Children (instead of using an Enumeration).
      Returns:
      a List object.
    • getExtent Link icon

      public double getExtent()
      getExtent
      Returns:
      a double.
    • getImproperTorsionList Link icon

      public List<ImproperTorsion> getImproperTorsionList()
      Returns a List of all ImproperTorsions below the present MSNode.
      Returns:
      a List object.
    • getList Link icon

      public <T extends TreeNode> List<T> getList(Class<T> c)
    • getList Link icon

      public <T extends TreeNode> List<T> getList(Class<T> c, List<T> nodes)
      getList
      Specified by:
      getList in interface ROLS
      Type Parameters:
      T - Node Type to collect.
      Parameters:
      c - a Class object.
      nodes - a List object.
      Returns:
      a List object.
    • getMSCount Link icon

      public <T extends TreeNode> long getMSCount(Class<T> c, long count)
      getMSCount
      Specified by:
      getMSCount in interface ROLS
      Type Parameters:
      T - Node Type to count.
      Parameters:
      c - a Class object.
      count - a long.
      Returns:
      a long.
    • getMSNode Link icon

      public <T extends TreeNode> T getMSNode(Class<T> c)
      getMSNode
      Specified by:
      getMSNode in interface ROLS
      Type Parameters:
      T - Node Type to look for.
      Parameters:
      c - a Class object.
      Returns:
      The node.
    • getMW Link icon

      public double getMW()
      getMW
      Specified by:
      getMW in interface ROLS
      Returns:
      a double.
    • getName Link icon

      public String getName()
      Returns the name of this MSNode.
      Returns:
      a String object.
    • setName Link icon

      public void setName(String n)
      Sets the name of this NodeObject to n.
      Parameters:
      n - a String object.
    • getOutOfPlaneBendList Link icon

      public List<OutOfPlaneBend> getOutOfPlaneBendList()
      Returns a List of all Out-of-Plane Bends below the present MSNode.
      Returns:
      a List object.
    • getPiOrbitalTorsionList Link icon

      public List<PiOrbitalTorsion> getPiOrbitalTorsionList()
      Returns a List of all Pi-Orbital Torsions below the present MSNode.
      Returns:
      a List object.
    • getStretchBendList Link icon

      public List<StretchBend> getStretchBendList()
      Returns a List of all Stretch-Bends below the present MSNode.
      Returns:
      a List object.
    • getStretchTorsionList Link icon

      public List<StretchTorsion> getStretchTorsionList()
      Returns a List of all StretchTorsions below the present MSNode.
      Returns:
      a List object.
    • getTorsionList Link icon

      public List<Torsion> getTorsionList()
      Returns a List of all Torsions below the present MSNode.
      Returns:
      a List object.
    • getTorsionTorsionList Link icon

      public List<TorsionTorsion> getTorsionTorsionList()
      Returns a List of all Torsion-Torsions below the present MSNode.
      Returns:
      a List object.
    • getTotalMass Link icon

      public double getTotalMass()
      Returns the total mass of all atoms in the MolecularAssembly, calculating the mass if it has not already been done, defaulting to simple addition.
      Returns:
      Total mass of atoms in system.
    • getUreyBradleyList Link icon

      public List<UreyBradley> getUreyBradleyList()
      Returns a List of all Urey-Bradleys below the present MSNode.
      Returns:
      a List object.
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isSelected Link icon

      public boolean isSelected()
      isSelected
      Returns:
      a boolean.
    • setSelected Link icon

      public void setSelected(boolean b)
      Setter for the field selected.
      Parameters:
      b - a boolean.
    • print Link icon

      public void print()
      Prints the MSNode's name
    • removeChild Link icon

      public void removeChild(MSNode child)
      removeChild.
      Parameters:
      child - a MSNode object.
    • setColor Link icon

      public void setColor(RendererCache.ColorModel colorModel, org.jogamp.vecmath.Color3f color, org.jogamp.java3d.Material mat)
      setColor
      Specified by:
      setColor in interface ROLS
      Parameters:
      colorModel - a RendererCache.ColorModel object.
      color - a Color3f object.
      mat - a Material object.
    • setView Link icon

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

      public String toString()

      Overridden toString method returns the MSNode's name

      Overrides:
      toString in class DefaultMutableTreeNode
    • update Link icon

      public void update()
      update
      Specified by:
      update in interface ROLS