Class RestrainPositionPotentialEnergy

java.lang.Object
ffx.potential.terms.EnergyTerm
ffx.potential.terms.RestrainPositionPotentialEnergy

public class RestrainPositionPotentialEnergy extends EnergyTerm
Restrain-Position potential energy term using RestrainPosition instances.
Since:
1.0
Author:
Michael J. Schnieders
  • Constructor Details

    • RestrainPositionPotentialEnergy

      public RestrainPositionPotentialEnergy(String name)
      Create a RestrainPositionPotentialEnergy with the provided name.
      Parameters:
      name - Name for this term.
    • RestrainPositionPotentialEnergy

      public RestrainPositionPotentialEnergy(String name, int forceGroup)
      Create a RestrainPositionPotentialEnergy with the provided name and force group.
      Parameters:
      name - Name for this term.
      forceGroup - Integer force group identifier.
    • RestrainPositionPotentialEnergy

      public RestrainPositionPotentialEnergy(String name, int forceGroup, List<RestrainPosition> restrainPositions)
      Create a RestrainPositionPotentialEnergy initialized with a list of terms and force group.
      Parameters:
      name - Name for this term.
      forceGroup - Force group identifier.
      restrainPositions - List of RestrainPosition instances (null-safe).
    • RestrainPositionPotentialEnergy

      public RestrainPositionPotentialEnergy(String name, Collection<RestrainPosition> restrainPositions)
      Create a RestrainPositionPotentialEnergy initialized with a collection of terms.
      Parameters:
      name - Name for this term (may be null).
      restrainPositions - Collection of RestrainPosition instances to add (null-safe).
  • Method Details

    • getNumberOfTerms

      public int getNumberOfTerms()
      Get the number of BondedTerms in this term.
      Specified by:
      getNumberOfTerms in class EnergyTerm
      Returns:
      The number of BondedTerms.
    • getBondedTermsArray

      public BondedTerm[] getBondedTermsArray()
      Get an array of BondedTerms in this term.
      Specified by:
      getBondedTermsArray in class EnergyTerm
      Returns:
      Array of BondedTerms.
    • addRestrainPosition

      public boolean addRestrainPosition(RestrainPosition restrainPosition)
      Add a RestrainPosition to this term.
      Parameters:
      restrainPosition - RestrainPosition to add (ignored if null).
      Returns:
      true if it was added.
    • addRestrainPositions

      public boolean addRestrainPositions(RestrainPosition[] restrainPositions)
      Add an array of RestrainPositions to this term.
      Parameters:
      restrainPositions - Array of RestrainPosition instances to add.
      Returns:
      true if they were added.
    • addRestrainPositions

      public boolean addRestrainPositions(List<RestrainPosition> restrainPositions)
      Add a list of RestrainPositions to this term.
      Parameters:
      restrainPositions - List of RestrainPosition instances to add.
      Returns:
      true if they were added.
    • removeRestrainPosition

      public boolean removeRestrainPosition(RestrainPosition restrainPosition)
      Remove a RestrainPosition from this term.
      Parameters:
      restrainPosition - RestrainPosition to remove (ignored if null).
      Returns:
      true if it was present and removed.
    • getRestrainPosition

      public RestrainPosition getRestrainPosition(int index)
      Get the RestrainPosition at a given index.
      Parameters:
      index - Index in the internal list.
      Returns:
      RestrainPosition at the specified index.
      Throws:
      IndexOutOfBoundsException - if index is invalid.
    • getRestrainPositions

      public List<RestrainPosition> getRestrainPositions()
      Get an unmodifiable view of the RestrainPositions in this term.
      Returns:
      Unmodifiable List of RestrainPositions.
    • getRestrainPositionArray

      public RestrainPosition[] getRestrainPositionArray()
      Get an array of RestrainPositions in this term.
      Returns:
      Array of RestrainPositions.
    • getNumberOfRestrainPositions

      public int getNumberOfRestrainPositions()
      Get the number of RestrainPositions in this term.
      Returns:
      The number of RestrainPositions.
    • getRestrainPositionEnergyString

      public static String getRestrainPositionEnergyString()
      Get the mathematical form of the Restrain Position interaction.
      Returns:
      The mathematical form of the Restrain Position interaction.
    • log

      public void log()
      Log the details of Restrain Position interactions.
      Specified by:
      log in class EnergyTerm
    • toPDBString

      public String toPDBString()
      Description copied from class: EnergyTerm
      Get a PDB-style REMARK representation of this energy term.
      Specified by:
      toPDBString in class EnergyTerm
      Returns:
      A PDB REMARK string for this energy term.
    • toString

      public String toString()
      Description copied from class: EnergyTerm
      Get a string representation of this energy term.
      Specified by:
      toString in class EnergyTerm
      Returns:
      A string representation of the energy term.