Class StretchBendPotentialEnergy

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

public class StretchBendPotentialEnergy extends EnergyTerm
Stretch-Bend potential energy term using StretchBend instances.
Since:
1.0
Author:
Michael J. Schnieders
  • Constructor Details

    • StretchBendPotentialEnergy

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

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

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

      public StretchBendPotentialEnergy(String name, Collection<StretchBend> stretchBends)
      Create a StretchBendPotentialEnergy initialized with a collection of stretch-bends.
      Parameters:
      name - Name for this term (may be null).
      stretchBends - Collection of StretchBend instances to add (null-safe).
  • Method Details

    • getNumberOfTerms

      public int getNumberOfTerms()
      Get the number of terms in this potential energy term.
      Specified by:
      getNumberOfTerms in class EnergyTerm
      Returns:
      The number of terms, which is the same as the number of stretch-bends.
    • getBondedTermsArray

      public BondedTerm[] getBondedTermsArray()
      Get an array of BondedTerms in this term.
      Specified by:
      getBondedTermsArray in class EnergyTerm
      Returns:
      Array of BondedTerms, which are actually StretchBends in this case.
    • addStretchBend

      public boolean addStretchBend(StretchBend stretchBend)
      Add a StretchBend to this term.
      Parameters:
      stretchBend - StretchBend to add (ignored if null).
      Returns:
      true if the stretch-bend was added.
    • addStretchBends

      public boolean addStretchBends(StretchBend[] stretchBends)
      Add an array of StretchBends to this term.
      Parameters:
      stretchBends - Array of StretchBend instances to add.
      Returns:
      true if the stretch-bends were added.
    • addStretchBends

      public boolean addStretchBends(List<StretchBend> stretchBends)
      Add a list of StretchBends to this term.
      Parameters:
      stretchBends - List of StretchBend instances to add.
      Returns:
      true if the stretch-bends were added.
    • removeStretchBend

      public boolean removeStretchBend(StretchBend stretchBend)
      Remove a StretchBend from this term.
      Parameters:
      stretchBend - StretchBend to remove (ignored if null).
      Returns:
      true if the stretch-bend was present and removed.
    • getStretchBend

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

      public List<StretchBend> getStretchBends()
      Get an unmodifiable view of the StretchBends in this term.
      Returns:
      Unmodifiable List of StretchBends.
    • getStretchBendArray

      public StretchBend[] getStretchBendArray()
      Get an array of StretchBends in this term.
      Returns:
      Array of StretchBends.
    • getNumberOfStretchBends

      public int getNumberOfStretchBends()
      Get the number of StretchBends in this term.
      Returns:
      The number of StretchBends.
    • getStretchBendEnergyString

      public static String getStretchBendEnergyString()
      Get a formatted string representing the energy expression for Stretch-Bend interactions.
      Returns:
      String representing the Stretch-Bend energy expression.
    • log

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