Skip to content

ANNNI Stacking Faults

ANNNIStackingFaultTransformation

ANNNIStackingFaultTransformation(
    sqs_gen: SqsGenerator | None = None,
)

Generates displaced structures for stacking fault energy calculations using the ANNNI model.

Supports FCC, HCP, and DHCP crystal systems, with configurable supercell sizes and shell weights.

Initializes the ANNNIStackingFaultTransformation object.

Parameters:

Name Type Description Default
sqs_gen SqsGenerator | None

An optional SQS generator object. If not provided, a new instance will be created when needed.

None

apply_transformation

apply_transformation(
    composition: Composition | str,
    fcc_supercell_size: tuple[int, int, int] = (5, 5, 5),
    hcp_supercell_size: tuple[int, int, int] = (5, 5, 5),
    dhcp_supercell_size: tuple[int, int, int] = (5, 5, 5),
    fcc_shell_weights: dict[int, float] | None = None,
    hcp_shell_weights: dict[int, float] | None = None,
    dhcp_shell_weights: dict[int, float] | None = None,
) -> dict[str, Structure]

Generate FCC, HCP, and DHCP supercell structures for the given composition.

Parameters:

Name Type Description Default
composition Composition | str

The composition of the supercell, either as a string or a Composition object.

required
fcc_supercell_size tuple[int, int, int]

The size of the FCC supercell. Defaults to (5, 5, 5).

(5, 5, 5)
hcp_supercell_size tuple[int, int, int]

The size of the HCP supercell. Defaults to (5, 5, 5).

(5, 5, 5)
dhcp_supercell_size tuple[int, int, int]

The size of the DHCP supercell. Defaults to (5, 5, 5).

(5, 5, 5)
fcc_shell_weights dict[int, float]

Shell weights for generating the FCC supercell. Defaults to None.

None
hcp_shell_weights dict[int, float]

Shell weights for generating the HCP supercell. Defaults to None.

None
dhcp_shell_weights dict[int, float]

Shell weights for generating the DHCP supercell. Defaults to None.

None

Returns:

Type Description
dict[str, Structure]

dict[str, Structure]: Dictionary of the generated structures, keyed by "fcc", "hcp", and "dhcp".

sqs_gen

sqs_gen() -> SqsGenerator

The SqsGenerator used to generate SQS structures.

Lazily creates a SqsGenerator instance on first access.

Returns:

Name Type Description
SqsGenerator SqsGenerator

The SqsGenerator instance.