/atomistic-skills:chem-msms-predictfrom Atomistic Skills
Predicts LC-MS/MS (tandem mass) spectra from SMILES using the ICEBERG deep neural network. Outputs m/z vs intensity spectra, fragment ion SMILES, and spectrum plots for drug discovery and metabolomics.
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.
Predict the LC-MS/MS (tandem mass) spectrum of a molecule given its SMILES string using ICEBERG — a two-stage GNN that first generates a fragmentation DAG (fragment ions) and then predicts their intensities. Output is a predicted spectrum (m/z, intensity) with optional fragment SMILES assignments per peak.
chem-spectrum-matcher can compare predicted vs experimental spectra.drug-db-pubchem, then call this skill.Scripts run in the msms environment, created on first use by venv/run. It
installs ICEBERG 2.1 (ms-pred, pinned to a commit) on a CPU torch build, and
is x86_64 Linux only: DGL publishes no aarch64 wheels.
${CLAUDE_SKILL_DIR}/../../venv/run msms python ${CLAUDE_SKILL_DIR}/scripts/download_weights.py
This fetches the public weights trained on MassSpecGym (msg_all, ~80 MB) from
the ms-pred authors:
downloads/iceberg_msg_all/
├── gen/best.ckpt # generator (stage 1)
└── inten_contr/best.ckpt # intensity predictor (stage 2)
Weights trained on NIST are available from the ms-pred authors on proof of a NIST license. ICEBERG 2.0 checkpoints do not load: 2.1 adds instrument types. Flag error and stop if either checkpoint is missing.
${CLAUDE_SKILL_DIR}/../../venv/run msms python ${CLAUDE_SKILL_DIR}/scripts/predict_msms.py \
--smiles "c1ccccc1C(=O)OCCN" \
--gen_ckpt downloads/iceberg_msg_all/gen/best.ckpt \
--inten_ckpt downloads/iceberg_msg_all/inten_contr/best.ckpt \
--collision_energies 20 40 \
--adduct "[M+H]+" \
--instrument "Orbitrap" \
--output_dir results/msms_prediction
Key parameters:
--smiles — input molecule as SMILES string--gen_ckpt / --inten_ckpt — paths to ICEBERG checkpoints--collision_energies — one or more collision energies in eV (e.g. 20 40 60); model was trained on absolute eV values--adduct — supported adducts: [M+H]+, [M-H]-, [M+Na]+, [M+NH4]+, and others from ms_pred.common.ion2mass--instrument — instrument type for intensity prediction (e.g. "Orbitrap", "QTOF")--threshold — confidence cutoff for DAG fragment generator (default 0.1; lower = more fragments)--sparse_k — maximum number of peaks returned (default 100)--num_workers — parallel CPU workers (default 0: serial); inference runs on the CPUOutputs written to --output_dir:
| File | Description |
|---|---|
spectrum.png | Stem plot of predicted spectrum, one panel per collision energy |
fragments.json | JSON list per CE: {mz, intensity, fragment_smiles} sorted by intensity |
input_configs.yaml | All run parameters for reproducibility |
fragments.json maps each predicted peak to the fragment ICEBERG assigns it,
as the Kekulé SMILES of the heavy-atom substructure (hydrogen shifts are not
shown). There is one entry per fragment, so fragments with the same formula
repeat an m/z; spectrum.png sums them. For 2-aminoethyl benzoate at 20 eV:
{
"20": [
{"mz": 149.0597, "intensity": 1.0, "fragment_smiles": "CCOC(=O)C1=CC=CC=C1"},
{"mz": 105.0335, "intensity": 0.944, "fragment_smiles": "O=CC1=CC=CC=C1"},
...
]
}
Use this to rationalize which bonds fragment at which energy.
If an experimental spectrum is available, use the companion skill:
c1ccccc1C(=O)OCCN)${CLAUDE_SKILL_DIR}/../../venv/run msms python ${CLAUDE_SKILL_DIR}/examples/predict_smiles.py \
--gen_ckpt downloads/iceberg_msg_all/gen/best.ckpt \
--inten_ckpt downloads/iceberg_msg_all/inten_contr/best.ckpt \
--output_dir .agents/test/msms_example
Expected output:
spectrum.png — two-panel spectrum (20 eV + 40 eV)fragments.json — fragment assignments for both energies[M+H]+ ≈ 166.086 Damsms environment (venv/run msms, x86_64 Linux only), on the CPU.FileNotFoundError if --gen_ckpt or --inten_ckpt are missing.nce=True in iceberg_prediction() directly.binned_out=False (high-precision m/z). Binned output disables fragment assignment.Author: Magdalena Lederbauer Contact: GitHub @mlederbauer
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