Package ffx.potential.terms
Class StretchBendPotentialEnergy
java.lang.Object
ffx.potential.terms.EnergyTerm
ffx.potential.terms.StretchBendPotentialEnergy
Stretch-Bend potential energy term using
StretchBend
instances.- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Field Summary
Fields inherited from class ffx.potential.terms.EnergyTerm
energy, forceGroup, name
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a StretchBendPotentialEnergy with the provided name.StretchBendPotentialEnergy
(String name, int forceGroup) Create a StretchBendPotentialEnergy with the provided name and force group.StretchBendPotentialEnergy
(String name, int forceGroup, List<StretchBend> stretchBends) Create a StretchBendPotentialEnergy initialized with a list of stretch-bends and force group.StretchBendPotentialEnergy
(String name, Collection<StretchBend> stretchBends) Create a StretchBendPotentialEnergy initialized with a collection of stretch-bends. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addStretchBend
(StretchBend stretchBend) Add a StretchBend to this term.boolean
addStretchBends
(StretchBend[] stretchBends) Add an array of StretchBends to this term.boolean
addStretchBends
(List<StretchBend> stretchBends) Add a list of StretchBends to this term.Get an array of BondedTerms in this term.int
Get the number of StretchBends in this term.int
Get the number of terms in this potential energy term.getStretchBend
(int index) Get the StretchBend at a given index.Get an array of StretchBends in this term.static String
Get a formatted string representing the energy expression for Stretch-Bend interactions.Get an unmodifiable view of the StretchBends in this term.void
log()
Log the details of Stretch-Bend interactions.boolean
removeStretchBend
(StretchBend stretchBend) Remove a StretchBend from this term.Get a PDB-style REMARK representation of this energy term.toString()
Get a string representation of this energy term.Methods inherited from class ffx.potential.terms.EnergyTerm
addAndGetEnergy, addAndGetRMSD, getEnergy, getForceGroup, getName, getRMSD, getTime, setEnergy, setForceGroup, setName, setRMSD, startTime, stopTime
-
Constructor Details
-
StretchBendPotentialEnergy
Create a StretchBendPotentialEnergy with the provided name.- Parameters:
name
- Name for this term.
-
StretchBendPotentialEnergy
Create a StretchBendPotentialEnergy with the provided name and force group.- Parameters:
name
- Name for this term.forceGroup
- Integer force group identifier.
-
StretchBendPotentialEnergy
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
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 classEnergyTerm
- Returns:
- The number of terms, which is the same as the number of stretch-bends.
-
getBondedTermsArray
Get an array of BondedTerms in this term.- Specified by:
getBondedTermsArray
in classEnergyTerm
- Returns:
- Array of BondedTerms, which are actually StretchBends in this case.
-
addStretchBend
Add a StretchBend to this term.- Parameters:
stretchBend
- StretchBend to add (ignored if null).- Returns:
- true if the stretch-bend was added.
-
addStretchBends
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
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
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
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
Get an unmodifiable view of the StretchBends in this term.- Returns:
- Unmodifiable List of StretchBends.
-
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
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 classEnergyTerm
-
toPDBString
Description copied from class:EnergyTerm
Get a PDB-style REMARK representation of this energy term.- Specified by:
toPDBString
in classEnergyTerm
- Returns:
- A PDB REMARK string for this energy term.
-
toString
Description copied from class:EnergyTerm
Get a string representation of this energy term.- Specified by:
toString
in classEnergyTerm
- Returns:
- A string representation of the energy term.
-