Crystal
A crystal structure: unit cell parameters, space group, and asymmetric-unit atoms with fractional coordinates.
Fields
Section titled “Fields”| Field | Type | Example |
|---|---|---|
name | String | "NaCl" |
a, b, c | Float | 5.64 |
alpha, beta, gamma | Float | 90 |
spacegroup | String | "Fm-3m" |
atoms | Array<Atom> | Atoms with @f(x,y,z) fractional coords |
Methods
Section titled “Methods”each_cell_param(format)— iterates set cell params with format-specific labelsCELL_PARAMS— frozen array of cell parameter field namesCELL_LABELS— per-format label hash (text, mathml, html, latex)
Constants
Section titled “Constants”LENGTH_FIELDS = %i[a b c]ANGLE_FIELDS = %i[alpha beta gamma]
See Crystallography syntax for input format.