Skip to content

Surface Energy

SurfaceAnalyzer

SurfaceAnalyzer(
    miller_index: tuple[int, int, int] = (1, 1, 0),
    min_slab_size: float = 10.0,
    min_vacuum_size: float = 10.0,
    center_slab: bool = True,
    in_unit_planes: bool = False,
    primitive: bool = False,
    symmetrize: bool = True,
    calculator: BaseCalculator | None = None,
    surface_transformation: SurfaceTransformation
    | None = None,
)

A class used to perform surface energy analysis for a given structure.

Initializes the SurfaceAnalyzer object.

Parameters:

Name Type Description Default
miller_index tuple[int, int, int]

The Miller index for the surface. Defaults to (1, 1, 0).

(1, 1, 0)
min_slab_size float

The minimum slab size in Angstroms. Defaults to 10.0.

10.0
min_vacuum_size float

The minimum vacuum size in Angstroms. Defaults to 10.0.

10.0
center_slab bool

Whether to center the slab within the vacuum. Defaults to True.

True
in_unit_planes bool

Whether min_slab_size and min_vacuum_size are in units of hkl planes instead of Angstroms. Defaults to False.

False
primitive bool

Whether to reduce the generated slabs to their primitive cell. Defaults to False.

False
symmetrize bool

Whether to generate slabs with symmetric surface terminations on both sides. Defaults to True.

True
calculator BaseCalculator | None

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

None
surface_transformation SurfaceTransformation | None

The transformation object used to generate the slabs. If not provided, a new instance is initialized from miller_index, min_slab_size, min_vacuum_size, center_slab, in_unit_planes, primitive, and symmetrize.

None

calculate

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

Calculates the surface energy of a given structure for the configured Miller index.

Parameters:

Name Type Description Default
structure Structure | Atoms

The bulk structure to be analyzed.

required
is_relaxed bool

Whether the structure is already relaxed. Defaults to False.

False

Returns:

Type Description
dict[str, Structure | float | list[dict[str, Structure | float]]]

dict[str, Structure | float | list[dict[str, Structure | float]]]: A dictionary with the following keys: - bulk_structure: The (relaxed) bulk structure used as the energy reference. - bulk_energy: The total energy of the bulk structure. - bulk_energy_per_atom: The energy per atom of the bulk structure. - slabs: A list of dictionaries, one per generated slab termination, with keys: - slab: The unrelaxed slab structure. - relaxed_slab: The slab structure after relaxation with the cell fixed. - slab_energy: The energy of the relaxed slab. - slab_area: The surface area of the slab, in Angstrom squared. - gamma: The surface energy of the slab, in eV/Angstrom squared. - gamma_J_m2: The surface energy of the slab, in J/m^2.

Raises:

Type Description
ValueError

If the calculator does not implement the 'energy' property.

surface_transformation

surface_transformation() -> SurfaceTransformation

Returns the transformation object used to generate the slabs.

Returns:

Name Type Description
SurfaceTransformation SurfaceTransformation

The transformation object used to generate the slabs.