Fidelity head-to-head¶
The fidelity run reads one set of CON and convel files with every reader and, where the tool has a writer, writes them back. reader is what that tool kept in memory. round_trip is what readcon.read_con finds in the file the tool wrote. Both columns use the same words: exact, within_tolerance, reordered, mismatch, label_changed, absent, not_representable, read_error, write_error, unavailable. unavailable means the tool could not be imported. chemfiles, ASE, and eOn are optional.
Fixtures, under bench/fidelity/fixtures/:
claisen.conis the two-frame Claisen case fromtests/python/test_atom_correspondence.py. The product is stored oxygen-first, and C5 is one cell along +x.neb_band_3.conis the first three images ofresources/examples/neb_band.con, copied up to the lineexample NEB image 3.pt100_slab.conis the Pt(100) 2x2x2 slab with one hollow adatom frompaper/cpc/scripts/failure_matrix.py. The bottom four atoms are fixed on every axis. The adatom is fixed in z only. Velocities are not in this file.tiny_multi_cuh2.convelandv30_fs_label.convelare byte copies of the files of the same name underresources/test/.
PROVENANCE.txt in that directory names the sources. Regenerate with python bench/fidelity/make_fixtures.py.
Tools, each on the same path, with the entry point or format it documents:
readcon’s Python reader and writer.
ASE formats
readcon-conandreadcon-convel, resolved throughase.ioformatstoase_readcon.io. Geometry files usereadcon-con. convel files usereadcon-convel.ASE’s built-in
eonreader and writer,format”eon”=.chemfiles, asked for format
CON.eOn’s Python reader,
eon.fileio.loadconsandsavecon, whenEON_ROOTpoints at a checkout. The commit used for the numbers inbench/fidelity/results/is recorded infidelity.json. The C++ client is not built here:client/ConFileIO.cpp:612callsreadcon::read_all_frames, and meson is not required by this rule.
Fields:
atom_idsis CON column 5.reorderedmeans the same ids in a different storage order. A fresh0..n-1that reuses those integers on different elements ismismatch.fixed_maskis the three-axis column 4 mask.massesandpositionsare paired by atom id when the ids still name the same elements, and by file order otherwise.reorderedmeans the sorted values match and the pairing does not.cellis the three lengths and three angles on every frame.fidelity.jsonrecords whether the input uses one cell for every frame.velocitiesare the numbers in the file.velocity_unitis theunits.timelabel. For spec 1, spec 2, and spec 3.0 the authoritative unit is the natural unit even when the file saysfs(src/units.rs:406).label_changedmeans the numbers survived and the label did not.frame_ordercompares frames by their sorted coordinates.positional_zip_erroris only meaningful forclaisen.con. It is the norm of the index-wise displacement minusreadcon.minimum_image_displacements, afterreadcon.atom_id_permutationandreadcon.reorder_like. The input values are also stored underclaisen_positional_zipin the JSON.
A float is exact at a difference of zero. Anything larger is within_tolerance only inside the tolerance on that row. readcon’s text tolerance is 0. ASE’s eon writer prints the cell with %-10.6f (ase/io/eon.py:257), so that cell tolerance is 5e-7. A path through a 3x3 cell matrix uses 1e-8. The tolerance is the writer’s format, not a fit to one run.
not_representable is used when the tool has no slot for the field. The citation column is the file and line. chemfiles 0.10.4 has no CON format: src/FormatFactory.cpp:139 throws, and line 208 builds the message can not find a format named. ASE’s eon reader turns column 4 into one boolean (ase/io/eon.py:139) and does not read column 5 (ase/io/eon.py:138). A following forces or velocities block is read as the next header (ase/io/eon.py:174), which is the read_error on the NEB file and on tiny_multi_cuh2.convel.
Timing uses the same reads and writes. One core (taskset -c 0), one warmup call that is not a sample, then six samples. The median and the interquartile range are the type-7 percentile, NumPy’s linear method. The raw lines are bench/fidelity/logs/timing.log. Paths that raise are rows with a status and no median.
Run it:
snakemake -s benchmarks/workflow/Snakefile --cores 1 fidelity
# one-call asv timings, quick mode
export EON_ROOT=/path/to/eOn # optional; omit to skip that class's setup
asv machine --yes --config asv.fidelity.conf.json \
--machine fidelity --os linux --arch x86_64 \
--cpu unspecified --num_cpu 1 --ram unspecified
asv run --quick --config asv.fidelity.conf.json HEAD^!
The tables are bench/fidelity/results/fidelity.csv and timing.csv. The JSON files next to them carry the per-run samples, the versions, and the Claisen numbers.