Overview
TheEOS task calculates the equation of state (EOS) of a crystal by:
- Performing a full cell relaxation via the OPT task.
- Generating
npointsuniformly strained copies of the relaxed cell. - Relaxing atomic positions (fixed cell) for each strained copy.
- Fitting the resulting energy–volume data with the Birch–Murnaghan EOS (via
pymatgen).
EOS and uses a TASK_SOURCE + INPUTS cache policy.
Function signature
Parameters
The input atomic structure.
ASE-compatible calculator for energy and force evaluations.
Optimizer used for both the initial full relaxation and the per-strain position relaxations. See OPT for accepted string values.
Extra keyword arguments forwarded to the optimizer constructor.
Filter applied during the initial full relaxation only. Subsequent per-strain runs use
filter=None (positions only). See OPT for accepted string values.Extra keyword arguments forwarded to the filter constructor.
Convergence criteria forwarded to
optimizer.run(). See OPT for details.Maximum absolute volumetric strain applied to each lattice dimension. Linear scale factors span
[1 - max_abs_strain, 1 + max_abs_strain]^(1/3).Number of strain points (i.e., structures) used to sample the energy–volume curve.
When
True, all per-strain OPT sub-tasks are submitted concurrently using OPT.submit() and collected with prefect.futures.wait. When False, they run sequentially.When
True, persists and caches intermediate OPT results so repeated calls with the same inputs skip re-computation. When False, intermediate results are not cached.Internal OPT chaining
EOS internally calls the OPT task twice per strain point:- Initial relaxation — uses the provided
filterto relax both cell and positions. - Per-strain relaxations —
filter=None, so only atomic positions are relaxed at each fixed strained volume.
optimizer, optimizer_kwargs, and criterion. The cache_opt flag controls whether persist_result and refresh_cache are set on the inner OPT calls.
Return value
The fully relaxed (equilibrium) structure.
Raw energy–volume data used for the fit.
Bulk modulus in GPa (
b0 converted from eV/ų).Bulk modulus in eV/ų (Birch–Murnaghan
b0 parameter).Pressure derivative of the bulk modulus (dimensionless).
Equilibrium energy in eV.
Equilibrium volume in ų.
If the initial relaxation fails, the function returns a Prefect
State object instead of a dict. Always check isinstance(result, dict) before accessing keys.