Skip to content

Bain Displacement

BainDisplacementTransformation

BainDisplacementTransformation(
    start: float = 0.89,
    stop: float = 1.5,
    step: float = 0.01,
    symprec: float = 0.01,
)

Generates a series of deformed structures along the Bain path.

Varies the c/a ratio in small steps to produce structures along the Bain transformation pathway between cubic and tetragonal phases.

Initializes the BainDisplacementTransformation object.

Parameters:

Name Type Description Default
start float

The starting displacement value for the c/a ratio. Defaults to 0.89.

0.89
stop float

The stopping displacement value for the c/a ratio. Defaults to 1.5.

1.5
step float

The step size for incrementing the c/a ratio. Defaults to 0.01.

0.01
symprec float

Symmetry precision used to standardize the input structure to a conventional cell before deforming it. Defaults to 1e-2.

0.01

Raises:

Type Description
ValueError

If start or stop is not positive, or if step is not positive.

apply_transformation

apply_transformation(
    structure: Structure,
) -> dict[float, Structure]

Generate displaced structures along the Bain path.

The Bain strain is defined relative to the Cartesian x/y/z axes, so structure is first standardized to a conventional, axis-aligned cubic cell (via SpacegroupAnalyzer) before being deformed.

Parameters:

Name Type Description Default
structure Structure

The input structure to be displaced along the Bain path.

required

Returns:

Type Description
dict[float, Structure]

dict[float, Structure]: The displaced structures, keyed by the corresponding c/a ratio.