Skip to content

H-Solubility Transformation

HSolubilityTransformation

HSolubilityTransformation(
    sqs_gen: SqsGenerator | None = None,
)

Generates H-interstitial BCC structures.

The transformation can start from an explicit host structure or generate a BCC host through SqsGenerator for composition-driven workflows.

Initializes the transformation.

Parameters:

Name Type Description Default
sqs_gen SqsGenerator | None

Optional SQS generator for composition-driven host generation.

None

apply_transformation

apply_transformation(
    structure: Atoms | Structure | None = None,
    composition: Composition | str | None = None,
    supercell_size: tuple[int, int, int] = (1, 1, 1),
    site_types: tuple[str, ...] = (
        "octahedral",
        "tetrahedral",
    ),
    max_sites_per_type: int | None = 1,
) -> dict[str, Any]

Generates structures with H inserted into BCC octahedral/tetrahedral sites.

Parameters:

Name Type Description Default
structure Atoms | Structure | None

Host structure.

None
composition Composition | str | None

Composition used with SqsGenerator when structure is omitted.

None
supercell_size tuple[int, int, int]

Supercell replication for the host.

(1, 1, 1)
site_types tuple[str, ...]

Site families to generate.

('octahedral', 'tetrahedral')
max_sites_per_type int | None

Maximum generated structures per site type. Use None to keep all generated candidates.

1

Returns:

Type Description
dict[str, Any]

dict[str, Structure | dict[str, list[Structure]]]: Dictionary with keys: - host_structure: The host structure used for interstitial insertion. - structures: Mapping of site type to generated host-plus-hydrogen structures.

Raises:

Type Description
ValueError

If core inputs are invalid.

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.