Elastic, internal-strain and piezoelectric tensors from the fewest possible stress calculations, for every crystal symmetry and with any electronic-structure code.
minelastic implements the minimal and uncoupled strain sets scheme of
S. I. Simak and U. Singh, A general algorithm for minimal uncoupled stress-strain calculations of elastic constants, arXiv:2610.11733 (2026).
Each independent elastic constant is read off one stress component of one strained cell, and the number of
strain patterns is the smallest that any stress-strain method can use: one for a cubic crystal and two for
tetragonal, trigonal and hexagonal crystals, where the usual approach (VASP's IBRION = 6 and most
workflows) applies six. The same strained cells also give the internal-strain tensor and, with Berry-phase
dipoles, the clamped-ion piezoelectric tensor; a few single points with displaced atoms add the relaxed-ion constants,
the Born charges and the total piezoelectric tensors; and molecular dynamics in the strained cells gives the
constants at finite temperature.
Installation
pip install minelastic
minelastic requires Python 3.9 or newer; numpy, spglib and ASE are installed with it.
Usage
With any ASE calculator, in memory:
from ase.build import bulk
from ase.calculators.emt import EMT
import minelastic
result = minelastic.calculate(bulk("Cu", "fcc", a=3.59, cubic=True), EMT())
print(result.summary())
minelastic 0.1.0: Fm-3m (225), cubic, 1 strain pattern(s), method 'uncoupled'
c11 = 172.50 GPa
c12 = 115.35 GPa
c44 = 89.84 GPa
...
Born stable: True (eigenvalues 57.2, 57.2, 89.8, 89.8, 89.8, 403.2)
K_VRH = 134.40 G_VRH = 56.85 E = 149.48 GPa nu = 0.315 A_U = 1.755
...
With a DFT code, minelastic writes the inputs of the strained cells from the input of the relaxed structure and reads the finished calculations:
# ref/ holds POSCAR, INCAR, POTCAR and KPOINTS of the relaxed structure
minelastic generate vasp ref/ -o el
# run VASP in every directory listed in el/STATES
minelastic collect el # prints the constants, writes el/elastic.json
VASP, Quantum ESPRESSO, ABINIT, FHI-aims and every structure format that ASE writes are supported, and any ASE calculator (EMT, MACE, CP2K, ...) can be used directly.
Documentation
The documentation at https://utksi.github.io/minelastic/ contains tutorials for VASP, Quantum ESPRESSO,
ABINIT and CP2K, how-to guides for every quantity, the theory with all formulas, and the validation against
the codes' own elastic, internal-strain, Born-charge and piezoelectric tensors. Runnable scripts are in
examples/.
Usage with agentic workflows
An AI coding agent can run minelastic for you. skills/minelastic is an agent skill
with the commands and the checks that a correct calculation needs. In Claude Code:
/plugin marketplace add utksi/minelastic
/plugin install minelastic@minelastic
Other agents can read skills/minelastic/SKILL.md directly. Examples are in
the documentation.
Citing
If you use minelastic in published work, please cite the paper:
@misc{simak2026minimal,
title = {A General Algorithm for Minimal Uncoupled Stress--Strain
Calculations of Elastic Constants},
author = {Simak, Sergei I. and Singh, Utkarsh},
year = {2026},
eprint = {2610.11733},
archivePrefix = {arXiv},
primaryClass = {cond-mat.mtrl-sci},
doi = {10.48550/arXiv.2610.11733}
}
Tests and license
pip install -e ".[test]" && pytest tests runs the tests. They use stored stresses of real calculations,
among them the paper's benchmark runs for all nine elastic types, and they run every code example of the
documentation, so no DFT code is needed.
minelastic is distributed under the MIT license (LICENSE). It was developed at the Department of Physics, Chemistry and Biology (IFM), Linköping University. Questions and bug reports are welcome as GitHub issues.
Metadata
Release files for minelastic 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| minelastic-0.1.0.tar.gz | 193.2 kB | With provenance | Details for minelastic-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| minelastic-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for minelastic-0.1.0-py3-none-any.whl |
Total release size: 260.2 kB
Release files / minelastic-0.1.0.tar.gz
| Download URL | minelastic-0.1.0.tar.gz |
|---|---|
| Size | 193.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61a13298a0a89ec9c60294b9160079d6eb56bc5d166ddcdd55d2e0f2c43d9a04
|
|
BLAKE2b-256 checksum How to use checksums |
85c9139cbfff497065be2707f66e166a639ebf4d27343dd086f2123cb176d003
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logRelease files / minelastic-0.1.0-py3-none-any.whl
| Download URL | minelastic-0.1.0-py3-none-any.whl |
|---|---|
| Size | 67.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08e4d884abf528e9c6317b4ec051dc07bac1a59cb86c63749f711be94c409a77
|
|
BLAKE2b-256 checksum How to use checksums |
90cf2c078d0c8c19bd971750f36274b917b13ba4f33e6112f6823d9c9f09b159
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logSecurity for minelastic 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for minelastic-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.