Class OSTOptions

java.lang.Object
ffx.algorithms.cli.OSTOptions

public class OSTOptions extends Object
Represents command line options for scripts that utilize variants of the Orthogonal Space Tempering (OST) algorithm. Metadynamics will be treated as a special case of OST where there is no dU/dL axis.
Since:
1.0
Author:
Michael J. Schnieders, Jacob M. Litman
  • Constructor Details

    • OSTOptions

      public OSTOptions()
  • Method Details

    • applyAllOSTOptions

      public CrystalPotential applyAllOSTOptions(OrthogonalSpaceTempering orthogonalSpaceTempering, MolecularAssembly firstAssembly, DynamicsOptions dynamicsOptions, BarostatOptions barostatOptions)
      Applies relevant options to an OST, and returns either the OST object or something that wraps the OST (such as a Barostat).
      Parameters:
      orthogonalSpaceTempering - Orthogonal Space Tempering.
      firstAssembly - Primary assembly in OST.
      dynamicsOptions - MD options.
      barostatOptions - NPT options.
      Returns:
      a CrystalPotential object.
    • beginMCOST

      public void beginMCOST(MonteCarloOST monteCarloOST, DynamicsOptions dynamicsOptions, ThermodynamicsOptions thermodynamicsOptions)
      Runs MC-OST.
      Parameters:
      monteCarloOST - MC-OST to run.
      dynamicsOptions - Dynamics options.
      thermodynamicsOptions - Thermodynamics options.
    • assembleMolecularDynamics

      public MolecularDynamics assembleMolecularDynamics(MolecularAssembly[] molecularAssemblies, CrystalPotential crystalPotential, DynamicsOptions dynamicsOptions, AlgorithmListener algorithmListener)
      Assembles a MolecularDynamics wrapped around a Potential.
      Parameters:
      molecularAssemblies - MolecularAssembly[]
      crystalPotential - Potential to run on
      dynamicsOptions - DynamicsOptions
      algorithmListener - AlgorithmListener
      Returns:
      MolecularDynamics
    • constructOST

      public OrthogonalSpaceTempering constructOST(CrystalPotential crystalPotential, @Nullable File lambdaRestartFile, File histogramRestartFile, MolecularAssembly firstAssembly, @Nullable org.apache.commons.configuration2.Configuration addedProperties, DynamicsOptions dynamicsOptions, ThermodynamicsOptions thermodynamicsOptions, LambdaParticleOptions lambdaParticleOptions, @Nullable AlgorithmListener algorithmListener, boolean async)
      constructOST.
      Parameters:
      crystalPotential - a CrystalPotential to build the OST around.
      lambdaRestartFile - a File lambda restart file.
      histogramRestartFile - a File histogram restart file.
      firstAssembly - the first MolecularAssembly in the OST system.
      addedProperties - a Configuration with additional properties.
      dynamicsOptions - a DynamicsOptions with MD-related settings.
      thermodynamicsOptions - a ThermodynamicsOptions with thermodynamics-related settings.
      lambdaParticleOptions - a LambdaParticleOptions with lambda particle-related settings.
      algorithmListener - any AlgorithmListener that OST should update.
      async - If OST should use asynchronous communications.
      Returns:
      the newly built OrthogonalSpaceTempering object.
    • beginMDOST

      public void beginMDOST(OrthogonalSpaceTempering orthogonalSpaceTempering, MolecularAssembly[] molecularAssemblies, CrystalPotential crystalPotential, DynamicsOptions dynamicsOptions, WriteoutOptions writeoutOptions, ThermodynamicsOptions thermodynamicsOptions, File dynFile, AlgorithmListener algorithmListener)
      Begins MD-OST sampling from an assembled OST.
      Parameters:
      orthogonalSpaceTempering - The OST object.
      molecularAssemblies - All MolecularAssemblies.
      crystalPotential - The top-layer CrystalPotential.
      dynamicsOptions - Dynamics options.
      writeoutOptions - a WriteoutOptions object.
      thermodynamicsOptions - Thermodynamics options.
      dynFile - The .dyn dynamics restart file.
      algorithmListener - AlgorithmListener
    • getIndependentWalkers

      public boolean getIndependentWalkers()
      Checks if independent walkers has been specified.
      Returns:
      Walker independence.
    • isMonteCarlo

      public boolean isMonteCarlo()
      Checks if the use of the Monte Carlo algorithm has been specified.
      Returns:
      Monte Carlo OST (as opposed to molecular dynamics OST).
    • setMonteCarlo

      public void setMonteCarlo(boolean monteCarlo)
    • isTwoStep

      public boolean isTwoStep()
      Returns true if the 2-step option is enabled (not guaranteed to also mean that MC is enabled!).
      Returns:
      If --ts is enabled.
    • setTwoStep

      public void setTwoStep(boolean twoStep)
    • setupMCOST

      public MonteCarloOST setupMCOST(OrthogonalSpaceTempering orthogonalSpaceTempering, MolecularAssembly[] molecularAssemblies, DynamicsOptions dynamicsOptions, ThermodynamicsOptions thermodynamicsOptions, boolean verbose, File dynRestart, AlgorithmListener algorithmListener)
      setupMCOST.
      Parameters:
      orthogonalSpaceTempering - a OrthogonalSpaceTempering object.
      molecularAssemblies - an array of MolecularAssembly objects.
      dynamicsOptions - a DynamicsOptions object.
      thermodynamicsOptions - a ThermodynamicsOptions object.
      verbose - Whether to print out additional information about MC-OST.
      algorithmListener - An AlgorithmListener
      Returns:
      An assembled MonteCarloOST ready to run.
    • getCountInterval

      public int getCountInterval()
      Sets the number of time steps between OST counts.
      Returns:
      Returns the interval between OST counts.
    • setCountInterval

      public void setCountInterval(int countInterval)
    • getBiasMag

      public double[] getBiasMag()
      Sets the initial Gaussian bias magnitude in kcal/mol.
      Returns:
      Returns the Bias magnitude.
    • setBiasMag

      public void setBiasMag(double[] biasMag)
    • isIndependentWalkers

      public boolean isIndependentWalkers()
      Enforces that each walker maintains their own histogram.
      Returns:
      Returns true if each Walker has their own histogram.
    • setIndependentWalkers

      public void setIndependentWalkers(boolean independentWalkers)
    • isMetaDynamics

      public boolean isMetaDynamics()
      Use a MetaDynamics style bias.
      Returns:
      Returns true if each Walker has their own histogram.
    • setMetaDynamics

      public void setMetaDynamics(boolean metaDynamics)
    • getTemperingRate

      public double[] getTemperingRate()
      The Dama et al. tempering rate parameter, in multiples of kBT.
      Returns:
      Returns the tempering rate.
    • setTemperingRate

      public void setTemperingRate(double[] temperingRate)
    • getTemperingThreshold

      public double[] getTemperingThreshold()
      The tempering threshold/offset in kcal/mol.
      Returns:
      Returns the tempering threshold.
    • setTemperingThreshold

      public void setTemperingThreshold(double[] temperingThreshold)
    • isMcHardWall

      public boolean isMcHardWall()
      The Monte Carlo scheme can use a hard wall that rejects any sample (Lambda, dU/dL) located in an empty histogram bin.
      Returns:
      Returns true if the MC-OST hard wall constraint is set.
    • setMcHardWall

      public void setMcHardWall(boolean mcHardWall)
    • getMcMDSteps

      public int getMcMDSteps()
      The number of steps to take for each MD trajectory for MC-OST.
      Returns:
      Returns the number of MD steps for each MC-OST round.
    • setMcMDSteps

      public void setMcMDSteps(int mcMDSteps)
    • getMcLambdaStdDev

      public double getMcLambdaStdDev()
      The standard deviation for lambda moves.
      Returns:
      Returns the MC lambda trial move standard deviations.
    • setMcLambdaStdDev

      public void setMcLambdaStdDev(double mcLambdaStdDev)
    • getLambdaWriteOut

      public double getLambdaWriteOut()
      Only write out snapshots if lambda is greater than the value specified.
      Returns:
      Returns the lambda write-out threshold.
    • setLambdaWriteOut

      public void setLambdaWriteOut(double lambdaWriteOut)