Class ResidueState

java.lang.Object
ffx.potential.bonded.ResidueState

public class ResidueState extends Object
The ResidueState class encodes the current chemical and coordinate state of a Residue, particularly a MultiResidue, for ease of reverting coordinates. Should not be too difficult to get it to also store velocities, etc.
Since:
1.0
Author:
Michael J. Schnieders, Jacob M. Litman
  • Constructor Details

    • ResidueState

      public ResidueState(Residue parent, Residue residue)
      Constructor for ResidueState.
      Parameters:
      parent - a Residue object.
      residue - a Residue object.
    • ResidueState

      public ResidueState(Residue residue)
      Constructor for ResidueState.
      Parameters:
      residue - a Residue object.
  • Method Details

    • revertAllCoordinates

      public static void revertAllCoordinates(List<Residue> residueList, ResidueState[] states)
      revertAllCoordinates.
      Parameters:
      residueList - a List object.
      states - an array of ResidueState objects.
    • revertAtomicCoordinates

      public static void revertAtomicCoordinates(Atom[] atoms, double[][] coords)
      Uses a double[nAtoms][3] to revert the coordinates of an array of atoms. Does not check to see if the arrays are properly ordered; make sure you are using the correct arrays.
      Parameters:
      atoms - To revert coordinates of
      coords - Coordinates
    • storeAllCoordinates

      public static ResidueState[] storeAllCoordinates(List<Residue> residueList)
      storeAllCoordinates.
      Parameters:
      residueList - a List object.
      Returns:
      an array of ResidueState objects.
    • storeAllCoordinates

      public static ResidueState[] storeAllCoordinates(Residue[] residues)
      storeAllCoordinates.
      Parameters:
      residues - an array of Residue objects.
      Returns:
      an array of ResidueState objects.
    • storeAtomicCoordinates

      public static double[][] storeAtomicCoordinates(Atom[] atoms)
      Returns a new double[nAtoms][3] with the coordinates of an array of atoms.
      Parameters:
      atoms - To store coordinates of
      Returns:
      Coordinates
    • compareTo

      public double compareTo(ResidueState residueState)
    • getAtoms

      public Atom[] getAtoms()
      Getter for the field atoms.
      Returns:
      an array of Atom objects.
    • getParent

      public Residue getParent()
      Getter for the field parent.
      Returns:
      a Residue object.
    • toString

      public String toString()
      Overrides:
      toString in class Object