Let \(\mathbf A^T=(\mathbf a_0,\mathbf a_1, \mathbf a_2)\), where \(\mathbf a_0\), \(\mathbf a_1\) and \(\mathbf a_2\) are the lattice vectors of the unit cell.


\((\mathbf a_c)_v=\mathbf A_{cv}\) is stored in gd.cell_cv[c, v] in units of Bohr and in atoms.cell[c, v] in Å units.

The relation between scaled positions \(\mathbf s\) and xyz-positions \(\mathbf r\) is \(\mathbf r=\mathbf A^T\mathbf s\).

A crystal has a set of symmetry operations (symmetry.op_scc) in the form of matrices \(\mathbf U\) so that the lattice vectors are transformed to \(\mathbf A'=\mathbf U\mathbf A\) and \(\mathbf r\) is transformed to \(\mathbf r'\) as:

\[\mathbf r'= \mathbf A'^T\mathbf s= \mathbf A^T\mathbf U^T\mathbf s= \mathbf A^T\mathbf U^T\mathbf A^{-T}\mathbf r= \mathbf M\mathbf r,\]

where \(\mathbf M=\mathbf A^T\mathbf U^T\mathbf A^{-T}\).

If we want to express \(\mathbf r'\) in terms of the original lattice vectors (\(\mathbf r'=\mathbf A^T\mathbf s'\)), we get:

\[\mathbf s' = \mathbf U^T\mathbf s.\]


The \(\mathbf U\) matrices contain only the integers -1, 0 and 1. Also note, that if \(\mathbf U\) is a symmetry operation, then \(\mathbf U^{-1}\) is too.

Let \(\tilde\psi_{\mathbf k}(\mathbf r)\) be a Bloch wave function and \(\mathbf R\) any Bravais lattice vector:

\[\tilde\psi_{\mathbf k}(\mathbf r+\mathbf R)= e^{i\mathbf k^T\mathbf R}\tilde\psi_{\mathbf k}(\mathbf r).\]

Transforming \(\tilde\psi_{\mathbf k}\) with our symmetry operation, we get \(\tilde\psi'_{\mathbf k'}(\mathbf r)=\tilde\psi_{\mathbf k}(\mathbf M\mathbf r)\) and:

\[\tilde\psi'_{\mathbf k'}(\mathbf r+\mathbf R)= \tilde\psi_{\mathbf k}(\mathbf M\mathbf r+\mathbf M\mathbf R)= e^{i\mathbf k^T\mathbf M\mathbf R} \tilde\psi_{\mathbf k}(\mathbf M\mathbf r)= e^{i\mathbf k^T\mathbf M\mathbf R} \tilde\psi'_{\mathbf k'}(\mathbf r).\]

From this equation it is seen that \(\mathbf k'=\mathbf M^T\mathbf k\). In terms of scaled k-points \(\mathbf q\), where:

\[\mathbf k=2\pi\mathbf A^{-1}\mathbf q,\]

we get \(\mathbf q'=\mathbf U\mathbf q\).

Besides cystal symmetry, there is also time reversal symmetry for all systems with no magnetic field. The wavefunction for \({\mathbf k}\) and \({-\mathbf k}\) is related as:

\[\tilde\psi_{-\mathbf k}(\mathbf r) = \tilde\psi^{\ast}_{\mathbf k}(\mathbf r)\]

If in addition the crystal has inversion symmetry, then the wavefunction should satisfy:

\[\tilde\psi_{\mathbf k}(\mathbf r) = \tilde\psi_{-\mathbf k}(-\mathbf r) = \tilde\psi^{\ast}_{\mathbf k}(-\mathbf r)\]


Time reversal symmetry operation is not included in symmetry.op_scc.

Details of the symmetry object

class gpaw.symmetry.Symmetry(id_a, cell_cv, pbc_c=array([ True, True, True]), tolerance=1e-07, point_group=True, time_reversal=True, symmorphic=True, do_not_symmetrize_the_density=False, rotate_aperiodic_directions=False, translate_aperiodic_directions=False)[source]

Interface class for determination of symmetry, point and space groups.

It also provides to apply symmetry operations to kpoint grids, wavefunctions and forces.

Construct symmetry object.


id_a: list of int
Numbered atomic types
cell_cv: array(3,3), float
Cartesian lattice vectors
pbc_c: array(3), bool
Periodic boundary conditions.
tolerance: float
Tolerance for symmetry determination.
symmorphic: bool
Switch for the use of non-symmorphic symmetries aka: symmetries with fractional translations. Default is to use only symmorphic symmetries.
point_group: bool
Use point-group symmetries.
time_reversal: bool
Use time-reversal symmetry.
tolerance: float
Relative tolerance.


Array of rotation matrices
Array of fractional translation vectors
Array of atomic indices after symmetry operation
(bool) Have inversion

Determine list of symmetry operations.

First determine all symmetry operations of the cell. Then call prune_symmetries to remove those symmetries that are not satisfied by the atoms.

It is not mandatory to call this method. If not called, only time reversal symmetry may be used.


Check if positions satisfy symmetry operations.


Check that symmetries are comensurate with grid.

check_one_symmetry(spos_ac, op_cc, ft_c, a_ij)[source]

Checks whether atoms satisfy one given symmetry operation.


Determine list of symmetry operations.


Remove symmetries that are not satisfied by the atoms.

reduce(bzk_kc, comm=None)[source]

Reduce k-points to irreducible part of the BZ.

Returns the irreducible k-points and the weights and other stuff.

symmetrize(a, gd)[source]

Symmetrize array.


Symmetrize forces.


Symmetrizes the atomic positions.

symmetrize_wavefunction(a_g, kibz_c, kbz_c, op_cc, time_reversal)[source]

Generate Bloch function from symmetry related function in the IBZ.

a_g: ndarray
Array with Bloch function from the irreducible BZ.
kibz_c: ndarray
Corresponing k-point coordinates.
kbz_c: ndarray
K-point coordinates of the symmetry related k-point.
op_cc: ndarray
Point group operation connecting the two k-points.
time-reversal: bool
Time-reversal symmetry required in addition to the point group symmetry to connect the two k-points.