Class AngleTorsionPotentialEnergy

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

public class AngleTorsionPotentialEnergy extends EnergyTerm
Angle-Torsion potential energy term using AngleTorsion instances.
  • Constructor Details

    • AngleTorsionPotentialEnergy

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

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

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

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

      public boolean addAngleTorsion(AngleTorsion angleTorsion)
      Add an AngleTorsion to this term.
      Parameters:
      angleTorsion - AngleTorsion to add (ignored if null).
      Returns:
      true if it was added.
    • addAngleTorsions

      public boolean addAngleTorsions(AngleTorsion[] angleTorsions)
      Add an array of AngleTorsions to this term.
      Parameters:
      angleTorsions - Array of AngleTorsion instances to add.
      Returns:
      true if they were added.
    • addAngleTorsions

      public boolean addAngleTorsions(List<AngleTorsion> angleTorsions)
      Add a list of AngleTorsions to this term.
      Parameters:
      angleTorsions - List of AngleTorsion instances to add.
      Returns:
      true if they were added.
    • removeAngleTorsion

      public boolean removeAngleTorsion(AngleTorsion angleTorsion)
      Remove an AngleTorsion from this term.
      Parameters:
      angleTorsion - AngleTorsion to remove (ignored if null).
      Returns:
      true if it was present and removed.
    • getAngleTorsion

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

      public List<AngleTorsion> getAngleTorsions()
      Get an unmodifiable view of the AngleTorsions in this term.
      Returns:
      Unmodifiable List of AngleTorsions.
    • getAngleTorsionArray

      public AngleTorsion[] getAngleTorsionArray()
      Get an array of AngleTorsions in this term.
      Returns:
      Array of AngleTorsions.
    • getNumberOfAngleTorsions

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

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