Chapter 1
25 min read
Section 2 of 70

Lattice Vectors and the Unit Cell

The Architecture of Crystals \u2014 Real Space

Learning Objectives

By the end of this section, you will be able to:

  1. Define lattice vectors a1,a2,a3\mathbf{a}_1, \mathbf{a}_2, \mathbf{a}_3 and explain how they generate an infinite lattice through integer linear combinations.
  2. Translate between lattice parameters (a,b,c,α,β,γa, b, c, \alpha, \beta, \gamma) and full Cartesian vector representations.
  3. Distinguish between primitive cells, conventional cells, and the Wigner-Seitz cell, and explain when to use each one.
  4. Compute the volume of a unit cell using the scalar triple product V=a1(a2×a3)V = \mathbf{a}_1 \cdot (\mathbf{a}_2 \times \mathbf{a}_3).
  5. Write a correct VASP POSCAR file with either primitive or conventional lattice vectors and verify the cell volume.
  6. Explain why the Wigner-Seitz cell in reciprocal space is the first Brillouin zone, and why that matters for DFT k-point sampling.

Why this matters

Every solid-state simulation begins with a unit cell. The cell you choose determines the cost of your calculation (N3\sim N^3 scaling for DFT), the symmetry VASP can exploit to reduce k-points, and whether your results match published data. Mastering lattice vectors and unit cells is the prerequisite for everything that follows in this book.

The Big Picture

The Problem: Describing Infinite Order with Finite Information

A macroscopic crystal of table salt contains roughly 102210^{22} atoms. Writing down every atom's position is impossible. Yet the structure has a beautiful regularity: if you stand at any sodium atom and look around, you see the exact same arrangement of chlorine and sodium neighbors, no matter which sodium atom you chose. This translational symmetry means we can describe the entire infinite crystal using just a few numbers.

The key insight, formalized by Auguste Bravais in 1850, is to separate the repeating pattern (the lattice) from what repeats (the basis). In the previous section we introduced this decomposition. Now we make the lattice side precise: three vectors define the repeat directions and distances, and the region they enclose — the unit cell — is the minimal "tile" that can be copied to fill all of space.

From Wallpaper to Crystals

Consider a wallpaper pattern. Two vectors in the plane define how the design repeats horizontally and diagonally. Given these two vectors and one copy of the motif, you can reconstruct the entire infinite wallpaper. A 3D crystal is the same idea with three vectors instead of two. The vectors tell you the "step size and direction" of each repeat, and the motif (the basis) is the group of atoms that gets stamped at every lattice point.

The choice of repeat vectors is not unique. You could describe the same wallpaper with different pairs of vectors, producing different-shaped tiles that all cover the plane perfectly. Some tiles are as small as possible (primitive), others are larger but more symmetric (conventional). Understanding this freedom — and knowing which choice is best for a given purpose — is the central theme of this section.


Lattice Vectors

A Bravais lattice is fully specified by three lattice vectors a1,a2,a3\mathbf{a}_1, \mathbf{a}_2, \mathbf{a}_3. These are three linearly independent vectors in R3\mathbb{R}^3 such that every lattice point R\mathbf{R} is located at:

R=n1a1+n2a2+n3a3,n1,n2,n3Z\mathbf{R} = n_1 \mathbf{a}_1 + n_2 \mathbf{a}_2 + n_3 \mathbf{a}_3, \quad n_1, n_2, n_3 \in \mathbb{Z}

Unpacking the Equation

Let us read this equation carefully, symbol by symbol:

  • R\mathbf{R} is the position vector of a lattice point, measured from some chosen origin. It is a vector in R3\mathbb{R}^3 with units of length (typically angstroms, A˚\text{\AA}).
  • a1,a2,a3\mathbf{a}_1, \mathbf{a}_2, \mathbf{a}_3 are the three lattice vectors (also called basis vectors of the lattice — not to be confused with the atomic basis). Each is a vector in R3\mathbb{R}^3. They define the shape and size of the repeating unit.
  • n1,n2,n3n_1, n_2, n_3 are integers (positive, negative, or zero). They act as "step counters": take n1n_1 steps along a1\mathbf{a}_1, n2n_2 steps along a2\mathbf{a}_2, and n3n_3 steps along a3\mathbf{a}_3. The resulting position is a lattice point.
  • Z\mathbb{Z} denotes the set of all integers: {,2,1,0,1,2,}\{\ldots, -2, -1, 0, 1, 2, \ldots\}. The requirement that niZn_i \in \mathbb{Z} is what makes the lattice discrete rather than continuous.

Linear independence

The three vectors must be linearly independent: no one can be written as a linear combination of the other two. Equivalently, the 3×33 \times 3 matrix formed by stacking them as rows must have nonzero determinant. If the determinant were zero, the vectors would be coplanar and could not generate a 3D lattice.

