/atomistic-skills:mat-raman-spectrafrom Atomistic Skills
Calculates Raman-active phonon mode frequencies and simulates Raman spectra from MLIP phonon calculations, with optional DFT Born-charge intensities via atomate2.
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:mace.load_modelis theload_modeltool of themaceserver (mcp__mace__load_model, ormcp__plugin_atomistic-skills_mace__load_modelwhen 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 mlip python -m src.mcp_server.cli mace load_model key=value relax_structure key=value ${CLAUDE_SKILL_DIR}/../../venv/run cpu python -m src.mcp_server.cli atomate2 run_atomate2_vasp_calculation key=value get_atomate2_job_status key=value
To calculate the Raman spectrum of a crystalline material by:
Physical background: Raman scattering intensity of mode $\nu$ is proportional to $|(\hat{e}i \cdot \alpha\nu \cdot \hat{e}s)|^2$, where $\alpha\nu = d\boldsymbol{\alpha}/dQ_\nu$ is the Raman tensor (derivative of polarizability with respect to mode coordinate $Q_\nu$). Computing $\alpha_\nu$ requires DFT-level dielectric calculations; phonon frequencies alone can be obtained with MLIPs.
[!IMPORTANT] Two-tier approach:
- MLIP tier (Step 1–3): Predicts Raman peak positions (frequencies). Intensities are set equal as a placeholder. Sufficient for peak assignment and comparison with experiment when known structure is available.
- DFT tier (Step 4): Computes actual Raman intensities via Born charges and dielectric tensor from VASP DFPT. Required for quantitative intensity matching.
cpu (for symmetry analysis and plotting)mlip for MACE or MatGL, or fairchem) for phonon calculationBefore computing phonons, ensure the structure is fully relaxed. Use the MCP tool for your chosen MLIP:
mace.load_model(model_name="MACE-MH-1")
mace.relax_structure(
structure_data="input_structure.cif",
relax_cell=True,
fmax=0.001, # tight convergence for phonons
output_dir="relaxation/"
)
[!IMPORTANT] Use a tight force convergence (
fmax ≤ 0.001 eV/Å) for phonon calculations. Poorly relaxed structures produce imaginary frequencies that indicate a false structural instability.
Use the mat-phonon skill to compute Γ-point phonons. The output phonon.yaml is the required input for this skill.
${CLAUDE_SKILL_DIR}/../../venv/run mlip python ${CLAUDE_SKILL_DIR}/../mat-phonon/scripts/calculate_phonon.py \
--structure relaxation/relaxed_structure.cif \
--model_type mace \
--model_name MACE-MH-1 \
--supercell_matrix '[[2,0,0],[0,2,0],[0,0,2]]' \
--output_dir phonon_results/
Verify the output: check phonon_results/phonon.yaml exists and there are no large imaginary modes at Γ.
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/analyze_raman_modes.py \
--phonon-yaml phonon_results/phonon.yaml \
--structure relaxation/relaxed_structure.cif \
--output-dir raman_results/ \
--broadening 5.0 \
--freq-max 1000
Parameters:
| Parameter | Description | Default |
|---|---|---|
--phonon-yaml | Path to phonon.yaml from mat-phonon | required |
--structure | Relaxed structure file (CIF/POSCAR) | required |
--output-dir | Output directory | ./raman_results |
--broadening | Lorentzian half-width at half-maximum (cm⁻¹) | 5.0 |
--freq-max | Maximum frequency for spectrum plot (cm⁻¹) | 1000 |
--laser-wavelength | Laser wavelength in nm (for intensity pre-factor, if using DFT intensities) | 532 |
Output files:
raman_modes.json — table of all Γ-point modes with symmetry label, frequency, and Raman-activity classificationraman_spectrum.png/svg — simulated spectrum (MLIP tier uses equal intensities; DFT tier uses computed intensities)raman_modes_table.csv — CSV table for further analysis[!NOTE] On Raman intensity accuracy: The MLIP tier assigns equal intensity to all Raman-active modes. Peak positions are reliable; relative intensities are not. For quantitative comparison with experiment, proceed to Step 4.
This step uses VASP DFPT via atomate2 to obtain Born effective charges and the macroscopic dielectric tensor, then combines them with MLIP phonon eigenvectors to compute Raman tensors.
4a. Run VASP DFPT for Born charges + dielectric tensor:
The atomate2 server has no dedicated DFPT job, so run a static calculation with
the DFPT tags as INCAR overrides:
atomate2.run_atomate2_vasp_calculation(
structures_path="relaxation/relaxed_structure.cif",
output_dir="vasp_dfpt/",
calculation_type="static",
# DFPT: macroscopic dielectric tensor and Born effective charges
config={"LEPSILON": True, "IBRION": 8, "EDIFF": 1e-8, "ENCUT": 520},
execution_mode="local", # "remote" submits through jobflow-remote instead
)
For a remote run, check on the job and fetch its results once it finishes:
atomate2.get_atomate2_job_status(job_id="<job_id>")
atomate2.get_atomate2_results_by_id(job_ids=["<job_id>"], save_to_file="vasp_dfpt/results.json")
4b. Compute Raman intensities:
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/analyze_raman_modes.py \
--phonon-yaml phonon_results/phonon.yaml \
--structure relaxation/relaxed_structure.cif \
--born-charges vasp_dfpt/OUTCAR \
--output-dir raman_dft_results/ \
--broadening 5.0
When --born-charges is provided, the script computes Raman tensors from the Born charges and dielectric tensor and uses the resulting intensities instead of equal weights.
If experimental Raman data is available as an image, use general-plot-digitizer or chem-db-spectra to extract peak positions and overlay with computed results.
Rutile TiO₂ (point group D₄h) has 4 Raman-active modes at ~143, ~235, ~447, 612 cm⁻¹ experimentally.
# 1. Relax with MACE
mace.load_model(model_name="MACE-MH-1")
mace.relax_structure(structure_data="TiO2_rutile.cif", relax_cell=True, fmax=0.001, output_dir="relax/")
# 2. Phonons
${CLAUDE_SKILL_DIR}/../../venv/run mlip python ${CLAUDE_SKILL_DIR}/../mat-phonon/scripts/calculate_phonon.py \
--structure relax/relaxed_structure.cif --model_type mace --model_name MACE-MH-1 \
--supercell_matrix '[[3,0,0],[0,3,0],[0,0,4]]' --output_dir phonon/
# 3. Raman analysis
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/analyze_raman_modes.py \
--phonon-yaml phonon/phonon.yaml --structure relax/relaxed_structure.cif \
--output-dir raman/ --freq-max 800 --broadening 8.0
Expected: the script should identify B1g, Eg, A1g, and B2g modes (all Raman active in D₄h) with frequencies near experimental values.
fmax ≤ 0.001 eV/Å. Large residual forces produce spurious imaginary modes.phonon.yaml; the supercell size affects the quality of Γ-point eigenvectors.mlip (MACE or MatGL) or fairchem; Step 3 (analysis and plotting) runs in cpu.Author: Yu Yao Contact: GitHub @AI4SciDisc
examples/tio2-rutile/README.md (opens in a new tab)examples/tio2-rutile/raman_modes.json (opens in a new tab)examples/tio2-rutile/raman_modes_table.csv (opens in a new tab)examples/tio2-rutile/raman_spectrum.png (opens in a new tab)examples/tio2-rutile/replot.py (opens in a new tab)scripts/analyze_raman_modes.py (opens in a new tab)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