Package ffx.potential.terms
Class TorsionTorsionPotentialEnergy
java.lang.Object
ffx.potential.terms.EnergyTerm
ffx.potential.terms.TorsionTorsionPotentialEnergy
Torsion-Torsion potential energy term using
TorsionTorsion
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 TorsionTorsionPotentialEnergy with the provided name.TorsionTorsionPotentialEnergy
(String name, int forceGroup) Create a TorsionTorsionPotentialEnergy with the provided name and force group.TorsionTorsionPotentialEnergy
(String name, int forceGroup, List<TorsionTorsion> torsionTorsions) Create a TorsionTorsionPotentialEnergy initialized with a list of terms and force group.TorsionTorsionPotentialEnergy
(String name, Collection<TorsionTorsion> torsionTorsions) Create a TorsionTorsionPotentialEnergy initialized with a collection of terms. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addTorsionTorsion
(TorsionTorsion torsionTorsion) Add a TorsionTorsion to this term.boolean
addTorsionTorsions
(TorsionTorsion[] torsionTorsions) Add an array of TorsionTorsions to this term.boolean
addTorsionTorsions
(List<TorsionTorsion> torsionTorsions) Add a list of TorsionTorsions to this term.Get an array of BondedTerms in this term.double
Get the energy contribution from all Torsion-Torsions in this term.double
getdEdL()
Get the energy contribution from all Torsion-Torsions in this term.int
Get the number of BondedTerms in this term.int
Get the number of TorsionTorsions in this term.getTorsionTorsion
(int index) Get the TorsionTorsion at a given index.Get an array of TorsionTorsions in this term.Get an unmodifiable view of the TorsionTorsions in this term.void
log()
Log the details of Torsion-Torsion interactions.boolean
removeTorsionTorsion
(TorsionTorsion torsionTorsion) Remove a TorsionTorsion from this term.void
setLambda
(double lambda) Set the lambda value for all TorsionTorsions in 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
-
TorsionTorsionPotentialEnergy
Create a TorsionTorsionPotentialEnergy with the provided name.- Parameters:
name
- Name for this term.
-
TorsionTorsionPotentialEnergy
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
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 classEnergyTerm
- Returns:
- The number of BondedTerms.
-
getBondedTermsArray
Get an array of BondedTerms in this term.- Specified by:
getBondedTermsArray
in classEnergyTerm
- Returns:
- Array of BondedTerms.
-
addTorsionTorsion
Add a TorsionTorsion to this term.- Parameters:
torsionTorsion
- TorsionTorsion to add (ignored if null).- Returns:
- true if it was added.
-
addTorsionTorsions
Add an array of TorsionTorsions to this term.- Parameters:
torsionTorsions
- Array of TorsionTorsion instances to add.- Returns:
- true if they were added.
-
addTorsionTorsions
Add a list of TorsionTorsions to this term.- Parameters:
torsionTorsions
- List of TorsionTorsion instances to add.- Returns:
- true if they were added.
-
removeTorsionTorsion
Remove a TorsionTorsion from this term.- Parameters:
torsionTorsion
- TorsionTorsion to remove (ignored if null).- Returns:
- true if it was present and removed.
-
getTorsionTorsion
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
Get an unmodifiable view of the TorsionTorsions in this term.- Returns:
- Unmodifiable List of TorsionTorsions.
-
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 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.
-