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 |
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 |
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:
- |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the calculator does not implement the 'energy' property. |
surface_transformation
¶
Returns the transformation object used to generate the slabs.
Returns:
| Name | Type | Description |
|---|---|---|
SurfaceTransformation |
SurfaceTransformation
|
The transformation object used to generate the slabs. |