› Crystal Structure Simulator Back
Materials Science Simulator

Crystal Structure Simulator — SC / BCC / FCC / HCP / Diamond

Visualize unit cells and calculate packing fraction, coordination number and lattice constant for five crystal structures. Enter Miller indices to find interplanar spacing and Bragg diffraction angle.

Select crystal structure
Atomic radius r (Å)
Å
Bragg condition (cubic)
hkl:
X-ray wavelength λ (Å)
Å
Calculating...

Geometric angles only: structure factors and systematic absences are not modeled. HCP angles excluded.

Inputs update immediately while paused.

Results
—
Lattice constant a (Å)
—
Atoms per cell Z
—
Packing fraction (%)
—
Coordination number
—
2θ (°)
Unit cell

Spheres are reduced for clarity; the view stays normalized when r changes. The displayed sphere count is not Z. HCP uses ideal c/a = √(8/3). Ideal HCP reference (ASE)

Packing
Theory & Key Formulas
$$2d\sin\theta = n\lambda$$

Cubic interplanar spacing: $d_{hkl}= a/\sqrt{h^2+k^2+l^2}$

Crystal geometry: packing fraction and Bragg angles

🙋
The atomic radius changes but packing fraction stays the same. Is that a bug?
🎓
Not in this ideal touching-sphere model. For BCC, a=4r/sqrt(3); atom and cell volumes both scale with r³. Their ratio is pi*sqrt(3)/8≈68.0%. Radius still changes lattice constant and geometric Bragg angle.

Checked calculation example

BCC, r=1.28Å, (110), λ=1.54Å: a=2.956Å, d=2.090Å, 2θ=43.23°, packing fraction 68.0%, coordination 8 and 2 atoms per cell. FCC at the same radius has a=3.620Å, packing fraction 74.0%, coordination 12 and 4 atoms per cell.

Model and scope

Equal hard spheres in ideal contact: SC a=2r; BCC a=4r/sqrt(3); FCC a=2sqrt(2)r; diamond a=8r/sqrt(3). HCP uses a=2r and ideal c/a=sqrt(8/3) in an illustrative projection. Its displayed 6 atoms refer to the conventional hexagonal prism, not the 2-atom primitive cell.

Angles are calculated only for cubic structures. Integer h,k,l from 0 to 9, excluding (000), give d=a/sqrt(h²+k²+l²) and first-order 2θ=2asin(λ/(2d)). No real angle exists when λ>2d. HCP angles are not calculated on this page.

A geometric Bragg angle does not guarantee an observable diffraction peak. Structure factors, systematic absences, intensities, temperature and instrument errors are not modeled. BCC(111), for example, has a geometric angle but is systematically absent. This is not a material-identification or measurement-accuracy guarantee. Atomic radii depend on bonding; no validated property lookup is included.

FAQ

Why does radius not change packing fraction?

In the touching-sphere model, a scales with r. Atom and cell volumes both scale with r³, so their ratio depends on structure, not radius.

Why is no angle displayed?

Check for (000), fractional/out-of-range indices, λ>2d, or HCP selection. Wavelength and lattice constant are both in Å.

Does an angle predict an XRD peak?

Only geometric conditions are evaluated. Without structure factors or systematic absences, actual peak presence and intensity cannot be predicted.

Does HCP contain two atoms rather than six?

The primitive cell contains 2; the illustrated conventional hexagonal prism contains 6. Compare the same cell convention.

LibreTexts: X-ray diffraction and systematic absences

How to Use

Angles are calculated only for cubic structures. Integer h,k,l from 0 to 9, excluding (000), give d=a/sqrt(h²+k²+l²) and first-order 2θ=2asin(λ/(2d)). No real angle exists when λ>2d. HCP angles are not calculated on this page.

Worked Example

BCC, r=1.28Å, (110), λ=1.54Å: a=2.956Å, d=2.090Å, 2θ=43.23°, packing fraction 68.0%, coordination 8 and 2 atoms per cell. FCC at the same radius has a=3.620Å, packing fraction 74.0%, coordination 12 and 4 atoms per cell.

Practical Notes

A geometric Bragg angle does not guarantee an observable diffraction peak. Structure factors, systematic absences, intensities, temperature and instrument errors are not modeled. BCC(111), for example, has a geometric angle but is systematically absent. This is not a material-identification or measurement-accuracy guarantee. Atomic radii depend on bonding; no validated property lookup is included.

🎬 Watch it in motion

Phase Transitions of Matter Explained | Melting, Boiling and Sublimation Visualized
Phase Transitions of Matter Explained | Melting, Boiling and Sublimation Visualized