Chapter 1
15 min read
Section 9 of 70

Building Supercells

The Architecture of Crystals — Real Space

Why Supercells?

Every DFT calculation we have discussed so far takes advantage of translational symmetry: because a crystal repeats infinitely, we only need to describe one unit cell, and Bloch's theorem handles the rest. But what happens when we want to study something that breaks translational symmetry — a point defect, a dopant atom, a vacancy, or a surface?

The answer is to build a supercell: a larger periodic cell that contains the defect surrounded by enough "bulk-like" material that the defect's periodic images do not interact with each other too strongly. The supercell approach is the cornerstone of defect physics in DFT and the essential first step toward simulating Mn-doped CdSe.

Intuition: Imagine tiling a floor with a single patterned tile. The smallest tile is the unit cell. If you want to place a unique stain on the floor, you need a bigger tile that includes the stain and enough surrounding clean area so the stain pattern doesn't repeat too often. That bigger tile is the supercell.

What Is a Supercell?

A supercell is constructed by repeating the primitive (or conventional) unit cell an integer number of times along each lattice direction. If the original unit cell has lattice vectors a1,a2,a3\mathbf{a}_1, \mathbf{a}_2, \mathbf{a}_3, the simplest supercell uses new lattice vectors:

A1=n1a1,A2=n2a2,A3=n3a3\mathbf{A}_1 = n_1 \mathbf{a}_1, \quad \mathbf{A}_2 = n_2 \mathbf{a}_2, \quad \mathbf{A}_3 = n_3 \mathbf{a}_3

where n1,n2,n3n_1, n_2, n_3 are positive integers. A 2×2×22 \times 2 \times 2 supercell doubles the cell along all three directions, producing a cell with 23=82^3 = 8 times the volume of the original.

Number of Atoms

If the primitive cell contains NprimN_{\text{prim}} atoms, then an n1×n2×n3n_1 \times n_2 \times n_3 supercell contains:

Nsuper=n1n2n3NprimN_{\text{super}} = n_1 \cdot n_2 \cdot n_3 \cdot N_{\text{prim}}

For zinc blende CdSe with Nprim=2N_{\text{prim}} = 2 atoms per primitive cell (or Nconv=8N_{\text{conv}} = 8 atoms per conventional FCC cell), the total atom count grows rapidly.

Conventional vs. Primitive

For FCC-based structures like zinc blende, the conventional cell has 8 atoms (4 Cd + 4 Se), while the primitive cell has only 2 atoms (1 Cd + 1 Se). Supercells are most commonly built from the conventional cell because the resulting geometry is easier to visualize and manipulate.


Supercell Sizes and Doping Concentration

A critical practical question is: how large must the supercell be? For defect or doping studies, the supercell size directly determines the effective doping concentration, because the periodic boundary conditions replicate the defect in every supercell image.

Consider zinc blende CdSe with a conventional cell of 8 atoms (4 Cd + 4 Se). If we substitute one Cd atom with Mn, the doping concentration is:

xMn=1NCd=1n1n2n34x_{\text{Mn}} = \frac{1}{N_{\text{Cd}}} = \frac{1}{n_1 \cdot n_2 \cdot n_3 \cdot 4}
SupercellTotal AtomsCd Sites1 Mn Replaces 1 CdMn ConcentrationComputational Cost
1x1x18425.0%Very highTrivial
2x2x264323.125%ModerateLow
3x3x3216108~0.93%RealisticModerate
4x4x4512256~0.39%DiluteHigh
5x5x510005000.20%Very diluteVery high

Experimental Mn:CdSe dilute magnetic semiconductors typically have Mn concentrations of 1-5%. A 2×2×22 \times 2 \times 2 supercell gives 3.125%, which is experimentally realistic. A 3×3×33 \times 3 \times 3 supercell at ~0.93% is closer to the dilute limit. The 4×4×44 \times 4 \times 4 cell with 512 atoms is at the frontier of standard DFT feasibility.

Computational Scaling

DFT computational cost scales roughly as O(N3)O(N^3) with the number of atoms (due to diagonalization of the Kohn-Sham Hamiltonian). Doubling the supercell size from 64 to 512 atoms increases cost by a factor of roughly (512/64)3=512(512/64)^3 = 512. In practice, clever algorithms and parallelization soften this, but the cost is still substantial.


The Supercell Transformation Matrix

The diagonal construction Ai=niai\mathbf{A}_i = n_i \mathbf{a}_i is the simplest approach, but it is not the most general. In general, a supercell is defined by a 3×33 \times 3 integer transformation matrix S\mathbf{S}:

