Crystal Description Language (CDL)
CDL is a domain-specific language for describing crystal morphology using crystallographic notation. It combines crystal systems, point groups, and Miller indices to precisely define crystal forms.
Syntax Overview
A CDL expression follows this general format:
system[point_group]:hkl@distance + hkl@distance ... Components
| Component | Description | Example |
|---|---|---|
system | Crystal system | cubic, hexagonal, trigonal |
[point_group] | Point group symmetry | [m3m], [6/mmm], [-3m] |
{hkl} | Miller indices | {111}, {10-10} |
@distance | Distance from origin | @1.0, @0.8 |
Crystal Systems
CDL supports all seven crystal systems:
cubic hexagonal trigonal tetragonal orthorhombic monoclinic triclinic Point Groups
Point groups define the symmetry operations applied to Miller indices. Each crystal system has specific valid point groups:
| System | Point Groups |
|---|---|
| Cubic | m3m, 432, -43m, m3, 23 |
| Hexagonal | 6/mmm, 622, 6mm, -62m, 6/m, 6, -6 |
| Trigonal | -3m, 32, 3m, -3, 3 |
| Tetragonal | 4/mmm, 422, 4mm, -42m, 4/m, 4, -4 |
| Orthorhombic | mmm, 222, mm2 |
| Monoclinic | 2/m, 2, m |
| Triclinic | -1, 1 |
Miller Indices
Miller indices define crystal planes. Use curly braces with comma-separated values:
- Three indices:
{h,k,l}for most systems - Four indices:
{h,k,i,l}for hexagonal/trigonal (Miller-Bravais) - Negative values: Use minus sign, e.g.,
{10-10}
Common Forms
| Indices | Form Name | System |
|---|---|---|
{111} | Octahedron | Cubic |
{100} | Cube | Cubic |
{110} | Rhombic dodecahedron | Cubic |
{10-10} | Hexagonal prism | Hexagonal/Trigonal |
{0001} | Basal pinacoid | Hexagonal/Trigonal |
Combining Forms
Use + to combine multiple crystal forms:
# Truncated octahedron
cubic[m3m]:{111}@1.0 + {100}@1.3
# Quartz with prism and rhombohedra
trigonal[-3m]:{10-10}@1.0 + {10-11}@0.8 + {01-11}@0.9 The @distance value controls how "developed" each form is. Smaller distances result in larger face areas.
Examples
Diamond (Octahedron)
cubic[m3m]:{111} Fluorite (Cube with Octahedron)
cubic[m3m]:{100}@1.0 + {111}@1.2 Beryl (Hexagonal Prism with Pinacoid)
hexagonal[6/mmm]:{10-10}@1.0 + {0001}@1.5 Quartz
trigonal[-3m]:{10-10}@1.0 + {10-11}@0.8 + {01-11}@0.9 Extensions
Twin Laws
Add twin laws with the twin: modifier:
cubic[m3m]:{111} twin:spinel_law Modifications
Apply modifications like elongation or flattening:
tetragonal[4/mmm]:{110}@1.0 --elongate=1.5