Class MonteCarloOST
- All Implemented Interfaces:
MetropolisMC
The algorithm generates coordinate (X) MC moves using molecular dynamics at a fixed lambda value (i.e. using OpenMM), followed by MC lambda moves.
1.) At a fixed Lambda, run a defined length MD trajectory to "move" coordinates and dU/dL on an approximate potential U* (i.e. no OST Bias).
2.) Accept / Reject the MD move with probability exp[-Beta(dU - dU*)] where dU is the change in AMOEBA + Bias energy and dU* is the change in AMOEBA + Kinetic energy from the MD.
3.) Randomly change the value of Lambda.
4.) Accept / Reject the Lambda move using the AMOEBA + OST Bias energy.
5.) Add to the time dependent 2D bias using the current values of Lambda and dU/dL.
- Since:
- 1.0
- Author:
- Michael J. Schnieders, Hernan Beranbe, Mallory R. Tollefson, Jacob Litman
-
Field Summary
Fields inherited from class ffx.algorithms.mc.BoltzmannMC
random
-
Constructor Summary
ConstructorDescriptionMonteCarloOST
(Potential potentialEnergy, OrthogonalSpaceTempering orthogonalSpaceTempering, MolecularAssembly molecularAssembly, org.apache.commons.configuration2.CompositeConfiguration properties, AlgorithmListener listener, DynamicsOptions dynamics, boolean verbose, int cycleLength, File dynRestartFile) Constructor for MonteCarloOST. -
Method Summary
Modifier and TypeMethodDescriptionprotected double
Must return the current energy of the system.double
Returns the current value of lambdagetMD()
void
If possible, reverts the last successful Monte Carlo step taken.void
The goal is to sample lambda and coordinates (X) simultaneously to converge the ensemble average dU/dL for every state (lambda) along the thermodynamic path.void
The goal is to sample lambda and coordinates (X) separately to converge the ensemble average dU/dL for every state (lambda) along the thermodynamic path.void
setAutomaticWriteouts
(boolean autoWrite) void
setEquilibration
(boolean equilibration) Sets the value of the boolean equilibration variables to true or false to either allow an equilibration step or skip it.void
setLambda
(double lambda) Calls on the OST method set lambda to update lambda to the current value in this classvoid
setLambdaStdDev
(double stdDev) Calls on LambdaMove class method setLambdaStdDev to update the lambda standard deviation to the current value in this classvoid
setTotalSteps
(long totalSteps) Sets the next number of steps MC-OST should run.protected void
Store the state for reverting a move.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
-
MonteCarloOST
public MonteCarloOST(Potential potentialEnergy, OrthogonalSpaceTempering orthogonalSpaceTempering, MolecularAssembly molecularAssembly, org.apache.commons.configuration2.CompositeConfiguration properties, AlgorithmListener listener, DynamicsOptions dynamics, boolean verbose, int cycleLength, File dynRestartFile) Constructor for MonteCarloOST.- Parameters:
potentialEnergy
- aPotential
object.orthogonalSpaceTempering
- aOrthogonalSpaceTempering
object.molecularAssembly
- aMolecularAssembly
object.properties
- aCompositeConfiguration
object.listener
- aAlgorithmListener
object.dynamics
- CLI object containing key information.verbose
- Whether to be verbose.cycleLength
- Length of an MC cycle in MD steps.
-
-
Method Details
-
getLambda
public double getLambda()Returns the current value of lambda- Returns:
- lambda
-
setLambda
public void setLambda(double lambda) Calls on the OST method set lambda to update lambda to the current value in this class- Parameters:
lambda
- a double.
-
getMD
-
sampleOneStep
public void sampleOneStep()The goal is to sample lambda and coordinates (X) simultaneously to converge the ensemble average dU/dL for every state (lambda) along the thermodynamic path. Note that the order of 1 invalid input: '&' 2 below can be swapped (i.e. run MD and then change lambda). Here the order is random for each trial.1.) Randomly change the value of Lambda.
2.) At the proposed lambda, run a am MD trajectory to "move" coordinates and dU/dL.
3.) Accept / Reject the Lambda + MD move using the total Hamiltonian (Kinetic energy + OST energy).
4.) Add to the bias.
-
sampleTwoStep
public void sampleTwoStep()The goal is to sample lambda and coordinates (X) separately to converge the ensemble average dU/dL for every state (lambda) along the thermodynamic path.1.) At a fixed lambda, run a defined length MD trajectory to "move" coordinates and dU/dL.
2.) Accept / Reject the MD move using the total Hamiltonian (Kinetic energy + OST energy).
3.) Randomly change the value of Lambda.
4.) Accept / Reject the Lambda move using the OST energy.
5.) Add a hill to the histogram.
-
setAutomaticWriteouts
public void setAutomaticWriteouts(boolean autoWrite) -
setEquilibration
public void setEquilibration(boolean equilibration) Sets the value of the boolean equilibration variables to true or false to either allow an equilibration step or skip it.- Parameters:
equilibration
- a boolean.
-
setLambdaStdDev
public void setLambdaStdDev(double stdDev) Calls on LambdaMove class method setLambdaStdDev to update the lambda standard deviation to the current value in this class- Parameters:
stdDev
- a double.
-
setTotalSteps
public void setTotalSteps(long totalSteps) Sets the next number of steps MC-OST should run.- Parameters:
totalSteps
- The length of the next MC-OST run.
-
revertStep
public void revertStep()If possible, reverts the last successful Monte Carlo step taken. -
currentEnergy
protected double currentEnergy()Must return the current energy of the system.- 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
-