symcrys: crystallographic point groups, plane groups and tensors¶
Crystallographic symmetry calculations: the 32 crystal classes and the 122 magnetic point groups, with their settings, symbols, symmetry elements, site symmetry, Wyckoff positions and crystal forms, and the forms of the property tensors (rank 0 to 4) they allow; the 17 plane groups with their operations, Wyckoff positions, asymmetric unit and symmetry elements in the cell. The results are checked against print, the International Tables for Crystallography (ITC) and Birss, Symmetry and Magnetism (1966), and, where print leaves a choice open, against birss-app.
One implementation, two packages of the same version:
Language |
Install |
Import |
|---|---|---|
TypeScript / JavaScript |
|
|
Python ≥ 3.10 |
|
|
The TypeScript library has no dependencies and runs unbundled in browsers and in Node. The Python
package runs the same library in an embedded JavaScript engine, so the results agree; names follow a
fixed rule (tensorForm → tensor_form), and matrices are NumPy arrays.
Where to start:
Getting started: the first calls, in both languages.
Two readings of a key: crystal class or magnetic point group,
symcrysorsymcrys/magnetic.Conventions: ITC and Birss, settings, the Cartesian frame. Which convention and which setting you need decides which tensor components you get.
Crystal forms, orbits and distorted crystals: the basic and limiting forms of each crystal class, as ITA lists them, the orbits of faces and directions, and the point group of a list of operations.
Cells, metric, angles and indices: the cell from lattice parameters, metric tensor, angles between directions and faces, the operations a distortion leaves, Miller–Bravais indices, the zone law and the change of axes.
Tensors and named properties: forms of property tensors, and the named properties such as piezoelectric or ferromagnetic.
Examples, among them second-harmonic generation at surfaces.
Reference: every function, for TypeScript and for Python.
symcrys is the computational core of the crystallography teaching apps (stereography, plane-groups) and of birss-app. Source, issues and changes: github.com/manganite/symcrys. Licence: MIT.