MayerSampling
-
class MayerSampling : public feasst::Criteria
Mayer-sampling Monte Carlo acceptance criteria as described in Singh and Kofke[1]. Extrapolation in temperature is performed as descirbed in Hatch et al.[2]. The coefficients for the Taylor series extrapolation are written to file and include the factorial division.
References:
Public Functions
-
bool is_accepted(const System &system, Acceptance *acceptance, Random *random)
Return whether or not the trial attempt should be accepted.
-
const Accumulator &mayer() const
Return the mayer ensemble of the full potential.
-
const Accumulator &mayer_ref() const
Return the mayer ensemble of the reference potential.
-
double second_virial_ratio() const
Return the ratio of the second virial coefficient of the full potential to the second virial coefficient of the reference potential.
-
double second_virial_ratio_block_stdev() const
Return the block standard deviation of the second_virial_ratio. This is computed using the error propogation formula variance formula:
\(f = mayer/mayer_ref\)
\(\sigma_f = \sqrt{(\sigma_{mayer}/mayer_ref)^2 + (f\sigma_{mayer_ref}/mayer_ref)^2}\)
-
int num_beta_taylor() const
Return the number of beta derivatives, starting with 1.
-
const std::vector<Accumulator> &beta_taylor() const
Return the beta derivatives in the mayer function f12.
-
double beta_taylor(const int deriv) const
Return the beta derivative in the second virial ratio by n factorial.
-
std::string write() const
Return a human-readable output of all data (not as brief as status).
Arguments
num_trials_per_iteration: define an iteration as a number of trials (as measured by number of calls to is_accepted) default: 1e9.
intra_potential: index of intramolecular potential that will be used to select the move. Ignore if -1 (default: -1).
num_beta_taylor: number of derivatives of second virial ratio with respect to beta. (default: 0).
training_file: if not empty, file name to write training data (default: empty).
training_per_write: write every this many sets of data (default: 1e4).
Criteria arguments.
-
bool is_accepted(const System &system, Acceptance *acceptance, Random *random)