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, 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.

Variables:
  • calculator – The ASE Calculator used for the calculations.

  • optimizer – Optimization algorithm. Defaults to “FIRE”.

  • relax_structure – Indicates if the structure should be relaxed initially. Defaults to True.

  • n_points – Number of strain points for the EOS calculation. Defaults to 11.

  • max_abs_strain – Maximum absolute volumetric strain. Defaults to 0.1 (10% strain).

  • fmax – Maximum force tolerance for relaxation. Defaults to 0.1 eV/Å.

  • max_steps – Maximum number of optimization steps during relaxation. Defaults to 500.

  • relax_calc_kwargs – Additional keyword arguments for relaxation calculations. Defaults to None.

Constructor for initializing the data and configurations necessary for a calculation and optimization process. This class enables the setup of simulation parameters, structural relaxation options, and optimizations with specified constraints and tolerances.

Parameters:
  • calculator (Calculator | str) – An ASE calculator object used to perform energy and force calculations. If string is provided, the corresponding universal calculator is loaded.

  • optimizer (Optimizer | str, optional) – The optimization algorithm used for structural relaxations or energy minimizations. Can be an optimizer object or the string name of the algorithm. Default is “FIRE”.

  • max_steps (int, optional) – The maximum number of steps allowed during the optimization or relaxation process. Default is 500.

  • max_abs_strain (float, optional) – The maximum allowable absolute strain for relaxation processes. Default is 0.1.

  • n_points (int, optional) – The number of points or configurations evaluated during the simulation or calculation process. Default is 11.

  • fmax (float, optional) – The force convergence criterion, specifying the maximum force threshold (per atom) for stopping relaxations. Default is 0.1.

  • relax_structure (bool, optional) – A flag indicating whether structural relaxation should be performed before proceeding with further steps. Default is True.

  • relax_calc_kwargs (dict | None, optional) – Additional keyword arguments to customize the relaxation calculation process. Default is None.

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

Performs energy-strain calculations using Birch-Murnaghan equations of state to extract equation of state properties such as bulk modulus and R-squared score of the fit.

This function calculates properties of a material system under strain, specifically its volumetric energy response produced by applying incremental strain, then fits the Birch-Murnaghan equation of state to the calculated energy and volume data. Optionally, a relaxation is applied to the structure between calculations of its strained configurations.

Parameters:

structure – Input structure for calculations. Can be a Structure object or a dictionary representation of its atomic configuration and parameters.

Returns:

A dictionary containing results of the calculations, including relaxed structures under conditions of strain, energy-volume data, Birch-Murnaghan bulk modulus (in GPa), and R-squared fit of the Birch-Murnaghan model to the data.