Class DynamicsOptions

java.lang.Object
ffx.algorithms.cli.DynamicsOptions

public class DynamicsOptions extends Object
Represents command line options for scripts that run molecular dynamics.
Since:
1.0
Author:
Michael J. Schnieders, Hernan V. Bernabe
  • Field Details

  • 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 - a WriteoutOptions object.
      potential - a Potential object.
      activeAssembly - a MolecularAssembly object.
      algorithmListener - a AlgorithmListener 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 - a WriteoutOptions object.
      potential - a Potential object.
      activeAssembly - a MolecularAssembly object.
      algorithmListener - a AlgorithmListener object.
      requestedEngine - The requested engine (either FFX or OpenMM).
      Returns:
      a MolecularDynamics object.
    • getNumSteps

      public long getNumSteps()
    • getOptimize

      public boolean getOptimize()
      Getter for the field optimize.
      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

      public String getThermostatString()
      The desired thermostat: current choices are Adiabatic, Berendsen, or Bussi.
      Returns:
      Returns a String for the requested thermostat.
    • setThermostat

      public void setThermostat(ThermostatEnum thermostat)
      Set the thermostat.
      Parameters:
      thermostat - Thermostat to replace the requested one with.
    • setIntegrator

      public void setIntegrator(IntegratorEnum integrator)
      Set the integrator.
      Parameters:
      integrator - Integrator to replace the requested one with.
    • setThermostatString

      public void setThermostatString(String thermostatString)
    • getIntegratorString

      public String getIntegratorString()
      The integrator: current choices are Beeman, RESPA, Stochastic (Langevin) or Verlet.
      Returns:
      Returns a String for the requested integrator.
    • setIntegratorString

      public void setIntegratorString(String integratorString)
    • 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

      public String getEngineString()
      The default engine choice for integrating the equations of motion
      Returns:
      Returns a String for the requested engine.
    • setEngineString

      public void setEngineString(String engineString)