Package ffx.algorithms.dynamics
Class NonEquilbriumDynamics
java.lang.Object
ffx.algorithms.dynamics.NonEquilbriumDynamics
NonEquilbriumDynamics is a class that contains methods to control
non-equilibrium molecular dynamics simulations.
-
Constructor Summary
ConstructorsConstructorDescriptionNonEquilbriumDynamics(int nonEquilibriumLambdaSteps, boolean reverseNEQ) Constructor for NonEquilbriumDynamics. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWork(double work) Add a work contribution.intgetCurrentLambdaBin(long step) Get the current lambda bin for a given MD step.doubleGet the initial lambda value.doublegetNextLambda(long step, double currentLambda) Get the non-equilibrium lambda value for a given MD step.intGet the number of non-equilibrium lambda steps.doublegetWork()Get the total work for a given range of lambda bins.booleanisUpdateStep(long step) Check if the non-equilibrium lambda value should be updated at a given MD step.longsetMDSteps(long nSteps) Configure increments of the non-equilibrium lambda values based on the total number of MD steps.
-
Constructor Details
-
NonEquilbriumDynamics
public NonEquilbriumDynamics(int nonEquilibriumLambdaSteps, boolean reverseNEQ) Constructor for NonEquilbriumDynamics.- Parameters:
nonEquilibriumLambdaSteps- The number of non-equilibrium lambda steps.reverseNEQ- If true, lambda values should decrease from 1 to 0.
-
-
Method Details
-
getNonEquilibriumLambdaSteps
public int getNonEquilibriumLambdaSteps()Get the number of non-equilibrium lambda steps.- Returns:
- The number of non-equilibrium lambda steps.
-
getInitialLambda
public double getInitialLambda()Get the initial lambda value.- Returns:
- The initial lambda value.
-
setMDSteps
public long setMDSteps(long nSteps) Configure increments of the non-equilibrium lambda values based on the total number of MD steps.- Parameters:
nSteps- The total number of MD steps.- Returns:
- The total number of MD steps may be adjusted to be a multiple of the non-equilibrium lambda steps.
-
isUpdateStep
public boolean isUpdateStep(long step) Check if the non-equilibrium lambda value should be updated at a given MD step.- Parameters:
step- The MD step number.- Returns:
- True if the non-equilibrium lambda value should be updated.
-
addWork
public void addWork(double work) Add a work contribution.- Parameters:
work- The work value.
-
getWork
public double getWork()Get the total work for a given range of lambda bins.- Returns:
- The total work.
-
getNextLambda
public double getNextLambda(long step, double currentLambda) Get the non-equilibrium lambda value for a given MD step.- Parameters:
step- The MD step number.currentLambda- The current lambda value.- Returns:
- The lambda value.
-
getCurrentLambdaBin
public int getCurrentLambdaBin(long step) Get the current lambda bin for a given MD step.- Parameters:
step- The MD step number.- Returns:
- The lambda bin.
-