Biased Sampling Methods
MetaQCD.BiasModule.calc_weights — MethodWeighting schemes based on the ones compared in
https://pubs.acs.org/doi/pdf/10.1021/acs.jctc.9b00867
MetaQCD.BiasModule.Bias — TypeBias{NumCV,BiasType,Smearing,Weights,BiasFile,DataFile}Container for bias potential and metadata.
Bias(p::ParameterSet, U::Gaugefield; mpi_multi_sim=false, instance=0, dummy=false, build=false, bias=nothing)Create a Bias that holds general parameters of bias enhanced sampling, like the kind of CV, its smearing and filenames relevant to the bias. Also holds the specific kind of bias (Metadynamics, OPES or VES for now).
The instance keyword is used in case of PT-MetaD and multiple walkers to assign the correct usebias to each stream.
If mpi_multi_sim=true the program assumes that there are multiple simulation streams running in parallel via MPI, which is necessary information for correct file names
If dummy=true the bias is static and set to zero as for the measurement stream in PT-MetaD
If build=true certain things are made more convenient for the building of the bias, like only the root rank printing its bias to file etc.
The kwarg bias is there for loading checkpoints, since checkpoints only keep track of the bias field and therefore all other information is gathered from the parameter file as usual
MetaQCD.BiasModule.Metadynamics — TypeMetadynamics <: AbstractBiasMetadynamics bias-enhanced sampler from https://arxiv.org/abs/cond-mat/0208352 .
Metadynamics(p::MetadynamicsParameters; dummy=false)Create an instance of a Metadynamics bias using the inputs or the parameters given in p.
Specifiable parameters
kind_of_cv::String = "topcharge_clover" - Collective variable numsmears_for_cv::Int64 = 4 - Number of smearing steps for the CV (step size is given in superstructure Bias) symmetric::Bool = true - If true, the bias is built symmetrically by updating for both cv and -cv at every update-iteration stride::Int64 = 1 - Number of iterations between updates; must be >0 cvlims::NTuple{2, Float64} = (-6, 6) - Minimum and maximum of the explorable cv-space; must be ordered write_bias_every::Int64 = 1 - Number of update iterations between writes of the bias to file biasfactor::Float64 = Inf - Biasfactor for well-tempered Metadynamics; must be >1 bin_width::Float64 = 0.1 - Width of bins in histogram; must be >0 weight::Float64 = 0.01 - (Starting) Height of added Gaussians; must be positive penalty_weight::Float64 = 1000 - Penalty when cv is outside of cvlims; must be positive
MetaQCD.BiasModule.OPES — TypeOPES <: AbstractBiasOPES bias-enhanced sampler from https://arxiv.org/abs/1909.07250 .
OPES(p::OPESParameters; instance=1, dummy=false)Create an instance of a OPES bias using the parameters given in p.
Specifiable parameters
kind_of_cv::String = "topcharge_clover" - Collective variable numsmears_for_cv::Int64 = 4 - Number of smearing steps for the CV (step size is given in superstructure Bias) symmetric::Bool = true - If true, the bias is built symmetrically by updating for both cv and -cv at every update-iteration stride::Int64 = 1 - Number of iterations between updates; must be >0 cvlims::NTuple{2, Float64} = (-6, 6) - Minimum and maximum of the explorable cv-space; must be ordered write_bias_every::Int64 = 1 - Number of update iterations between writes of the bias to file barrier::Float64 = 30 - Estimate of height of action barriers biasfactor::Float64 = Inf - Biasfactor for well-tempered OPES; must be >1 σ₀::Float64 = 0.1 - (Starting) width of kernels; must be >0 σ_min::Float64 = 1e-6 - Minimum width of kernels; must be >0 fixed_σ::Bool = true - If true, width if kernels decreases iteratively ϵ::Float64 = exp(-barrier/(1-1/biasfactor)) - Determines maximum height of bias; must be >0 no_Z::Bool = false - If false normalization factor Z is dynamically adjusted threshold::Float64 = 1.0 - Threshold distance for kernel merging; must be >0 cutoff::Float64 = sqrt(2barrier/(1-1/biasfactor)) - Cutoff value for kernels; must be >0 penalty::Float64 = exp(-0.5cutoff²) - Penalty for being outside kernel cutoff; must be >0
MetaQCD.BiasModule.OPESmultithermal — TypeOPESmultithermal{CV} <: AbstractBiasOPES MultiThermal from https://arxiv.org/abs/1909.07250 .
OPESmultithermal(; symmetric=true, stride=1, cvlims=(-6, 6), barrier=30,
biasfactor=Inf, σ₀=0.1, σ_min=1e-6, fixed_σ=true, opes_epsilon=0.0,
no_Z=false, threshold=1.0, cutoff=0.0)
OPESmultithermal(p::OPESmultithermalParameters; dummy=false)Create an instance of a OPES bias using the parameters given in p.
Specifiable parameters
numsmears_for_cv::Int64 = 4 - Number of smearing steps for the CV (step size is given in superstructure Bias) symmetric::Bool = true - If true, the bias is built symmetrically by updating for both cv and -cv at every update-iteration stride::Int64 = 1 - Number of iterations between updates; must be >0 write_bias_every::Int64 = 1 - Number of update iterations between writes of the bias to file beta_min_max::Vector{Float64} = [6.0, 6.3] - Minimum and maximum of beta range (must be ordered) beta_num::Int64 = 10 - Number of intermediate betas between beta_min and beta_max
MetaQCD.BiasModule.VES — TypeVES <: AbstractBiasVariationally enhanced sampler that uses a fourier basis to approximate the bias potential.
VES(p::VESParameters; dummy=false)Create an instance of a static VES bias using the inputs or the parameters given in p.
Specifiable parameters
kind_of_cv::String = "topcharge_clover" - Collective variable numsmears_for_cv::Int64 = 4 - Number of smearing steps for the CV (step size is given in superstructure Bias) cvlims::NTuple{2, Float64} = (-6, 6) - Minimum and maximum of the explorable cv-space; must be ordered penalty_weight::Float64 = 1000 - Penalty when cv is outside of cvlims; must be positive nbasis::Int64 = 20 - Number of basis functions used in approximation batch_size::Int64 = 50 - Number CV measurements before optimization iteration