Class UreyBradleyPotentialEnergy

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

public class UreyBradleyPotentialEnergy extends EnergyTerm
Urey-Bradley potential energy term using UreyBradley instances.
Since:
1.0
Author:
Michael J. Schnieders
  • Constructor Details

    • UreyBradleyPotentialEnergy

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

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

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

      public UreyBradleyPotentialEnergy(String name, Collection<UreyBradley> ureyBradleys)
      Create a UreyBradleyPotentialEnergy initialized with a collection of UreyBradleys.
      Parameters:
      name - Name for this term (may be null).
      ureyBradleys - Collection of UreyBradley 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 Urey-Bradley interactions.
    • 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 UreyBradleys in this case.
    • addUreyBradley

      public boolean addUreyBradley(UreyBradley ureyBradley)
      Add a UreyBradley to this term.
      Parameters:
      ureyBradley - UreyBradley to add (ignored if null).
      Returns:
      true if the UreyBradley was added.
    • addUreyBradleys

      public boolean addUreyBradleys(UreyBradley[] ureyBradleys)
      Add an array of UreyBradleys to this term.
      Parameters:
      ureyBradleys - Array of UreyBradley instances to add.
      Returns:
      true if the UreyBradleys were added.
    • addUreyBradleys

      public boolean addUreyBradleys(List<UreyBradley> ureyBradleys)
      Add a list of UreyBradleys to this term.
      Parameters:
      ureyBradleys - List of UreyBradley instances to add.
      Returns:
      true if the UreyBradleys were added.
    • removeUreyBradley

      public boolean removeUreyBradley(UreyBradley ureyBradley)
      Remove a UreyBradley from this term.
      Parameters:
      ureyBradley - UreyBradley to remove (ignored if null).
      Returns:
      true if the UreyBradley was present and removed.
    • getUreyBradley

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

      public List<UreyBradley> getUreyBradleys()
      Get an unmodifiable view of the UreyBradleys in this term.
      Returns:
      Unmodifiable List of UreyBradleys.
    • getUreyBradleyArray

      public UreyBradley[] getUreyBradleyArray()
      Get an array of UreyBradleys in this term.
      Returns:
      Array of UreyBradleys.
    • getNumberOfUreyBradleys

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

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