Geometric Intuition

Think of the lattice vectors as three "step instructions" in 3D space. Starting at the origin, step a1\mathbf{a}_1 tells you how far and in what direction to walk to reach the nearest lattice point along the first direction. Similarly for a2\mathbf{a}_2 and a3\mathbf{a}_3. By taking integer combinations of these steps, you visit every point of an infinite 3D grid. The grid might be orthogonal (like a cubic lattice), skewed (like a triclinic lattice), or anything in between.

Cartesian Components

In practice, we express each lattice vector as three Cartesian components. For example, the FCC primitive vectors for a material with lattice constant aa are:

a1=a2(0,1,1),a2=a2(1,0,1),a3=a2(1,1,0)\mathbf{a}_1 = \frac{a}{2}(0, 1, 1), \quad \mathbf{a}_2 = \frac{a}{2}(1, 0, 1), \quad \mathbf{a}_3 = \frac{a}{2}(1, 1, 0)

For CdSe in the zinc blende structure with a=6.052a = 6.052 A˚\text{\AA}, each component evaluates to 6.052/2=3.0266.052/2 = 3.026 A˚\text{\AA}. These are exactly the vectors you write in a VASP POSCAR file (after dividing by the scaling factor).

Meanwhile, the conventional cubic vectors are simply:

a1=ax^,a2=ay^,a3=az^\mathbf{a}_1 = a\hat{\mathbf{x}}, \quad \mathbf{a}_2 = a\hat{\mathbf{y}}, \quad \mathbf{a}_3 = a\hat{\mathbf{z}}

Both sets of vectors describe the same infinite lattice, but the primitive set produces a smaller cell (fewer atoms, cheaper calculation).


Lattice Parameters

Instead of writing full Cartesian vectors, crystallographers often use six scalar lattice parameters to characterize the unit cell geometry:

  • Three lengths: a=a1a = |\mathbf{a}_1|, b=a2b = |\mathbf{a}_2|, c=a3c = |\mathbf{a}_3|.
  • Three angles:
AngleDefinitionBetween which vectors
αAngle between a₂ and a₃a₂ ↔ a₃
βAngle between a₁ and a₃a₁ ↔ a₃
γAngle between a₁ and a₂a₁ ↔ a₂

The angles are computed from the dot products: for example, cosγ=a1a2a1a2\cos \gamma = \frac{\mathbf{a}_1 \cdot \mathbf{a}_2}{|\mathbf{a}_1| |\mathbf{a}_2|}.

Crystal Systems and Their Constraints

The 7 crystal systems impose specific constraints on these 6 parameters. A few key examples:

Crystal SystemConstraintFree ParametersExample
Cubica = b = c, α = β = γ = 90°1 (a)NaCl, Si, CdSe(ZB)
Hexagonala = b ≠ c, α = β = 90°, γ = 120°2 (a, c)GaN(W), graphite
Tetragonala = b ≠ c, α = β = γ = 90°2 (a, c)TiO₂ rutile
Orthorhombica ≠ b ≠ c, α = β = γ = 90°3 (a, b, c)BaTiO₃ (ortho)
TriclinicNo constraints6Many organic crystals

For a cubic system, a single number aa suffices. For triclinic, all 6 parameters are independent. The fewer the constraints, the lower the symmetry.

VASP and lattice parameters

VASP does not use lattice parameters directly. It takes the full 3×33 \times 3 matrix of lattice vectors. However, databases like the ICSD and Materials Project report parameters, so you must be able to convert between the two representations. Pymatgen's Lattice.from_parameters(a, b, c, alpha, beta, gamma) handles this conversion automatically.

Explore how these 6 parameters define the shape of the unit cell in 3D. Select any of the 7 crystal systems to see its characteristic parallelepiped, or adjust the sliders to watch the cell morph continuously between systems:

3D Crystal System Explorer

Adjust lattice parameters to see how the 7 crystal systems differ in 3D

a1.0
b1.0
c1.0
\u03b190\u00b0
\u03b290\u00b0
\u03b390\u00b0
Detected: Cubic
a = b = c, α = β = γ = 90°
Volume: 1.000 (unit³)
Legend
a₁ (red)
a₂ (green)
a₃ (blue)
\u03b1 (orange)
\u03b2 (purple)
\u03b3 (amber)

Interactive Lattice Vector Explorer

Adjust lattice parameters to see how the unit cell and tiling change

|a\u2081| = 1.00
|a\u2082| = 1.00
\u03b3 = 90\u00b0
Cell area = |a\u2081||\u00b7|a\u2082||\u00b7sin(\u03b3)
= 1.00 \u00d7 1.00 \u00d7 sin(90\u00b0) = 1.000
a\u2081a\u2082\u03b3O

