In this article
A valid stress array can still carry the wrong physical convention after a source or simulator conversion.
Identify the implementation before converting a tensor
A materials pipeline may combine a stress prediction, a reference calculation, and a simulation calculator in one table. Those arrays can share a shape while using different conventions. A comparison needs an explicit boundary for every conversion, rather than a generic stress label.
The legacy M3GNet project is archived and identifies MatGL as its replacement. This guide concerns the archived implementation; a similarly named model in another framework needs its own interface review.
Reference signs and units must be translated together
The documented training convention uses GPa and negative compression. The repository explains converting default VASP stress in kBar with positive compression by multiplying by -0.1. Omitting the sign or applying only the magnitude conversion creates a different physical quantity.
Preserve the original values, declared source convention, and conversion operation. A derived column should remain traceable to its source instead of overwriting it. Verify whether an upstream exporter already applied conversion before performing it again.
Model output and calculator output are different boundaries
The potential implementation derives stress from energy under strain and applies its unit conversion. Its returned quantity should not automatically be treated as the final simulator-facing representation.
The dynamics adapter multiplies returned stress by stress_weight. Higher-level workflows supply that setting. Record the actual resolved value and intended role; copying an optimizer setting is not a universal unit-conversion rule.
Component order is independent of physical units
An external exporter may flatten a matrix into a component vector. That operation introduces an ordering convention separate from sign and units. A correctly scaled value assigned to the wrong shear component remains incorrect.
Document the matrix-to-vector mapping whenever an application adds one. The tensor-axis guide helps separate axis meaning from compatible storage shapes. Retain cell and periodic-boundary information with the geometry used for prediction.
Check the complete conversion path on a small deformation
A useful audit follows an inspected structure through source import, model output, and calculator result. Apply a controlled cell deformation and inspect signs, units, and component correspondence before using the adapter in a long relaxation.
The autograd guide explains derivative provenance. Such a check tests interface consistency; it does not measure model accuracy for a new material or establish experimental agreement of the predicted stress.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.