Skip to content

Hybrid reverse Monte Carlo

Reverse Monte Carlo (RMC) refines an atomistic configuration by proposing random moves and accepting them with a probability that improves the fit to experimental data. Hybrid RMC (HRMC) adds an interatomic potential to the cost, so the refined structure is constrained to be energetically sensible as well as consistent with the data.

The cost function

Each scattering constraint \(d\) contributes a weighted χ²,

\[ \chi^2 \;=\; \sum_d w_d \sum_i \frac{\big[y_d^{\text{calc}}(x_i) - y_d^{\text{exp}}(x_i)\big]^2} {\sigma_{d,i}^{\,2}}, \]

where \(y\) is \(F(Q)\) or \(G(r)\) on the experimental grid and the \(\sigma_{d,i}\) are the per-point uncertainties supplied with the data (the practical knobs for balancing datasets). The potential enters as the configurational energy \(U\) (in eV, from LAMMPS), and the total cost is \(\chi^2 + \beta U\) with \(\beta = 1/k_\mathrm{B}T\).

Acceptance rules

A trial move is accepted with the Metropolis probability

\[ P_\text{acc} \;=\; \min\!\Big\{1,\; \exp\!\big(-\big[\Delta\chi^2 + \beta\,\Delta U\big]\big)\Big\} \]

in the canonical (NVT) case. When a pressure schedule is set and volume moves are proposed as \(\ln V \to \ln V + \delta\), the isothermal–isobaric (NPT) rule is used:

\[ P_\text{acc} \;=\; \min\!\Big\{1,\; \exp\!\Big( -\big[\Delta\chi^2 + \beta\,(\Delta U + P\,\Delta V)\big] + (N{+}1)\ln\tfrac{V'}{V} \Big)\Big\}, \]

where \(N\) is the number of independently scaled points — atoms for a free-atom volume move, molecules when rigid_molecules=True scales centres of mass only. Pressure schedules are supplied in GPa and converted to eV/ų internally.

The single-β convention

Constraints return raw quantities: EnthalpyConstraint.compute() is the potential energy in eV, with no temperature factor. β is applied exactly once, inside nvt_accept/npt_accept. Keep this in mind when writing custom constraints — return the physical quantity, not a pre-scaled cost.

Temperature, annealing, and step-size tuning

The effective temperature sets how much energy (and cost) fluctuation is tolerated. A ConstantSchedule gives standard sampling at fixed \(T\); LinearSchedule or ExponentialDecaySchedule implement simulated annealing by lowering \(T\) (raising β) as the run proceeds.

Each MoveSpec also adapts its proposal amplitude: every interval trials, the tuned parameter is multiplied or divided by adjustment_factor to steer the observed acceptance rate towards target_acceptance, clamped to [min_values, max_values].

Adaptive tuning and detailed balance

Amplitude tuning (and annealing) mean the Markov chain is not strictly stationary while parameters are changing. This is standard practice in RMC-type refinement, where the goal is a representative refined configuration rather than rigorous ensemble averages — but for production sampling you may wish to freeze the amplitudes (set min_values = max_values) after an equilibration period.

References

  • R. L. McGreevy & L. Pusztai, Mol. Simul. 1, 359–367 (1988) — reverse Monte Carlo.
  • G. Opletal et al., Mol. Simul. 28, 927–938 (2002) — hybrid reverse Monte Carlo.
  • M. G. Tucker et al., J. Phys.: Condens. Matter 19, 335218 (2007) — RMCProfile; total-scattering refinement in practice.