Now explore these lattice types in full 3D. Rotate the view to see how corner, body-center, and face-center atoms are arranged, and toggle between conventional and primitive cell representations:

3D Crystal Lattice Viewer

Rotate and zoom to explore SC, BCC, and FCC lattices in three dimensions

Face-Centered Cubic (F)
Z = 4. Primitive cell has one-quarter the conventional volume.
Primitive vectors:
½(0,1,1), ½(1,0,1), ½(1,1,0)
Vprim = 0.250
Atom Colors
Corner
Face center

The Unit Cell

A unit cell is a region of space that, when translated by all lattice vectors, tiles the entire crystal without gaps or overlaps. Formally, it is a fundamental domain of the translation group generated by a1,a2,a3\mathbf{a}_1, \mathbf{a}_2, \mathbf{a}_3.

The Tiling Analogy

Think of a unit cell as a single tile on an infinite bathroom floor. The tile can be any shape that covers the floor with no gaps and no overlaps when you slide copies of it around (without rotating or reflecting). The simplest tile is the parallelepiped — the 3D analogue of a parallelogram — whose edges are the lattice vectors themselves. But there are infinitely many valid tile shapes for any given lattice.

Formal Properties

  1. Space-filling: copies of the cell, translated by R=n1a1+n2a2+n3a3\mathbf{R} = n_1 \mathbf{a}_1 + n_2 \mathbf{a}_2 + n_3 \mathbf{a}_3 for all integers n1,n2,n3n_1, n_2, n_3, cover every point of R3\mathbb{R}^3 exactly once.
  2. Integer lattice points: the cell contains an integer number of lattice points: 1 (primitive), 2 (body-centered), 4 (face-centered), or 2 (base-centered).
  3. Non-uniqueness: for any lattice, there are infinitely many valid unit cells. The choice depends on your purpose — minimal cost (primitive), maximum symmetry display (conventional), or maximum symmetry (Wigner-Seitz).

Key distinction: lattice vs basis

The unit cell specifies only the shape of the repeating tile. The actual atoms inside the tile — the basis — are specified separately. A unit cell with 1 lattice point can still contain many atoms in the basis. For CdSe zinc blende, the primitive cell has 1 lattice point but 2 atoms (1 Cd + 1 Se).

Volume of the Unit Cell

The volume of the parallelepiped spanned by three lattice vectors is given by the scalar triple product:

V=a1(a2×a3)V = |\mathbf{a}_1 \cdot (\mathbf{a}_2 \times \mathbf{a}_3)|

Geometric Meaning

This formula has a beautiful geometric interpretation in two stages:

  1. Cross product a2×a3\mathbf{a}_2 \times \mathbf{a}_3: this gives a vector perpendicular to both a2\mathbf{a}_2 and a3\mathbf{a}_3, with magnitude equal to the area of the parallelogram they span. Think of it as the "base area" of the parallelepiped.
  2. Dot product with a1\mathbf{a}_1: this projects a1\mathbf{a}_1 onto the perpendicular direction, giving the height of the parallelepiped. Area ×\times height = volume.

Step through this decomposition in 3D to see the base parallelogram, cross product vector, and height projection that combine to give the parallelepiped volume:

Unit Cell Volume: V = a₁·(a₂×a₃)

Step through the geometric meaning of the scalar triple product

Simple Cubic
|a₂×a₃| = 1.000 (base area)
h = a₁·\u00ea = 1.000 (height)
V = 1.000

Equivalently, the volume is the absolute value of the determinant of the lattice matrix:

V=det(a1xa1ya1za2xa2ya2za3xa3ya3z)V = \left| \det \begin{pmatrix} a_{1x} & a_{1y} & a_{1z} \\ a_{2x} & a_{2y} & a_{2z} \\ a_{3x} & a_{3y} & a_{3z} \end{pmatrix} \right|

Example: Simple Cubic

For a simple cubic lattice with lattice constant aa: the vectors are ax^a\hat{\mathbf{x}}, ay^a\hat{\mathbf{y}}, az^a\hat{\mathbf{z}}, so V=aaa=a3V = a \cdot a \cdot a = a^3. For CdSe with a=6.052a = 6.052 A˚\text{\AA}, the conventional cube volume is V=6.0523221.7V = 6.052^3 \approx 221.7 A˚3\text{\AA}^3.

Example: FCC Primitive Cell

For the FCC primitive vectors a1=a2(0,1,1)\mathbf{a}_1 = \frac{a}{2}(0,1,1), a2=a2(1,0,1)\mathbf{a}_2 = \frac{a}{2}(1,0,1), a3=a2(1,1,0)\mathbf{a}_3 = \frac{a}{2}(1,1,0):

