# MayerSampling

class MayerSampling : public feasst::Criteria

Mayer-sampling Monte Carlo acceptance criteria (see https://doi.org/10.1103/PhysRevLett.92.220601).

Extrapolation in temperature is performed as descirbed in: https://doi.org/10.1063/1.5016165 .

The coefficients for the Taylor series extrapolation are written to file and include the division by factorial.

Public Functions

void precompute(System *system)

Disable optimization when overlap is detected.

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).

• Criteria arguments.