Package ffx.potential.terms
Class RestrainTorsionPotentialEnergy
java.lang.Object
ffx.potential.terms.EnergyTerm
ffx.potential.terms.RestrainTorsionPotentialEnergy
Restrain-Torsion potential energy term using
Torsion
instances.
Method names are specific to restrain torsions for clarity.-
Field Summary
Fields inherited from class ffx.potential.terms.EnergyTerm
energy, forceGroup, name
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a RestrainTorsionPotentialEnergy with the provided name.RestrainTorsionPotentialEnergy
(String name, int forceGroup) Create a RestrainTorsionPotentialEnergy with the provided name and force group.RestrainTorsionPotentialEnergy
(String name, int forceGroup, List<Torsion> restrainTorsions) Create a RestrainTorsionPotentialEnergy initialized with a list of torsions and force group.RestrainTorsionPotentialEnergy
(String name, Collection<Torsion> restrainTorsions) Create a RestrainTorsionPotentialEnergy initialized with a collection of torsions. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addRestrainTorsion
(Torsion torsion) Add a single restrain torsion.boolean
addRestrainTorsions
(Torsion[] torsions) Add an array of restrain torsions.boolean
addRestrainTorsions
(List<Torsion> torsions) Add a list of restrain torsions.Get an array of BondedTerms in this term.int
Get the number of restrain torsions.int
Get the number of BondedTerms in this term.getRestrainTorsion
(int index) Get a restrain torsion at an index.Torsion[]
Get an array of restrain torsions.Get an unmodifiable view of restrain torsions.void
log()
Log the details of Restrain Torsion interactions.boolean
removeRestrainTorsion
(Torsion torsion) Remove a restrain torsion.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
-
RestrainTorsionPotentialEnergy
Create a RestrainTorsionPotentialEnergy with the provided name.- Parameters:
name
- Name for this term.
-
RestrainTorsionPotentialEnergy
Create a RestrainTorsionPotentialEnergy with the provided name and force group.- Parameters:
name
- Name for this term.forceGroup
- Integer force group identifier.
-
RestrainTorsionPotentialEnergy
Create a RestrainTorsionPotentialEnergy initialized with a list of torsions and force group.- Parameters:
name
- Name for this term.forceGroup
- Force group identifier.restrainTorsions
- List of Torsion instances to add (null-safe).
-
RestrainTorsionPotentialEnergy
Create a RestrainTorsionPotentialEnergy initialized with a collection of torsions.- Parameters:
name
- Name for this term (may be null).restrainTorsions
- Collection of Torsion 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.
-
addRestrainTorsion
Add a single restrain torsion.- Parameters:
torsion
- Torsion to add (ignored if null).- Returns:
- true if added.
-
addRestrainTorsions
Add an array of restrain torsions.- Parameters:
torsions
- Array of Torsion instances to add.- Returns:
- true if added.
-
addRestrainTorsions
Add a list of restrain torsions.- Parameters:
torsions
- List of Torsion instances to add.- Returns:
- true if added.
-
removeRestrainTorsion
Remove a restrain torsion.- Parameters:
torsion
- Torsion to remove (ignored if null).- Returns:
- true if removed.
-
getRestrainTorsion
Get a restrain torsion at an index.- Parameters:
index
- Index.- Returns:
- Torsion.
- Throws:
IndexOutOfBoundsException
- if invalid index.
-
getRestrainTorsions
Get an unmodifiable view of restrain torsions.- Returns:
- List of Torsion.
-
getRestrainTorsionArray
Get an array of restrain torsions.- Returns:
- Array of Torsion.
-
getNumberOfRestrainTorsions
public int getNumberOfRestrainTorsions()Get the number of restrain torsions.- Returns:
- Number of restrain torsions.
-
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.
-
log
public void log()Log the details of Restrain Torsion interactions.- Specified by:
log
in classEnergyTerm
-