/atomistic-skills:mat-qha-thermal-expansionfrom Atomistic Skills
Calculates thermal expansion and temperature-dependent Gibbs energy using Machine Learning Interatomic Potentials (MLIPs) via the Quasi-Harmonic Approximation (QHA). Guides volume window selection and foundation potential choice.
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.
This skill provides tools for calculating thermal expansion and temperature-dependent Gibbs energy using Machine Learning Interatomic Potentials (MLIPs).
MACEWrapper, MatGLWrapper, or FAIRCHEMWrapper).matcalc is included in the mlip and fairchem environments.QHA calculations require accurate lattice expansion and vibrational properties.
[!IMPORTANT]
- Use OMAT or MatPES trained models: These models (e.g.,
MACE-OMAT-0-small,TensorNet-MatPES-r2SCAN) are specifically optimized for forces and vibrational stability.- Avoid MPtrj-trained models: Models trained primarily on the
MPtrjdataset (e.g.,MACE-MP-small,MACE-MP-medium) suffer from the "softening" problem, where the calculated phonon frequencies are significantly lower than DFT values.
Refer to the foundation-potentials skill for more details.
QHA fits the free energy against volume -- phonopy-qha fits E(V) + F_vib(V,T) to a
Vinet, Birch-Murnaghan or Murnaghan equation of state at each temperature and minimises
it -- so the sampled volume range is a real input, and you should report it alongside
the result.
The convention is +/-5% in LINEAR strain, which is -14% to +16% in volume:
| source | window | volume width |
|---|---|---|
matcalc QHACalc default scale_factors | 0.95-1.05 linear | 1.35x |
atomate2 QhaMaker default linear_strain | (-0.05, 0.05) | 1.35x |
phonopy Si-QHA example e-v.dat | 140.03-189.07 A^3 | 1.35x |
Note the cube: a window quoted as "+/-5%" in lattice parameter is three times that in
volume. Read which convention a tool means before comparing windows across codes --
QHACalc scales the lattice (apply_strain), not the volume.
Omit --volume_window to retain MatCalc's native scale grid; --n_volumes only
applies when a volume window is supplied. For example,
--volume_window 0.10 --n_volumes 7 samples seven volumes from 0.90 to 1.10 times
the relaxed volume,
with lattice scale factors obtained by taking their cube roots.
[!IMPORTANT] The window must bracket the free-energy minimum at your highest temperature. The lattice expands on heating, so a window adequate at 0 K can be too narrow at high T, and a minimiser that runs into the edge of the scan returns the edge rather than the minimum. Check that the equilibrium volume at your top temperature is interior to the sampled volumes, and widen
--volume_windowif it is not.phonopyrequires at least 5 volume points; 11 is the usual choice.
[!NOTE] Widening the window is not automatically safer. On BCC lithium with a MatGL MatPES-PBE potential, going from +/-10% to the conventional +/-14/+16% in volume moves the 0 K equilibrium volume by 0.09 A^3 (0.5%) and the thermal expansion coefficient by 9%, with every sampled volume still dynamically stable -- so this is fit sensitivity, not a soft-mode artefact. Neither window is wrong; quote the one you used. If you need a number comparable to someone else's, match their window rather than assuming a default agrees.
To calculate thermal expansion and temperature-dependent Gibbs energy, use calculate_qha.py.
${CLAUDE_SKILL_DIR}/../../venv/run mlip python ${CLAUDE_SKILL_DIR}/scripts/calculate_qha.py \
--structure path/to/relaxed_structure.cif \
--model_type matgl \
--eos vinet \
--output_dir research/my_folder/qha
qha_results.json: Summary.gibbs_temperature.dat: Gibbs energy vs T.thermal_expansion.dat: Thermal expansion vs T.examples/ for detailed usage scenarios.Author: Bowen Deng Contact: GitHub @learningmatter-mit
examples/Li_BCC_TensorNet/README.md (opens in a new tab)examples/Li_BCC_TensorNet/gibbs_temperature.dat (opens in a new tab)examples/Li_BCC_TensorNet/qha_results.json (opens in a new tab)examples/Li_BCC_TensorNet/thermal_expansion.dat (opens in a new tab)scripts/calculate_qha.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./chem-db-qmofQuery the Quantum MOF (QMOF) database via Materials Project's MPContribs platform for DFT-computed properties (bandgap) and optimized crystal structures of Metal-Organic Frameworks./chem-db-spectraSearch and download experimental InfraRed (IR), Mass spectra, and UV-Vis spectra data (JCAMP-DX format) for molecules./chem-dft-orca-advanced-calculationWrite and run custom ORCA input files for advanced electronic structure methods or settings not available through the SCINE wrapper, including multi-reference methods, excited states, relativistic effects, advanced SCF, NMR/EPR, and more.Other plugins' skills for the same job