matcalc._eos module

Calculators for EOS and associated properties.

class EOSCalc(calculator: Calculator | str, *, optimizer: Optimizer | str = 'FIRE', max_steps: int = 500, max_abs_strain: float = 0.1, n_points: int = 11, fmax: float = 0.1, allow_shape_change: bool = True, relax_structure: bool = True, relax_calc_kwargs: dict | None = None)[source]

Bases: PropCalc

Performs equation of state (EOS) calculations using a specified ASE calculator.

This class is intended to fit the Birch-Murnaghan equation of state, determine the bulk modulus, and provide other relevant physical properties of a given structure. The EOS calculation includes applying volumetric strain to the structure, optional initial relaxation of the structure, and evaluation of energies and volumes corresponding to the applied strain.

calculator[source]

ASE calculator or universal model name.

optimizer[source]

Optimizer for optional relaxations.

relax_structure[source]

Relax initial structure before the EOS scan.

n_points[source]

Number of volume/strain samples.

max_abs_strain[source]

Half-range of applied volumetric strain (symmetric scan).

fmax[source]

Force tolerance for relaxations.

max_steps[source]

Max optimizer steps per relaxation.

allow_shape_change[source]

Allow cell shape to change at fixed volume during EOS points.

relax_calc_kwargs[source]

Optional kwargs for RelaxCalc.

Parameters:
  • calculator – ASE calculator or universal model name string.

  • optimizer – ASE optimizer name or class for relaxations.

  • max_steps – Maximum relaxation steps per structure.

  • max_abs_strain – Maximum absolute volumetric strain in the scan.

  • n_points – Number of strain points (including halves of the scan).

  • fmax – Force convergence criterion (eV/Å).

  • allow_shape_change – Relax cell shape at fixed volume for EOS points when True.

  • relax_structure – Relax input structure before the strain scan.

  • relax_calc_kwargs – Optional kwargs for RelaxCalc.

_abc_impl = <_abc._abc_data object>[source]
calc(structure: Structure | Atoms | dict[str, Any]) dict[source]
Parameters:

structure – Pymatgen structure, ASE atoms, or dict with structure keys.

Returns:

Dict with eos (volumes, energies), bulk_modulus_bm (GPa), r2_score_bm, and fields from the final relaxation merged in. See pymatgen BirchMurnaghan / EOSBase for fit details.