Package ffx.algorithms.dynamics
Class PhReplicaExchange
java.lang.Object
ffx.algorithms.dynamics.PhReplicaExchange
- All Implemented Interfaces:
Terminatable
The PhReplicaExchange implements pH replica exchange. Adapted from "ReplicaExchange.java" by
Timothy D. Fenn and Michael J. Schnieders
- Since:
- 1.0
- Author:
- Matthew Speranza and Andrew Thiel
-
Constructor Summary
ConstructorDescriptionPhReplicaExchange
(MolecularDynamics molecularDynamics, File structureFile, double pH, double[] pHLadder, double temp, ExtendedSystem extendedSystem, double[] x) pHReplicaExchange constructor.PhReplicaExchange
(MolecularDynamics molecularDynamics, File structureFile, double pH, double[] pHLadder, double temp, ExtendedSystem extendedSystem, double[] x, MolecularDynamicsOpenMM molecularDynamicsOpenMM, Potential potential) OpenMM cycled pHReplicaExchange constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
sample
(int cycles, long nSteps, double timeStep, double printInterval, double trajInterval, int initTitrDynamics) Sample.void
sample
(int cycles, long titrSteps, long confSteps, double timeStep, double printInterval, double trajInterval, int initDynamics) static double[]
setEvenSpacePhLadder
(double pHGap, double pH, int nReplicas) Sets an even pH ladder based on the pH gap.void
This should be implemented as a blocking interrupt; when the method returns theTerminatable
algorithm has reached a clean termination point.
-
Constructor Details
-
PhReplicaExchange
public PhReplicaExchange(MolecularDynamics molecularDynamics, File structureFile, double pH, double[] pHLadder, double temp, ExtendedSystem extendedSystem, double[] x) pHReplicaExchange constructor.- Parameters:
molecularDynamics
- aMolecularDynamics
object.pH
- pH = pKa will be changed from this initial valuepHLadder
- range of pH's that replicas are created fortemp
- temperature of replicaextendedSystem
- extended system attached to this process
-
PhReplicaExchange
public PhReplicaExchange(MolecularDynamics molecularDynamics, File structureFile, double pH, double[] pHLadder, double temp, ExtendedSystem extendedSystem, @Nullable double[] x, @Nullable MolecularDynamicsOpenMM molecularDynamicsOpenMM, @Nullable Potential potential) OpenMM cycled pHReplicaExchange constructor.- Parameters:
molecularDynamics
- aMolecularDynamics
object.pH
- pH = pKa will be changed from this initial valuepHLadder
- range of pH's that replicas are created fortemp
- temperature of replicaextendedSystem
- extended system attached to this processx
- array of coordinatesmolecularDynamicsOpenMM
- for running config steps on GPU
-
-
Method Details
-
sample
public void sample(int cycles, long nSteps, double timeStep, double printInterval, double trajInterval, int initTitrDynamics) Sample. Restart file write-outs are entirely handled by this method based on how many steps are per cycle. User command input is ignored.- Parameters:
cycles
- The number of cycles to run.nSteps
- The number of steps per cycle.timeStep
- The time step.printInterval
- The print interval.
-
sample
public void sample(int cycles, long titrSteps, long confSteps, double timeStep, double printInterval, double trajInterval, int initDynamics) -
setEvenSpacePhLadder
public static double[] setEvenSpacePhLadder(double pHGap, double pH, int nReplicas) Sets an even pH ladder based on the pH gap. -
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
-