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
-
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.void
beginMCOST
(MonteCarloOST monteCarloOST, DynamicsOptions dynamicsOptions, ThermodynamicsOptions thermodynamicsOptions) Runs MC-OST.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.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.int
Sets the number of time steps between OST counts.boolean
Checks if independent walkers has been specified.double
Only write out snapshots if lambda is greater than the value specified.double
The standard deviation for lambda moves.int
The 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.boolean
Enforces that each walker maintains their own histogram.boolean
The Monte Carlo scheme can use a hard wall that rejects any sample (Lambda, dU/dL) located in an empty histogram bin.boolean
Use a MetaDynamics style bias.boolean
Checks if the use of the Monte Carlo algorithm has been specified.boolean
Returns true if the 2-step option is enabled (not guaranteed to also mean that MC is enabled!).void
setBiasMag
(double[] biasMag) void
setCountInterval
(int countInterval) void
setIndependentWalkers
(boolean independentWalkers) void
setLambdaWriteOut
(double lambdaWriteOut) void
setMcHardWall
(boolean mcHardWall) void
setMcLambdaStdDev
(double mcLambdaStdDev) void
setMcMDSteps
(int mcMDSteps) void
setMetaDynamics
(boolean metaDynamics) void
setMonteCarlo
(boolean monteCarlo) void
setTemperingRate
(double[] temperingRate) void
setTemperingThreshold
(double[] temperingThreshold) void
setTwoStep
(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
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 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
- aCrystalPotential
to build the OST around.lambdaRestartFile
- aFile
lambda restart file.histogramRestartFile
- aFile
histogram restart file.firstAssembly
- the firstMolecularAssembly
in the OST system.addedProperties
- aConfiguration
with additional properties.dynamicsOptions
- aDynamicsOptions
with MD-related settings.thermodynamicsOptions
- aThermodynamicsOptions
with thermodynamics-related settings.lambdaParticleOptions
- aLambdaParticleOptions
with lambda particle-related settings.algorithmListener
- anyAlgorithmListener
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
- aWriteoutOptions
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
- aOrthogonalSpaceTempering
object.molecularAssemblies
- an array ofMolecularAssembly
objects.dynamicsOptions
- aDynamicsOptions
object.thermodynamicsOptions
- aThermodynamicsOptions
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)
-