openmaterials.ai / codes / AtomisticSkills mat-elasticity

mat-elasticity: the elastic tensor of a crystal from strained cells

An AtomisticSkills skill that strains a cell, reads the stress from a machine-learned potential and fits the 21 elastic constants by least squares through matcalc.

What it is and how it works

Stress response to small strains

The skill applies normal strains of 0.5% and 1% and shear strains of 3% and 6%, each with both signs, to the relaxed cell. The potential gives each deformed cell's stress and ElasticityCalc fits the Voigt tensor C_ij.

Potentials with stress labels

The skill loads MACE, MatGL or FAIRChem wrappers. It asks for models trained with stress labels on OMAT or MatPES, such as MACE-OMAT-0-small, since the fit uses stresses.

Relaxed-ion or clamped-ion

By default ions relax in each deformed cell at fixed shape, giving the relaxed-ion constants experiment measures. --no-relax_deformed gives stiffer clamped-ion ones.

Moduli and derived properties

Bulk and shear moduli as Voigt, Reuss and Hill averages, Young's modulus and Poisson ratio from the VRH pair, the anisotropy index, Debye temperature and Born stability.

Inputs and outputs

Input is a CIF or POSCAR and a model name. Output is elasticity_results.json with the 6x6 tensor in GPa, the moduli, the fit residual and directional Young's moduli.

Moduli under load

--pressure relaxes cell and ions against a hydrostatic load in GPa, then reports stress-strain coefficients about that loaded reference, not the zero-pressure cell.

What people do with it

fcc Cu with MACE-OMAT-0-small

The worked example expects a bulk modulus of 130 to 145 GPa, a shear modulus of 45 to 55 GPa and a Poisson ratio of 0.33 to 0.36, against measured 137 GPa, 48 GPa and 0.34. Cu example README

How it is used

  1. Relax the cell

    calculate_elasticity.py reads a CIF or POSCAR and relaxes it to a stress-free reference.

  2. Apply strains

    Normal strains of 0.5% and 1% and shear strains of 3% and 6%, both signs, by default.

  3. Compute stresses

    The potential evaluates each deformed cell, ions re-minimised at fixed cell by default.

  4. Fit and report

    Least squares gives C_ij. elasticity_results.json holds tensor, VRH moduli and residual.