PAOFLOW.utils.point_groups#
Point-group operations, third-rank tensor symmetrisation and k-grid reduction.
A third-rank polar tensor \(T^{abc}\) of a crystal with point group \(G\) satisfies \(T^{abc} = \sum_{a'b'c'} R_{aa'}R_{bb'}R_{cc'}T^{a'b'c'}\) for every operation \(R\) (the same law for proper and improper operations). Two uses:
Audit of a computed tensor: its projection on the invariant subspace (
symmetrize()), the part removed by the projection (symmetry_error()), the components that must vanish (forbidden_components()) and the relations between the others (independent_relations()). The groups of the common crystal classes are closed from a few Cartesian generators (GENERATORS; the polar axis ofmm2/C2valongxorzas named, the threefold axis alongz, a mirrorm_xperpendicular tox).Reduction of a uniform k-grid to its irreducible wedge (
reduce_k_grid()) with the orbit sizes as weights, and the symmetrisation of the wedge sums: since the symmetrisation is linear, \(\sum_{\mathbf k \in BZ} T(\mathbf k) = \mathrm{Sym}_G[\sum_{\mathbf k \in IBZ} w_{\mathbf k} T(\mathbf k)]\) for a covariant integrand. The operations act on fractional k as integer matrices (fractional_k_from_cartesian(),cartesian_from_fractional_k()), the convention of Quantum ESPRESSO’ssym_rotas stored by PAOFLOW.
Attributes#
Functions#
|
All products of the generators (the identity included). |
|
All Cartesian matrices of a crystal class, closed from its generators. |
|
Projection of a third-rank tensor on the invariant subspace of the operations. |
|
Components that vanish for the group (labels such as |
|
Each allowed component expressed through the symmetrised unit tensors: |
|
Norm of the part of a tensor removed by the symmetrisation, relative to the tensor norm. |
|
Deviation from full permutation symmetry (Kleinman): |
|
|
|
Cartesian rotation |
|
Inverse of |
|
Integer indices |
|
Irreducible wedge of a Gamma-centred uniform grid under integer k-space operations. |
|
Components that feed the symmetrised values of the requested ones. |
|
Group average of component spectra: |
Module Contents#
- PAOFLOW.utils.point_groups.GENERATORS: dict[str, list[numpy.typing.NDArray[numpy.float64]]][source]#
- PAOFLOW.utils.point_groups.close_group(generators, limit=96)[source]#
All products of the generators (the identity included).
- Parameters:
generators (array_like
(ngen, 3, 3))limit (int, optional) – Largest group accepted (raises above it).
- Return type:
ndarray
(nops, 3, 3)
- PAOFLOW.utils.point_groups.point_group_operations(name)[source]#
All Cartesian matrices of a crystal class, closed from its generators.
- Parameters:
name (str) – A key of
GENERATORS(Hermann-Mauguin with the axis convention, e.g.'mm2_x','3m_x','-43m') or a Schoenflies alias ofALIASES.- Return type:
ndarray
(nops, 3, 3)
- PAOFLOW.utils.point_groups.symmetrize(tensor, operations)[source]#
Projection of a third-rank tensor on the invariant subspace of the operations.
- PAOFLOW.utils.point_groups.forbidden_components(operations, tol=1e-10)[source]#
Components that vanish for the group (labels such as
'xxx').
- PAOFLOW.utils.point_groups.independent_relations(operations, tol=1e-10)[source]#
Each allowed component expressed through the symmetrised unit tensors:
{'yxx': {'yyy': -1.0, ...}}.The projection of the unit tensor
e_abcgives the linear relations that the symmetry imposes; the dictionary lists, for every allowed component, the components it is tied to and the coefficients (yxx -> yyy: -1meansT^yxx = -T^yyyin 3m with the mirror perpendicular to x).
- PAOFLOW.utils.point_groups.symmetry_error(tensor, operations)[source]#
Norm of the part of a tensor removed by the symmetrisation, relative to the tensor norm.
- PAOFLOW.utils.point_groups.kleinman_error(tensor)[source]#
Deviation from full permutation symmetry (Kleinman):
|T - sym_perm(T)| / |T|.
- PAOFLOW.utils.point_groups.tensor_from_components(values, fill=np.nan)[source]#
(3, 3, 3)array from{'xyz': value, ...}(missing componentsfill).
- PAOFLOW.utils.point_groups.cartesian_from_fractional_k(w_frac, b_vectors)[source]#
Cartesian rotation
Rof an operationWacting on fractional k-coordinates.- Parameters:
w_frac (array_like
(3, 3)or(nops, 3, 3)) –k'_frac = W k_frac(Quantum ESPRESSO’ssym_rotas stored by PAOFLOW).b_vectors (array_like
(3, 3)) – Reciprocal lattice vectors as rows (any unit).
- Returns:
R = B^T W B^{-T}withk_cart = B^T k_frac; orthogonal for a lattice symmetry.- Return type:
ndarray, same leading shape
- PAOFLOW.utils.point_groups.fractional_k_from_cartesian(r_cart, b_vectors)[source]#
Inverse of
cartesian_from_fractional_k()(W = B^{-T} R B^T).
- PAOFLOW.utils.point_groups.grid_indices(nk)[source]#
Integer indices
(i1, i2, i3)of a uniform grid in the order ofmeshgrid(indexing='ij').
- PAOFLOW.utils.point_groups.reduce_k_grid(nk, operations_cryst)[source]#
Irreducible wedge of a Gamma-centred uniform grid under integer k-space operations.
- Parameters:
nk (sequence of 3 int)
operations_cryst (array_like
(nops, 3, 3)) – Integer matrices acting on fractional k (k' = W k); the identity may be omitted.
- Returns:
k_irr (ndarray
(nirr, 3)) – Fractional coordinates of the representatives (i / nk).weights (ndarray
(nirr,)) – Orbit sizes (they sum toprod(nk)).representative (ndarray
(prod(nk),), int) – Index intok_irrof the representative of every full-grid point.
- Raises:
ValueError – If an operation is not integer (it would not map the grid onto itself).
- PAOFLOW.utils.point_groups.component_closure(components, operations_cart, tol=1e-10)[source]#
Components that feed the symmetrised values of the requested ones.
T_sym^{abc} = (1/|G|) sum_R R_{aa'} R_{bb'} R_{cc'} T^{a'b'c'}: the closure is the set of(a', b', c')with a non-zero coefficient for at least one requested(a, b, c).
- PAOFLOW.utils.point_groups.symmetrize_components(values, components, operations_cart, requested)[source]#
Group average of component spectra:
(ncomp, ...)oncomponents->(nreq, ...).componentsmust contain the closure ofrequested(component_closure()); components outside the closure would carry zero weight anyway.