Validation science: NVE stability probe, TCF spectra (VDOS/IR/Raman/SFG), learning curves#3
Open
basillicus wants to merge 5 commits into
Open
Validation science: NVE stability probe, TCF spectra (VDOS/IR/Raman/SFG), learning curves#3basillicus wants to merge 5 commits into
basillicus wants to merge 5 commits into
Conversation
…H,depolarization)/SFG with quantum-correction factors and a broadened cosine-similarity metric Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RmprSjfXNtRV84X9cdkwS
…angevin-equilibrated Velocity-Verlet production with an explosion guard and folds nve_* conservation metrics into the quality report Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RmprSjfXNtRV84X9cdkwS
…an/SFG artifacts, dielectric MaceCalc.model_type, reference spectral-error metrics, SERS enhancement hook; loader resolves validation input paths against the config dir Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RmprSjfXNtRV84X9cdkwS
…om subsets against one fixed holdout and writes validation/learning_curve.json Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RmprSjfXNtRV84X9cdkwS
…+ limits, learning curve), config/CLI reference, skill recipes, roadmap tick Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RmprSjfXNtRV84X9cdkwS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The validation stage grows from parity-only into the actual scientific acceptance test for a MACE model — all folded into the same
quality_report.jsonso every new number thresholds exactly like parity metrics (and becomes an input for the future AL convergence criterion).[validation.stability]): Langevin equilibration → Velocity-Verlet (NVE) production with a force/energy explosion guard. Metrics:nve_aborted(an exploding model is a result, not a crash),nve_drift_mev_per_atom_ps,nve_energy_std_mev_per_atom,nve_temp_mean. Probes the firstn_structuresreference frames; worst case reported.[validation.spectra], TCF route): one production trajectory → VDOS (mass-weighted VACF, per-element), IR (dipole-derivative ACF), Raman (isotropic/anisotropic invariants → VV/VH/unpolarized/depolarization,(nu_L-nu)^4/nu+ Bose prefactors, selectable quantum-correction factor), and SFG (Morita–Hynes dipole–polarizability cross-TCF, signed Im χ⁽²⁾, configurable component/ssp). Artifacts: two-column.datper spectrum +spectra.json(peaks, params, metrics) undervalidation/spectra/— O(1) files. Optional per-spectrum reference files →<name>_spectral_error = 1 − cosine similarityafter common-grid Gaussian broadening.MaceCalc.model_typepasses through toMACECalculatorso trainedAtomicDipolesMACE/AtomicDielectricMACEmodels load as the spectra property calculator (runtime-gated, same status as the QE ph.x polarizability path). The MD driver and the dielectric model are decoupled.enhancement_fileprofile is interpolated and multiplied onto the Raman spectra (raman_*_enhanced.dat).traincraft learning-curve CONFIG --fractions ...retrains on nested random subsets (one seeded shuffle, prefixes) and validates every point against one fixed holdout (trainer's own split, never trained on) →validation/learning_curve.json. A diagnostic command, not a stage: no events, no cache keys._resolve_input_pathsnow also resolvesvalidation.test_file+ spectra reference/enhancement paths against the config dir (previously geometry-only — this also closes a latent gap in the remote-execution PR, whose shipped snapshots rewritetest_fileto a config-relative path).Design notes
validation/spectra.pyis pure numpy (no ASE, no I/O), formulas cited to standard literature in docstrings (Thomas et al. PCCP 2013; Berne & Pecora; Ramírez et al. JCP 2004; Morita & Hynes JPCB 2002). Clean-room: no legacy code consulted (verified the legacy tree contains no spectra code).qcf="harmonic"is the identity and other choices apply as ratios — one consistent knob instead of double-counted detailed-balance factors.run_validationstays parity-only;run_validation_sciencecomposes parity + probes and applies thresholds once over the merged metrics (sonve_*/*_spectral_errorthreshold names work, and probe-referencing thresholds don't explode inside the parity pass)._stage_inputsalready hashes the whole[validation]section).numpy.fft; windowing vianp.hanning).Testing
test_spectra.py(13): synthetic signals with known answers — peak positions,<cos²>=1/2ACF, iso mode → depolarization 0, traceless mode → 3/4, QCF classical limits, SFG signal vs quiet component, similarity identity/disjoint, stick-vs-broadened matching.test_dynamics.py(7): EMT NVE conservation (<5 meV/atom/ps drift), seeded reproducibility, guard abort →nve_aborted=1without drift metric, analytic point-charge dielectric capture, hard error on missing requested property.test_validation_science.py(7): end-to-end[validation.spectra]→ artifacts +spectra.json; self-reference →ir_spectral_error≈0passes threshold, displaced reference fails it; enhancement profile kills the enhanced curves only; aborted MD is a metric not a crash; config validators; loader path resolution.test_learning_curve.py(4): nested-prefix subsets, fixed holdout, rounding-collision dedup, guards, CLI (incl. bad--fractions→ exit 2) — via a fakemace_run_trainthroughTRAINCRAFT_MACE_TRAIN_COMMAND.Full suite: 268 passed, 27 skipped;
ruffclean;mkdocs build --strictclean.Docs
New how-to
docs/how-to/validation-science.md(MD-length/timestep/QCF guidance, SFG setup, SERS recipe + limits, learning-curve usage);[validation.stability]/[validation.spectra]/model_typereference tables;traincraft learning-curveCLI reference; agent-skill recipes + gotchas; roadmap tick (EOS/phonons + harmonic spectra stay 🔜).🤖 Generated with Claude Code
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_017RmprSjfXNtRV84X9cdkwS