Package ffx.algorithms.dynamics
Class ReplicaExchange
java.lang.Object
ffx.algorithms.dynamics.ReplicaExchange
- All Implemented Interfaces:
Terminatable
The ReplicaExchange implements temperature and lambda replica exchange methods.
- Since:
- 1.0
- Author:
- Timothy D. Fenn and Michael J. Schnieders
-
Constructor Summary
ConstructorDescriptionReplicaExchange
(MolecularDynamics molecularDynamics, AlgorithmListener listener, double temperature, double exponent, boolean monteCarlo) ReplicaExchange constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
sample
(int cycles, long nSteps, double timeStep, double printInterval, double saveInterval) Sample.void
setExponentialTemperatureLadder
(double lowTemperature, double exponent) setExponentialTemperatureLadder.void
setTemperatures
(double[] temperatures) Setter for the fieldtemperatures
.void
This should be implemented as a blocking interrupt; when the method returns theTerminatable
algorithm has reached a clean termination point.
-
Constructor Details
-
ReplicaExchange
public ReplicaExchange(MolecularDynamics molecularDynamics, AlgorithmListener listener, double temperature, double exponent, boolean monteCarlo) ReplicaExchange constructor.- Parameters:
molecularDynamics
- The MolecularDynamics instance.listener
- A listener for algorithm events.temperature
- The temperature (K).exponent
- a double to set temperature ladder.
-
-
Method Details
-
sample
public void sample(int cycles, long nSteps, double timeStep, double printInterval, double saveInterval) Sample.- Parameters:
cycles
- The number of cycles to sample.nSteps
- The number of steps per cycle.timeStep
- The time step (fsec).printInterval
- The interval (in steps) to print current status.saveInterval
- The interval (in steps) to save a snapshot.
-
setExponentialTemperatureLadder
public void setExponentialTemperatureLadder(double lowTemperature, double exponent) setExponentialTemperatureLadder.- Parameters:
lowTemperature
- a double.exponent
- a double.
-
setTemperatures
public void setTemperatures(double[] temperatures) Setter for the fieldtemperatures
.- Parameters:
temperatures
- an array ofinvalid reference
double
-
terminate
public void terminate()This should be implemented as a blocking interrupt; when the method returns theTerminatable
algorithm has reached a clean termination point. For example, between minimize or molecular dynamics steps.This should be implemented as a blocking interrupt; when the method returns the
Terminatable
algorithm has reached a clean termination point. For example, between minimize or molecular dynamics steps.- Specified by:
terminate
in interfaceTerminatable
-