Class Molecule

All Implemented Interfaces:
ROLS, Serializable, Cloneable, MutableTreeNode, TreeNode

public class Molecule extends MSGroup
The Molecule class is a general container used for simple compounds or in cases where more specialized classes have not been implemented.
Since:
1.0
Author:
Michael J. Schnieders
See Also:
  • Constructor Details

    • Molecule

      public Molecule(String name)
      Constructor for Molecule.
      Parameters:
      name - a String object.
    • Molecule

      public Molecule(String name, int residueNum, Character chainID, String segID)
      Constructor for Molecule.
      Parameters:
      name - a String object.
      residueNum - The residue number.
      chainID - a Character object.
      segID - a String object.
  • Method Details

    • setChainID

      public void setChainID(Character c)
      Setter for the field chainID.
      Parameters:
      c - a Character object.
    • setResidueNum

      public void setResidueNum(int residueNum)
      Setter for the field residueNum.
      Parameters:
      residueNum - The molecule number.
    • addMSNode

      public MSNode addMSNode(MSNode o)
      Abstract method that should specify how to add various MSNodes subclasses (such as Atoms, Residues and Polymers) to the MSGroup

      Allows adding Atom MSNodes to the Molecule.

      Specified by:
      addMSNode in class MSGroup
      Parameters:
      o - a MSNode object.
      Returns:
      a MSNode object.
    • equals

      public boolean equals(Object o)
      Description copied from class: MSNode

      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 MSNode
    • finalize

      public void finalize(boolean finalizeGeometry, ForceField forceField)
      Abstract method that should specify how to finalize a MSGroup
      Specified by:
      finalize in class MSGroup
      Parameters:
      finalizeGeometry - a boolean.
      forceField - the ForceField parameters to use when finalizing the MSGroup.
    • getAtom

      public Atom getAtom(String name)
      getAtom
      Parameters:
      name - a String object.
      Returns:
      a Atom object.
    • getChainID

      public Character getChainID()
      Getter for the field chainID.
      Returns:
      a Character object.
    • getKey

      public String getKey()
    • getResidueName

      public String getResidueName()
      Getter for the field residueName.
      Returns:
      a String object.
    • getResidueNumber

      public int getResidueNumber()
      getResidueNumber
      Returns:
      The residue number.
    • getSegID

      public String getSegID()
      Getter for the field segID.
      Returns:
      a String object.
    • hashCode

      public int hashCode()
      Description copied from class: MSNode
      Overrides:
      hashCode in class MSNode
    • setName

      public void setName(String name)
      Sets the name of this NodeObject to n.
      Overrides:
      setName in class MSNode
      Parameters:
      name - a String object.