matcalc._stability module

Calculator for stability related properties.

class EnergeticsCalc(calculator: Calculator | str, *, elemental_refs: Literal['MP-PBE', 'MatPES-PBE', 'MatPES-r2SCAN'] | dict = 'MatPES-PBE', fmax: float = 0.1, optimizer: str = 'FIRE', perturb_distance: float | None = None, use_gs_reference: bool = False, relax_structure: bool = True, relax_calc_kwargs: dict | None = None)[source]

Bases: PropCalc

Handles formation energy per atom, cohesive energy per atom, and relaxed structures using reference elemental data and optional relaxation.

calculator[source]

ASE calculator (or universal model name) for energies and forces.

elemental_refs[source]

Builtin ref key or custom dict mapping elements to reference data.

use_gs_reference[source]

If True, use tabulated DFT ground-state energies from refs.

relax_structure[source]

Whether to relax the input structure before energetics.

relax_calc_kwargs[source]

Optional kwargs forwarded to RelaxCalc.

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

  • elemental_refs"MP-PBE", "MatPES-PBE", "MatPES-r2SCAN", or a custom dict.

  • fmax – Force convergence tolerance (eV/Å) for relaxation.

  • optimizer – ASE optimizer name for relaxation.

  • perturb_distance – Random displacement (Å) before relaxation, or None.

  • use_gs_reference – Use tabulated ground-state energies from references when True.

  • relax_structure – Relax input structure before computing energetics.

  • relax_calc_kwargs – Optional kwargs for RelaxCalc.

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

structure – Pymatgen structure, ASE atoms, or chained-result dict.

Returns:

Dict with formation_energy_per_atom, cohesive_energy_per_atom (or None), final_structure, and other keys from relaxation / PES when applicable.