(A1A2A3)=(S11S12S13S21S22S23S31S32S33)(a1a2a3)\begin{pmatrix} \mathbf{A}_1 \\ \mathbf{A}_2 \\ \mathbf{A}_3 \end{pmatrix} = \begin{pmatrix} S_{11} & S_{12} & S_{13} \\ S_{21} & S_{22} & S_{23} \\ S_{31} & S_{32} & S_{33} \end{pmatrix} \begin{pmatrix} \mathbf{a}_1 \\ \mathbf{a}_2 \\ \mathbf{a}_3 \end{pmatrix}

The volume ratio between the supercell and the original cell is given by the determinant:

VsuperVprim=det(S)\frac{V_{\text{super}}}{V_{\text{prim}}} = |\det(\mathbf{S})|

Diagonal Supercells

For the common case of an n1×n2×n3n_1 \times n_2 \times n_3 supercell, the matrix is diagonal:

S=(n1000n2000n3)\mathbf{S} = \begin{pmatrix} n_1 & 0 & 0 \\ 0 & n_2 & 0 \\ 0 & 0 & n_3 \end{pmatrix}

and det(S)=n1n2n3\det(\mathbf{S}) = n_1 n_2 n_3, which equals the volume multiplier as expected.

Non-Diagonal Supercells

Non-diagonal matrices allow tilted supercells that can produce more isotropic shapes. For example, to build a supercell of an FCC lattice that is as close to cubic as possible with minimal atom count, one might use:

S=(111111111)\mathbf{S} = \begin{pmatrix} 1 & -1 & 1 \\ 1 & 1 & -1 \\ -1 & 1 & 1 \end{pmatrix}

This produces a simple cubic supercell from the FCC primitive vectors with det(S)=4|\det(\mathbf{S})| = 4, containing 4 times as many atoms as the primitive cell.

Atomic Positions in the Supercell

When building the supercell, every atom in the original cell must be replicated. For each atom at fractional coordinate (x,y,z)(x, y, z) in the primitive cell, we generate copies at (x+i,y+j,z+k)(x + i, y + j, z + k) for all integer combinations 0i<n10 \leq i < n_1, 0j<n20 \leq j < n_2, 0k<n30 \leq k < n_3, then convert to the new supercell fractional coordinates by dividing: (xs,ys,zs)=(x+in1,y+jn2,z+kn3)(x_s, y_s, z_s) = \left(\frac{x+i}{n_1}, \frac{y+j}{n_2}, \frac{z+k}{n_3}\right).


k-Point Reduction in Supercells

One of the most important practical consequences of using a supercell is the relationship between supercell size and k-point sampling. In the primitive cell, we need a dense k-point mesh to sample the Brillouin zone accurately. When we enlarge the cell, the Brillouin zone shrinks by the same factor, and the band structure is "folded" into the smaller zone.

The Folding Relationship

If the primitive cell requires an M1×M2×M3M_1 \times M_2 \times M_3 k-point mesh, then an n1×n2×n3n_1 \times n_2 \times n_3 supercell needs only:

M1n1×M2n2×M3n3\frac{M_1}{n_1} \times \frac{M_2}{n_2} \times \frac{M_3}{n_3}

k-points to achieve equivalent sampling of reciprocal space. This means:

SupercellPrimitive k-meshEquivalent Supercell k-mesh
1x1x18x8x88x8x8
2x2x28x8x84x4x4
3x3x39x9x93x3x3
4x4x48x8x82x2x2
8x8x88x8x81x1x1 (Gamma only)

For sufficiently large supercells, a single Γ\Gamma-point calculation can be adequate! This is a major simplification. However, the total computational effort is not reduced — the savings in k-points are exactly offset by the larger Hamiltonian matrix.

Gamma-Point Sampling

For supercells with more than about 100 atoms, many practitioners use only the Γ\Gamma-point. This simplifies the calculation and often provides sufficient accuracy. However, always test convergence: compare results with a 2×2×22 \times 2 \times 2 k-mesh to verify that the Γ\Gamma-point is adequate.


Defect-Defect Interactions and Finite-Size Errors

The fundamental limitation of the supercell approach is that the defect interacts with its own periodic images. These spurious interactions introduce finite-size errors that must be understood and controlled.

Sources of Finite-Size Error

  1. Elastic interactions: A defect distorts the surrounding lattice. In a finite supercell, these strain fields overlap with neighboring images, leading to artificial energy contributions that decay as 1/L3\sim 1/L^3 where LL is the supercell linear dimension.
  2. Electrostatic interactions: Charged defects produce long-range Coulomb fields. The interaction between a charged defect and its periodic images decays slowly as 1/L\sim 1/L, making charged defect calculations particularly sensitive to supercell size.
  3. Electronic overlap: Defect states may have wave functions that extend into neighboring supercell images, causing artificial band dispersion of the defect level.
  4. Dispersion of defect bands: In a finite supercell, what should be a flat defect level in the band gap acquires dispersion due to image interactions, broadening it into a band.

Defect Separation Distance

