Class StretchTorsionPotentialEnergy

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

public class StretchTorsionPotentialEnergy extends EnergyTerm
Stretch-Torsion potential energy term using StretchTorsion instances.
Since:
1.0
Author:
Michael J. Schnieders
  • Constructor Details

    • StretchTorsionPotentialEnergy

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

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

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

      public StretchTorsionPotentialEnergy(String name, Collection<StretchTorsion> stretchTorsions)
      Create a StretchTorsionPotentialEnergy initialized with a collection of terms.
      Parameters:
      name - Name for this term (may be null).
      stretchTorsions - Collection of StretchTorsion 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.
    • addStretchTorsion

      public boolean addStretchTorsion(StretchTorsion stretchTorsion)
      Add a StretchTorsion to this term.
      Parameters:
      stretchTorsion - StretchTorsion to add (ignored if null).
      Returns:
      true if it was added.
    • addStretchTorsions

      public boolean addStretchTorsions(StretchTorsion[] stretchTorsions)
      Add an array of StretchTorsions to this term.
      Parameters:
      stretchTorsions - Array of StretchTorsion instances to add.
      Returns:
      true if they were added.
    • addStretchTorsions

      public boolean addStretchTorsions(List<StretchTorsion> stretchTorsions)
      Add a list of StretchTorsions to this term.
      Parameters:
      stretchTorsions - List of StretchTorsion instances to add.
      Returns:
      true if they were added.
    • removeStretchTorsion

      public boolean removeStretchTorsion(StretchTorsion stretchTorsion)
      Remove a StretchTorsion from this term.
      Parameters:
      stretchTorsion - StretchTorsion to remove (ignored if null).
      Returns:
      true if it was present and removed.
    • getStretchTorsion

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

      public List<StretchTorsion> getStretchTorsions()
      Get an unmodifiable view of the StretchTorsions in this term.
      Returns:
      Unmodifiable List of StretchTorsions.
    • getStretchTorsionArray

      public StretchTorsion[] getStretchTorsionArray()
      Get an array of StretchTorsions in this term.
      Returns:
      Array of StretchTorsions.
    • getNumberOfStretchTorsions

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

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