class TrialComputeAdd : public feasst::TrialCompute

Attempt to add a particle.

The derivation of the acceptance criteria follows a similar procedure as descibed in TrialComputeMove, except with the following differences.

The limiting distribution in the grand canonical ensemble is

\(\pi_i \propto \frac{e^{-\beta U + \beta \mu_t N_t}}{\Lambda^{dN}}\)

where \(\mu_t\) is the chemical potential of particles of type t, \(\Lambda\) is the de Broglie wavelength, \(N_t\) is the number of particles of type t and d is the dimension.

The transition probabilities are as follows, assuming that this move is coupled with a trial that removes particles with the same selection weight.

Forward event

[reverse event]

Probability, \(\pi_{on}\)

[reverse probability, \(\pi_{no}\)]

Select insert trial

[Select remove trial]



Place particle of type t

[Delete particle type t]





\(min(1, \chi)\)

\([min(1, 1/\chi)]\)

Application of local detailed balance yields the acceptance probability, \(\chi\).

\(\frac{e^{-\beta U_o + \beta\mu_t N_t}}{\Lambda^{dN}w V }min(1, \chi) = \frac{e^{-\beta U_n + \beta\mu_t (N_t+1)}}{\Lambda^{d(N+1)}w (N_t+1)} min(1, 1/\chi)\)

\(\chi = \frac{V e^{-\beta\Delta U + \beta\mu_t}}{(N_t+1)\Lambda^d}\)

Note that the number of particles, \(N_t\) is from the perspective of the old state. Thus, if the particle has already been added during computation of \(\chi\), then \(N_t + 1 \rightarrow N_t\). The same applies for TrialComputeRemove.

The de Broglie wavelength, \(\Lambda^d\), is absorbed into the definition of \(\mu\) for convenience, \(\mu + \ln(\Lambda^d)/\beta \rightarrow \mu\).

Public Functions

void perturb_and_acceptance(Criteria *criteria, System *system, Acceptance *acceptance, std::vector<TrialStage*> *stages, Random *random)

Perform the Perturbations and determine acceptance.