Skip to content

Surface Binding Energy

SBEAnalyzer

SBEAnalyzer(
    max_index: int = 1,
    min_slab_size: float = 10.0,
    min_vacuum_size: float = 10.0,
    height: float = 1.0,
    supercell_size: list[int] | None = None,
    calculator: BaseCalculator | None = None,
    sbe_transformation: SBETransformation | None = None,
)

A class used to compute surface binding energies (SBE) for a bulk structure.

Initializes the SBEAnalyzer object.

Parameters:

Name Type Description Default
max_index int

Maximum Miller index to consider when generating slabs. Defaults to 1.

1
min_slab_size float

Minimum slab thickness in Angstroms for slab generation. Defaults to 10.0.

10.0
min_vacuum_size float

Minimum vacuum size in Angstroms for slab generation. Defaults to 10.0.

10.0
height float

Height above the surface, in Angstroms, used to identify surface atoms. Defaults to 1.0.

1.0
supercell_size list[int] | None

Supercell replication factors used when building the slab supercell for vacancy calculations. Defaults to [4, 4, 1].

None
calculator BaseCalculator | None

The calculator used for energy calculations. Defaults to a lazily constructed default calculator.

None
sbe_transformation SBETransformation | None

The transformation object used to generate slabs, supercells, vacancy structures, and isolated-atom references. If not provided, a new instance is initialized from max_index, min_slab_size, min_vacuum_size, height, and supercell_size.

None

calculate

calculate(
    structure: Structure | Atoms, is_relaxed: bool = False
) -> dict[str, Any]

Calculates the surface binding energy (SBE) for a given bulk structure.

Every energy/metadata collection below is a flat list of uniform dicts, joinable on miller_index/termination_index/site_index. Structure objects are kept out of these records and returned separately under structures, keyed the same way, so the main result stays small and easy to hand to e.g. pandas.DataFrame.

Parameters:

Name Type Description Default
structure Structure | Atoms

The bulk structure to be analyzed.

required
is_relaxed bool

Whether the input structure is already relaxed. Defaults to False.

False

Returns:

Type Description
dict[str, Any]

dict[str, Any]: A dictionary with the following keys: - bulk_energy_per_atom: The energy per atom of the (relaxed) bulk structure. - best_miller_index: The Miller index containing the single lowest-surface-energy termination. - best_surface_energy: That termination's surface_energy (the minimum across every entry in surface_energies). - surface_energies: One entry per screened slab termination (every Miller index up to max_index), each a dict with keys miller_index, termination_index, slab_area, slab_energy, and surface_energy. - isolated_atom_energies: A dict mapping each element symbol to its isolated-atom energy. - terminations: One entry per termination of best_miller_index, each a dict with keys miller_index, termination_index, supercell_slab_energy (E_s), and avg_surface_binding_energy_by_element (mean SBE per element for that termination alone). - vacancy_results: One entry per surface site of every termination of best_miller_index, each a dict with keys miller_index, termination_index, site_index, element, vacancy_energy (E_{s+v}), and surface_binding_energy. - avg_surface_binding_energy_by_element: Mean, across terminations, of each termination's per-element average SBE (each termination weighted equally, not each site). - avg_surface_binding_energy: Mean, across terminations and elements, of the per-termination per-element averages above. - structures: A dict with keys bulk_structure (the relaxed bulk Structure), slabs (parallel to surface_energies, each with slab and relaxed_slab), supercells (parallel to terminations, each with supercell_slab), and vacancies (parallel to vacancy_results, each with structure (unrelaxed) and relaxed_structure).

Raises:

Type Description
ValueError

If the calculator does not implement the 'energy' property, or if no slabs were generated for the given structure and parameters.

sbe_transformation

sbe_transformation() -> SBETransformation

Returns the transformation object used to generate slabs, supercells, and vacancy structures.

Returns:

Name Type Description
SBETransformation SBETransformation

The transformation object used to generate structures.