Class Polymer

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

public class Polymer extends MSGroup
The Polymer class encapsulates a peptide or nucleotide chain.
Since:
1.0
Author:
Michael J. Schnieders
See Also:
  • Field Details

  • Constructor Details

    • Polymer

      public Polymer(Character chainID, String segID)
      Polymer constructor.
      Parameters:
      chainID - Possibly redundant PDB chainID.
      segID - Unique identifier from A-Z,0-9, then 1A-1Z,10-19, etc.
    • Polymer

      public Polymer(Character chainID, String segID, boolean link)
      Polymer constructor.
      Parameters:
      chainID - Possibly redundant PDB chainID.
      segID - Unique identifier from A-Z,0-9, then 1A-1Z,10-19, etc.
      link - a boolean.
    • Polymer

      public Polymer(Character chainID, String segID, MSNode residues)
      Polymer Constructor.
      Parameters:
      chainID - a Character object.
      segID - A unique identifier from A-Z,0-9, then 1A-1Z,10-19, etc.
      residues - Represents a MSNode where the Polymer's residues have been attached.
  • Method Details

    • addMSNode

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

      A generic method for adding a MSNode to the Polymer.

      Specified by:
      addMSNode in class MSGroup
      Parameters:
      msNode - a MSNode object.
      Returns:
      a MSNode object.
    • setChainID

      public void setChainID(Character chainID)
      Set the Polymer chainID. The residues that form the polymer are also updated.
      Parameters:
      chainID - The chainID to use.
    • setSegID

      public void setSegID(String segID)
      Set the Polymer segID. The residues that form the polymer are also updated.
      Parameters:
      segID - The segID to use.
    • addMultiResidue

      public void addMultiResidue(MultiResidue multiResidue)
      addMultiResidue.
      Parameters:
      multiResidue - a MultiResidue object.
    • createJoint

      public Joint createJoint(Residue residue1, Residue residue2, ForceField forceField)

      Joiner joins Moieties m1 and m2 and returns the Geometry objects formed in a Joint.

    • equals

      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.

      Overridden equals method.

      Overrides:
      equals in class MSNode
    • finalize

      public void finalize(boolean finalizeGroups, ForceField forceField)
      Abstract method that should specify how to finalize a MSGroup

      Finalize should be called after all the Residues have been added to the Polymer. This method in turn calls the Finalize method of each Residue, then forms Joints between adjacent Residues in the Polymer

      Specified by:
      finalize in class MSGroup
      Parameters:
      finalizeGroups - a boolean.
      forceField - the ForceField parameters to use when finalizing the MSGroup.
    • getChainID

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

      public Residue getFirstResidue()
      getFirstResidue
      Returns:
      a Residue object.
    • getLink

      public boolean getLink()
      Getter for the field link.
      Returns:
      a boolean.
    • setLink

      public void setLink(boolean link)
      Setter for the field link.
      Parameters:
      link - a boolean.
    • getPhiPsiList

      public List<List<Torsion>> getPhiPsiList()
      Get lists of the phi and psi torsions.
      Returns:
      A List of Dihedral objects representing the Phi/Psi angles of the Polymer.
    • getResidue

      public Residue getResidue(int resNum)
      getResidue
      Parameters:
      resNum - The residue number.
      Returns:
      a Residue object.
    • getResidue

      public Residue getResidue(String resName, int resNum, boolean create)
      getResidue
      Parameters:
      resName - a String object.
      resNum - The residue number.
      create - a boolean.
      Returns:
      a Residue object.
    • getResidue

      public Residue getResidue(String resName, int resNum, boolean create, Residue.ResidueType defaultRT)
      getResidue
      Parameters:
      resName - The residue name.
      resNum - The residue number.
      create - If true, create the residue if it does not exist.
      defaultRT - Default ResidueType if it cannot be assigned.
      Returns:
      a Residue object.
    • getResidues

      public List<Residue> getResidues()
      getResidues
      Returns:
      a List object.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class MSNode
    • 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 MSGroup
      Parameters:
      newColorModel - a RendererCache.ColorModel object.
      color - a Color3f object.
      mat - a Material 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 MSGroup
      Parameters:
      newViewModel - a RendererCache.ViewModel object.
      newShapes - a List object.