Class TorsionTorsionPotentialEnergy

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

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

    • TorsionTorsionPotentialEnergy

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

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

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

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

      public boolean addTorsionTorsion(TorsionTorsion torsionTorsion)
      Add a TorsionTorsion to this term.
      Parameters:
      torsionTorsion - TorsionTorsion to add (ignored if null).
      Returns:
      true if it was added.
    • addTorsionTorsions

      public boolean addTorsionTorsions(TorsionTorsion[] torsionTorsions)
      Add an array of TorsionTorsions to this term.
      Parameters:
      torsionTorsions - Array of TorsionTorsion instances to add.
      Returns:
      true if they were added.
    • addTorsionTorsions

      public boolean addTorsionTorsions(List<TorsionTorsion> torsionTorsions)
      Add a list of TorsionTorsions to this term.
      Parameters:
      torsionTorsions - List of TorsionTorsion instances to add.
      Returns:
      true if they were added.
    • removeTorsionTorsion

      public boolean removeTorsionTorsion(TorsionTorsion torsionTorsion)
      Remove a TorsionTorsion from this term.
      Parameters:
      torsionTorsion - TorsionTorsion to remove (ignored if null).
      Returns:
      true if it was present and removed.
    • getTorsionTorsion

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

      public List<TorsionTorsion> getTorsionTorsions()
      Get an unmodifiable view of the TorsionTorsions in this term.
      Returns:
      Unmodifiable List of TorsionTorsions.
    • getTorsionTorsionArray

      public TorsionTorsion[] getTorsionTorsionArray()
      Get an array of TorsionTorsions in this term.
      Returns:
      Array of TorsionTorsions.
    • getNumberOfTorsionTorsions

      public int getNumberOfTorsionTorsions()
      Get the number of TorsionTorsions in this term.
      Returns:
      The number of TorsionTorsions.
    • setLambda

      public void setLambda(double lambda)
      Set the lambda value for all TorsionTorsions in this term.
      Parameters:
      lambda - The new lambda value to set.
    • getdEdL

      public double getdEdL()
      Get the energy contribution from all Torsion-Torsions in this term.
      Returns:
      Total energy from all Torsion-Torsions.
    • getd2EdL2

      public double getd2EdL2()
      Get the energy contribution from all Torsion-Torsions in this term.
      Returns:
      Total energy from all Torsion-Torsions.
    • log

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