Package ffx.potential.terms
Class RestrainPositionPotentialEnergy
java.lang.Object
ffx.potential.terms.EnergyTerm
ffx.potential.terms.RestrainPositionPotentialEnergy
Restrain-Position potential energy term using
RestrainPosition
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 RestrainPositionPotentialEnergy with the provided name.RestrainPositionPotentialEnergy
(String name, int forceGroup) Create a RestrainPositionPotentialEnergy with the provided name and force group.RestrainPositionPotentialEnergy
(String name, int forceGroup, List<RestrainPosition> restrainPositions) Create a RestrainPositionPotentialEnergy initialized with a list of terms and force group.RestrainPositionPotentialEnergy
(String name, Collection<RestrainPosition> restrainPositions) Create a RestrainPositionPotentialEnergy initialized with a collection of terms. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addRestrainPosition
(RestrainPosition restrainPosition) Add a RestrainPosition to this term.boolean
addRestrainPositions
(RestrainPosition[] restrainPositions) Add an array of RestrainPositions to this term.boolean
addRestrainPositions
(List<RestrainPosition> restrainPositions) Add a list of RestrainPositions to this term.Get an array of BondedTerms in this term.int
Get the number of RestrainPositions in this term.int
Get the number of BondedTerms in this term.getRestrainPosition
(int index) Get the RestrainPosition at a given index.Get an array of RestrainPositions in this term.static String
Get the mathematical form of the Restrain Position interaction.Get an unmodifiable view of the RestrainPositions in this term.void
log()
Log the details of Restrain Position interactions.boolean
removeRestrainPosition
(RestrainPosition restrainPosition) Remove a RestrainPosition 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
-
RestrainPositionPotentialEnergy
Create a RestrainPositionPotentialEnergy with the provided name.- Parameters:
name
- Name for this term.
-
RestrainPositionPotentialEnergy
Create a RestrainPositionPotentialEnergy with the provided name and force group.- Parameters:
name
- Name for this term.forceGroup
- Integer force group identifier.
-
RestrainPositionPotentialEnergy
public RestrainPositionPotentialEnergy(String name, int forceGroup, List<RestrainPosition> restrainPositions) Create a RestrainPositionPotentialEnergy initialized with a list of terms and force group.- Parameters:
name
- Name for this term.forceGroup
- Force group identifier.restrainPositions
- List of RestrainPosition instances (null-safe).
-
RestrainPositionPotentialEnergy
Create a RestrainPositionPotentialEnergy initialized with a collection of terms.- Parameters:
name
- Name for this term (may be null).restrainPositions
- Collection of RestrainPosition 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.
-
addRestrainPosition
Add a RestrainPosition to this term.- Parameters:
restrainPosition
- RestrainPosition to add (ignored if null).- Returns:
- true if it was added.
-
addRestrainPositions
Add an array of RestrainPositions to this term.- Parameters:
restrainPositions
- Array of RestrainPosition instances to add.- Returns:
- true if they were added.
-
addRestrainPositions
Add a list of RestrainPositions to this term.- Parameters:
restrainPositions
- List of RestrainPosition instances to add.- Returns:
- true if they were added.
-
removeRestrainPosition
Remove a RestrainPosition from this term.- Parameters:
restrainPosition
- RestrainPosition to remove (ignored if null).- Returns:
- true if it was present and removed.
-
getRestrainPosition
Get the RestrainPosition at a given index.- Parameters:
index
- Index in the internal list.- Returns:
- RestrainPosition at the specified index.
- Throws:
IndexOutOfBoundsException
- if index is invalid.
-
getRestrainPositions
Get an unmodifiable view of the RestrainPositions in this term.- Returns:
- Unmodifiable List of RestrainPositions.
-
getRestrainPositionArray
Get an array of RestrainPositions in this term.- Returns:
- Array of RestrainPositions.
-
getNumberOfRestrainPositions
public int getNumberOfRestrainPositions()Get the number of RestrainPositions in this term.- Returns:
- The number of RestrainPositions.
-
getRestrainPositionEnergyString
Get the mathematical form of the Restrain Position interaction.- Returns:
- The mathematical form of the Restrain Position interaction.
-
log
public void log()Log the details of Restrain Position 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.
-