Package ffx.algorithms.cli
Class OSTOptions
java.lang.Object
ffx.algorithms.cli.OSTOptions
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyAllOSTOptions(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).assembleMolecularDynamics(MolecularAssembly[] molecularAssemblies, CrystalPotential crystalPotential, DynamicsOptions dynamicsOptions, AlgorithmListener algorithmListener) Assembles a MolecularDynamics wrapped around a Potential.voidbeginMCOST(MonteCarloOST monteCarloOST, DynamicsOptions dynamicsOptions, ThermodynamicsOptions thermodynamicsOptions) Runs MC-OST.voidbeginMDOST(OrthogonalSpaceTempering orthogonalSpaceTempering, MolecularAssembly[] molecularAssemblies, CrystalPotential crystalPotential, DynamicsOptions dynamicsOptions, WriteoutOptions writeoutOptions, ThermodynamicsOptions thermodynamicsOptions, File dynFile, AlgorithmListener algorithmListener) Begins MD-OST sampling from an assembled OST.constructOST(CrystalPotential crystalPotential, File lambdaRestartFile, File histogramRestartFile, MolecularAssembly firstAssembly, org.apache.commons.configuration2.Configuration addedProperties, DynamicsOptions dynamicsOptions, ThermodynamicsOptions thermodynamicsOptions, LambdaParticleOptions lambdaParticleOptions, AlgorithmListener algorithmListener, boolean async) constructOST.double[]Sets the initial Gaussian bias magnitude in kcal/mol.intSets the number of time steps between OST counts.booleanChecks if independent walkers has been specified.doubleOnly write out snapshots if lambda is greater than the value specified.doubleThe standard deviation for lambda moves.intThe number of steps to take for each MD trajectory for MC-OST.double[]The Dama et al. tempering rate parameter, in multiples of kBT.double[]The tempering threshold/offset in kcal/mol.booleanEnforces that each walker maintains their own histogram.booleanThe Monte Carlo scheme can use a hard wall that rejects any sample (Lambda, dU/dL) located in an empty histogram bin.booleanUse a MetaDynamics style bias.booleanChecks if the use of the Monte Carlo algorithm has been specified.booleanReturns true if the 2-step option is enabled (not guaranteed to also mean that MC is enabled!).voidsetBiasMag(double[] biasMag) voidsetCountInterval(int countInterval) voidsetIndependentWalkers(boolean independentWalkers) voidsetLambdaWriteOut(double lambdaWriteOut) voidsetMcHardWall(boolean mcHardWall) voidsetMcLambdaStdDev(double mcLambdaStdDev) voidsetMcMDSteps(int mcMDSteps) voidsetMetaDynamics(boolean metaDynamics) voidsetMonteCarlo(boolean monteCarlo) voidsetTemperingRate(double[] temperingRate) voidsetTemperingThreshold(double[] temperingThreshold) voidsetTwoStep(boolean twoStep) setupMCOST(OrthogonalSpaceTempering orthogonalSpaceTempering, MolecularAssembly[] molecularAssemblies, DynamicsOptions dynamicsOptions, ThermodynamicsOptions thermodynamicsOptions, boolean verbose, File dynRestart, AlgorithmListener algorithmListener) setupMCOST.
-
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
CrystalPotentialobject.
-
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 ondynamicsOptions- DynamicsOptionsalgorithmListener- 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- aCrystalPotentialto build the OST around.lambdaRestartFile- aFilelambda restart file.histogramRestartFile- aFilehistogram restart file.firstAssembly- the firstMolecularAssemblyin the OST system.addedProperties- aConfigurationwith additional properties.dynamicsOptions- aDynamicsOptionswith MD-related settings.thermodynamicsOptions- aThermodynamicsOptionswith thermodynamics-related settings.lambdaParticleOptions- aLambdaParticleOptionswith lambda particle-related settings.algorithmListener- anyAlgorithmListenerthat OST should update.async- If OST should use asynchronous communications.- Returns:
- the newly built
OrthogonalSpaceTemperingobject.
-
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- aWriteoutOptionsobject.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- aOrthogonalSpaceTemperingobject.molecularAssemblies- an array ofMolecularAssemblyobjects.dynamicsOptions- aDynamicsOptionsobject.thermodynamicsOptions- aThermodynamicsOptionsobject.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)
-