V=deta2(011101110)=a380(01)1(01)+1(10)=a382=a34V = \left| \det \frac{a}{2} \begin{pmatrix} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \end{pmatrix} \right| = \frac{a^3}{8} \cdot |0(0-1) - 1(0-1) + 1(1-0)| = \frac{a^3}{8} \cdot 2 = \frac{a^3}{4}

This is exactly 1/41/4 of the conventional cubic volume, consistent with Z=4Z = 4 lattice points in the FCC conventional cell. For CdSe: Vprim=221.7/455.4V_{\text{prim}} = 221.7/4 \approx 55.4 A˚3\text{\AA}^3.

Volume in Terms of Lattice Parameters

If you only know the six lattice parameters rather than the full vectors, the volume is:

V=abc1cos2αcos2βcos2γ+2cosαcosβcosγV = abc\sqrt{1 - \cos^2\alpha - \cos^2\beta - \cos^2\gamma + 2\cos\alpha\cos\beta\cos\gamma}

For the cubic case (a=b=ca=b=c, all angles 9090^\circ), this simplifies to V=a3V = a^3 since all cosines are zero. For hexagonal (γ=120\gamma = 120^\circ), it gives V=a2csin(120)=32a2cV = a^2 c \sin(120^\circ) = \frac{\sqrt{3}}{2} a^2 c.


Primitive Cells

A primitive cell is the smallest unit cell that contains exactly one lattice point. It has the minimum possible volume for the given lattice:

Vprim=VconvZV_{\text{prim}} = \frac{V_{\text{conv}}}{Z}

where ZZ is the number of lattice points in the conventional cell.

Properties of Primitive Cells

  • Minimal volume: contains exactly 1 lattice point per cell.
  • Computationally efficient: fewest atoms means fastest DFT calculation.
  • May hide symmetry: the parallelepiped shape often looks "tilted" and does not obviously display the crystal system's symmetry.
  • Not unique: there are infinitely many valid primitive cells for any lattice. The Niggli cell is a standardized choice.

FCC Primitive Vectors and Cell

The FCC lattice has Z=4Z = 4 in the conventional cubic cell. Its standard primitive vectors are:

a1=a2(0,1,1),a2=a2(1,0,1),a3=a2(1,1,0)\mathbf{a}_1 = \frac{a}{2}(0, 1, 1), \quad \mathbf{a}_2 = \frac{a}{2}(1, 0, 1), \quad \mathbf{a}_3 = \frac{a}{2}(1, 1, 0)

Each vector connects a corner of the conventional cube to the center of one of its faces. The resulting primitive cell is a rhombohedron (a parallelepiped with all edges equal and all face angles equal).

BCC Primitive Vectors and Cell

The BCC lattice has Z=2Z = 2. Its primitive vectors are:

a1=a2(1,1,1),a2=a2(1,1,1),a3=a2(1,1,1)\mathbf{a}_1 = \frac{a}{2}(-1, 1, 1), \quad \mathbf{a}_2 = \frac{a}{2}(1, -1, 1), \quad \mathbf{a}_3 = \frac{a}{2}(1, 1, -1)

Each vector connects a corner of the cube to the body center. The primitive cell volume is a3/2a^3/2.

Computational cost scaling

Using a conventional FCC cell (8 atoms for CdSe) instead of the primitive cell (2 atoms) increases the DFT diagonalization cost by roughly (8/2)3=64×(8/2)^3 = 64 \times. For a BCC metal like iron, it is (2/1)3=8×(2/1)^3 = 8 \times. Always use the smallest cell that captures the physics you need.

Primitive vs Conventional Cell Comparison

See how the same lattice can be described by different unit cells

Face-Centered Cubic (F)
Z = 4: Four lattice points per conventional cell. Primitive cell has one-quarter the volume.
Vprim = a3/4
Primitive vectors:
½(0,1,1), ½(1,0,1), ½(1,1,0)
Face-Centered Cubic (F)

Conventional Cells

A conventional cell is a larger unit cell chosen for convenience. It displays the full symmetry of the crystal system at the cost of containing multiple lattice points.

CenteringSymbolZ (lattice points)V_conv / V_primExample
PrimitiveP11Simple cubic
Body-centeredI (Innenzentriert)22BCC iron, W, Cr
Face-centeredF44FCC Cu, Al, CdSe(ZB)
Base-centeredC (or A, B)22Monoclinic base-centered

Why Use Conventional Cells?

  1. Symmetry is visually obvious: a cube for cubic, a hexagonal prism for hexagonal. Primitive cells often hide this symmetry in a skewed parallelepiped.
  2. Database compatibility: the ICSD, Materials Project, and AFLOW all report conventional cells by default. Comparing your structure to databases requires matching conventions.
  3. Supercell construction: building a 2×2×22 \times 2 \times 2 supercell is trivial with orthogonal conventional vectors. With primitive FCC vectors, the same supercell requires careful matrix manipulation.
  4. Defect modeling: to study a vacancy, substitution, or interface, you typically need a supercell. Starting from the conventional cell keeps the geometry intuitive.

