Configuration files

This page is written by hand; the key and flag tables it points to are generated. TOML configuration keys lists every TOML key, with its type, flag, default and meaning, from managers/io/TomlConfigLoader.cpp and schema/params.capnp. The gprn command-line reference lists every flag. For a first run without a file, follow the gprn tutorial.

Choosing a file

gprn reads a file given with --config PATH or --config=PATH. A path that ends in .toml (the suffix is case insensitive) selects the TOML reader. Any other path is read as a binary Cap’n Proto message of type gpr::schema::InputParameters. Both readers need a build with -Duse_capnp=true; the default of that option is false. Without it, gprn prints --config requires a build with use_capnp=true and exits with status 1. A file that cannot be read or that holds an unknown key, an unknown enum name or a value of the wrong type stops gprn with --config PATH: followed by the reason, and exit status 1.

gprd --config FILE is a different mechanism. It reads a binary Cap’n Proto parameter file in a build with use_capnp=true, and a text parameter file of key = value lines (read by FileManager::readInputFile) in a build without it. It has no TOML reader, and a .bin path in a build without use_capnp exits with status 1.

TOML files

The loader writes the file into the same Cap’n Proto message that a binary file uses, then copies the fields onto the command-line settings of gprn before it reads argv. A flag on the command line therefore replaces the file value wherever --config appears in the command.

A key that the file leaves out takes the schema default of its field, and the copy overwrites the flag default with it. For most keys the two are equal. The exceptions are the following; each is stated in the Meaning column of TOML configuration keys.

  • [gp] hyperparameter_mode and hyperparameter_objective are copied only when the key is present, so an absent key leaves the flag unset. Writing inla or nlml selects that value even though it equals the schema default. An unset mode follows the model profile, as for the flag; see --hyperparameter-mode in the gprn reference.

  • [oracle.metatomic] uncertainty_threshold and --metatomic-uncertainty both default to 1.0.

  • [linalg] threads is copied only when it is positive, so an absent key leaves the flag default 1.

  • The six [gp] initialization keys in the next table are applied only when present.

For example, save this as run.toml. The two .con paths name the reactant and product geometries of the band:

[run]
reactant = "reactant.con"
product = "product.con"
output = "neb.h5"

[oracle]
potential = "lj"

[band]
nimages = 8
converged_force = 0.05
spring_constant = 5.0

[gp]
hyperparameter_mode = "scg"
hyperparameter_objective = "nlml"

With a gprn built with -Duse_readcon=true and -Duse_capnp=true, run:

cp examples/lj-pentamer/reactant.con examples/lj-pentamer/product.con .
builddir/gprn --config run.toml --nimages 5

This runs five intermediate images and takes the remaining values from the file. Add --dump-cli-args to print the command-line settings after the file is applied, without starting a search. The dump does not show the binary-file overrides described below, because they are applied when the run configuration is built.

The TOML reader accepts the tables [run], [band], [band.lbfgs], [band.mmf], [gp], [gp.hssvd], [uncertainty], [acquisition], [trust], [oracle], [oracle.metatomic] and [linalg]. Trace settings belong to [run]. [oracle.parameters] carries an rgpot PotentialConfig, and --potential-config FILE replaces it. The loader rejects any other key, in these tables or at the top level.

These [gp] keys set the GP initialization. Each is applied only when the file supplies it, and an explicit zero counts as supplied:

TOML key

GP initialization field

Value without the key

gp_sigma2

Covariance noise variance

1e-4

jitter_sigma2

Diagonal jitter

1e-4

noise_sigma2

Likelihood noise variance

1e-4

max_iter

Hyperparameter optimizer iteration limit

400

tol_func

Hyperparameter optimizer function tolerance

--gp-opt-tol (1e-3)

tol_sol

Hyperparameter optimizer solution tolerance

--gp-opt-tol (1e-3)

An explicit --gp-opt-tol replaces both file tolerances. In hyperparameter_objective, local-loo and local_loo select the local leave-one-out objective.

Binary files

--config params.bin loads a gpr::schema::InputParameters message and, for the fields it covers, overwrites the command-line values. The code is loadNebConfigFromCapnp and loadOciMmfConfigFromCapnp in managers/io/CapnProtoNebLoader.cpp. main_neb.cpp calls them after it has mapped the flags onto GPNEBConfig and OCINEBConfig, so here the file wins over an explicit flag.

