Configuration¶
High-level structure generation and supercell objects.
configuration
¶
SSAGenerator
¶
SSAGenerator(prim_cell: Cell, magnetic_site_indices: Sequence[int], *, sublattice: Sublattice | None = None, multiplicity_preserving: bool = True, symprec: float = DEFAULT_SYMPREC, atol: float = 1e-05)
propagation_vectors
property
¶
propagation_vectors: list[NDArrayFloat] | None
Propagation vectors in the primitive standardized setting, or
None if the generator was not constructed with
:meth:with_propagation_vectors.
enumerate
¶
enumerate(spin_only_group_type: SpinOnlyGroupType, *, k_index: int | None = None, max_depth: int | None = 1, up_to_parent_conjugacy: bool = True) -> list[tuple[SpinOnlyGroup, NontrivialSpinSpaceGroup, SpinSymmetryAdaptedStructure]]
Enumerate spin symmetry adapted (SSA) structures.
For every retained family space subgroup G' <= G, spin space groups
are classified under N_G(G') x O(3). up_to_parent_conjugacy
independently controls whether G-conjugate family subgroups are
retained separately.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
spin_only_group_type
|
SpinOnlyGroupType
|
Type of the spin-only group to enumerate. |
required |
k_index
|
int | None
|
Global index of the invariant translation sublattice used to
bound family-subgroup enumeration. Without propagation vectors,
every index- |
None
|
max_depth
|
int | None
|
Maximum Hermann translationengleiche subgroup depth from the
parent group. |
1
|
up_to_parent_conjugacy
|
bool
|
Classify family space subgroups up to conjugation by the
crystallographic parent. When |
True
|
generate_oriented
¶
generate_oriented(sas: SpinSymmetryAdaptedStructure, spin_only_group: SpinOnlyGroup, nontrivial_spin_space_group: NontrivialSpinSpaceGroup, *, preserve_spin_planochirality: bool = True, rng: Generator | None = None, atol: float = 1e-05) -> list[tuple[Structure, MagneticSpaceSubgroup]]
Generate oriented structures using only the SSG family group's axes.
with_propagation_vectors
classmethod
¶
with_propagation_vectors(cell: Cell, propagation_vectors: Sequence[NDArrayFloat], magnetic_site_indices: Sequence[int], *, k_frame: Literal['input', 'prim_std'] = 'input', multiplicity_preserving: bool = True, symprec: float = DEFAULT_SYMPREC, atol: float = 1e-05) -> Self
Create a generator from propagation vectors given in a named frame.
The internal enumeration works in moyopy's primitive standardized cell,
whose setting may differ from that of cell (e.g. hexagonal axis
permutations). The propagation vectors are transformed into that frame
explicitly, and the accepted vectors are echoed back in both settings
at INFO level so a frame mismatch can be caught before enumeration. The
resulting commensurate translation lattice is also used as the single
bound for t-, k-, and general-family subgroup enumeration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cell
|
Cell
|
Input cell, e.g. in the CIF / experimental setting. Do not
pre-standardize it unless the propagation vectors are given in the
same standardized setting (then use |
required |
propagation_vectors
|
Sequence[NDArrayFloat]
|
Propagation vectors in fractional reciprocal coordinates of the
frame named by |
required |
magnetic_site_indices
|
Sequence[int]
|
Indices of magnetic sites in |
required |
k_frame
|
Literal['input', 'prim_std']
|
Frame in which |
'input'
|
SpinSymmetryAdaptedStructure
dataclass
¶
SpinSymmetryAdaptedStructure(supercell: Supercell, magnetic_moments_basis: list[NDArrayFloat], atol: float = 1e-08)
grouped_magnetic_moments_basis
cached
property
¶
Group basis vectors by the supercell sites they act on.
Returns a dict mapping frozensets of supercell site indices (where the
basis vector has nonzero rows) to lists of indices into
magnetic_moments_basis sharing that site pattern.
generate_oriented
¶
generate_oriented(spin_only_group: SpinOnlyGroup, nontrivial_spin_space_group: NontrivialSpinSpaceGroup, *, preserve_spin_planochirality: bool = True, parent_prim_rotations: NDArrayInt | None = None, rng: Generator | None = None, atol: float = 1e-05) -> list[tuple[Structure, MagneticSpaceSubgroup]]
generate_with_magnetic_moments
¶
Supercell
¶
Supercell(prim_cell: Cell, sublattice: Sublattice, symprec: float = 0.0001)
positions
property
¶
Return fractional coordinates of sites in the supercell.
act_operation
¶
act_operation(sub_sites: Sequence[SupercellSiteIndex], prim_rotation: NDArrayInt, prim_translation: NDArrayFloat) -> dict[SupercellSiteIndex, SupercellSiteIndex] | None
Permutation of sub_sites under one primitive-frame operation.
Returns the mapping from each site in sub_sites to its image
site, or None when the operation does not permute sub_sites
within the symprec tolerance.
site_permutations
¶
site_permutations(rotations: Sequence[NDArrayInt], translations: Sequence[NDArrayFloat]) -> list[NDArrayInt]
Supercell-site permutations under primitive-frame operations.
For each (rotation, translation) pair, returns the array mapping
each supercell site index to its image site index (brute-force
O(n^2) matching). Raises if an operation does not permute the sites
within the symprec tolerance.