Crystal symmetries

Theory

In this discussion we will only describe the situation for a monoatomic crystal $\mathcal C \subset \mathbb R^3$, the extension being easy. A symmetry of the crystal is an orthogonal matrix $W$ and a real-space vector $w$ such that

\[W \mathcal{C} + w = \mathcal{C}.\]

The symmetries where $W = 1$ and $w$ is a lattice vector are always assumed and ignored in the following.

We can define a corresponding unitary operator $U$ on $L^2(\mathbb R^3)$ with action

\[ (Uu)(x) = u\left( W x + w \right).\]

We assume that the atomic potentials are radial and that any self-consistent potential also respects this symmetry, so that $U$ commutes with the Hamiltonian.

This operator acts on a plane-wave as

\[\begin{aligned} (U e^{iq\cdot x}) (x) &= e^{iq \cdot w} e^{i (W^T q) x}\\ &= e^{- i(S q) \cdot \tau } e^{i (S q) \cdot x} \end{aligned}\]

where we set

\[\begin{aligned} S &= W^{T}\\ \tau &= -W^{-1}w. \end{aligned}\]

It follows that the Fourier transform satisfies

\[\widehat{Uu}(q) = e^{- iq \cdot \tau} \widehat u(S^{-1} q)\]

(all of these equations being also valid in reduced coordinates). In particular, if $e^{ik\cdot x} u_{k}(x)$ is an eigenfunction, then by decomposing $u_k$ over plane-waves $e^{i G \cdot x}$ one can see that $e^{i(S^T k) \cdot x} (U u_k)(x)$ is also an eigenfunction: we can choose

\[u_{Sk} = U u_k.\]

This is used to reduce the computations needed. For a uniform sampling of the Brillouin zone (the reducible $k$-points), one can find a reduced set of $k$-points (the irreducible $k$-points) such that the eigenvectors at the reducible $k$-points can be deduced from those at the irreducible $k$-points.

Symmetrization

Quantities that are calculated by summing over the reducible $k$ points can be calculated by first summing over the irreducible $k$ points and then symmetrizing. Let $\mathcal{K}_\text{reducible}$ denote the reducible $k$-points sampling the Brillouin zone, $\mathcal{S}$ be the group of all crystal symmetries that leave this BZ mesh invariant ($\mathcal{S}\mathcal{K}_\text{reducible} = \mathcal{K}_\text{reducible}$) and $\mathcal{K}$ be the irreducible $k$-points obtained from $\mathcal{K}_\text{reducible}$ using the symmetries $\mathcal{S}$. Clearly

\[\mathcal{K}_\text{red} = \{Sk \, | \, S \in \mathcal{S}, k \in \mathcal{K}\}.\]

Let $Q$ be a $k$-dependent quantity to sum (for instance, energies, densities, forces, etc). $Q$ transforms in a particular way under symmetries: $Q(Sk) = S(Q(k))$ where the (linear) action of $S$ on $Q$ depends on the particular $Q$.

\[\begin{aligned} \sum_{k \in \mathcal{K}_\text{red}} Q(k) &= \sum_{k \in \mathcal{K}} \ \sum_{S \text{ with } Sk \in \mathcal{K}_\text{red}} S(Q(k)) \\ &= \sum_{k \in \mathcal{K}} \frac{1}{N_{\mathcal{S},k}} \sum_{S \in \mathcal{S}} S(Q(k))\\ &= \frac{1}{N_{\mathcal{S}}} \sum_{S \in \mathcal{S}} \left(\sum_{k \in \mathcal{K}} \frac{N_\mathcal{S}}{N_{\mathcal{S},k}} Q(k) \right) \end{aligned}\]

Here, $N_\mathcal{S} = |\mathcal{S}|$ is the total number of symmetry operations and $N_{\mathcal{S},k}$ denotes the number of operations such that leave $k$ invariant. The latter operations form a subgroup of the group of all symmetry operations, sometimes called the small/little group of $k$. The factor $\frac{N_\mathcal{S}}{N_{S,k}}$, also equal to the ratio of number of reducible points encoded by this particular irreducible $k$ to the total number of reducible points, determines the weight of each irreducible $k$ point.

Example

Let us demonstrate this in practice. We consider silicon, setup appropriately in the lattice, atoms and positions objects as in Tutorial and to reach a fast execution, we take a small Ecut of 5 and a [4, 4, 4] Monkhorst-Pack grid. First we perform the DFT calculation disabling symmetry handling

