The local pair-baseline band (gp_local)¶
Status: implemented. --nebmode gp_local in gprn and GPR_NEB_GP_LOCAL
in the C API run it, and the Python class GPLocalBand wraps it. This page
describes the design of the driver runGpLocalOie in gpr/neb/GPNEB.cpp and
lists its options. To run a band, see Run a GP-NEB band;
for a worked Python run, see the Pt(111) tutorial.
The problem it addresses¶
The gp_oie mode fits one Gaussian process to the pair distances of the whole
system. The gp_local mode is for bands in which many atoms are free but only
some carry the transition. It keeps the Gaussian process to the atoms that
carry the path motion and describes the rest with a pair-additive baseline,
and it measures one image per outer iteration. The heptamer of the Pt(111)
tutorial has 343 atoms, of which 175 are in the band and 168 are frozen (the
Band coordinates: line that gprn prints for those endpoints), and 11 atoms
move by more than 0.1 Angstrom between the endpoints (a check in that
tutorial).
The surrogate¶
The surrogate has two parts, both described in the headers.
A pair-additive baseline (
PairSplineModel,gpr/neb/PairSplineModel.h). The energy is a constant plus a sum over pairs within a cutoff of a radial function \(\phi(r)\), written as a combination of cardinal cubic B-splines on a uniform knot grid. The weights are the posterior mean of a Bayesian linear model fitted to every measured energy and gradient. Pairs run over the moving atoms and between moving and frozen atoms under the minimum-image convention of the cell. The baseline gives forces on every atom and an analytic Hessian. The driver calls the coordinates outside the local set the substrate and uses that Hessian for them.A residual on the local atoms. A Gaussian process over the Cartesian coordinates, with gradient rows on the atoms that carry the endpoint motion, models what the baseline misses. The local atoms are the ones whose endpoint displacement reaches
--gp-local-fractiontimes the largest displacement, plus those within--gp-local-radiusof them.
One outer iteration¶
The driver comment in GPNEB.cpp gives the loop. Every coordinate outside the
local set takes one quasi-Newton step from the force measured at that image,
with secant pairs shared across the band because every image relaxes the same
substrate. One Cholesky factor of the reactant’s substrate Hessian seeds the
quasi-Newton inverse on the substrate block of every image. After that step, the GP relaxes the local subspace of
each image under the band projection, bounded by a trust sphere
(--gp-local-trust) about the image’s last measurement. The worst image is
then measured with the oracle. The band is converged once every interior image
has been measured at its current geometry with a force below the tolerance.
A relaxation round has two phases. In the local phase, the atoms of the local
set and their shell (the neighbours within --gp-local-grow-radius) move
against a standing substrate on the pairs that touch them alone. The phase
runs while the substrate force is the smaller part and the local force keeps
falling by three per cent a step. Then the full band takes over, and the round
ends only on the full band force. Three stalled rounds widen the shell by
--gp-local-grow-radius, twice at most.
A new measurement joins the baseline fit while the baseline still misses that
measurement’s forces by more than a fifth of the force tolerance somewhere.
After that, new points feed the residual only, and the baseline, its substrate
factor and the band memory stay unchanged. Pairs farther apart than
--gp-local-pair-split are summed once per round and held as a linear model
through the round’s band steps.
The knot spacing of the baseline follows the force tolerance \(\varepsilon\),
unless --gp-local-pair-spacing sets it:
with \(h\) in Angstrom and \(\varepsilon\) in eV/Angstrom, limited to the range
0.01 to 0.25 Angstrom. A cubic spline’s force error
scales as the fourth power of its knot spacing, which is why the exponent is
a quarter (the comment and expression in GPNEB.cpp).
Options¶
All options belong to gprn. Defaults are those printed by gprn --help.
Boolean options take true or false.
Option |
Default |
Meaning |
|---|---|---|
|
0.1 |
Atoms whose endpoint displacement reaches this fraction of the largest are local |
|
0 |
Angstrom. Moving atoms within it of a local atom join the polished set; 0 means displacement selection only |
|
16 |
Observations kept in the local model |
|
0.3 |
Angstrom. Largest polish displacement per image from the stepped band, adapted by the measured energy error |
|
20 |
Quasi-Newton iterations per polish |
|
0 |
Marginal-likelihood iterations of the seed fit; 0 keeps the data-spacing seed |
|
4 |
Rebuild the residual model on the refitted baseline, with the substrate Hessian, every N outer iterations |
|
1e-3 |
Standard deviation of the energy and gradient channels of the local model |
|
9.5 |
Angstrom. Cutoff of the pair baseline; 0 disables it |
|
0 |
Angstrom. Knot spacing; 0 derives it from the force tolerance |
|
2 |
Substrate-step and local-polish cycles per outer iteration |
|
7 |
Angstrom. Pairs beyond it are summed once per round; 0 sums every pair on every step |
|
0 |
Angstrom. Atom displacement that also resums the tail inside a round; 0 resums only at round starts |
|
0.5 |
Angstrom. Trust radius of one substrate step in the far subspace |
|
0.05 |
Angstrom. Image displacement that refreshes its substrate Hessian |
|
true |
Measure every interior image of the seeded band before the first relaxation |
|
0.5 |
Surrogate band force at which a relaxation round stops, as a fraction of the convergence force |
|
1 |
Images measured per relaxation round, the worst unmeasured ones first |
|
8 |
Rounds per extra image in the batch; 0 keeps the batch fixed |
|
3 |
Largest batch |
|
0 |
Bands with at most N interior images measure all of them each round |
|
false |
Scale the local block of the band step by the inverse diagonal of the baseline Hessian |
|
3 |
Angstrom. Neighbour radius of the shell that moves with the local atoms in the local phase; 0 keeps the phase set to the local atoms |
|
true |
Halve a band step that raises the largest surrogate force by more than half |
|
true |
Keep the band quasi-Newton memory across outer iterations until the models are refitted |
|
true |
Hold the far atoms still and finish the local atoms on the pairs that touch them alone once the substrate force of a round is under the round tolerance |
|
true |
Add the local GP residual on top of the pair baseline |
|
false |
Measure every image after each polish instead of the worst image only |
The block below compares the defaults of the table with the gprn on your path.
fail=0
help=$(gprn --help) || { echo "gprn --help failed"; exit 1; }
while IFS='|' read -r flag text; do
lines=$(printf '%s\n' "$help" | grep -E -- "^ +$flag " || true)
printf '%s\n' "$lines" | grep -- "$text" >/dev/null || { echo "mismatch: $flag"; fail=1; }
done <<'EOF'
--gp-local-fraction|Default 0.1.
--gp-local-radius|Default 0 (
--gp-local-window|Default 16.
--gp-local-trust|Default 0.3.
--gp-local-inner-max|Default 20.
--gp-local-refit-iters|Default 0.
--gp-local-refit-every|Default 4.
--gp-local-noise|Default 1e-3.
--gp-local-pair-cutoff|Default 9.5.
--gp-local-pair-spacing|Default 0 derives
--gp-local-cycles|Default 2.
--gp-local-pair-split|Default 7.
--gp-local-pair-tail-refresh|Default 0.
--gp-local-far-trust|Default 0.5.
--gp-local-far-refresh|Default 0.05.
--gp-local-initial-sweep|Default true.
--gp-local-inner-tol|Default 0.5.
--gp-local-batch|Default 1.
--gp-local-batch-growth|Default 8.
--gp-local-batch-max|Default 3.
--gp-local-sweep-images|Default 0.
--gp-local-jacobi|Default false.
--gp-local-grow-radius|Default 3.
--gp-local-safeguard|Default true.
--gp-local-keep-memory|Default true.
--gp-local-phase|Default true.
--gp-local-residual|Default true.
--gp-local-sweep|Default false.
EOF
test "$fail" = 0 && echo ok
--gp-local-tier is a separate option. Its help text describes a per-image
local tier under the classic joint profiles; it is not one of the options of
this driver.
Running it¶
The command below is the shape of a run on the Pt(111) heptamer endpoints. The
potential comes from a TOML file, which --config reads only in a build with
Cap’n Proto (-Duse_capnp=true); a build without it exits with
--config requires a build with use_capnp=true. The TOML file for the Morse
oracle is printed on the Pt(111) tutorial
page.
gprn --reactant paper/jcim/records/periodic/inputs/heptamer/reactant.con \
--product paper/jcim/records/periodic/inputs/heptamer/product.con \
--config potential.toml --nimages 8 \
--nebmode gp_local --converged-force 0.01 \
--convergence-force-norm l2 --neb-lbfgs-max-move 0.2 \
--climbing-image true --climbing-image-converged-only false \
--spring-constant 5 --spring-constant-min 5 \
--gp-local-pair-cutoff 9.5
The final [gp_local] summary log line reports polish_steps,
pair_skipped (measurements that did not join the baseline fit), the seconds
spent in fit, polish, measure, observe, gp and restore, the
neighbour-list builds and seconds, far_factorisations and pair_spacing.
Each [gp_local] round line reports the steps taken, the worst image, the
first and last worst force, the local and substrate parts of that force
(F_local and F_far), the climbing-image index at the start and end, the
number of active images, local_steps and phase_entries.
What was measured¶
The record paper/jcim/records/periodic/rerun/pt_rerun_raw.csv lists, for
the heptamer start min01, 20 oracle calls for gp_local and 442 for the
true-force climbing-image NEB, with barriers of 0.588655 eV and 0.588686 eV.
The Pt(111) tutorial reads the same file. Other rows of that file give the
numbers for other starts and for the island set. The comparison depends on the
Morse oracle of the record; it does not say how the mode behaves with an
expensive oracle on other systems.