API Reference#
- dsenum.StructureEnumerator(base_structure: Structure, index: int, num_types: int, mapping_color_species: list[SpeciesLike] | None = None, composition_constraints: list[int] | None = None, base_site_constraints: list[list[int]] | None = None, color_exchange: bool = True, remove_superperiodic: bool = True, remove_incomplete: bool = True, method: Literal['direct', 'lexicographic'] = 'direct', n_jobs: int = 1, verbose: bool = True)[source]#
Enumerate derivative structures.
- Parameters:
base_structure (pymatgen.core.Structure) – Aristotype for derivative structures
index (int) – How many times to expand unit cell
num_types (int) – The number of species in derivative structures. num_types may be larger than the number of the kinds of species in base_structure: for example, you consider vacancies in derivative structures.
mapping_color_species (list[SpecieLike] | None, optional) – If specified, use these species in derivative structures. The length of this list should be equal to num_types
composition_constraints (list[int] | None, optional) – composition_constraints[i] is the ratio of the i-th species in mapping_color_species. For example, set composition_constraints = [1, 2] for enumerating TiO2 structures with mapping_color_species = [“Ti”, “O”].
base_site_constraints (list[list[int]] | None, optional) – (num_elements, num_color) e.g. site_constraints[2] = [0, 3, 4] means color of site-2 in base_structure must be 0, 3, or 4.
color_exchange (bool, optional) – Iff true, identify color-exchanging
remove_superperiodic (bool, optional) – Iff true, discard superperiodic coloring
remove_incomplete (bool, optional) – Iff true, discard structures whose number of types are less then num_types.
method (str, optional) – “direct” or “lexicographic”, so far
n_jobs (int, optional) – core in lexicographic coset enumeration(only used when method=’lexicographic’)
verbose (bool, optional) – If true, print progress and number of enumerated structures.
- dsenum.ZddStructureEnumerator(base_structure: Structure, index: int, num_types: int, mapping_color_species: list[SpeciesLike] | None = None, composition_constraints: list[int] | None = None, base_site_constraints: list[list[int]] | None = None, remove_superperiodic: bool = True, remove_incomplete: bool = True, verbose: bool = True)[source]#
Enumerate derivative structures with ZDD acceleration.
- Parameters:
base_structure (pymatgen.core.Structure) – Aristotype for derivative structures
index (int) – How many times to expand unit cell
num_types (int) – The number of species in derivative structures. num_types may be larger than the number of the kinds of species in base_structure: for example, you consider vacancies in derivative structures.
mapping_color_species (list[int] | None, optional) – If specified, use these species in derivative structures. The length of this list should be equal to num_types
composition_constraints (list[int] | None, optional) – composition_constraints[i] is the ratio of the i-th species in mapping_color_species. For example, set composition_constraints = [1, 2] for enumerating TiO2 structures with mapping_color_species = [“Ti”, “O”].
base_site_constraints (list[list[int]] | None, optional) – (num_elements, num_color) e.g. site_constraints[2] = [0, 3, 4] means color of site-2 in base_structure must be 0, 3, or 4.
remove_superperiodic (bool, optional) – Iff true, discard superperiodic coloring
remove_incomplete (bool, optional) – Iff true, discard structures whose number of types are less then num_types.
verbose (bool, optional) – If true, print progress and number of enumerated structures.