AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Chem Msms Predict

skill-learningmatter-mit-atomisticskills-chem-msms-predict · by learningmatter-mit

Predict LC-MS/MS (MS2, tandem mass spectra) from SMILES via ICEBERG, a two-stage deep neural network. Outputs predicted m/z vs intensity spectrum, fragment ion SMILES, and a spectrum plot.

No reviews yet
0 installs
31 views
0.0% view→install

Install

$ agentstack add skill-learningmatter-mit-atomisticskills-chem-msms-predict

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-learningmatter-mit-atomisticskills-chem-msms-predict)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Chem Msms Predict? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

LC-MS/MS Spectrum Prediction

Goal

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.

When to Use This Skill

  • A SMILES string is known and a predicted LC-MS/MS spectrum (m/z vs intensity) is needed.
  • Fragment ion assignments (SMILES per peak) are required.
  • No reference spectrum exists, or comparison to a predicted spectrum is desired.
  • Companion skill chem-spectrum-matcher can compare predicted vs experimental spectra.

When NOT to Use This Skill

  • Experimental spectrum already available — use it directly; no prediction needed.
  • Only compound name known — first resolve to SMILES via drug-db-pubchem, then call this skill.
  • GC-MS or other MS types — ICEBERG is trained on LC-MS/MS only; flag a warning before proceeding.
  • Organometallics or MW > 1000 — predictions may be unreliable or fail due to unsupported element types.

Prerequisites

1. Download ICEBERG checkpoints

Download from coleygroup/ms-pred releases and place in downloads/:

downloads/
├── iceberg_dag_gen_msg_best.ckpt     # generator (stage 1)
└── iceberg_dag_inten_msg_best.ckpt   # intensity predictor (stage 2)

Flag error and stop if either checkpoint is missing.

2. Set up the conda environment

bash conda-envs/msms-agent/install.sh

The ms_pred Python package is installed from GitHub automatically by the install script.

Instructions

Step 1 — Run inference and generate spectrum

# Env: ms-gen
python .agents/skills/chem-msms-predict/scripts/predict_msms.py \
    --smiles "c1ccccc1C(=O)OCCN" \
    --gen_ckpt downloads/iceberg_dag_gen_msg_best.ckpt \
    --inten_ckpt downloads/iceberg_dag_inten_msg_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)
  • --cuda_devices — GPU device IDs (e.g. "0" or "0,1"); omit or set to None for CPU

Outputs 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 |

Step 2 — Inspect fragment assignments (optional)

fragments.json maps each predicted peak to the fragment ion SMILES responsible for it:

{
  "20": [
    {"mz": 122.0600, "intensity": 1.0, "fragment_smiles": "c1ccccc1C=O"},
    ...
  ]
}

Use this to rationalize which bonds fragment at which energy.

Step 3 — Compare with experimental spectrum (optional)

If an experimental spectrum is available, use the companion skill:

→ [chem-spectrum-matcher](../chem-spectrum-matcher/SKILL.md)

Examples

2-Aminoethyl benzoate (c1ccccc1C(=O)OCCN)

# Env: ms-gen
python .agents/skills/chem-msms-predict/examples/predict_smiles.py \
    --gen_ckpt downloads/iceberg_dag_gen_msg_best.ckpt \
    --inten_ckpt downloads/iceberg_dag_inten_msg_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
  • Precursor [M+H]+ ≈ 166.087 Da

Constraints

  • Environment: All scripts require the ms-gen conda environment. ms_pred is installed automatically from GitHub by conda-envs/msms-agent/install.sh.
  • Checkpoints required: Script raises FileNotFoundError if --gen_ckpt or --inten_ckpt are missing.
  • Collision energy units: Use absolute eV values. To convert NCE → eV, set nce=True in iceberg_prediction() directly.
  • Non-binned output only: This skill uses binned_out=False (high-precision m/z). Binned output disables fragment assignment.
  • Single-compound inference: Provide one SMILES per call. For batch prediction, loop over SMILES and use separate output dirs.
  • Unsupported elements: Molecules containing metals, lanthanides, or rare main-group elements may fail or produce low-quality predictions.
  • MW limit: ICEBERG is unreliable for MW > 1000 Da.

References


Author: Magdalena Lederbauer Contact: GitHub @mlederbauer

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.