Why Fractional Coordinates?
Imagine trying to give directions to every atom in a crystal. You could use ordinary Cartesian coordinates — metres along x, y, and z — but crystals are periodic, and their axes are not always orthogonal. A much more natural choice is fractional coordinates (also called direct coordinates), which express every atomic position as a fraction of the lattice vectors.
In fractional coordinates, the unit cell is always a cube that runs from 0 to 1 along each axis, regardless of how the real-space lattice vectors are oriented or how long they are. This makes symmetry operations, periodic boundary conditions, and VASP input files dramatically simpler.
Intuition: Think of fractional coordinates as a GPS that always works in units of "how far along each lattice vector." A coordinate of means "halfway along , halfway along , zero along ."
Direct vs Cartesian Coordinates
There are two equivalent ways to specify an atomic position inside a crystal:
Cartesian Coordinates
The atom's position is given in a fixed, orthogonal reference frame, typically in angstroms (Å):
These are the coordinates you would measure with a ruler. They are intuitive but cumbersome for non-orthogonal lattices because symmetry operations look complicated.
Fractional (Direct) Coordinates
The atom's position is expressed as a linear combination of the lattice vectors :
where are dimensionless fractions. The triplet is the fractional coordinate.
| Property | Cartesian | Fractional |
|---|---|---|
| Units | Angstroms | Dimensionless |
| Range | Depends on cell | [0, 1) for each component |
| Orthogonality | Always orthogonal axes | Follows lattice vectors |
| Symmetry ops | Complex matrices | Often simple fractions |
| Periodic wrapping | Requires modular arithmetic on real lengths | Simply mod 1 |
| VASP keyword | Cartesian | Direct |
When to Use Which
The Conversion Matrix
To convert between fractional and Cartesian coordinates we need the lattice matrix. If the three lattice vectors are written as column vectors, the matrix is:
Each column of is one lattice vector expressed in the Cartesian frame. The conversion from fractional to Cartesian is then a simple matrix-vector product:
Written out component-by-component:
Example: Simple Cubic Lattice
For a simple cubic lattice with parameter , the lattice vectors are , , , so:
In this special case, Cartesian and fractional coordinates are related by a simple scaling: .
Example: FCC Conventional Cell
For the zinc blende (FCC-based) structure of CdSe with lattice parameter Å, the conventional cell has:
An atom at fractional position maps to Cartesian position Å.
Inverse Transformation
Going the other way — from Cartesian back to fractional — requires the inverse of the lattice matrix:
The inverse exists whenever the three lattice vectors are linearly independent (which they always are for a valid crystal). For the simple cubic case:
For a general triclinic cell the inverse is more involved, but any linear algebra library (NumPy, LAPACK) computes it in one line.
Practical Calculation with Python
1import numpy as np
2
3# CdSe zinc blende lattice vectors (conventional cell, angstroms)
4a = 6.077
5M = np.array([
6 [a, 0, 0],
7 [0, a, 0],
8 [0, 0, a],
9])
10
11# Fractional -> Cartesian
12r_frac = np.array([0.25, 0.25, 0.25])
13r_cart = M @ r_frac
14print(f"Cartesian: {r_cart}") # [1.519 1.519 1.519]
15
16# Cartesian -> Fractional
17M_inv = np.linalg.inv(M)
18r_frac_back = M_inv @ r_cart
19print(f"Fractional: {r_frac_back}") # [0.25 0.25 0.25]Hexagonal Cells
Zinc Blende Positions
The zinc blende structure (space group ) is the prototypical structure for CdSe and many III-V and II-VI semiconductors. Its conventional cell contains 4 formula units (4 Cd + 4 Se), and the atomic positions in fractional coordinates are beautifully simple:
Cd Sublattice (FCC Positions)
| Atom | f1 | f2 | f3 |
|---|---|---|---|
| Cd 1 | 0.000 | 0.000 | 0.000 |
| Cd 2 | 0.500 | 0.500 | 0.000 |
| Cd 3 | 0.500 | 0.000 | 0.500 |
| Cd 4 | 0.000 | 0.500 | 0.500 |
Se Sublattice (Offset by 1/4, 1/4, 1/4)
| Atom | f1 | f2 | f3 |
|---|---|---|---|
| Se 1 | 0.250 | 0.250 | 0.250 |
| Se 2 | 0.750 | 0.750 | 0.250 |
| Se 3 | 0.750 | 0.250 | 0.750 |
| Se 4 | 0.250 | 0.750 | 0.750 |
Notice how the Se sublattice is simply the Cd (FCC) sublattice shifted by . This shift is the defining feature of the zinc blende structure: two interpenetrating FCC lattices with a quarter-body-diagonal offset.
Bond Length from Fractional Coordinates
Periodicity and Wrapping
Because crystals are periodic, fractional coordinates are inherently defined modulo 1. Two positions that differ by an integer in any component refer to the same site in different unit cells:
By convention, we wrap all fractional coordinates into the interval . For example:
| Raw coordinate | Wrapped coordinate | Explanation |
|---|---|---|
| 1.250 | 0.250 | Subtract 1 |
| -0.250 | 0.750 | Add 1 |
| 2.750 | 0.750 | Subtract 2 |
| 0.000 | 0.000 | Already in range |
| 1.000 | 0.000 | 1.0 wraps to 0.0 |
In Python, wrapping is a one-liner:
1# Wrap fractional coordinates to [0, 1)
2f_wrapped = f % 1.0Why Wrapping Matters
Wrapping is not just a convention — it is essential for:
- Avoiding duplicate atoms: If you accidentally place an atom at and another at , they are the same atom. VASP will sometimes warn about atoms that are too close together.
- Computing distances correctly: The minimum image convention requires checking whether the shortest distance between two atoms crosses a periodic boundary.
- Symmetry analysis: Fractional coordinates make it trivial to check whether two positions are symmetry-related — they differ by a symmetry operation applied to the fractional triplet.
Common Mistake
VASP Connection: POSCAR Format
In VASP, the choice between fractional and Cartesian coordinates is specified on line 8 of the POSCAR file. The keyword Direct indicates fractional coordinates; Cartesian indicates Cartesian coordinates in angstroms.
POSCAR Example: CdSe Zinc Blende (Direct Coordinates)
1CdSe zinc blende
21.0
3 6.077000 0.000000 0.000000
4 0.000000 6.077000 0.000000
5 0.000000 0.000000 6.077000
6Cd Se
7 4 4
8Direct
9 0.000000 0.000000 0.000000 ! Cd 1
10 0.500000 0.500000 0.000000 ! Cd 2
11 0.500000 0.000000 0.500000 ! Cd 3
12 0.000000 0.500000 0.500000 ! Cd 4
13 0.250000 0.250000 0.250000 ! Se 1
14 0.750000 0.750000 0.250000 ! Se 2
15 0.750000 0.250000 0.750000 ! Se 3
16 0.250000 0.750000 0.750000 ! Se 4POSCAR Line-by-Line Breakdown
| Line(s) | Content | Description |
|---|---|---|
| 1 | CdSe zinc blende | Comment / system name |
| 2 | 1.0 | Universal scaling factor |
| 3-5 | Lattice vectors | Three rows defining a1, a2, a3 in angstroms |
| 6 | Cd Se | Atomic species in order |
| 7 | 4 4 | Number of each species |
| 8 | Direct | Coordinate type: Direct (fractional) or Cartesian |
| 9+ | Positions | One line per atom with f1 f2 f3 |
Same Structure in Cartesian Coordinates
1CdSe zinc blende
21.0
3 6.077000 0.000000 0.000000
4 0.000000 6.077000 0.000000
5 0.000000 0.000000 6.077000
6Cd Se
7 4 4
8Cartesian
9 0.000000 0.000000 0.000000 ! Cd 1
10 3.038500 3.038500 0.000000 ! Cd 2
11 3.038500 0.000000 3.038500 ! Cd 3
12 0.000000 3.038500 3.038500 ! Cd 4
13 1.519250 1.519250 1.519250 ! Se 1
14 4.557750 4.557750 1.519250 ! Se 2
15 4.557750 1.519250 4.557750 ! Se 3
16 1.519250 4.557750 4.557750 ! Se 4Both POSCAR files describe the identical structure. VASP converts everything to Cartesian internally, but using Direct coordinates is standard practice because the fractional positions are universal — they do not change when you scale the lattice parameter.
VASP Best Practice
Summary
Fractional coordinates provide a compact, lattice-adapted way to describe atomic positions that exploits the periodicity of crystals. Here are the key takeaways:
- Fractional coordinates express positions as fractions of the lattice vectors, always in .
- The lattice matrix converts fractional to Cartesian: .
- The inverse matrix converts Cartesian back to fractional.
- In zinc blende CdSe, Se atoms sit at relative to each Cd — a clean quarter-diagonal offset.
- Fractional coordinates are periodic modulo 1, making wrapping trivial and symmetry operations elegant.
- In VASP, use the Direct keyword in POSCAR to specify fractional coordinates — this is the recommended standard.
Looking Ahead: In the next section we will use fractional coordinates as the foundation for understanding symmetry operations — rotations, reflections, and inversions that map the crystal onto itself. These operations are most naturally expressed as matrices acting on fractional coordinates.