Expand description
Campaign screening scalars / CON ingest contracts for corpus stores (readcon-db).
Campaign-store index projection: screening scalars and contracts derived from
a parsed ConFrame so corpora (e.g. readcon-db) do not
fork CON semantics.
§Finite scalars
Energy, mass, volume, (f_{\max}), and metadata channels used for ordered indexes
are included only when finite (f64::is_finite). NaN/Inf are omitted so B-tree
range scans never see non-orderable keys.
§Sections mask
[sections_present_mask] / [SECTIONS_MASK_*] summarize forces / velocities /
energies presence for flag indexes without scanning blobs twice.
§Spans
Multi-frame ingest should use crate::iterators::ConFrameIterator::next_with_raw_span
so stored blobs are exact substrings; [frame_byte_spans] is a structural pre-pass
(offsets only) for planning.
Structs§
- Frame
Byte Span - Byte span of one frame within a multi-frame CON buffer (
startinclusive,endexclusive). - Frame
Index Projection - ASE.db-competitive / CON-derivable screening projection for one frame.
Constants§
- SECTIONS_
MASK_ ENERGIES - Bit 2: energies section or finite frame energy present.
- SECTIONS_
MASK_ FORCES - Bit 0: forces section or per-atom forces present.
- SECTIONS_
MASK_ VELOCITIES - Bit 1: velocities section or per-atom velocities present.
Functions§
- composition_
formula - Canonical multiset formula: sorted non-empty
Sym:countjoined by|. Example: Cu₂H₂ →Cu:2|H:2. Shared with campaignidx_formulakeys. - finite_
energy - Finite frame energy from header helper or metadata
"energy"; None if missing or non-finite. - frame_
byte_ spans - Structural pre-pass: frame byte ranges via span-preserving iteration (parses each frame).
Concatenating spans in order reproduces
file_contentsfor well-formed multi-frame CON with no leading/trailing junk (trailing newline at EOF may be absorbed into the last span). - frame_
cell_ volume - Cell volume: prefer lattice determinant; else triclinic from
boxl+angles(degrees). - frame_
composition_ formula - Canonical formula string for
frame(empty string if no non-empty symbols). - frame_
fmax - Max Euclidean (|F_i|) over atoms with force data; None if no finite forces.
- frame_
has_ energies - True if energies section is declared or a finite frame energy exists.
- frame_
has_ forces - True if forces are declared or any atom carries force data.
- frame_
has_ velocities - True if velocities are declared or any atom carries velocity data.
- frame_
species_ counts - Species multiset from a frame’s
atom_datasymbols. - frame_
total_ mass - Total mass = Σ masses_per_type[i] * natms_per_type[i] (all finite).
- sections_
present_ mask - Bitmask of present sections (forces / velocities / energies) for flag indexes.
- spans_
cover_ buffer - Ingest contract: successive
next_with_raw_spanslices concatenate to the full buffer when the file is only frames (no prefix garbage). Used by tests and corpus docs. - species_
counts_ from_ symbols - Species multiset from atom symbols (non-empty only), sorted by symbol.
- symbol_
histogram - Symbol multiset histogram without retaining frames (ingest planning / cheap stats).