Reference Configuration¶
Source code:
Purpose¶
bff reference executes the CP2K reference assets staged by bff prepare.
It can:
- stage one run directory per snapshot under a separate output tree such as
02-reference-data/reference-assets/system-XXX/snapshots/snapshot-XXXX/ - run the short GFN1-xTB MD plus final single-point evaluation
- collect
sp.extxyzfiles intotrain.extxyzandvalid.extxyz - optionally run isolated single-atom reference calculations
- run either locally or through Slurm
Minimal Example¶
reference_dir: ./reference-assets
job_scheduler: local
cp2k_cmd: cp2k.psmp
single_atoms: true
snapshot_md_steps: 100
train_fraction: 0.8
seed: 2026
systems:
- assets: ../01-prepare/colvars/reference/system-000
- assets: ../01-prepare/colvars/reference/system-001
Per-system CP2K input overrides are optional:
systems:
- assets: ../01-prepare/colvars/reference/system-000
md: ./inputs/system-000-md.inp
sp: ./inputs/revpbe0-sp.inp
Slurm Example¶
reference_dir: ./reference-assets
job_scheduler: slurm
cp2k_cmd: cp2k.psmp
single_atoms: true
snapshot_md_steps: 100
systems:
- assets: ../01-prepare/colvars/reference/system-000
slurm:
max_parallel_jobs: 20
sbatch:
partition: cpu
time: "04:00:00"
mem: 10G
setup:
- module load cp2k
In Slurm mode, cp2k_cmd is kept for config symmetry but not injected into the
batch job. Make cp2k.psmp available through slurm.setup, your shell
environment, or your site scheduler defaults.
Top-Level Keys¶
reference_dirOutput directory written bybff reference. In the acetate example this is./reference-assetsinside02-reference-data/.job_schedulerEitherlocalorslurm.cp2k_cmdCP2K executable used for local execution. This should be a single executable name or path such ascp2k.psmp.single_atomsWhether to also run the isolated single-atom reference jobs. Defaults totrue.snapshot_md_stepsOptional override for the number of short GFN1-xTB MD steps run for each snapshot. If omitted,bff referenceuses the stagedsnapshots/md.inpfrombff prepareunchanged.train_fractionFraction of collected snapshot frames written intotrain.extxyz. The rest goes tovalid.extxyz.seedDeterministic shuffle seed used before the train/validation split.systemsNon-empty list of prepared reference-asset directories.slurmRequired whenjob_scheduler: slurm.
systems[] Keys¶
assetsPath to one prepared reference system directory such as../01-prepare/colvars/reference/system-000/.mdOptional CP2K MD input for this system's short snapshot relaxations. If omitted,bff referenceusesassets/snapshots/md.inp.spOptional CP2K single-point input for this system's final energy/force calculation. If omitted,bff referenceusesassets/snapshots/sp.inp.
Each referenced system must already contain:
system.topsystem.grosystem.xyzsnapshots/md.inp, unlesssystems[].mdis providedsnapshots/sp.inp, unlesssystems[].spis providedsnapshots/xyz/snapshot-*.xyzsingle-atoms/*/input.inpsingle-atoms/*/pos.xyz
Those are written by bff prepare.
slurm Keys¶
The slurm block intentionally matches the simulation workflow shape:
slurm.max_parallel_jobsMaximum number of simultaneously active jobs. Use-1for no client-side throttling.slurm.sbatchMapping ofsbatchoptions such aspartition,time,mem,ntasks_per_node, orcpus_per_task.slurm.setupOptional shell commands inserted before each batch job.slurm.teardownOptional shell commands inserted after each batch job.
Outputs¶
For each configured reference system, bff reference writes or refreshes:
snapshots/snapshot-XXXX/Per-snapshot run directories with stagedmd.inp,sp.inp,pos.xyz, and the resultingsp.extxyz.train.extxyzvalid.extxyz
If single_atoms: true, it also writes:
single-atoms/energies.yaml