Package ffx.potential.terms
Class AnglePotentialEnergy
java.lang.Object
ffx.potential.terms.EnergyTerm
ffx.potential.terms.AnglePotentialEnergy
Angle potential energy term using
Angle
instances.- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Field Summary
Fields inherited from class ffx.potential.terms.EnergyTerm
energy, forceGroup, name
-
Constructor Summary
ConstructorsConstructorDescriptionAnglePotentialEnergy
(String name) Create an AnglePotentialEnergy with the provided name.AnglePotentialEnergy
(String name, int forceGroup) Create an AnglePotentialEnergy with the provided name and force group.AnglePotentialEnergy
(String name, int forceGroup, List<Angle> angles) Create an AnglePotentialEnergy initialized with a list of angles and force group.AnglePotentialEnergy
(String name, Collection<Angle> angles) Create an AnglePotentialEnergy initialized with a collection of angles. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Add an Angle to this term.boolean
Add an array of Angles to this term.boolean
Add a list of Angles to this term.getAngle
(int index) Get the Angle at a given index.Angle[]
Get an array of Angles in this term.Get the String used for OpenMM angle energy expressions.Get an unmodifiable view of the Angles in this term.Get an array of BondedTerms in this term.int
Get the number of Angles in this term.int
Get the number of terms in this potential energy term.void
log()
Log the details of Angle interactions.boolean
removeAngle
(Angle angle) Remove an Angle 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
-
AnglePotentialEnergy
Create an AnglePotentialEnergy with the provided name.- Parameters:
name
- Name for this term.
-
AnglePotentialEnergy
Create an AnglePotentialEnergy with the provided name and force group.- Parameters:
name
- Name for this term.forceGroup
- Integer force group identifier.
-
AnglePotentialEnergy
Create an AnglePotentialEnergy initialized with a list of angles and force group.- Parameters:
name
- Name for this term.forceGroup
- Force group identifier.angles
- List of Angle instances to add (null-safe).
-
AnglePotentialEnergy
Create an AnglePotentialEnergy initialized with a collection of angles.- Parameters:
name
- Name for this term (may be null).angles
- Collection of Angle 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 angles.
-
getBondedTermsArray
Get an array of BondedTerms in this term.- Specified by:
getBondedTermsArray
in classEnergyTerm
- Returns:
- Array of BondedTerms, which are actually Angles in this case.
-
addAngle
Add an Angle to this term.- Parameters:
angle
- Angle to add (ignored if null).- Returns:
- true if the angle was added.
-
addAngles
Add an array of Angles to this term.- Parameters:
angles
- Array of Angle instances to add.- Returns:
- true if the angles were added.
-
addAngles
Add a list of Angles to this term.- Parameters:
angles
- List of Angle instances to add.- Returns:
- true if the angles were added.
-
removeAngle
Remove an Angle from this term.- Parameters:
angle
- Angle to remove (ignored if null).- Returns:
- true if the angle was present and removed.
-
getAngle
Get the Angle at a given index.- Parameters:
index
- Index in the internal list.- Returns:
- Angle at the specified index.
- Throws:
IndexOutOfBoundsException
- if index is invalid.
-
getAngles
Get an unmodifiable view of the Angles in this term.- Returns:
- Unmodifiable List of Angles.
-
getAngleArray
Get an array of Angles in this term.- Returns:
- Array of Angles.
-
getNumberOfAngles
public int getNumberOfAngles()Get the number of Angles in this term.- Returns:
- The number of Angles.
-
getAngleEnergyString
Get the String used for OpenMM angle energy expressions.- Returns:
- String representing the angle energy expression.
-
getInPlaneAngleEnergyString
-
log
public void log()Log the details of Angle 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.
-