pyiron_atomistics.atomistics.structure.pyxtal.pyxtal#
- pyiron_atomistics.atomistics.structure.pyxtal.pyxtal(group: int | List[int], species: Tuple[str], num_ions: Tuple[int], dim=3, repeat=1, storage=None, allow_exceptions=True, **kwargs) Atoms | StructureStorage[source]#
Generate random crystal structures with PyXtal.
- group must be between 1 and the largest possible value for the given dimensionality:
dim=3 => 1 - 230 (space groups) dim=2 => 1 - 80 (layer groups) dim=1 => 1 - 75 (rod groups) dim=0 => 1 - 58 (point groups)
When group is passed as a list of integers or repeat>1, generate multiple structures and return them in a
StructureStorage.- Parameters:
group (list of int, or int) – the symmetry group to generate or a list of them
species (tuple of str) – which species to include, defines the stoichiometry together with num_ions
num_ions (tuple of int) – how many of each species to include, defines the stoichiometry together with species
dim (int) – dimensionality of the symmetry group, 0 is point groups, 1 is rod groups, 2 is layer groups and 3 is space groups
repeat (int) – how many random structures to generate
storage (
StructureStorage, optional) – when generating multiple structures, add them to this instead of creating a new storageallow_exceptions (bool) – when generating multiple structures, silence errors when the requested stoichiometry and symmetry group are incompatible
**kwargs – passed to pyxtal.pyxtal function verbatim
- Returns:
the generated structure, if repeat==1 and only one symmetry group is requested
StructureStorage: a storage of all generated structure, if repeat>1 or multiple symmetry groups are requested- Return type:
- Raises:
ValueError – if species and num_ions are not of the same length
ValueError – if stoichiometry and symmetry group are incompatible and allow_exceptions==False or only one structure is requested