openmaterials.ai / codes / AtomisticSkills mat-elasticity
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.
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.
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.
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.
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.
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.
--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.
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
calculate_elasticity.py reads a CIF or POSCAR and relaxes it to a stress-free reference.
Normal strains of 0.5% and 1% and shear strains of 3% and 6%, both signs, by default.
The potential evaluates each deformed cell, ions re-minimised at fixed cell by default.
Least squares gives C_ij. elasticity_results.json holds tensor, VRH moduli and residual.