Package ffx.potential.terms
Class StretchTorsionPotentialEnergy
java.lang.Object
ffx.potential.terms.EnergyTerm
ffx.potential.terms.StretchTorsionPotentialEnergy
Stretch-Torsion potential energy term using
StretchTorsion
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 StretchTorsionPotentialEnergy with the provided name.StretchTorsionPotentialEnergy
(String name, int forceGroup) Create a StretchTorsionPotentialEnergy with the provided name and force group.StretchTorsionPotentialEnergy
(String name, int forceGroup, List<StretchTorsion> stretchTorsions) Create a StretchTorsionPotentialEnergy initialized with a list of terms and force group.StretchTorsionPotentialEnergy
(String name, Collection<StretchTorsion> stretchTorsions) Create a StretchTorsionPotentialEnergy initialized with a collection of terms. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addStretchTorsion
(StretchTorsion stretchTorsion) Add a StretchTorsion to this term.boolean
addStretchTorsions
(StretchTorsion[] stretchTorsions) Add an array of StretchTorsions to this term.boolean
addStretchTorsions
(List<StretchTorsion> stretchTorsions) Add a list of StretchTorsions to this term.Get an array of BondedTerms in this term.int
Get the number of StretchTorsions in this term.int
Get the number of BondedTerms in this term.getStretchTorsion
(int index) Get the StretchTorsion at a given index.Get an array of StretchTorsions in this term.Get an unmodifiable view of the StretchTorsions in this term.void
log()
Log the details of Stretch-Torsion interactions.boolean
removeStretchTorsion
(StretchTorsion stretchTorsion) Remove a StretchTorsion 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
-
StretchTorsionPotentialEnergy
Create a StretchTorsionPotentialEnergy with the provided name.- Parameters:
name
- Name for this term.
-
StretchTorsionPotentialEnergy
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
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 classEnergyTerm
- Returns:
- The number of BondedTerms.
-
getBondedTermsArray
Get an array of BondedTerms in this term.- Specified by:
getBondedTermsArray
in classEnergyTerm
- Returns:
- Array of BondedTerms.
-
addStretchTorsion
Add a StretchTorsion to this term.- Parameters:
stretchTorsion
- StretchTorsion to add (ignored if null).- Returns:
- true if it was added.
-
addStretchTorsions
Add an array of StretchTorsions to this term.- Parameters:
stretchTorsions
- Array of StretchTorsion instances to add.- Returns:
- true if they were added.
-
addStretchTorsions
Add a list of StretchTorsions to this term.- Parameters:
stretchTorsions
- List of StretchTorsion instances to add.- Returns:
- true if they were added.
-
removeStretchTorsion
Remove a StretchTorsion from this term.- Parameters:
stretchTorsion
- StretchTorsion to remove (ignored if null).- Returns:
- true if it was present and removed.
-
getStretchTorsion
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
Get an unmodifiable view of the StretchTorsions in this term.- Returns:
- Unmodifiable List of StretchTorsions.
-
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 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.
-