Skip to content

Distance table operation modes

Ye Luo edited this page Feb 22, 2021 · 1 revision

Two operation modes

The using and updating distance tables via ParticleSet operate in two modes, regular and forward modes.

Regular mode

The regular mode can only be used when the distance tables for particle pairs are fully up-to-date. This is the case after calling ParticleSet::update() in a unit test or after p-by-p moves in a QMC driver.

In this mode, the distance tables remain up-to-date after calling ParticleSet::acceptMove and calling ParticleSet::rejectMove is not mandatory.

Forward mode

The forward mode assumes that distance table is not fully up-to-date until every particle is accepted or rejected to move once in order. This is the mode used in the p-by-p part of drivers.

In this mode, calling ParticleSet::accept_rejectMove is required to handle accept/reject rather than calling individual ParticleSet::acceptMove and ParticleSet::reject. ParticleSet::accept_rejectMove(iel) ensures the distance tables (jel < iel) part is fully up-to-date regardless a move is accepted or rejected. For this reason, the rejecting operation inside ParticleSet::accept_rejectMove involves writing the distances with respect to the old particle position.