Package ffx.algorithms.cli
Class DynamicsOptions
java.lang.Object
ffx.algorithms.cli.DynamicsOptions
Represents command line options for scripts that run molecular dynamics.
- Since:
- 1.0
- Author:
- Michael J. Schnieders, Hernan V. Bernabe
-
Field Summary
Modifier and TypeFieldDescriptionIntegrator.Thermostat. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
The restart save frequency in picoseconds (1.0 psec default).int
getCheckpointFrequency
(int defaultFrequency) The checkpoint frequency in steps.double
getDt()
The time step in femtoseconds (default of 1.0).double
getDynamics
(WriteoutOptions writeoutOptions, Potential potential, MolecularAssembly activeAssembly, AlgorithmListener algorithmListener) Initialize a MolecularDynamics from the parsed options.getDynamics
(WriteoutOptions writeoutOptions, Potential potential, MolecularAssembly activeAssembly, AlgorithmListener algorithmListener, MDEngine requestedEngine) Initialize a MolecularDynamics from the parsed options.The default engine choice for integrating the equations of motionThe integrator: current choices are Beeman, RESPA, Stochastic (Langevin) or Verlet.long
boolean
Getter for the fieldoptimize
.double
The thermodynamics reporting frequency in picoseconds (0.1 psec default).int
getReportFrequency
(int defaultFrequency) The molecular dynamics reporting frequency in steps.double
Write/snapshot appending interval.long
getSteps()
The number of molecular dynamics steps (default is 1,000,000).double
The simulation temperature (Kelvin).The desired thermostat: current choices are Adiabatic, Berendsen, or Bussi.int
Number of steps for each OpenMM MD cycle.double
getWrite()
Snapshot save frequency in picoseconds (1.0 psec default).void
init()
Parse the thermostat and integrator.boolean
Saves low-energy snapshots discovered (only for single topology simulations).void
setCheckpoint
(double checkpoint) void
setDt
(double dt) void
setEngineString
(String engineString) void
setIntegrator
(IntegratorEnum integrator) Set the integrator.void
setIntegratorString
(String integratorString) void
setOptimize
(boolean optimize) void
setReport
(double report) void
setSteps
(long steps) void
setTemperature
(double temperature) void
setThermostat
(ThermostatEnum thermostat) Set the thermostat.void
setThermostatString
(String thermostatString) void
setTrajSteps
(int trajSteps) void
setWrite
(double write)
-
Field Details
-
thermostat
Thermostat. -
integrator
Integrator.
-
-
Constructor Details
-
DynamicsOptions
public DynamicsOptions()
-
-
Method Details
-
getCheckpoint
public double getCheckpoint()The restart save frequency in picoseconds (1.0 psec default).- Returns:
- Restart file interval in picoseconds.
-
getCheckpointFrequency
public int getCheckpointFrequency(int defaultFrequency) The checkpoint frequency in steps.- Parameters:
defaultFrequency
- The default frequency if the checkpoint interval is less than the time step.- Returns:
- The checkpoint frequency in steps.
-
setCheckpoint
public void setCheckpoint(double checkpoint) -
getDt
public double getDt()The time step in femtoseconds (default of 1.0). A value of 2.0 is possible for the RESPA integrator.- Returns:
- Time step in femtoseconds.
-
getDtPsec
public double getDtPsec() -
setDt
public void setDt(double dt) -
getDynamics
public MolecularDynamics getDynamics(WriteoutOptions writeoutOptions, Potential potential, MolecularAssembly activeAssembly, AlgorithmListener algorithmListener) Initialize a MolecularDynamics from the parsed options.- Parameters:
writeoutOptions
- aWriteoutOptions
object.potential
- aPotential
object.activeAssembly
- aMolecularAssembly
object.algorithmListener
- aAlgorithmListener
object.- Returns:
- a
MolecularDynamics
object.
-
getDynamics
public MolecularDynamics getDynamics(WriteoutOptions writeoutOptions, Potential potential, MolecularAssembly activeAssembly, AlgorithmListener algorithmListener, @Nullable MDEngine requestedEngine) Initialize a MolecularDynamics from the parsed options.- Parameters:
writeoutOptions
- aWriteoutOptions
object.potential
- aPotential
object.activeAssembly
- aMolecularAssembly
object.algorithmListener
- aAlgorithmListener
object.requestedEngine
- The requested engine (either FFX or OpenMM).- Returns:
- a
MolecularDynamics
object.
-
getNumSteps
public long getNumSteps() -
getOptimize
public boolean getOptimize()Getter for the fieldoptimize
.- Returns:
- Whether to optimize structures.
-
getReport
public double getReport()The thermodynamics reporting frequency in picoseconds (0.1 psec default).- Returns:
- Thermodynamics logging interval in picoseconds.
-
getReportFrequency
public int getReportFrequency(int defaultFrequency) The molecular dynamics reporting frequency in steps.- Parameters:
defaultFrequency
- The default frequency if the report interval is less than the time step.- Returns:
- The reporting frequency in steps.
-
setReport
public void setReport(double report) -
getSnapshotInterval
public double getSnapshotInterval()Write/snapshot appending interval.- Returns:
- Interval between appending snapshots in psec.
-
getTemperature
public double getTemperature()The simulation temperature (Kelvin).- Returns:
- Temperature in Kelvins.
-
setTemperature
public void setTemperature(double temperature) -
init
public void init()Parse the thermostat and integrator. -
getThermostatString
The desired thermostat: current choices are Adiabatic, Berendsen, or Bussi.- Returns:
- Returns a String for the requested thermostat.
-
setThermostat
Set the thermostat.- Parameters:
thermostat
- Thermostat to replace the requested one with.
-
setIntegrator
Set the integrator.- Parameters:
integrator
- Integrator to replace the requested one with.
-
setThermostatString
-
getIntegratorString
The integrator: current choices are Beeman, RESPA, Stochastic (Langevin) or Verlet.- Returns:
- Returns a String for the requested integrator.
-
setIntegratorString
-
getWrite
public double getWrite()Snapshot save frequency in picoseconds (1.0 psec default).- Returns:
- Returns the frequency to save snapshots.
-
setWrite
public void setWrite(double write) -
getSteps
public long getSteps()The number of molecular dynamics steps (default is 1,000,000).- Returns:
- Returns the number of MD time steps.
-
setSteps
public void setSteps(long steps) -
getTrajSteps
public int getTrajSteps()Number of steps for each OpenMM MD cycle.- Returns:
- Returns the number of steps for OpenMM MD cycles.
-
setTrajSteps
public void setTrajSteps(int trajSteps) -
isOptimize
public boolean isOptimize()Saves low-energy snapshots discovered (only for single topology simulations).- Returns:
- Returns true if low-energy snapshots should be saved.
-
setOptimize
public void setOptimize(boolean optimize) -
getEngineString
The default engine choice for integrating the equations of motion- Returns:
- Returns a String for the requested engine.
-
setEngineString
-