/atomistic-skills:ml-property-predict-scdfrom Atomistic Skills
Trains property prediction models for molecules or periodic materials using pretrained SelfConditionedDenoisingAtoms (SCD) foundation models. Supports frozen embeddings, lightweight heads, fine-tuning, and pretraining.
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.
Use SelfConditionedDenoisingAtoms for four related workflows:
Commands run in the scd environment through venv/run, as shown below. It
is created on first use, on x86_64 Linux only (PyG publishes its compiled
extensions, which the upstream code imports, for x86_64), with a CUDA 12.6 or
13 torch build chosen by driver.
Confirm the upstream repo exists at $SCD_REPO_DIR (default:
~/.cache/atomisticskills/SelfConditionedDenoisingAtoms), or clone it at the
verified commit:
SCD_REPO_DIR="${SCD_REPO_DIR:-$HOME/.cache/atomisticskills/SelfConditionedDenoisingAtoms}"
git clone https://github.com/TyJPerez/SelfConditionedDenoisingAtoms "$SCD_REPO_DIR"
git -C "$SCD_REPO_DIR" checkout 528c13ead7cc2b1c2b3dfddc0d167248e670746b
Optionally build the faster TorchMD graph kernel for non-periodic runs
(needs the CUDA toolkit); without it, use noise_in_loader: true:
cd "$SCD_REPO_DIR/models/ET_models" && ${CLAUDE_SKILL_DIR}/../../venv/run scd python setup.py build_ext --inplace
Read the upstream README.md and examples.ipynb.
Then read the local references in this skill:
references/repo-map.mdreferences/transfer-recipes.mdreferences/config-recipes.mdreferences/dataset-contract.md if a new dataset is involvedct-scd-pcq for molecule property prediction, molecule embeddings, and molecule-side transfer learning.ct-scd-amp for materials property prediction, periodic materials embeddings, and materials-side transfer learning.Do not swap these by default. The public checkpoints were pretrained on different domains.
Default to out["mol_emb"] for graph-level downstream ML.
return_atom_embs=True only when the downstream task needs atom- or site-level features.eval() mode.graph_batch=batch only when allow_periodic or noise_in_loader is enabled. Do not force graph_batch on the fast molecular path.templates/extract_embeddings.py as the starting point. It keeps the model live and returns embeddings on demand instead of defaulting to a frozen feature dump.Use templates/train_lightweight_head.py for three lightweight options:
scalar_head
Appropriate for invariant scalar regression targets. This path trains only the model's native scalar_head using pretrained backbone weights.atom_emb_mlp
Pools atom_embs with sum or mean, then trains a 1- or 2-layer MLP head.mol_emb_mlp
Uses mol_emb directly, then trains a 1- or 2-layer MLP head.Important details:
scalar_head is usually the lightest path for standard scalar property prediction.reset_head() is a sensible default for scalar_head mode when switching to a new target.set_head_agg controls the native scalar-head reduction and should be set through the checkpoint-loading path, not by editing tensors after the fact.finetune() and reset_head(), but finetune() does not by itself implement scalar-head-only training; explicitly freeze non-scalar_head parameters in the lightweight script.scalar_head path should reset the checkpoint's output affine buffers to identity because pretrained mean/std buffers are not downstream target statistics.atom_emb_mlp, either sum or mean pooling may work better depending on whether the target behaves more like an extensive or intensive quantity.atom_emb_mlp and mol_emb_mlp should compute frozen-backbone features on the fly, not treat a static embedding cache as the default workflow.mol_emb_mlp is the cleanest external-head baseline on the pretrained graph representation.Use the native training path when you want all model weights updated:
cd "${SCD_REPO_DIR:-$HOME/.cache/atomisticskills/SelfConditionedDenoisingAtoms}"
${CLAUDE_SKILL_DIR}/../../venv/run scd python train.py --conf configs/my_finetune.yaml --load-hf ct-scd-pcq --job-id my_run
or
cd "${SCD_REPO_DIR:-$HOME/.cache/atomisticskills/SelfConditionedDenoisingAtoms}"
${CLAUDE_SKILL_DIR}/../../venv/run scd python train.py --conf configs/my_finetune.yaml --load-hf ct-scd-amp --job-id my_run
Start from:
templates/finetune_config.template.yamlconfigs/finetune_qm9.yaml for public molecular examplesFor public materials finetuning, do not rely on configs/finetune_matbench.yaml unless the private StructureCloud dependency is available. Copy the template and configure the periodic settings yourself.
Full-model finetuning usually gives better results than the lightweight frozen-backbone options, but it costs more GPU memory and more wall time.
Use the native training path:
cd "${SCD_REPO_DIR:-$HOME/.cache/atomisticskills/SelfConditionedDenoisingAtoms}"
${CLAUDE_SKILL_DIR}/../../venv/run scd python train.py --conf configs/my_pretrain.yaml --job-id my_pretrain
Start from:
templates/pretrain_config.template.yamlconfigs/pretrain_pcq.yaml for moleculesconfigs/pretrain_amp20.yaml for periodic materialsWhen adding a new dataset class under SelfConditionedDenoisingAtoms/data/datasets/:
templates/dataset_template.py.__init__(root, dataset_arg=None, transform=None, **kwargs).torch_geometric.data.Data objects with the required fields for the training mode.idx and optionally a human-readable identifier on each Data object when practical.data/datasets/__init__.py, or train.py --dataset ... will reject it.root, dataset_arg, and transform, wire them through train.py argparse and data/loaders.py.--num-steps override.Before launching a full run:
nvidia-smi first to confirm CUDA-visible GPUs exist on the real machine and to see whether another job is already using themdata/loaders.pytrain.py --conf ... --num-steps 100 or 200 check while actively watching live command-line outputTreat live stdout visibility as general guidance for SCD runs, not just these example wrappers. When possible, launch smoke tests and full runs with unbuffered stdout and without command-capture layers so startup messages stay visible.
nvidia-smi both before launch and during launch: before launch to choose devices, during launch to verify the intended GPU or GPUs are actually being used.python -u ... and a TTY-capable shell session for smoke runs.venv/run streams output as it is produced, so dataset downloads, checkpoint downloads, split generation, and normalization work are visible immediately.parity_plot: true before launching. Otherwise a max_steps=2 run can still spend significant extra time on parity-plot generation and repeated evaluation passes.mean/std, sometimes more than once across train and test setup. This is startup work, not necessarily a hang.CUDA_VISIBLE_DEVICES=<gpu_id> and pass --use-devices 0 so the upstream trainer uses only that logical device.CUDA_VISIBLE_DEVICES to the chosen physical ids and pass --use-devices 0 1 ... across the visible logical devices.Check the detailed, reproducible examples in the examples/ directory:
Environment: Scripts run in the scd environment (venv/run scd, x86_64 Linux only). Each code block MUST go through venv/run.
train.py always creates a WandbLogger.
For finetuning runs, train.py derives the W&B project from the config dataset field, currently as SCD_bench_{dataset}.
The W&B run name and id both come from job_id, so set the specific run identifier in the config file or override it on the CLI.
train.py is configured with accelerator="gpu".
Native train.py handles standard pretraining and finetuning loops well, but special prediction/export flows or custom evaluation loops may still need a small wrapper script.
noise_in_loader: true is required for periodic materials and is the fallback when the optional TorchMD CUDA extension is not built.
Public repo examples cover PCQM4MV2, AlexMP20, QM9, MD17, and OMOL25 best.
The public checkpoints are downloaded as last.ckpt files from Hugging Face.
The upstream pretraining path freezes the scalar head, so reset_head: true is a reasonable downstream default when switching to a new scalar property during full-model finetuning. That is an inference from the code path, not a documented upstream requirement.
--conf parsing.--dataset until it is exported from data/datasets/__init__.py.noise_in_loader: true for molecular runs.nvidia-smi outside any restrictive sandbox before concluding that CUDA is unavailable.nvidia-smi memory use and active compute processes before choosing devices. A GPU with near-zero utilization but several GiB already allocated may still belong to another live job.wandb status may be inconclusive even when online login works through ~/.netrc. If you need certainty, run a tiny online wandb.init(..., mode="online") probe or observe the live W&B login lines during a real run.Author: Ty Perez Contact: [email protected]
examples/CT-SCD_QM9/README.md (opens in a new tab)examples/CT-SCD_QM9/run_ct_scd_qm9.py (opens in a new tab)examples/CT-SCD_matbench/README.md (opens in a new tab)examples/CT-SCD_matbench/run_ct_scd_matbench.py (opens in a new tab)references/config-recipes.md (opens in a new tab)references/dataset-contract.md (opens in a new tab)references/repo-map.md (opens in a new tab)references/transfer-recipes.md (opens in a new tab)templates/dataset_template.py (opens in a new tab)templates/extract_embeddings.py (opens in a new tab)templates/finetune_config.template.yaml (opens in a new tab)templates/generate_conformer_rdkit.py (opens in a new tab)templates/pretrain_config.template.yaml (opens in a new tab)templates/train_lightweight_head.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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