For an n×n×nn \times n \times n supercell of a cubic crystal with lattice parameter aa, the nearest-neighbor distance between periodic images of the defect is:

dimage=nad_{\text{image}} = n \cdot a

For CdSe with a=6.077a = 6.077 Angstrom:

SupercellImage Distance (Angstrom)Adequacy
2x2x212.15Marginal for neutral defects
3x3x318.23Good for neutral defects
4x4x424.31Good for charged defects
5x5x530.39Converged for most cases

Charged Defect Corrections

For charged defects (like ionized Mn substitutionals), finite-size errors are severe. Correction schemes such as the Makov-Payne correction or the Freysoldt-Neugebauer-Van de Walle (FNV) method are essential. These add energy corrections of the form ΔEq2αM2εL\Delta E \approx \frac{q^2 \alpha_M}{2 \varepsilon L} where qq is the defect charge, αM\alpha_M is the Madelung constant, and ε\varepsilon is the dielectric constant.


Convergence Testing with Supercell Size

Before trusting any supercell result, you must verify that the property of interest is converged with respect to supercell size. The standard approach:

  1. Choose a target property: defect formation energy, magnetic moment, band gap, relaxed geometry, etc.
  2. Calculate with increasing supercell sizes: 2×2×22 \times 2 \times 2, 3×3×33 \times 3 \times 3, 4×4×44 \times 4 \times 4 (if affordable).
  3. Extrapolate to infinite size: Plot the property vs. 1/N1/N or 1/L1/L and extrapolate.
  4. Apply corrections: Use finite-size correction formulas where available.

Defect Formation Energy

The defect formation energy is the most common quantity to converge. It is defined as:

Ef=EdefectEbulk+iniμi+q(EVBM+ΔV+EF)E_f = E_{\text{defect}} - E_{\text{bulk}} + \sum_i n_i \mu_i + q(E_{\text{VBM}} + \Delta V + E_F)

where EdefectE_{\text{defect}} and EbulkE_{\text{bulk}} are total energies of the supercell with and without the defect, nin_i are the number of atoms added/removed, μi\mu_i are chemical potentials, qq is the charge state, and EFE_F is the Fermi energy.

Practical Guideline

For Mn:CdSe in the neutral charge state, a 2×2×22 \times 2 \times 2 supercell (64 atoms) typically gives formation energies within ~0.1 eV of the converged value. A 3×3×33 \times 3 \times 3 cell (216 atoms) is usually sufficient for publication-quality results of neutral substitutional defects.


VASP Connection: Building Supercells in Practice

Let us put theory into practice. Building a supercell for VASP involves constructing the POSCAR file with the enlarged lattice vectors and replicated atomic positions.

2x2x2 CdSe Zinc Blende POSCAR

Starting from the conventional zinc blende cell with a=6.077a = 6.077 Angstrom, a 2×2×22 \times 2 \times 2 supercell doubles all lattice vectors and contains 64 atoms (32 Cd + 32 Se):

