Package ffx.potential.terms
Class TorsionPotentialEnergy
java.lang.Object
ffx.potential.terms.EnergyTerm
ffx.potential.terms.TorsionPotentialEnergy
Torsion potential energy term using
Torsion instances.- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Field Summary
Fields inherited from class ffx.potential.terms.EnergyTerm
energy, forceGroup, name -
Constructor Summary
ConstructorsConstructorDescriptionTorsionPotentialEnergy(String name) Create a TorsionPotentialEnergy with the provided name.TorsionPotentialEnergy(String name, int forceGroup) Create a TorsionPotentialEnergy with the provided name and force group.TorsionPotentialEnergy(String name, int forceGroup, List<Torsion> torsions) Create a TorsionPotentialEnergy initialized with a list of torsions and force group.TorsionPotentialEnergy(String name, Collection<Torsion> torsions) Create a TorsionPotentialEnergy initialized with a collection of torsions. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddTorsion(Torsion torsion) Add a Torsion to this term.booleanaddTorsions(Torsion[] torsions) Add an array of Torsions to this term.booleanaddTorsions(List<Torsion> torsions) Add a list of Torsions to this term.Get an array of BondedTerms in this term.doubleGet the energy contribution from all Torsions in this term.doublegetdEdL()Get the energy contribution from all Torsions in this term.intGet the number of BondedTerms in this term.intGet the number of Torsions in this term.getTorsion(int index) Get the Torsion at a given index.Torsion[]Get an array of Torsions in this term.Get an unmodifiable view of the Torsions in this term.voidlog()Log the details of Torsion interactions.booleanremoveTorsion(Torsion torsion) Remove a Torsion from this term.voidsetLambda(double lambda) Set the lambda value for all Torsions 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
-
TorsionPotentialEnergy
Create a TorsionPotentialEnergy with the provided name.- Parameters:
name- Name for this term.
-
TorsionPotentialEnergy
Create a TorsionPotentialEnergy with the provided name and force group.- Parameters:
name- Name for this term.forceGroup- Integer force group identifier.
-
TorsionPotentialEnergy
Create a TorsionPotentialEnergy initialized with a list of torsions and force group.- Parameters:
name- Name for this term.forceGroup- Force group identifier.torsions- List of Torsion instances to add (null-safe).
-
TorsionPotentialEnergy
Create a TorsionPotentialEnergy initialized with a collection of torsions.- Parameters:
name- Name for this term (may be null).torsions- Collection of Torsion instances to add (null-safe).
-
-
Method Details
-
getNumberOfTerms
public int getNumberOfTerms()Get the number of BondedTerms in this term.- Specified by:
getNumberOfTermsin classEnergyTerm- Returns:
- The number of BondedTerms.
-
getBondedTermsArray
Get an array of BondedTerms in this term.- Specified by:
getBondedTermsArrayin classEnergyTerm- Returns:
- Array of BondedTerms.
-
addTorsion
Add a Torsion to this term.- Parameters:
torsion- Torsion to add (ignored if null).- Returns:
- true if it was added.
-
addTorsions
Add an array of Torsions to this term.- Parameters:
torsions- Array of Torsion instances to add.- Returns:
- true if they were added.
-
addTorsions
Add a list of Torsions to this term.- Parameters:
torsions- List of Torsion instances to add.- Returns:
- true if they were added.
-
removeTorsion
Remove a Torsion from this term.- Parameters:
torsion- Torsion to remove (ignored if null).- Returns:
- true if it was present and removed.
-
getTorsion
Get the Torsion at a given index.- Parameters:
index- Index in the internal list.- Returns:
- Torsion at the specified index.
- Throws:
IndexOutOfBoundsException- if index is invalid.
-
getTorsions
Get an unmodifiable view of the Torsions in this term.- Returns:
- Unmodifiable List of Torsions.
-
getTorsionArray
Get an array of Torsions in this term.- Returns:
- Array of Torsions.
-
getNumberOfTorsions
public int getNumberOfTorsions()Get the number of Torsions in this term.- Returns:
- The number of Torsions.
-
setLambda
public void setLambda(double lambda) Set the lambda value for all Torsions in this term.- Parameters:
lambda- Lambda value to set for all Torsions.
-
getdEdL
public double getdEdL()Get the energy contribution from all Torsions in this term.- Returns:
- Total energy from all Torsions.
-
getd2EdL2
public double getd2EdL2()Get the energy contribution from all Torsions in this term.- Returns:
- Total energy from all Torsions.
-
log
public void log()Log the details of Torsion interactions.- Specified by:
login classEnergyTerm
-
toPDBString
Description copied from class:EnergyTermGet a PDB-style REMARK representation of this energy term.- Specified by:
toPDBStringin classEnergyTerm- Returns:
- A PDB REMARK string for this energy term.
-
toString
Description copied from class:EnergyTermGet a string representation of this energy term.- Specified by:
toStringin classEnergyTerm- Returns:
- A string representation of the energy term.
-