Crystal Structure Viewer (Unit Cells, Interstitial Sites, Miller Indices)
Draws a unit cell in 3D that you can rotate by dragging, swiping or with the buttons. Drawing atoms as points shows their positions; drawing them as hard spheres shows how they touch. The number of atoms per unit cell, the coordination number, the packing factor and the relation between the atomic radius r and the lattice parameter a are given as formulas and numbers. Octahedral and tetrahedral interstitial sites can be drawn with their positions, numbers and the radius ratio of the sphere that fits. For cubic crystals, entering (hkl) draws the plane and entering [uvw] draws the direction as an arrow, with the interplanar spacing, the atoms on the plane, the planar density and the linear density. Pressing a slip-system button draws one slip plane with its slip direction. The default is the (111) plane of copper (FCC, a = 0.3615 nm).
Your inputs are kept in this page's URL, so a bookmark or a shared link opens the same calculation. Favorites and recently used calculators are stored only in this browser (localStorage).
Figure and results
Unit cell
Interstitial sites
Plane and direction
Slip systems
Continue in other tools
Atoms are treated as hard spheres of equal size, with nearest neighbors touching. The radius ratio of an interstitial site is the distance from its center to the center of the nearest atom minus the atomic radius, divided by the atomic radius. Planar density counts atoms whose centers lie on the plane, and the planar packing fraction is the fraction of the plane covered by the cross-sections (circles of radius r) of those atoms. Real atomic sizes change with bond type and coordination number, so the values are geometric estimates.
See it as a graph
Other inputs stay at their current values while the chosen input varies from 1/4 to 4 times its current value. The red dot is the current value.
How to read and rotate the figure
Cubic crystals are drawn as a cubic unit cell and HCP as a hexagonal prism. The x, y and z arrows (a₁, a₂ and c for HCP) are the crystal axes, extended from the origin O beyond the cell edges. Atoms are colored by the fraction that belongs to the cell: corners (1/8; 1/6 at the HCP corners), edges (1/4), faces (1/2) and interior (1). Drag the figure to rotate it. On a phone, a sideways swipe rotates it while an up-or-down swipe scrolls the page, so use the ▲▼ buttons to tilt it. “View along [111]” shows the cell along the body diagonal; in FCC you can then see the atoms of the close-packed planes arranged in hexagons. The point display is for seeing positions, and the hard-sphere display for seeing the directions in which atoms touch (edges in SC, body diagonals in BCC, face diagonals in FCC). In the point display of the diamond structure, bonds to the nearest neighbors are also drawn.
Atoms per cell, packing factor and atomic radius
The number of atoms per unit cell is the sum of the fractions at each position: 8 × 1/8 + 6 × 1/2 = 4 for FCC, 8 × 1/8 + 1 = 2 for BCC, the 4 FCC atoms plus 4 interior atoms = 8 for the diamond structure, and 12 × 1/6 + 2 × 1/2 + 3 = 6 for the HCP hexagonal prism. The packing factor is n × (4/3)πr³/a³; substituting the relation between a and r set by the contact direction removes r, giving π/6 ≈ 0.52 for SC, √3π/8 ≈ 0.68 for BCC, π/(3√2) ≈ 0.74 for FCC and √3π/16 ≈ 0.34 for diamond. When you enter the lattice parameter, the atomic radius and nearest-neighbor distance are shown in nm. For example, α-iron (BCC, a = 0.2866 nm) has r = √3a/4 ≈ 0.124 nm, and copper (FCC, a = 0.3615 nm) has r = √2a/4 ≈ 0.128 nm.
Octahedral and tetrahedral sites
Interstitial sites are named by the number of atoms around them: 6 atoms at the corners of an octahedron form an octahedral site, and 4 at the corners of a tetrahedron form a tetrahedral site. The radius of the sphere that fits is the distance from the center to the surrounding atom centers minus the atomic radius r. In FCC, the octahedral site is a/2 = √2r from its neighbors, so the radius ratio is √2 − 1 ≈ 0.414; the tetrahedral site is √3a/4 = √(3/2)r away, giving √(3/2) − 1 ≈ 0.225. Per unit cell there are 4 octahedral sites (body center 1 + edge midpoints 12 × 1/4) and 8 tetrahedral sites, that is, 1 octahedral and 2 tetrahedral sites per atom. HCP has the same numbers per atom and the same radius ratios. The “radius of the sphere” column uses the lattice parameter you entered.
BCC: much empty space in total, but each site is small
BCC has a packing factor of about 0.68, lower than FCC (about 0.74), so its total empty space (1 − packing factor) is about 0.32, larger than about 0.26 in FCC. But the space is divided among many sites, 3 octahedral and 6 tetrahedral per atom, and the sphere that fits has a radius of only about 0.291r in a tetrahedral site and about 0.155r in an octahedral site. The BCC octahedral site is a distorted octahedron: the 2 atoms along one axis are only a/2 away, while the other 4 are a/√2 away. The size of the sphere that fits is set by the 2 near atoms. Choosing octahedral sites under “Interstitial sites” draws the 2 near atoms with thick lines and the 4 far atoms with dashed lines. This is why the maximum solubility of carbon in α-iron (about 0.022 wt%) is much smaller than in γ-iron (about 2.14 wt%).
Drawing Miller planes and counting atoms on them
Entering (hkl) draws the plane whose intercepts on the x, y and z axes are 1/h, 1/k and 1/l. An index of 0 means the plane does not meet that axis (intercept ∞). If an index is negative, the origin is moved to the 1 position on that axis (O′) before the intercepts are taken. The dashed outlines are the adjacent parallel planes, separated by the interplanar spacing d = a/√(h² + k² + l²). Atoms whose centers lie on the plane are counted by the fraction inside the polygon of the section: an atom at a corner of the section counts by the interior angle (60°/360° = 1/6 for an equilateral triangle, 1/4 for a rectangle), an atom on an edge counts 1/2 and one inside counts 1. On FCC (111), 3 corners × 1/6 + 3 edges × 1/2 = 2 atoms lie in an area of (√3/2)a², so the planar density is 4/(√3a²), about 17.7 atoms/nm² for copper (a = 0.3615 nm). On BCC (110), 4 corners × 1/4 + 1 inside = 2 atoms lie in an area of √2a², giving √2/a².
Reading planar density, linear density and slip systems
Slip occurs most easily on the planes and in the directions where atoms are most densely packed. The planar packing fraction is π/(2√3) ≈ 0.907 for FCC {111} and about 0.833 for BCC {110}, and the linear packing fraction is 1 (atoms touching) for FCC <110> and BCC <111>. Pressing a slip-system button draws the slip plane and an arrow for the slip direction along a row of atoms on that plane, and checks that the direction lies in the plane (hu + kv + lw = 0). FCC {111}<110> has 4 planes × 3 directions = 12 systems and BCC {110}<111> has 6 planes × 2 directions = 12 systems; in BCC, {112}<111> and {123}<111> also operate. HCP basal slip {0001}<11-20> has only 3 systems, 2 of them independent, which falls short of the 5 needed for a polycrystal to deform freely.
Linking with the XRD and periodic table tools
The URL of this tool keeps the values you enter. Opening it with a structure (type = sc, bcc, fcc, hcp or diamond) and lattice parameter (a, in nm), as in “…/tools/crystal-structure-viewer/?type=bcc&a=0.28665”, shows that case. For HCP, the axial ratio (ca for c/a) can also be passed. The link “See the … peak position in the XRD calculator” opens the XRD calculator with the current structure, lattice parameter and plane indices, and shows the diffraction angle 2θ from Bragg’s law and whether the plane diffracts under the extinction rules. Crystal structures and lattice parameters of the elements can be looked up in the periodic table for materials; entering a lattice parameter from there gives the atomic radius, planar densities and interstitial site sizes of that element.
In FCC, atoms touch along the face diagonal, so √2a = 4r, that is, a = 2√2r. With 4 atoms per unit cell, the packing factor is 4 × (4/3)πr³ / (2√2r)³ = π/(3√2) ≈ 0.74. About 0.68 is the BCC value (atoms touch along the body diagonal, a = 4r/√3, 2 atoms), and about 0.52 is the SC value (a = 2r, 1 atom, π/6). HCP with the ideal c/a also reaches 0.74 and is the other close-packed structure alongside FCC. The size of each interstitial site, however, runs the other way: it is smaller in the less densely packed BCC (the largest sphere fitting an octahedral site has a radius of about 0.41r in FCC but about 0.15r in BCC), because BCC divides its larger total free volume into many small sites.
Miller indices are found by expressing the intercepts on each axis in units of the lattice parameter, taking their reciprocals and reducing to the smallest integer ratio. The intercepts are 1, 2 and ∞, so the reciprocals are 1, 1/2 and 0; multiplying by 2 gives (210). (120) is the mistake of listing the intercepts 1 and 2 without taking reciprocals. A plane parallel to the z axis has an infinite z intercept, so l = 0 always, and (102), whose third index is not zero, is also wrong. If the plane passes through the origin, move the origin to a neighboring lattice point before reading the intercepts.
In FCC, the {111} planes are the most densely packed, and within them atoms touch along the face diagonals, the <110> directions. Slip in FCC metals occurs on {111}<110>; there are 4 kinds of {111} plane, each with 3 <110> directions, giving 12 slip systems. {110} planes and <111> directions are the densest plane and direction in BCC, a pairing that is easily confused with FCC. {100} planes and <100> directions are the densest plane and direction in SC and are not close-packed in FCC.
FAQ
Are (200) and (100) the same plane?
They have the same orientation, but (200) has intercepts of 1/2 and half the interplanar spacing of (100). Entering (200) in this tool draws the plane through the middle of the cell. In FCC and BCC, atoms also lie on the (200) planes, so in XRD (100) is extinct and (200) appears. The (200) plane of SC contains no atoms, and the XRD (200) reflection corresponds to the second-order reflection from (100).
What happens if I enter (000) or a decimal?
(000) does not describe a plane and [000] does not describe a direction, so nothing is drawn and a message says so. Indices are whole numbers from −9 to 9, and decimals are rounded. Negative indices entered as −1 are shown with a bar over the number in the results.
Why does the planar density sometimes differ from the value counted in the section of one unit cell?
For low-index planes such as (100), (110) and (111), every unit cell gives a section of the same shape, so counting one section gives the average for the whole plane. For planes such as (112) and (123), the shape of the section changes from one cell to the next, so a single section is not representative. The tool shows the average over the whole plane, calculated from the spacing of lattice planes and the cell volume, as the planar density, and adds the single-section value when they differ.
In BCC the tetrahedral site is larger, so why does carbon in α-iron occupy octahedral sites?
A carbon atom is larger than either site, so it pushes the surrounding iron atoms apart. In an octahedral site it only needs to push the 2 near atoms apart, which is thought to cost less distortion energy overall than entering a tetrahedral site. As a result, the lattice containing carbon stretches in one direction, which is why martensite formed by quenching is tetragonal. The hard-sphere radius ratio is only one guide to where an atom fits most easily.
Why can’t I enter Miller indices for HCP?
HCP is normally described with Miller–Bravais indices (hkil, with i = −(h + k)), using three axes a₁, a₂ and a₃ at 120° in the basal plane plus the c axis, and the cubic formula d = a/√(h² + k² + l²) does not apply. This tool draws the typical basal plane (0001), the prism plane (10-10) and slip systems, and shows how they depend on c/a.
Which atomic radius does the tool use?
It is the hard-sphere radius calculated from the lattice parameter you enter, assuming nearest neighbors touch. It differs slightly from the metallic radius for 12-fold coordination listed in the periodic table tool, especially in structures with a different coordination number such as BCC. For HCP with c/a away from the ideal value, only the atoms in the nearest direction are assumed to touch.