The trade-off

Conventional cells cost more in DFT but less in human confusion. For production calculations, start with the conventional cell for structure setup and verification, then convert to the primitive cell for the actual VASP run.

The Wigner-Seitz Cell

The Wigner-Seitz (WS) cell is a special primitive cell with a remarkable property: it has the full point-group symmetry of the lattice. It is constructed by a purely geometric recipe:

  1. Pick a lattice point as the origin.
  2. Draw line segments from the origin to all neighboring lattice points.
  3. Construct the perpendicular bisector plane of each segment.
  4. The smallest enclosed region around the origin — the intersection of all the half-spaces — is the Wigner-Seitz cell.

Mathematically, the WS cell is the Voronoi cell of the origin: the set of all points in space that are closer to the origin than to any other lattice point:

WS={rR3:rrR for all lattice vectors R0}\text{WS} = \{ \mathbf{r} \in \mathbb{R}^3 : |\mathbf{r}| \leq |\mathbf{r} - \mathbf{R}| \text{ for all lattice vectors } \mathbf{R} \neq 0 \}

Properties of the Wigner-Seitz Cell

  • It is a primitive cell: contains exactly 1 lattice point, has volume VprimV_{\text{prim}}.
  • It has the full point-group symmetry of the lattice (unlike generic primitive cells that may look asymmetric).
  • It is always convex.
  • It is unique for a given lattice (unlike parallelepiped primitive cells).

WS Cells for Common Lattices

LatticeWS Cell ShapeFacesPoint Group
Simple CubicCube6 squaresO_h (m3m)
BCCTruncated octahedron8 hexagons + 6 squaresO_h (m3m)
FCCRhombic dodecahedron12 rhombusesO_h (m3m)
HexagonalHexagonal prism2 hexagons + 6 rectanglesD_6h (6/mmm)

The Brillouin zone connection

When you apply the Wigner-Seitz construction in reciprocal space (to the reciprocal lattice), you get the first Brillouin zone. This is the central concept in electronic structure theory: the Brillouin zone is where band structures live, k\mathbf{k}-points are sampled, and phonon dispersion curves are plotted. The WS cell and the Brillouin zone are dual partners — one in real space, one in reciprocal space — connected by the same Voronoi construction.

Wigner-Seitz Cell Construction

Step through the geometric recipe for constructing the WS cell

The WS cell is a square — it has the full 4-fold symmetry (C₄v).
O

The 2D construction above generalizes to 3D. Explore the actual Wigner-Seitz cell shapes for cubic lattices — the cube (SC), truncated octahedron (BCC), and rhombic dodecahedron (FCC) — and step through the 3D construction:

3D Wigner-Seitz Cell Viewer

Explore the 3D Wigner-Seitz cells for SC, BCC, and FCC lattices

Transparency40%
Cube
6 square faces
Point group: Oₕ (m3m)
The WS cell of the SC lattice is a cube centered on the lattice point.
Face Colors
Square faces

Real-World Examples

Example 1: X-Ray Diffraction and the Unit Cell

When X-rays hit a crystal, the diffraction pattern encodes the unit cell geometry. The positions of diffraction peaks give the lattice parameters, while their intensities encode the atomic basis. A powder X-ray diffraction (PXRD) experiment on CdSe zinc blende yields peaks at specific 2θ2\theta angles. From the peak positions, we extract the d-spacings using Bragg's law nλ=2dsinθn\lambda = 2d\sin\theta, and from the d-spacings we determine the lattice parameter aa. For cubic systems, the relationship is dhkl=ah2+k2+l2d_{hkl} = \frac{a}{\sqrt{h^2 + k^2 + l^2}}.

Example 2: Choosing Cells for Defect Calculations

To model a single Mn dopant substituting for Cd in CdSe, you need a supercell large enough that the periodic images of the defect do not interact. A typical choice is a 3×3×33 \times 3 \times 3 supercell of the conventional cell (216 atoms) or a 4×4×44 \times 4 \times 4 supercell of the primitive cell (128 atoms). The primitive-cell supercell has fewer atoms and is cheaper, but the conventional-cell supercell has a cleaner geometry that makes it easier to analyze the defect's local environment.

Example 3: Strain Analysis from Lattice Parameters

When a thin film of GaN is grown on a sapphire substrate, the mismatch in lattice parameters causes strain. The in-plane parameter aa is compressed or stretched to match the substrate, while the out-of-plane parameter cc changes in response (Poisson effect). By measuring both aa and cc via X-ray diffraction and comparing to the bulk values, you can quantify the biaxial strain: ε=(afilmabulk)/abulk\varepsilon_{\parallel} = (a_{\text{film}} - a_{\text{bulk}})/a_{\text{bulk}}.

