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
FieldsModifier and TypeFieldDescriptionIntegrator.Thermostat. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleThe restart save frequency in picoseconds (1.0 psec default).intgetCheckpointFrequency(int defaultFrequency) The checkpoint frequency in steps.doublegetDt()The time step in femtoseconds (default of 1.0).doublegetDynamics(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.longbooleanGetter for the fieldoptimize.doubleThe thermodynamics reporting frequency in picoseconds (0.1 psec default).intgetReportFrequency(int defaultFrequency) The molecular dynamics reporting frequency in steps.doubleWrite/snapshot appending interval.longgetSteps()The number of molecular dynamics steps (default is 1,000,000).doubleThe simulation temperature (Kelvin).The desired thermostat: current choices are Adiabatic, Berendsen, or Bussi.intNumber of steps for each OpenMM MD cycle.doublegetWrite()Snapshot save frequency in picoseconds (1.0 psec default).voidinit()Parse the thermostat and integrator.booleanSaves low-energy snapshots discovered (only for single topology simulations).voidsetCheckpoint(double checkpoint) voidsetDt(double dt) voidsetEngineString(String engineString) voidsetIntegrator(IntegratorEnum integrator) Set the integrator.voidsetIntegratorString(String integratorString) voidsetOptimize(boolean optimize) voidsetReport(double report) voidsetSteps(long steps) voidsetTemperature(double temperature) voidsetThermostat(ThermostatEnum thermostat) Set the thermostat.voidsetThermostatString(String thermostatString) voidsetTrajSteps(int trajSteps) voidsetWrite(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- aWriteoutOptionsobject.potential- aPotentialobject.activeAssembly- aMolecularAssemblyobject.algorithmListener- aAlgorithmListenerobject.- Returns:
- a
MolecularDynamicsobject.
-
getDynamics
public MolecularDynamics getDynamics(WriteoutOptions writeoutOptions, Potential potential, MolecularAssembly activeAssembly, AlgorithmListener algorithmListener, @Nullable MDEngine requestedEngine) Initialize a MolecularDynamics from the parsed options.- Parameters:
writeoutOptions- aWriteoutOptionsobject.potential- aPotentialobject.activeAssembly- aMolecularAssemblyobject.algorithmListener- aAlgorithmListenerobject.requestedEngine- The requested engine (either FFX or OpenMM).- Returns:
- a
MolecularDynamicsobject.
-
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
-