Package ffx.algorithms.mc
Class MolecularMC
java.lang.Object
ffx.algorithms.mc.BoltzmannMC
ffx.algorithms.mc.MolecularMC
- All Implemented Interfaces:
MetropolisMC
The MolecularMC class is a framework to take Monte Carlo steps on a molecular system. It does not
implement an MC algorithm, nor does it implement move sets; it is used to evaluate a single MC
step with movements defined by implementations of MCMove.
- Since:
- 1.0
- Author:
- Michael J. Schnieders, Jacob M. Litman
-
Field Summary
Fields inherited from class ffx.algorithms.mc.BoltzmannMC
random
-
Constructor Summary
ConstructorDescriptionMolecularMC
(MolecularAssembly molecularAssembly) Constructs a DefaultMC instance with a molecular assembly and its PotentialEnergy.MolecularMC
(MolecularAssembly molecularAssembly, Potential potential) Constructs a DefaultMC instance with a molecular assembly and a specific Potential. -
Method Summary
Modifier and TypeMethodDescriptionprotected double
Must return the current energy of the system.Returns the associated MolecularAssembly.Returns the associated Potential.void
If possible, reverts the last successful Monte Carlo step taken.protected void
Store the state for reverting a move.toString()
Methods inherited from class ffx.algorithms.mc.BoltzmannMC
acceptChance, evaluateMove, evaluateMove, getAccept, getE1, getE2, getTemperature, lastEnergy, mcStep, mcStep, mcStep, mcStep, setPrint, setRandomSeed, setTemperature
-
Constructor Details
-
MolecularMC
Constructs a DefaultMC instance with a molecular assembly and its PotentialEnergy. Fancy footwork will be required if we ever need to use multiple assemblies at once.- Parameters:
molecularAssembly
- MolecularAssembly to operate on.
-
MolecularMC
Constructs a DefaultMC instance with a molecular assembly and a specific Potential.- Parameters:
molecularAssembly
- MolecularAssembly to operate on.potential
- aPotential
object.
-
-
Method Details
-
getMolecularAssembly
Returns the associated MolecularAssembly.- Returns:
- MolecularAssembly
-
getPotential
Returns the associated Potential.- Returns:
- Potential.
-
revertStep
public void revertStep()If possible, reverts the last successful Monte Carlo step taken. -
toString
-
currentEnergy
protected double currentEnergy()Must return the current energy of the system.Calculates the energy at the current state; identical to RotamerOptimization method of same name.
- Specified by:
currentEnergy
in classBoltzmannMC
- Returns:
- Current system energy
-
storeState
protected void storeState()Store the state for reverting a move. Must be properly implemented for revertStep() to function properly; otherwise, the implementation of revertStep() should throw an OperationNotSupportedException.- Specified by:
storeState
in classBoltzmannMC
-