Migration¶
From 0.5.1 to 0.5.2¶
- Systems built with
nsteps.npt > 0by an earlier version have the box of the constructed system (systems.boxor the guessed box), not the NpT average, and their coordinates do not match that box. Rerunbff buildand the stages after it if the density matters for your QoIs. Systems built withnsteps.npt: 0are unchanged. plot_cornersizes its figure and fonts from the number of columns. Passfigsize=1.5for the old panel size. The parameter names are now the bottom-row axis labels only; code that read them from the diagonal titles readsaxes[-1, j].get_xlabel()instead.
From 0.5.0 to 0.5.1¶
validateandsample-parametersreject adefine <DIRECTIVE>parameter whose directive no configured topology contains. If a configuration that ran under 0.5.0 now stops with this error, its parameter name did not match the#definein the topology (for exampledefine VSAagainstVSAIN) and had no effect; rename the parameter to the directive in the topology.- Nothing else needs to change. A campaign staged with 0.5.0 can be resumed
with a larger
n_samplesto add samples.
From 0.4.2 to 0.5.0¶
- Custom QoI routines import from
bff.qoi: replacefrom bff.qoi.data import QoIandfrom bff.tools import get_unitcellwithfrom bff.qoi import QoI, get_unitcell. Python code usingbff.qoi.data.QoIDatasetimportsQoIDatasetfrombff.qoi. Routines no longer receivesystem_idandsample_id; drop both parameters:routine(universe, *, frames, options)orroutine(*, inputs, options). Results inraw.jsonare already keyed by system and sample. - Invalid built-in routine options are reported when the reference trajectory is analyzed instead of when the configuration is loaded.
- Campaign logs (
config.yaml,run.out,gmx.log) now live insamples/<sample_id>/; there is nooutputs/directory. Existing campaign manifests remain readable. - Remove any
arrayentry fromslurm.sbatch. If the cluster limits array size or submitted jobs per user below 1000, setslurm.max_array_size. Slurm output appears insamples/<sample_id>/run.out(campaigns) andslurm/<job>_<task>.out. - Remove
mdp_nptfrom explicit campaigninputs; it was never used there. - Import
fit_surrogatesfrombff.bayes.fit;LearningProblemstays inbff.bayes.learning. - Replace
cd "$WORKDIR"-styleslurm.setup/teardownlines withscratch_dir; GROMACS runs in its sample (or scratch) directory regardless of the shell's working directory. bff label-snapshotsis gone. Produce the reference trajectory outside BFF (see Reference trajectories). To label frames with CP2K, usescripts/label_structures.pyon Slurm: renamesystem_idtoid, replacemd_input/sp_inputwith one single-pointcp2k_inputthat readsstructure.xyzand includescell.inc, movesingle_atom_inputsto the top level, replacetrain_fractionwithsplit, and dropjob_scheduler,single_atoms,cleanup_snapshots, andcollection_wait_seconds. The short CP2K MD before each single point is no longer run; label frames from foundation-model MD instead.- Delete
chargeandmultiplicityfrom build configs. Existing build outputs, including theirsystem.yaml, work unchanged. - Configuration files are checked more strictly; see the
conventions. In build configs, write
project: {directory: <path>}instead ofproject: <path>, move a top-levelfn_logtoproject.log, and dropkindfrombias. Writestoreas a list (store: [xtc]). Replaceplots.max_marginal_samples: nullwith-1. Values that were silently truncated or accepted before, such asn_steps: 1.5, equal parameter bounds,rhat_tol: 1, or an unknownpriors_disttype, are now errors. - Rerunning
sample-parametersorvalidateon an existing campaign directory now fails. Addresume: trueto continue it oroverwrite: trueto replace it. Removemax_restartsfrom local campaigns. Python code importingcompile_specsfrombff.workflows.sample_parameters.mainimports it frombff.domain.charge_constraintsand passes bounds, constraints, and topology paths. - In
charge_constraints, setimplicitto the atom name or type instead of the parameter label:implicit: C2instead ofimplicit: "charge C2". Constraints no longer need to be disjoint or nested. - Campaigns and QoI datasets written by earlier versions cannot be read:
samples.yamlhas a new layout and jobs readcampaign.yaml. Rerunsample-parameters/validate(orbuild-qoi-datasetson a new campaign), thenfit-lgpandlearn. Removetraining_samples.progress_strideandoutput.write_rawfrom build-qoi-datasets configs;qoi/raw.jsonis no longer written. Delete anysystems/<id>/system.yamlyou no longer need. - Rebuild QoI datasets and refit
.lgpmodels: both use the new names. In Python code, useQoIDataset(X=..., y=..., y_ref=...),committee.members,committee.y_ref,committee.test_error, andfit_surrogates(means=...). In fit-lgp configs, the defaultmeanis nowdata; writemean: 0to keep the old zero mean. - In learn configs, remove
n_effandindependent_observations; BFF infers the effective observations. Keep or settoleranceas the deviation you accept in the QoI's units (for example0.1for an RDF); it now widens the likelihood instead of counting curve features, so posteriors change where the tolerance exceeds the learned noise. - Rerun
bff learn: it now writesoutputs/results.ptand oldposterior.pt/prior.pt/checkpoints cannot be read. Pointvalidate.posterior.fileatresults.pt(optionallyinclude_map: true), and removemcmc.include_implicit_charge. In Python, usebff.Results.load(...),results.draw(...),results.map, andLearningProblem.from_models(models, specs=specs)withfn_results=; plot functions take theResultsand return figures. mcmc.ess_mindefaults to400and counts the smaller of the bulk and tail effective sample sizes; setess_min: 100to keep the old looseness.Results.diagnostics()returnsrhat,ess_bulk, andess_tail(previouslyessandautocorr_time). Restart runs withmcmc.resumeonly from checkpoints written by this version.- In fit-lgp configs remove
fit.deviceandfit.lr; fitting always runs on the CPU. Optionally tunefit.max_iterandfit.tol_grad(new default1e-4). In learn configs,mcmc.devicenow defaults toauto. In Python code, dropdevice=fromfit_surrogatesandLocalGaussianProcess, usemodel.to(device)if you predict on a GPU yourself, and calllog_posterior(theta, priors, log_likelihood_fn)withoutdevice.find_maptakesboundsand returns aMapResult. - The acetate example moved to one directory per stage with its config inside
(
cd 06-learn && bff learn config.yaml); copy your own configs next to the stage they belong to. Thedata/directory of templates is removed;LGPCommittee.n_effis inferred at creation, so Python code no longer needseffective_observationsto set it. - The acetate example has two systems,
acetateandcalcium-acetate(formerlyacetate,acetate-contact,acetate-separated), and one config per stage; Slurm settings are a commented block in03-sample-parameters/config.yaml. Its topologies areinputs/acetate.topandinputs/calcium-acetate.top. - Quote
slurm.sbatch.time(time: "04:00:00"); a number is rejected. Givebuildboxes as three lengths: angles other than 90 are rejected.
Pipeline Directory-Contract Migration¶
This release deliberately has no runtime compatibility shim for the previous pipeline configuration. Keep old output directories intact and create new stage directories for the convention-based workflow.
Required Changes¶
- Give every physical system a semantic
system_id, such asacetateoracetate-contact. IDs must be unique, lowercase, file-safe, and match[a-z0-9][a-z0-9._-]*. Use the optionalsystem_nameonly for display. - Replace
prepare-referenceandevaluate-snapshotswithlabel-snapshots. Provide each system's topology, trajectory, CP2K MD and single-point inputs, and snapshot count explicitly. When isolated-atom energies are enabled, also provide one CP2K input per detected element insingle_atom_inputs; BFF no longer generates these inputs. Regenerate labels; old prepare/evaluate stage layouts are not loaded. - Replace
sample,analyze, andlgpfitwithsample-parameters,build-qoi-datasets, andfit-lgp. The Python names use underscores. - Rename the analysis
samplesection totraining_samples. Move routines out of reference-system entries into the top-levelroutineslist, and give each routine its applicablesystems. - Replace residue shortcuts with complete MDAnalysis selections. RDF routines
require
group_aandgroup_band now emit one curve per atom type ingroup_a. Hydrogen-bond routines requireselectionandwater_selection; donor hydrogens and both interaction directions are inferred automatically. - Remove
loaderfrom custom QoI routines. A callable withinputsis file-based; a callable withoutinputsis trajectory-based. Removerun.gc_collectandrun.maxtasksperchild;run.in_memoryis the only analysis runtime option. - In fit-LGP configs, rename the
lgpfitoptions section tofit. - Replace learning
restartand individual artifact paths withmcmc.resume,output.overwrite, and oneoutput.directory. Learning now owns fixedoutputs/andplots/children below that root. The pluraloutputs/replaces the earlier singular directory. - Regenerate QoI datasets and
.lgpmodels. RDF normalization/PBC handling changed, and model reuse now verifies an exact dataset fingerprint. - Rerun
bff buildto create each system's stablereference/topology.topandreference/coordinates.gro. Configurebuild-qoi-datasetswith those files and the external MLIP trajectory as separate explicit inputs. - Validation may now consume
outputs/posterior.ptdirectly. Posterior mode rejects an externalspecspath and writes the artifact's embedded specifications into the validation campaign. Keepparametersplusspecsonly for explicitly exported YAML samples.
Identity and Paths¶
Training and reference system sets must contain the same unique IDs. YAML list
order is irrelevant: QoI construction pairs records by ID. Build files follow
documented fixed names under systems/<system_id>/; label-snapshots inputs are
explicit. Paths in samples.yaml are relative to that file, while user paths
remain relative to their config.
specs.yaml remains limited to ordered parameter bounds and compiled charge
constraints. It does not carry system, path, scheduler, or learning metadata.
No schema_version or replacement version field was introduced.
Learning Outputs¶
New learning runs reject existing stage-owned artifacts unless
output.overwrite: true is explicit. Resuming requires mcmc.resume: true and
a compatible outputs/mcmc.ckpt plus a matching outputs/specs.yaml; resume
and overwrite cannot be combined.
Only the known learning artifacts are replaced by overwrite, so unrelated
files in the output root are preserved.
Existing posterior files can still be loaded read-only where their contents are compatible, but old checkpoint directories are not migrated in place.