model_nosym = model_DFT(lattice, atoms, positions; functionals=LDA(), symmetries=false)
basis_nosym = PlaneWaveBasis(model_nosym; Ecut=5, kgrid=[4, 4, 4])
scfres_nosym = @time self_consistent_field(basis_nosym, tol=1e-6)
n     Energy            log10(ΔE)   log10(Δρ)   Diag   Δtime
---   ---------------   ---------   ---------   ----   ------
  1   -7.864806893697                   -0.72    3.6    440ms
  2   -7.868983426729       -2.38       -1.54    1.0    163ms
  3   -7.869173707317       -3.72       -2.58    1.0    166ms
  4   -7.869208898304       -4.45       -2.86    2.4    305ms
  5   -7.869209501451       -6.22       -3.06    1.0    192ms
  6   -7.869209806057       -6.52       -4.66    1.0    166ms
  7   -7.869209817390       -7.95       -4.74    2.5    303ms
  8   -7.869209817520       -9.89       -5.57    1.0    164ms
  9   -7.869209817530      -11.02       -5.69    1.5    211ms
 10   -7.869209817531      -12.00       -6.62    1.0    168ms
  2.285979 seconds (2.82 M allocations: 572.413 MiB, 5.02% gc time)

and then redo it using symmetry (the default):

model_sym = model_DFT(lattice, atoms, positions; functionals=LDA())
basis_sym = PlaneWaveBasis(model_sym; Ecut=5, kgrid=[4, 4, 4])
scfres_sym = @time self_consistent_field(basis_sym, tol=1e-6)
n     Energy            log10(ΔE)   log10(Δρ)   Diag   Δtime
---   ---------------   ---------   ---------   ----   ------
  1   -7.865087013401                   -0.72    4.4   63.9ms
  2   -7.869033919501       -2.40       -1.54    1.0   30.6ms
  3   -7.869184129737       -3.82       -2.59    1.0   51.3ms
  4   -7.869209095964       -4.60       -2.90    2.5   44.8ms
  5   -7.869209583057       -6.31       -3.13    1.0   30.8ms
  6   -7.869209805489       -6.65       -4.02    1.0   30.6ms
  7   -7.869209816893       -7.94       -5.14    1.6   36.2ms
  8   -7.869209817523       -9.20       -5.27    2.1   43.5ms
  9   -7.869209817528      -11.32       -5.64    1.0   31.4ms
 10   -7.869209817530      -11.73       -5.88    1.0   31.2ms
 11   -7.869209817530      -13.85       -5.87    1.0   31.3ms
 12   -7.869209817530      -12.81       -5.94    1.0   49.7ms
 13   -7.869209817531      -12.60       -6.28    1.0    233ms
  0.713798 seconds (805.45 k allocations: 156.393 MiB, 5.14% gc time, 28.10% compilation time)

Clearly both yield the same energy but the version employing symmetry is faster, since less $k$-points are explicitly treated:

(length(basis_sym.kpoints), length(basis_nosym.kpoints))
(8, 64)

Both SCFs would even agree in the convergence history if exact diagonalization was used for the eigensolver in each step of both SCFs. But since DFTK adjusts this diagtol value adaptively during the SCF to increase performance, a slightly different history is obtained. Try adding the keyword argument determine_diagtol=(args...; kwargs...) -> 1e-8 in each SCF call to fix the diagonalization tolerance to be 1e-8 for all SCF steps, which will result in an almost identical convergence history.

We can also explicitly verify both methods to yield the same density:

(norm(scfres_sym.ρ - scfres_nosym.ρ),
 norm(values(scfres_sym.energies) .- values(scfres_nosym.energies)))
(2.4727021391723376e-7, 4.1787027376507203e-7)

The symmetries can be used to map reducible to irreducible points:

ikpt_red = rand(1:length(basis_nosym.kpoints))
# find a (non-unique) corresponding irreducible point in basis_nosym,
# and the symmetry that relates them
ikpt_irred, symop = DFTK.unfold_mapping(basis_sym, basis_nosym.kpoints[ikpt_red])
[basis_sym.kpoints[ikpt_irred].coordinate symop.S * basis_nosym.kpoints[ikpt_red].coordinate]
3×2 StaticArraysCore.SMatrix{3, 2, Float64, 6} with indices SOneTo(3)×SOneTo(2):
 -0.5   -0.5
  0.25  -0.5
  0.0   -0.25

The eigenvalues match also:

[scfres_sym.eigenvalues[ikpt_irred] scfres_nosym.eigenvalues[ikpt_red]]
7×2 Matrix{Float64}:
 -0.0678642  -0.0678641
  0.0340214   0.0340214
  0.131311    0.131311
  0.179372    0.179372
  0.319769    0.319769
  0.428182    0.428169
  0.482384    0.47637