Example 4: Nanoparticle Size from Peak Broadening

For nanocrystalline CdSe quantum dots, the X-ray diffraction peaks are broadened. The Scherrer equation relates peak width to crystallite size: D=KλβcosθD = \frac{K\lambda}{\beta \cos\theta}, where β\beta is the full width at half maximum (FWHM) in radians and K0.9K \approx 0.9. This is a direct application of lattice periodicity: fewer repeat units means broader peaks.


Modern Computing and Materials Informatics

Why Crystallography Is the Language of Periodic Matter

Every atom-scale simulation of a solid must deal with periodicity. The unit cell is the computational box: atoms inside it are explicitly simulated, and periodic boundary conditions replicate it infinitely. This is not an approximation — a perfect crystal really is infinite repetition of a finite motif. The unit cell is the natural "quantum of crystal structure."

DFT and k-Point Sampling

In density functional theory (DFT), Bloch's theorem says that electronic wave functions in a periodic potential can be written as ψnk(r)=eikrunk(r)\psi_{n\mathbf{k}}(\mathbf{r}) = e^{i\mathbf{k} \cdot \mathbf{r}} u_{n\mathbf{k}}(\mathbf{r}), where unku_{n\mathbf{k}} has the periodicity of the lattice. The k\mathbf{k}-points live in the first Brillouin zone — the Wigner-Seitz cell of the reciprocal lattice. A smaller primitive cell means a larger Brillouin zone, but you solve the Schrödinger equation with fewer atoms per k-point. This is the fundamental trade-off:

Cell TypeAtomsBZ Sizek-Points NeededCost per k-PointTotal Cost
Primitive FCC2LargeMoreCheap (N³ ∝ 8)Lower
Conventional FCC8Small (1/4)Fewer (1/4)Expensive (N³ ∝ 512)Higher

The primitive cell wins: although you need 4x more k-points, each is 64x cheaper, giving a net 16x advantage.

Machine Learning for Crystal Structure Prediction

Modern ML models for materials discovery must encode crystal structure as input features. The lattice parameters and atomic positions within the unit cell are the raw ingredients. Several approaches exist:

  • Graph Neural Networks (GNNs): atoms are nodes, bonds are edges. The lattice vectors define periodic boundary conditions that determine which atoms are neighbors across cell boundaries.
  • Symmetry-aware representations: models like CGCNN, MEGNet, and M3GNet use lattice vectors to compute interatomic distances correctly under periodic boundaries. Getting the lattice vectors wrong means wrong distances and wrong predictions.
  • Generative models: diffusion models for crystal structure generation (like CDVAE) must learn to generate valid lattice vectors alongside atomic positions. The 6 lattice parameters are part of the model's output.

High-Throughput Screening

Databases like the Materials Project contain over 150,000 computed crystal structures. Each entry specifies the lattice vectors and atomic positions — exactly the POSCAR format we discuss below. Automated workflows use pymatgen to convert between primitive and conventional cells, compute volumes, and identify space groups. Understanding lattice vectors and unit cells is essential for navigating and using these databases.

Molecular Dynamics and Structure Factors

In molecular dynamics (MD) simulations, the simulation box is a unit cell with periodic boundary conditions. The structure factor S(q)S(\mathbf{q}) — the Fourier transform of the pair correlation function — directly reflects the lattice geometry. Sharp Bragg peaks appear at reciprocal lattice points G=hb1+kb2+lb3\mathbf{G} = h\mathbf{b}_1 + k\mathbf{b}_2 + l\mathbf{b}_3, where bi\mathbf{b}_i are the reciprocal lattice vectors (Chapter 3). Computing S(q)S(\mathbf{q}) from an MD trajectory is a standard way to verify that the simulated crystal has the expected structure.


VASP Connection: The POSCAR File

The POSCAR file is where you translate crystallographic knowledge into VASP input. It encodes the lattice vectors, atomic species, and positions — everything we have discussed in this section. Let us walk through a complete example using the primitive FCC cell of CdSe zinc blende.

CdSe Zinc Blende \u2014 Primitive Cell POSCAR
📝POSCAR
1System Name

A free-form comment describing the system. Has no effect on the calculation but is critical for record-keeping. Always include the material name, structure type, and cell type.

EXAMPLE
Si diamond - primitive cell
GaN wurtzite - conventional hexagonal
2Universal Scaling Factor

Multiplies ALL lattice vectors on lines 3–5. Here, 6.052 means each fractional vector component is multiplied by 6.052 Å. This is the lattice constant a for the zinc blende CdSe conventional cube.

