Class ImproperTorsionPotentialEnergy

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

public class ImproperTorsionPotentialEnergy extends EnergyTerm
Improper Torsion potential energy term using ImproperTorsion instances.
  • Constructor Details

    • ImproperTorsionPotentialEnergy

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

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

      public ImproperTorsionPotentialEnergy(String name, int forceGroup, List<ImproperTorsion> improperTorsions)
      Create an ImproperTorsionPotentialEnergy initialized with a list of terms and force group.
      Parameters:
      name - Name for this term.
      forceGroup - Force group identifier.
      improperTorsions - List of ImproperTorsion instances to add (null-safe).
    • ImproperTorsionPotentialEnergy

      public ImproperTorsionPotentialEnergy(String name, Collection<ImproperTorsion> improperTorsions)
      Create an ImproperTorsionPotentialEnergy initialized with a collection of terms.
      Parameters:
      name - Name for this term (may be null).
      improperTorsions - Collection of ImproperTorsion 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.
    • addImproperTorsion

      public boolean addImproperTorsion(ImproperTorsion improperTorsion)
      Add an ImproperTorsion to this term.
      Parameters:
      improperTorsion - ImproperTorsion to add (ignored if null).
      Returns:
      true if it was added.
    • addImproperTorsions

      public boolean addImproperTorsions(ImproperTorsion[] improperTorsions)
      Add an array of ImproperTorsions to this term.
      Parameters:
      improperTorsions - Array of ImproperTorsion instances to add.
      Returns:
      true if they were added.
    • addImproperTorsions

      public boolean addImproperTorsions(List<ImproperTorsion> improperTorsions)
      Add a list of ImproperTorsions to this term.
      Parameters:
      improperTorsions - List of ImproperTorsion instances to add.
      Returns:
      true if they were added.
    • removeImproperTorsion

      public boolean removeImproperTorsion(ImproperTorsion improperTorsion)
      Remove an ImproperTorsion from this term.
      Parameters:
      improperTorsion - ImproperTorsion to remove (ignored if null).
      Returns:
      true if it was present and removed.
    • getImproperTorsion

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

      public List<ImproperTorsion> getImproperTorsions()
      Get an unmodifiable view of the ImproperTorsions in this term.
      Returns:
      Unmodifiable List of ImproperTorsions.
    • getImproperTorsionArray

      public ImproperTorsion[] getImproperTorsionArray()
      Get an array of ImproperTorsions in this term.
      Returns:
      Array of ImproperTorsions.
    • getNumberOfImproperTorsions

      public int getNumberOfImproperTorsions()
      Get the number of ImproperTorsions in this term.
      Returns:
      The number of ImproperTorsions.
    • log

      public void log()
      Log the details of Improper 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.