Units Reference for Atomistic Simulations

SkillDev tools

Reference guide for energy, force, and stress units across MLIPs, DFT codes, and ASE, including conversion factors.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Units Reference for Atomistic Simulations skill

What this skill tells your AI

The instructions your AI receives, as published by learningmatter-mit/atomisticskills in .agents/skills/general-property-units/SKILL.md and read by ahel’s review.

Goal

Provide a single authoritative reference for units of energy, forces, and stress across all MLIPs, DFT codes, and simulation tools used in this project, including the conversions applied internally.

Project Standard

All internal representations follow the ASE (Atomic Simulation Environment) convention:

QuantityStandard UnitNotes
EnergyeVTotal energy of the system
Energy per atomeV/atomUsed for MAE reporting and training labels
ForceseV/ÅNegative gradient of energy w.r.t. position
StresseV/ųVoigt notation, 6-component (xx, yy, zz, yz, xz, xy)

MLIP Model Units

Prediction (Inference)

The raw torch model and the ASE calculator do not return the same stress units. Most calculators apply a unit conversion on the way out; two do not. Read the stress column for the layer you are actually calling.

Energy is eV and forces are eV/Å everywhere, at both layers. Only stress varies:

Model (calculator class)raw model outputASE calculator outputconversion in the ASE layer
MACE (MACECalculator)eV/ųeV/ųnone
UMA / FairChem (FAIRChemCalculator)eV/ųeV/ųnone
CHGNet standalone (CHGNetCalculator)GPaeV/Å³× stress_weight, default 1/160.21766208
CHGNet / M3GNet / TensorNet via MatGL (PESCalculator)GPaGPa unless asked otherwisenone by default — pass stress_unit="eV/A3"

Measured on one compressed Si cell (xx component), 2026-08-25:

pathrawcalculator defaultcalculator eV/ų
MACE-MP small-0.0762876-0.0762876
UMA uma-s-1p1 (omat)-0.0821809-0.0821810
CHGNet standalone 0.4.2-13.906347-0.0867966
MatGL TensorNet-PES-MatPES-PBE-2025.2-10.780773-10.780773-0.067288
MatGL CHGNet-PES-MatPES-PBE-2025.2.10-15.229350-0.095054
MatGL M3GNet-PES-MatPES-2025.2-20.293510-0.126662

Every ratio above is exactly 160.21766208, i.e. GPa per eV/ų.

[!IMPORTANT] matgl.ext.ase.PESCalculator takes stress_unit: Literal["eV/A3", "GPa"] = "GPa", so using it as a drop-in ASE calculator gives GPa, not ASE units — it prints a runtime warning saying so. Calling Potential.forward directly also returns GPa. Pass PESCalculator(potential=model, stress_unit="eV/A3"), or divide by 160.21766208. Mixing this up is a 160x error, not a sign error.

[!NOTE] All of the above are in the ASE sign convention: positive = tensile, compression negative. A compressed cell therefore gives negative diagonal stress at both layers. DFT codes may differ — see VASP below.

Training Input Labels

Training labels in training_data.json are stored in ASE standard units (eV, eV/Å, eV/ų). Conversions to trainer-specific units are handled automatically inside each wrapper:

TrainerEnergy InputForce InputStress InputInternal Conversion
MACEeVeV/ÅeV/ųNone — trains in eV/ų
FairChem (UMA)eVeV/ÅeV/ųNone — trains in eV/ų
MatGL (CHGNet/M3GNet)eVeV/ÅGPa (converted)eV/ų → GPa in _prepare_training_data

[!IMPORTANT] MatGL is the only trainer that requires stress conversion. The conversion from eV/ų → GPa is performed automatically inside MATGLWrapper._prepare_training_data(). Users should always provide stress labels in eV/ų.

Training Output (Saved Metrics)

Each MLIP trainer natively reports MAE in eV. All wrappers apply a ×1000 conversion to save MAE values in meV to training_history.json and plot axes in training_history.png, for human readability and consistent cross-model comparison:

TrainerNative Energy MAENative Force MAENative Stress MAESaved Unit
MACEeV/atomeV/ÅeV/ųmeV (×1000)
FairChem (UMA)eV/atomeV/ÅeV/ųmeV (×1000)
MatGL (CHGNet/M3GNet)eV/atomeV/ÅGPa → eV/ųmeV (×1000)

The training_history.json keys and their units:

KeyUnit
energy_mae_train / energy_mae_valmeV/atom
force_mae_train / force_mae_valmeV/Å
stress_mae_train / stress_mae_valmeV/ų
loss_train / loss_valDimensionless (weighted combination)

[!NOTE] For MatGL stress: the trainer computes MAE in GPa internally. The wrapper converts back to eV/ų first, then multiplies by 1000 to get meV/ų, matching the other wrappers.

DFT Code Units

VASP

QuantityVASP InternalVASP OUTCARConversion to ASE Standard
EnergyeVeVNone needed
ForceseV/ÅeV/ÅNone needed
StresskB (kilo-Bar)kB (and GPa)kB × 0.1 = GPa, then GPa × 0.0062415 = eV/ų

[!NOTE] VASP stores stress internally in kB (kilo-Bar). The vasprun.xml parser in pymatgen returns stress in kB. The Atomate2 MCP tool applies the conversion kB → eV/ų automatically when convert_units=True (default).

Sign Convention

VASP reports stress with the opposite sign to the physics and ASE convention:

  • VASP: positive = compressive (pressure-like)
  • ASE/Physics/MLIPs: positive = tensile

The sign flip is handled during VASP output parsing (e.g. in the atomate2 MCP tool, VASP stress is multiplied by -1 in addition to the unit conversion).

Common Conversion Factors

FromToFactorASE Code
GPaeV/ų0.00624150913ase.units.GPa
eV/ųGPa160.217662081.0 / ase.units.GPa
kBGPa0.1
kBeV/ų0.0006241509130.1 * ase.units.GPa
eVkJ/mol96.4853ase.units.kJ / ase.units.mol
eVkcal/mol23.0605ase.units.kcal / ase.units.mol
ÅBohr1.88972598861.0 / ase.units.Bohr

Quick Reference: Python Conversions

# Env: base-agent
from ase import units

# Stress conversions
stress_GPa = stress_eV_per_A3 / units.GPa        # eV/ų → GPa
stress_eV_per_A3 = stress_GPa * units.GPa         # GPa → eV/ų
stress_eV_per_A3 = stress_kB * 0.1 * units.GPa    # kB → eV/ų

# Energy conversions
energy_kJ_per_mol = energy_eV * units.kJ / units.mol
energy_kcal_per_mol = energy_eV * units.kcal / units.mol

Constraints

  • Never mix unit systems within a single workflow.
  • Always verify stress units when comparing MLIP predictions to DFT references.
  • Training data JSON files must use eV/ų for stress — wrapper-internal conversion handles the rest.
  • When reporting MAE in papers/docs, specify the unit explicitly (e.g., "Force MAE: 50 meV/Å").

Author: Bowen Deng Contact: GitHub @learningmatter-mit

Signals

GitHub stars
164
Forks
24
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
general-property-units
Source
github.com/learningmatter-mit/atomisticskills