EXAMPLE
If line 2 is 1.0, the vectors on lines 3–5 must be in absolute angstroms.
If line 2 is 6.052, the vectors are in units of a.
3Lattice Vector a₁

The first primitive FCC vector: a₁ = (a/2)(0, 1, 1). In units of the scaling factor (6.052 Å), this is (0.000, 0.500, 0.500). The x-component is zero — this vector lies in the y-z plane.

EXAMPLE
Cartesian: (0.000, 3.026, 3.026) Å
4Lattice Vector a₂

The second primitive FCC vector: a₂ = (a/2)(1, 0, 1). This vector lies in the x-z plane. Together with a₁, it defines a face of the primitive cell parallelepiped.

EXAMPLE
Cartesian: (3.026, 0.000, 3.026) Å
5Lattice Vector a₃

The third primitive FCC vector: a₃ = (a/2)(1, 1, 0). This vector lies in the x-y plane. The three vectors together span the primitive cell with volume a³/4.

EXAMPLE
Cartesian: (3.026, 3.026, 0.000) Å
6Species Names

Atomic species names. MUST match the order of POTCAR files exactly. VASP reads pseudopotentials in this order. Getting this wrong gives physically meaningless results with no error message.

EXAMPLE
Wrong order: Se Cd  (if POTCAR has Cd first)
Correct order: Cd Se (matching POTCAR)
7Atom Counts

Number of atoms per species: 1 Cd + 1 Se = 2 atoms total. In the primitive FCC cell, the zinc blende structure has exactly one cation and one anion. The conventional cell would have 4 Cd + 4 Se = 8 atoms.

8Coordinate System

"Direct" means fractional coordinates: each position (f₁, f₂, f₃) maps to the Cartesian point r = f₁a₁ + f₂a₂ + f₃a₃. The alternative is "Cartesian" (positions in angstroms). Direct is standard for periodic systems.

9Cd Atom Position

Cd sits at the origin: (0, 0, 0) in fractional coordinates. This is a lattice point of the FCC lattice. In Cartesian coordinates this is simply (0, 0, 0) Å.

10Se Atom Position

Se sits at (¼, ¼, ¼) in fractional coordinates. In Cartesian: r = 0.25a₁ + 0.25a₂ + 0.25a₃ = (a/4)(1, 1, 1). This is the tetrahedral interstitial site, displaced by one-quarter of the body diagonal. This offset defines the zinc blende (sphalerite) structure.

EXAMPLE
Cartesian: (1.513, 1.513, 1.513) Å
Bond length: a√3/4 ≈ 2.621 Å
1CdSe zinc blende - primitive cell
26.052
3  0.000  0.500  0.500
4  0.500  0.000  0.500
5  0.500  0.500  0.000
6Cd Se
71  1
8Direct
9  0.000  0.000  0.000
10  0.250  0.250  0.250

Verifying the Cell Volume

Always verify the cell volume from your POSCAR. The primitive FCC cell with a=6.052a = 6.052 A˚\text{\AA} should have:

V=a34=6.0523455.4V = \frac{a^3}{4} = \frac{6.052^3}{4} \approx 55.4 A˚3\text{\AA}^3

VASP prints the cell volume in the OUTCAR file (search for "volume of cell"). If your OUTCAR volume does not match this expectation, your lattice vectors are wrong.

Conventional vs primitive POSCAR

Both POSCARs describe the exact same infinite crystal. VASP will give identical physical results (energies, band gaps, forces) with either. The difference is purely computational cost: the primitive cell is roughly (Z)3(Z)^3 times cheaper for the diagonalization step.

Building Structures Programmatically

For production work, writing POSCAR files by hand is error-prone. Use pymatgen to build, verify, and convert structures programmatically:

Building and Verifying CdSe with Pymatgen
🐍build_cdse.py
1Imports

Structure is pymatgen’s core object for periodic crystals. Lattice encodes the 3×3 matrix of lattice vectors. These are the two objects you need for any crystal.

4Lattice Constant

The conventional cubic lattice parameter for CdSe in the zinc blende phase. This is the edge length of the conventional cube, obtained from experiment (X-ray diffraction) or DFT relaxation.

6Lattice Matrix

The Lattice constructor takes a 3×3 matrix where each row is a lattice vector in Cartesian coordinates (Å). Here we use the primitive FCC vectors. Pymatgen stores this as the lattice.matrix attribute.

EXAMPLE
lattice.matrix =
[[ 0.    3.026 3.026]
 [ 3.026 0.    3.026]
 [ 3.026 3.026 0.   ]]
12Structure Construction

Structure combines a Lattice with species labels and fractional coordinates. This is exactly the lattice + basis decomposition: the lattice defines periodicity, and the basis defines what sits at each point.

