Package ffx.potential.terms
Class UreyBradleyPotentialEnergy
java.lang.Object
ffx.potential.terms.EnergyTerm
ffx.potential.terms.UreyBradleyPotentialEnergy
Urey-Bradley potential energy term using
UreyBradley
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 UreyBradleyPotentialEnergy with the provided name.UreyBradleyPotentialEnergy
(String name, int forceGroup) Create a UreyBradleyPotentialEnergy with the provided name and force group.UreyBradleyPotentialEnergy
(String name, int forceGroup, List<UreyBradley> ureyBradleys) Create a UreyBradleyPotentialEnergy initialized with a list of UreyBradleys and force group.UreyBradleyPotentialEnergy
(String name, Collection<UreyBradley> ureyBradleys) Create a UreyBradleyPotentialEnergy initialized with a collection of UreyBradleys. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addUreyBradley
(UreyBradley ureyBradley) Add a UreyBradley to this term.boolean
addUreyBradleys
(UreyBradley[] ureyBradleys) Add an array of UreyBradleys to this term.boolean
addUreyBradleys
(List<UreyBradley> ureyBradleys) Add a list of UreyBradleys to this term.Get an array of BondedTerms in this term.int
Get the number of terms in this potential energy term.int
Get the number of UreyBradleys in this term.getUreyBradley
(int index) Get the UreyBradley at a given index.Get an array of UreyBradleys in this term.Get an unmodifiable view of the UreyBradleys in this term.void
log()
Log the details of Urey-Bradley interactions.boolean
removeUreyBradley
(UreyBradley ureyBradley) Remove a UreyBradley 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
-
UreyBradleyPotentialEnergy
Create a UreyBradleyPotentialEnergy with the provided name.- Parameters:
name
- Name for this term.
-
UreyBradleyPotentialEnergy
Create a UreyBradleyPotentialEnergy with the provided name and force group.- Parameters:
name
- Name for this term.forceGroup
- Integer force group identifier.
-
UreyBradleyPotentialEnergy
Create a UreyBradleyPotentialEnergy initialized with a list of UreyBradleys and force group.- Parameters:
name
- Name for this term.forceGroup
- Force group identifier.ureyBradleys
- List of UreyBradley instances to add (null-safe).
-
UreyBradleyPotentialEnergy
Create a UreyBradleyPotentialEnergy initialized with a collection of UreyBradleys.- Parameters:
name
- Name for this term (may be null).ureyBradleys
- Collection of UreyBradley 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 Urey-Bradley interactions.
-
getBondedTermsArray
Get an array of BondedTerms in this term.- Specified by:
getBondedTermsArray
in classEnergyTerm
- Returns:
- Array of BondedTerms, which are actually UreyBradleys in this case.
-
addUreyBradley
Add a UreyBradley to this term.- Parameters:
ureyBradley
- UreyBradley to add (ignored if null).- Returns:
- true if the UreyBradley was added.
-
addUreyBradleys
Add an array of UreyBradleys to this term.- Parameters:
ureyBradleys
- Array of UreyBradley instances to add.- Returns:
- true if the UreyBradleys were added.
-
addUreyBradleys
Add a list of UreyBradleys to this term.- Parameters:
ureyBradleys
- List of UreyBradley instances to add.- Returns:
- true if the UreyBradleys were added.
-
removeUreyBradley
Remove a UreyBradley from this term.- Parameters:
ureyBradley
- UreyBradley to remove (ignored if null).- Returns:
- true if the UreyBradley was present and removed.
-
getUreyBradley
Get the UreyBradley at a given index.- Parameters:
index
- Index in the internal list.- Returns:
- UreyBradley at the specified index.
- Throws:
IndexOutOfBoundsException
- if index is invalid.
-
getUreyBradleys
Get an unmodifiable view of the UreyBradleys in this term.- Returns:
- Unmodifiable List of UreyBradleys.
-
getUreyBradleyArray
Get an array of UreyBradleys in this term.- Returns:
- Array of UreyBradleys.
-
getNumberOfUreyBradleys
public int getNumberOfUreyBradleys()Get the number of UreyBradleys in this term.- Returns:
- The number of UreyBradleys.
-
log
public void log()Log the details of Urey-Bradley 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.
-