Package ffx.potential.terms
Class ImproperTorsionPotentialEnergy
java.lang.Object
ffx.potential.terms.EnergyTerm
ffx.potential.terms.ImproperTorsionPotentialEnergy
Improper Torsion potential energy term using
ImproperTorsion
instances.-
Field Summary
Fields inherited from class ffx.potential.terms.EnergyTerm
energy, forceGroup, name
-
Constructor Summary
ConstructorsConstructorDescriptionCreate an ImproperTorsionPotentialEnergy with the provided name.ImproperTorsionPotentialEnergy
(String name, int forceGroup) Create an ImproperTorsionPotentialEnergy with the provided name and force group.ImproperTorsionPotentialEnergy
(String name, int forceGroup, List<ImproperTorsion> improperTorsions) Create an ImproperTorsionPotentialEnergy initialized with a list of terms and force group.ImproperTorsionPotentialEnergy
(String name, Collection<ImproperTorsion> improperTorsions) Create an ImproperTorsionPotentialEnergy initialized with a collection of terms. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addImproperTorsion
(ImproperTorsion improperTorsion) Add an ImproperTorsion to this term.boolean
addImproperTorsions
(ImproperTorsion[] improperTorsions) Add an array of ImproperTorsions to this term.boolean
addImproperTorsions
(List<ImproperTorsion> improperTorsions) Add a list of ImproperTorsions to this term.Get an array of BondedTerms in this term.getImproperTorsion
(int index) Get the ImproperTorsion at a given index.Get an array of ImproperTorsions in this term.Get an unmodifiable view of the ImproperTorsions in this term.int
Get the number of ImproperTorsions in this term.int
Get the number of BondedTerms in this term.void
log()
Log the details of Improper interactions.boolean
removeImproperTorsion
(ImproperTorsion improperTorsion) Remove an ImproperTorsion 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
-
ImproperTorsionPotentialEnergy
Create an ImproperTorsionPotentialEnergy with the provided name.- Parameters:
name
- Name for this term.
-
ImproperTorsionPotentialEnergy
Create an ImproperTorsionPotentialEnergy with the provided name and force group.- Parameters:
name
- Name for this term.forceGroup
- Integer force group identifier.
-
ImproperTorsionPotentialEnergy
public ImproperTorsionPotentialEnergy(String name, int forceGroup, List<ImproperTorsion> improperTorsions) Create an ImproperTorsionPotentialEnergy initialized with a list of terms and force group.- Parameters:
name
- Name for this term.forceGroup
- Force group identifier.improperTorsions
- List of ImproperTorsion instances to add (null-safe).
-
ImproperTorsionPotentialEnergy
Create an ImproperTorsionPotentialEnergy initialized with a collection of terms.- Parameters:
name
- Name for this term (may be null).improperTorsions
- Collection of ImproperTorsion 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.
-
addImproperTorsion
Add an ImproperTorsion to this term.- Parameters:
improperTorsion
- ImproperTorsion to add (ignored if null).- Returns:
- true if it was added.
-
addImproperTorsions
Add an array of ImproperTorsions to this term.- Parameters:
improperTorsions
- Array of ImproperTorsion instances to add.- Returns:
- true if they were added.
-
addImproperTorsions
Add a list of ImproperTorsions to this term.- Parameters:
improperTorsions
- List of ImproperTorsion instances to add.- Returns:
- true if they were added.
-
removeImproperTorsion
Remove an ImproperTorsion from this term.- Parameters:
improperTorsion
- ImproperTorsion to remove (ignored if null).- Returns:
- true if it was present and removed.
-
getImproperTorsion
Get the ImproperTorsion at a given index.- Parameters:
index
- Index in the internal list.- Returns:
- ImproperTorsion at the specified index.
- Throws:
IndexOutOfBoundsException
- if index is invalid.
-
getImproperTorsions
Get an unmodifiable view of the ImproperTorsions in this term.- Returns:
- Unmodifiable List of ImproperTorsions.
-
getImproperTorsionArray
Get an array of ImproperTorsions in this term.- Returns:
- Array of ImproperTorsions.
-
getNumberOfImproperTorsions
public int getNumberOfImproperTorsions()Get the number of ImproperTorsions in this term.- Returns:
- The number of ImproperTorsions.
-
log
public void log()Log the details of Improper 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.
-