📝text
1CdSe 2x2x2 zinc blende supercell
21.0
3  12.154000   0.000000   0.000000
4   0.000000  12.154000   0.000000
5   0.000000   0.000000  12.154000
6Cd  Se
732  32
8Direct
9  0.000  0.000  0.000   ! Cd  1
10  0.000  0.000  0.500   ! Cd  2
11  0.000  0.250  0.250   ! Cd  3
12  0.000  0.250  0.750   ! Cd  4
13  0.000  0.500  0.000   ! Cd  5
14  0.000  0.500  0.500   ! Cd  6
15  0.000  0.750  0.250   ! Cd  7
16  0.000  0.750  0.750   ! Cd  8
17  0.250  0.000  0.250   ! Cd  9
18  0.250  0.000  0.750   ! Cd 10
19  0.250  0.250  0.000   ! Cd 11
20  0.250  0.250  0.500   ! Cd 12
21  0.250  0.500  0.250   ! Cd 13
22  0.250  0.500  0.750   ! Cd 14
23  0.250  0.750  0.000   ! Cd 15
24  0.250  0.750  0.500   ! Cd 16
25  0.500  0.000  0.000   ! Cd 17
26  0.500  0.000  0.500   ! Cd 18
27  0.500  0.250  0.250   ! Cd 19
28  0.500  0.250  0.750   ! Cd 20
29  0.500  0.500  0.000   ! Cd 21
30  0.500  0.500  0.500   ! Cd 22
31  0.500  0.750  0.250   ! Cd 23
32  0.500  0.750  0.750   ! Cd 24
33  0.750  0.000  0.250   ! Cd 25
34  0.750  0.000  0.750   ! Cd 26
35  0.750  0.250  0.000   ! Cd 27
36  0.750  0.250  0.500   ! Cd 28
37  0.750  0.500  0.250   ! Cd 29
38  0.750  0.500  0.750   ! Cd 30
39  0.750  0.750  0.000   ! Cd 31
40  0.750  0.750  0.500   ! Cd 32
41  0.125  0.125  0.125   ! Se  1
42  0.125  0.125  0.625   ! Se  2
43  0.125  0.375  0.375   ! Se  3
44  0.125  0.375  0.875   ! Se  4
45  0.125  0.625  0.125   ! Se  5
46  0.125  0.625  0.625   ! Se  6
47  0.125  0.875  0.375   ! Se  7
48  0.125  0.875  0.875   ! Se  8
49  0.375  0.125  0.375   ! Se  9
50  0.375  0.125  0.875   ! Se 10
51  0.375  0.375  0.125   ! Se 11
52  0.375  0.375  0.625   ! Se 12
53  0.375  0.625  0.375   ! Se 13
54  0.375  0.625  0.875   ! Se 14
55  0.375  0.875  0.125   ! Se 15
56  0.375  0.875  0.625   ! Se 16
57  0.625  0.125  0.125   ! Se 17
58  0.625  0.125  0.625   ! Se 18
59  0.625  0.375  0.375   ! Se 19
60  0.625  0.375  0.875   ! Se 20
61  0.625  0.625  0.125   ! Se 21
62  0.625  0.625  0.625   ! Se 22
63  0.625  0.875  0.375   ! Se 23
64  0.625  0.875  0.875   ! Se 24
65  0.875  0.125  0.375   ! Se 25
66  0.875  0.125  0.875   ! Se 26
67  0.875  0.375  0.125   ! Se 27
68  0.875  0.375  0.625   ! Se 28
69  0.875  0.625  0.375   ! Se 29
70  0.875  0.625  0.875   ! Se 30
71  0.875  0.875  0.125   ! Se 31
72  0.875  0.875  0.625   ! Se 32

To introduce one Mn dopant, simply replace the species label for one Cd atom. For example, change Cd 1 at (0, 0, 0) to Mn, and update the atom counts in the POSCAR header to Cd Mn Se with 31 1 32.

KPOINTS for Supercell Calculations

For the 2×2×22 \times 2 \times 2 supercell, a reduced k-mesh is appropriate:

📝text
1Automatic mesh
20
3Gamma
4  4  4  4
5  0  0  0

For the larger 3×3×33 \times 3 \times 3 supercell (216 atoms), Gamma-point sampling is often sufficient:

📝text
1Gamma-point only
20
3Gamma
4  1  1  1
5  0  0  0

ENCUT Considerations

The plane-wave cutoff energy (ENCUT) does not change with supercell size — it depends only on the elements present. A typical INCAR setting for CdSe:

📝text
1ENCUT  = 400     ! Plane-wave cutoff in eV
2PREC   = Accurate
3EDIFF  = 1E-6    ! Energy convergence criterion
4ISMEAR = 0       ! Gaussian smearing
5SIGMA  = 0.05    ! Small smearing width
6ISPIN  = 2       ! Spin-polarized (needed for Mn)
7LORBIT = 11      ! Projected DOS

Memory and Parallelization

A 64-atom supercell with spin polarization requires roughly 4-8 GB of RAM. A 216-atom cell can require 32-64 GB. Always check your VASP OUTCAR for the "maximum memory used" line and ensure your computational resources are adequate. Use NCORE and KPAR tags to parallelize efficiently:

📝text
1NCORE  = 4       ! Cores per orbital band
2KPAR   = 2       ! k-point parallelization

Summary

Supercells are the essential bridge between perfect crystal calculations and the real-world physics of defects, dopants, and disorder.

Key Takeaways

  1. Supercell construction: Repeat the unit cell n1×n2×n3n_1 \times n_2 \times n_3 times using a transformation matrix S\mathbf{S}. The volume scales as det(S)|\det(\mathbf{S})|.
  2. Doping concentration: Directly determined by supercell size. For Mn:CdSe, a 2×2×22 \times 2 \times 2 cell gives 3.125% Mn, matching typical experimental concentrations.
  3. k-point folding: Larger supercells need fewer k-points. Very large supercells can use only the Γ\Gamma-point.
  4. Finite-size errors: Defect-image interactions (elastic, electrostatic, electronic) introduce systematic errors that must be tested and corrected.
  5. Convergence testing: Always compute your target property at multiple supercell sizes and extrapolate to the infinite-size limit.
  6. VASP practice: The POSCAR lattice vectors scale with the supercell, KPOINTS reduces, but ENCUT stays the same. Mind memory requirements for large cells.
Coming Next: In the final section of this chapter, Common Crystal Structures, we survey the most important crystal structures encountered in materials science — diamond, zinc blende, wurtzite, rock salt, and perovskite — and connect them directly to our Mn:CdSe project.
Loading comments...