19Volume Check

The primitive FCC cell volume is a³/4. For a = 6.052 Å, this gives 6.052³/4 ≈ 55.43 ų. Always verify the volume after building a structure — a wrong volume means wrong lattice vectors.

24Conventional Cell Conversion

SpacegroupAnalyzer detects the space group from the structure, then get_conventional_standard_structure() returns the conventional cell. This is extremely useful: you can build with primitive vectors (efficient for DFT) then convert to conventional (for visualization or comparison with databases).

27Atom Count Verification

The conventional FCC cell should have Z = 4 formula units. For CdSe that means 4 Cd + 4 Se = 8 atoms. If you get a different number, the lattice vectors or space group detection are wrong.

30Space Group Identification

CdSe zinc blende should be F̓43m (No. 216). The F means face-centered, ̓43m encodes the full tetrahedral symmetry. This is a critical sanity check: if pymatgen reports a different space group, your atomic positions are likely wrong.

25 lines without explanation
1from pymatgen.core import Structure, Lattice
2
3# Build CdSe zinc blende from primitive FCC cell
4a = 6.052  # conventional lattice constant in angstroms
5
6lattice = Lattice(
7    [[0.0, a/2, a/2],   # a1 = (a/2)(0,1,1)
8     [a/2, 0.0, a/2],   # a2 = (a/2)(1,0,1)
9     [a/2, a/2, 0.0]]   # a3 = (a/2)(1,1,0)
10)
11
12cdse = Structure(
13    lattice,
14    ["Cd", "Se"],
15    [[0.0, 0.0, 0.0],       # Cd at origin
16     [0.25, 0.25, 0.25]]    # Se at (1/4,1/4,1/4)
17)
18
19# Key quantities for verification
20print(f"Volume: {cdse.volume:.2f} A^3")
21# Expected: 6.052^3 / 4 = 55.43 A^3
22
23print(f"Density: {cdse.density:.3f} g/cm^3")
24
25# Convert to conventional cell
26from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
27sga = SpacegroupAnalyzer(cdse)
28conv = sga.get_conventional_standard_structure()
29print(f"Conventional cell atoms: {len(conv)}")
30# Expected: 8 atoms (4 Cd + 4 Se)
31
32print(f"Space group: {sga.get_space_group_symbol()}")
33# Expected: F-43m (space group 216)

Common POSCAR Mistakes

MistakeSymptomFix
Wrong scaling factorNonsensical volume, unphysical bond lengthsCheck that scale × vectors gives the correct a
Species order mismatch with POTCARCalculation runs but gives wrong energies, magnetizationVerify that line 6 matches the POTCAR concatenation order
Cartesian vs Direct mismatchAtoms placed at wrong positions; may crash or give huge forcesIf positions are fractional, use Direct. If in Å, use Cartesian
Wrong number of atomsMissing atoms or extra atomsCount carefully; sum on line 7 must match number of position lines
Using conventional cell when primitive sufficesCalculation is Z³ times more expensive than necessaryConvert to primitive cell with pymatgen or AFLOW

Summary

This section made the abstract lattice concrete through vectors, cells, and volumes:

  • Lattice vectors a1,a2,a3\mathbf{a}_1, \mathbf{a}_2, \mathbf{a}_3 generate the entire lattice through integer linear combinations R=n1a1+n2a2+n3a3\mathbf{R} = n_1\mathbf{a}_1 + n_2\mathbf{a}_2 + n_3\mathbf{a}_3. They are equivalently described by six lattice parameters (a,b,c,α,β,γ)(a, b, c, \alpha, \beta, \gamma).
  • The unit cell is the parallelepiped spanned by the lattice vectors. Its volume is V=a1(a2×a3)V = |\mathbf{a}_1 \cdot (\mathbf{a}_2 \times \mathbf{a}_3)|, computable as a determinant.
  • A primitive cell contains exactly 1 lattice point and has the minimum volume. It is the most computationally efficient choice for DFT.
  • A conventional cell is larger (Z = 2 for I, 4 for F) but displays full symmetry and matches database conventions.
  • The Wigner-Seitz cell is the unique primitive cell with full point-group symmetry. Its reciprocal-space counterpart is the first Brillouin zone — the domain where electronic band structures and phonon dispersions live.
  • In VASP, the POSCAR file encodes the lattice vectors and atomic positions. Choosing primitive vs conventional cells dramatically affects computational cost (Z3\sim Z^3 scaling).
  • In modern computing, lattice vectors and unit cells appear everywhere: DFT k-point sampling, ML crystal representations, MD simulation boxes, and high-throughput materials databases.

In the next section, we will enumerate all possible lattice types: the 7 crystal systems and the 14 Bravais lattices, establishing the complete classification of translational symmetry in three dimensions.

Loading comments...