sites

Structure helpers for kMC site metadata and supercell indexing.

kmcpy.structure.sites.build_site_index(structure, skip_check=True)[source]

Map site_index_key values to structure site indices.

Return type:

dict[tuple[int, int, int, str, int], int]

kmcpy.structure.sites.find_site_by_wyckoff_sequence_and_label(structure, wyckoff_sequence=0, label='Na2')[source]

Return the first site matching a Wyckoff sequence and CIF label.

kmcpy.structure.sites.find_site_by_wyckoff_sequence_label_and_supercell(structure, wyckoff_sequence=0, label='Na2', supercell=(0, 1, 1), return_index=True)[source]

Find a site or site index by Wyckoff sequence, label, and supercell image.

kmcpy.structure.sites.kmc_info_key(supercell=(1, 2, 3), label='Na2', wyckoff_sequence=2)[source]

Build the historical key from supercell, label, and Wyckoff sequence.

Return type:

tuple[int, int, int, str, int]

kmcpy.structure.sites.make_kmc_supercell(structure, scaling_matrix=(1, 2, 3), to_unit_cell=True)[source]

Build a supercell and annotate each site with its supercell image.

Return type:

Structure

kmcpy.structure.sites.site_index_key(supercell=(1, 2, 3), label='Na2', local_index=2)[source]

Build a unique active-site key from supercell, label, and local index.

Return type:

tuple[int, int, int, str, int]

kmcpy.structure.sites.structure_from_sites(sites, charge=None, validate_proximity=False, to_unit_cell=False, properties=None)[source]

Create a pymatgen Structure from sites while preserving site properties.

Return type:

Structure