The binary reader applies these fields, with their schema defaults when the message does not set them:

  • NebParams: mode, acquisition, convergence force and force norm, maximum outer and inner iterations, spring constant and floor, geometric spring, climbing image and climbing_image_converged_only, the CI activation tolerance and factor, IDPP and SIDPP with their alpha and geodesic settings, the geodesic image prior, the three-phase picker, seed-full-chain, OIE evaluations, per-image minimum training rows and neighbours, the IMSPE refit-skip tolerance, the theta-shift skip tolerance and auto setting, the scale-free trust setting and tau, the reparameterization period and tolerance, and the eOn inner mode.

  • NebLbfgs: maximum move, memory, inverse curvature, finite-difference step, auto-scale, angle reset, distance reset, and the sketch history, seed, H0 rank and H0 epsilon.

  • NebTrust: metric, adaptive-trust switch, radius, adaptive A, adaptive floor, minimum, exploration delta, half-life and ratio at the limit.

  • NebMmf: use-mmf, rg-minmode-dimer, trigger force and factor, maximum steps, angle tolerance, maximum phases, maximum inner iterations, maximum rotation iterations, eval-image1, perturbation distance, keep-improving and the IMSPE soft threshold.

  • HsSvd: the solver switch, the principled nugget and the kappa maximum.

  • GprModel: [gp] use_rigid_null_deflation (--gp-rigid-null-deflation, default false). When enabled on eligible free systems, projects out rigid-motion nullspace modes before factorization; this eliminates ~4e-11 null-mode rounding drift (shifting free 2-atom LJ marginal-likelihood iterations from 28 to 33, and 38 to 49 on max_iter=15 restarts) and makes sub-floor sigma2=1e-28, jitter=0 free 2-atom LJ training certify. Because Marchildon-Zingg’s principled_nugget adds a coordinate-dependent eta * diag(K) that couples rigid and internal subspaces, combining use_rigid_null_deflation = true with principled_nugget = true (the CLI/TOML default) is rejected; pass principled_nugget = false / --principled-nugget false. ScaLAPACK builds also reject use_rigid_null_deflation = true.

  • The length-scale prior switch of Optimizer.LengthScalePriors.

Every other setting stays on the command line, among them:

  • the endpoint paths, --nimages, --seed, --max-wall-seconds and the output and report flags;

  • the potential and model selection (--potential, --model, --device and the --metatomic-* and --nwchem-* flags);

  • the model profile and the uncertainty and hyperparameter selections (--gp-model-profile, --uncertainty-mode, --hyperparameter-mode, --hyperparameter-objective, --use-psis-laplace, --use-psis-deterministic, --use-delta-method, --rff-features);

  • the HS-SVD dual-solver flags other than --gp-hssvd, --principled-nugget and --kappa-max, the ScaLAPACK flags and the profiling flags;

  • --use-prune, the variance-acceptance flags, --rho-trust, --inner-unc-relative and the trust-engine override flags.

The one exception to “the potential stays on the command line” is the PotentialConfig message inside the binary file. gprn reads it when it parses the command line, and --potential-config FILE replaces it.

Environment variables

The precedence above covers the NEB, acquisition, trust and GP model options. Library paths and some execution and diagnostic controls use the environment instead:

  • RGSADDLE_LIBRARY fills the post-convergence index-test selection when --rgsaddle-library is omitted; the flag replaces that selection. The stored text turns the test on. RgsaddleClient::load checks the ABI stamp of the linked librgsaddle, which runs the test.

  • GPR_EON_RELAX_ENGINE names the eOn relaxation library.

  • GPR_PAIR_LOCAL_TILES, GPR_GRADIENT_DENSE and GPR_GEOM_FORCE_STREAM select kernel assembly or contraction paths. GPR_PAIR_LOCAL_TILES=0 also leaves the directional curvature on the channel-pair blocks; otherwise a covering layout, including cutoff 0, uses the pair tiles.

  • GPR_GRADIENT_CHECK, GPR_GRADIENT_PRINT, GPR_GEOM_DEBUG, GPR_MIDPOINT_DEBUG and GPR_TRAINING_AUDIT enable checks or diagnostic output.

Record these settings when comparing performance. The terminal variables NO_COLOR, FORCE_COLOR and COLUMNS are read by the command-line parser.

Precedence summary

File selection

Order, from lowest to highest

No file

Flag defaults, explicit flags

--config run.toml

Schema defaults of the file fields, TOML values, explicit flags

--config params.bin

Flag defaults, explicit flags, the binary fields listed above

The environment variables are separate from this order.