/atomistic-skills:ml-committee-uncertaintyfrom Atomistic Skills
Quantifies prediction uncertainty of MACE MLIPs using committee models. Flags high-uncertainty structures for DFT verification in active learning workflows.
Ships in Atomistic Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
[!NOTE] Steps written
server.toolare MCP tool calls:base.search_model_registryis thesearch_model_registrytool of thebaseserver (mcp__base__search_model_registry, ormcp__plugin_atomistic-skills_base__search_model_registrywhen installed as a plugin). Without a connected server, run the same tools from the shell. Tools named in one command share a process, so a model loaded byload_modelstays loaded:${CLAUDE_SKILL_DIR}/../../venv/run cpu python -m src.mcp_server.cli base search_model_registry key=value register_model key=value
To estimate the epistemic uncertainty of a MACE MLIP by running inference with a committee (ensemble) of independently trained models. Structures where the committee disagrees strongly (high energy or force variance) are flagged as candidates for DFT labelling, supporting active learning workflows and validating MLIP reliability in under-sampled regions of configuration space.
The uncertainty estimate is:
3N
components. This is the conventional MLIP force-RMSE reduction used by MACE
reporting.[!WARNING] Energy std is only a valid disagreement signal when every committee member shares the same energy reference — the same training dataset, level of theory, and atomic reference energies (
E0). If the committee instead pools several independently pretrained foundation models (e.g. different MACE-MP / MACE-OMAT / MACE-MATPES releases) rather than same-data/different-seed checkpoints, their absolute energies are not on a common scale: an energy-std ranking will mostly reflect per-model reference-energy offsets, not genuine epistemic disagreement. For this heterogeneous committee flavor, rank structures by force disagreement instead — forces are invariant to each model's arbitrary atomic reference energy, so they remain a reliable cross-model signal. See the heterogeneous-committee note under Constraints.
A committee requires N ≥ 3 independently trained MACE checkpoints covering the same chemical system. There are two ways to obtain them:
Option A — Train with different random seeds (recommended for fine-tuned models)
Run ml-mace-finetune N times, varying only the random seed via the --seed flag in generate_mace_config.py. Save each checkpoint to a separate directory:
# Run for seed=0, seed=1, seed=2 (at minimum)
for SEED in 0 1 2; do
${CLAUDE_SKILL_DIR}/../../venv/run mlip python ${CLAUDE_SKILL_DIR}/../ml-mace-finetune/scripts/generate_mace_config.py \
--train-file ./mace_data/train.xyz \
--valid-file ./mace_data/valid.xyz \
--model MACE-MH-1 \
--epochs 200 \
--lr 1e-4 \
--batch-size 4 \
--freeze-backbone \
--seed ${SEED} \
--output-dir ./committee_models/seed_${SEED}
${CLAUDE_SKILL_DIR}/../../venv/run mlip mace_run_train \
--config ./committee_models/seed_${SEED}/finetune_config.yaml
done
Option B — Use pre-existing models from the registry
base.search_model_registry(
chemical_system="Li-Fe-P-O",
backend="mace",
)
# If multiple models exist for the same system, they can form a committee.
Pass all checkpoint paths to the inference script. It will run each model independently and compute mean ± std across the committee.
${CLAUDE_SKILL_DIR}/../../venv/run mlip python ${CLAUDE_SKILL_DIR}/scripts/run_committee_inference.py \
--structures /path/to/structures_dir_or_file.cif \
--models ./committee_models/seed_0/mace_finetuned.model \
./committee_models/seed_1/mace_finetuned.model \
./committee_models/seed_2/mace_finetuned.model \
--output-dir ./uncertainty_results \
--energy-threshold 10.0 \
--force-threshold 200.0
# For MACE-MH foundation models, add:
# --head omat_pbe
Key parameters:
| Parameter | Description | Typical value |
|---|---|---|
--structures | Path to structure file, directory, or .xyz trajectory | — |
--models | Space-separated list of MACE checkpoint paths | ≥ 3 models |
--energy-threshold | Flag if energy std > this value (meV/atom) | 5–20 meV/atom |
--force-threshold | Flag if component-wise force RMSE > this value (meV/Å) | 100–300 meV/Å |
--output-dir | Directory for results and plots | — |
--device | cuda or cpu | cuda |
--head | Head name for multi-head models (e.g. omat_pbe for MACE-MH-1) | None |
The script produces:
uncertainty_summary.json — per-structure energy/force mean ± stdhigh_uncertainty_structures/ — .cif files of flagged structures requiring DFTuncertainty_distribution.png — histogram of energy uncertainty across all structuresThresholds for DFT flagging: There is no universal threshold. Empirically:
[!TIP] Run this skill on your MD trajectory after a few nanoseconds to check whether the MLIP remains in-distribution throughout the simulation. High uncertainty at late simulation times suggests the trajectory has drifted into unexplored configuration space.
Pass the flagged structures to the DFT labelling pipeline. See the mat-sample-pes-by-md skill for context on when and how to label new structures.
# High-uncertainty structures needing DFT labels are in:
ls ./uncertainty_results/high_uncertainty_structures/
# → Pass these to atomate2 DFT workflow for labelling
After determining an appropriate uncertainty threshold for your system, update the registry so future tasks can apply the same criterion automatically:
base.register_model(
checkpoint_path="./committee_models/seed_0/mace_finetuned.model",
chemical_system="Li-Fe-P-O",
backend="mace",
base_model="MACE-MH-1",
notes="Committee of 3 models (seed 0/1/2). Use energy_std > 10 meV/atom as DFT flag threshold.",
tags_json='["battery", "committee"]',
)
--model flag during fine-tuning). Different architectures cannot be meaningfully ensembled.mlip environment.Author: Yu Yao Contact: GitHub @AI4SciDisc
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub learningmatter-mit/atomisticskills --plugin atomistic-skills133 skills in this plugin
/chem-bond-dissociationCalculate homolytic and heterolytic bond dissociation energies (BDEs) for all single bonds in a molecule using MLIPs with RDKit fragmentation./chem-conformer-searchGenerate molecular conformers with RDKit ETKDG, relax with MLIPs, and rank by energy with Boltzmann weighting./chem-db-mofQuery multiple MOF databases (QMOF via MPContribs; ARC-MOF DB7/Majumdar et al. via Materials Cloud) and download CIF structures with optional element or identifier filters.Other plugins' skills for the same job