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_modeandhyperparameter_objectiveare copied only when the key is present, so an absent key leaves the flag unset. Writinginlaornlmlselects that value even though it equals the schema default. An unset mode follows the model profile, as for the flag; see--hyperparameter-modein the gprn reference.[oracle.metatomic] uncertainty_thresholdand--metatomic-uncertaintyboth default to1.0.[linalg] threadsis copied only when it is positive, so an absent key leaves the flag default1.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 |
|---|---|---|
|
Covariance noise variance |
|
|
Diagonal jitter |
|
|
Likelihood noise variance |
|
|
Hyperparameter optimizer iteration limit |
|
|
Hyperparameter optimizer function tolerance |
|
|
Hyperparameter optimizer solution tolerance |
|
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 andclimbing_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, defaultfalse). 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 onmax_iter=15restarts) and makes sub-floorsigma2=1e-28, jitter=0free 2-atom LJ training certify. Because Marchildon-Zingg’sprincipled_nuggetadds a coordinate-dependenteta * diag(K)that couples rigid and internal subspaces, combininguse_rigid_null_deflation = truewithprincipled_nugget = true(the CLI/TOML default) is rejected; passprincipled_nugget = false/--principled-nugget false. ScaLAPACK builds also rejectuse_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-secondsand the output and report flags;the potential and model selection (
--potential,--model,--deviceand 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-nuggetand--kappa-max, the ScaLAPACK flags and the profiling flags;--use-prune, the variance-acceptance flags,--rho-trust,--inner-unc-relativeand 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_LIBRARYfills the post-convergence index-test selection when--rgsaddle-libraryis omitted; the flag replaces that selection. The stored text turns the test on.RgsaddleClient::loadchecks the ABI stamp of the linked librgsaddle, which runs the test.GPR_EON_RELAX_ENGINEnames the eOn relaxation library.GPR_PAIR_LOCAL_TILES,GPR_GRADIENT_DENSEandGPR_GEOM_FORCE_STREAMselect kernel assembly or contraction paths.GPR_PAIR_LOCAL_TILES=0also 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_DEBUGandGPR_TRAINING_AUDITenable 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 |
|
Schema defaults of the file fields, TOML values, explicit flags |
|
Flag defaults, explicit flags, the binary fields listed above |
The environment variables are separate from this order.