TrialComputeAdd

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]

\(1/w\)

\([1/w]\)

Place particle of type t

[Delete particle type t]

\(1/V\)

\(\left[\frac{1}{N_t+1}\right]\)

Accept

[Accept]

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

For configurational bias, consider multiple trial positions and select one.

Forward event

[reverse event]

Probability, \(\pi_{on}\)

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

Generate k positions in V. Probability that x_n is in k.

[Select particle of type t]

\(k/V\)

\([\frac{1}{N_t + 1}]\)

Pick x_n in k positions with probability P_k.

[Remove selected particle]

\(P_k\)

\([1]\)

Accept

[Accept]

\(min(1, \chi)\)

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

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

where \(U\) is the interaction energy of the new site with the existing sites and \(U_o\) is the energy of the original configuration.

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

If the probability of picking a position is chosen by the Rosenbluth factor,

\(P_k = e^{-\beta U}/\sum_i^k e^{-\beta U_i}\).

Thus, the acceptance is given by

\(\chi = \frac{V \sum_i^k e^{-\beta U_i}}{k(N_t+1)\Lambda^d}e^{\beta\mu_t}\)

For dual-cut configurational bias, the new trials are instead chosen from a reference potential, \(U^r\), that is ideally much faster to compute than the full potential but still contains sampling-relevant terms (e.g., excluded volume in a dense system).

\(P_k = e^{-\beta U^r}/\sum_i^k e^{-\beta U_i^r}\)

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

Note that these equations consider only a single-site particle.

For the deletion trial, the forward and reverse moves are switched.

Forward event

[reverse event]

Probability, \(\pi_{on}\)

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

Select particle of type t.

[Generate k positions in V. Probability that x_o is in k.]

\(\frac{1}{N_t}\)

\([k/V]\)

Remove selected particle

[Pick x_o in k positions with probability P_k.]

\(1\)

\([P_k]\)

Accept

[Accept]

\(min(1, \chi)\)

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

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

where \(U\) is the interaction energy of the removed site with the existing sites and \(U_o\) is the energy of the original configuration.

\(\chi = \frac{k P_k \Lambda^d}{V N_t}e^{\beta U - \beta\mu_t}\)

If the probability of picking a position is chosen by the Rosenbluth factor,

\(P_k = e^{-\beta U}/\sum_i^k e^{-\beta U_i}\).

Note that one of the k positions is \(x_o\). Thus, the acceptance is given by

\(\chi = \frac{k \Lambda^d}{V N_t \sum_i^k e^{-\beta U_i}}e^{-\beta\mu_t}\)

Public Functions

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

Perform the Perturbations and determine acceptance.