Skip to content
AsciiC6hem

Crystal

A crystal structure: unit cell parameters, space group, and asymmetric-unit atoms with fractional coordinates.

FieldTypeExample
nameString"NaCl"
a, b, cFloat5.64
alpha, beta, gammaFloat90
spacegroupString"Fm-3m"
atomsArray<Atom>Atoms with @f(x,y,z) fractional coords
  • each_cell_param(format) — iterates set cell params with format-specific labels
  • CELL_PARAMS — frozen array of cell parameter field names
  • CELL_LABELS — per-format label hash (text, mathml, html, latex)
  • LENGTH_FIELDS = %i[a b c]
  • ANGLE_FIELDS = %i[alpha beta gamma]

See Crystallography syntax for input format.

Play