Crystal forms, orbits and distorted crystals¶
A crystal form is a set of faces that a point group makes equivalent. ITA (6th ed.) lists, for every crystal class and every Wyckoff position, the forms that occur there: the basic form and the limiting forms, which have the same face symmetry but a higher eigensymmetry. symcrys gives these lists, in the ITC convention, together with ITA’s table of the 47 forms (number, English name, number of faces, eigensymmetry). The rules and the print anchors are in Conventions, “Crystal forms” and “Site symmetry and Wyckoff positions”.
TypeScript¶
// The crystal forms of 4mm as ITA prints them: per Wyckoff position the basic form, then the limiting forms.
import { CRYSTAL_FORM_TYPES, crystalForms } from 'symcrys';
for (const f of crystalForms('4mm')) {
const form = CRYSTAL_FORM_TYPES[f.formType - 1];
const kind = f.basic ? 'basic ' : 'limiting';
console.log(
`${f.multiplicity}${f.letter} ${f.siteSymmetry.padEnd(3)} ${kind} (${f.millerIndices}) ${form.name}, ${form.eigensymmetry}`,
);
}
Output:
8d 1 basic (h,k,l) Ditetragonal pyramid, 4mm
8d 1 limiting (h,k,0) Ditetragonal prism, 4/mmm
4c .m. basic (h,0,l) Tetragonal pyramid, 4mm
4c .m. limiting (1,0,0) Tetragonal prism, 4/mmm
4b ..m basic (h,h,l) Tetragonal pyramid, 4mm
4b ..m limiting (1,1,0) Tetragonal prism, 4/mmm
1a 4mm basic (0,0,1) Pedion or monohedron, ∞m
A form names its kind by its number in CRYSTAL_FORM_TYPES; an application that shows the names
in another language keeps its own table by these numbers.
Python¶
import symcrys
for f in symcrys.crystal_forms("-43m"):
form = symcrys.CRYSTAL_FORM_TYPES[f["form_type"] - 1]
print(f["letter"], f["basic"], f["miller_indices"], f.get("condition", ""), form["name"])
d True h,k,l Hexatetrahedron or hexakistetrahedron
d False 0,k,l Tetrahexahedron or tetrakishexahedron
c True h,h,l |h|<|l| Trigon-tritetrahedron or tristetrahedron
c True h,h,l |h|>|l| Tetragon-tritetrahedron or deltohedron or deltoid-dodecahedron
c False 1,1,0 Rhomb-dodecahedron
b True 1,0,0 Cube or hexahedron
a True 1,1,1 Tetrahedron
Each form has a representative face with numbers, its Miller indices and its Cartesian unit normal in the frame of the setting, e.g. to draw its pole or to compute its site symmetry:
f = symcrys.crystal_forms("-43m")[2]
f["representative"]["hkl"], f["representative"]["cartesian"]
(array([1, 1, 3]), array([0.30151134, 0.30151134, 0.90453403]))
Orbits and the lattice basis¶
The faces of a form are the orbit of one face. orbit computes it exactly, in integers, from the
operations in the lattice basis (latticeOperations); orbitOf computes it for a Cartesian
direction under any list of operations, for instance those left after distorting a crystal. In
hexagonal axes a face transforms otherwise than a lattice direction
(Conventions, “Lattice basis and orbits”).
// The faces of a form in hexagonal axes, exactly, and the poles left after distorting the crystal.
import { latticeOperations, operations, orbit, orbitOf } from 'symcrys';
// The rhombohedron {10-11} of -3m1: six faces, three indices each (i = -(h + k) left out).
console.log(
orbit('-3m', { hkl: [1, 0, 1] })
.map((f) => `(${f.hkl.join(' ')})`)
.join(' '),
);
// Directions transform otherwise than faces in hexagonal axes: the threefold axis of 3.
console.log(
orbit('3', { uvw: [1, 0, 0] })
.map((d) => `[${d.uvw.join(' ')}]`)
.join(' '),
);
console.log(
orbit('3', { hkl: [1, 0, 0] })
.map((f) => `(${f.hkl.join(' ')})`)
.join(' '),
);
// The integer matrix of the threefold rotation in the lattice basis (ITA: -y, x-y, z).
console.log(JSON.stringify(latticeOperations('3')[1].matrix));
// A cube flattened along z keeps the operations of 4/mmm: the six faces of {100} fall into two orbits.
const kept = operations('m-3m').filter((op) => Math.abs(op.matrix[2][2]) === 1);
for (const v of [
[1, 0, 0],
[0, 0, 1],
] as const)
console.log(v, orbitOf(kept, v).length, 'poles');
Output:
(1 0 1) (-1 1 1) (0 -1 1) (0 1 -1) (1 -1 -1) (-1 0 -1)
[1 0 0] [0 1 0] [-1 -1 0]
(1 0 0) (-1 1 0) (0 -1 0)
[[0,-1,0],[1,-1,0],[0,0,1]]
[ 1, 0, 0 ] 4 poles
[ 0, 0, 1 ] 2 poles
[f["hkl"] for f in symcrys.orbit("-3m", {"hkl": [1, 0, 1]})]
[array([1, 0, 1]),
array([-1, 1, 1]),
array([ 0, -1, 1]),
array([ 0, 1, -1]),
array([ 1, -1, -1]),
array([-1, 0, -1])]
symcrys.lattice_operations("3")[1]["matrix"] # integers, as a float64 array
array([[ 0., -1., 0.],
[ 1., -1., 0.],
[ 0., 0., 1.]])
A distorted crystal¶
The operations that a distortion leaves form a point group, usually in an orientation that is not a
setting of symcrys. pointGroupOf names it, and describeOperationsOf gives its elements with
Cartesian axes (Conventions, “Point group of a list of operations”).
// A cube stretched along [111] keeps the operations that map [111] onto ±[111]: the class -3m, with
// its threefold axis along [111], so in no setting of symcrys.
import { describeOperationsOf, operations, pointGroupOf } from 'symcrys';
const along111 = (m: readonly (readonly number[])[]) => {
const v = m.map((row) => row[0] + row[1] + row[2]);
return v.every((x) => Math.abs(x - v[0]) < 1e-9) && Math.abs(Math.abs(v[0]) - 1) < 1e-9;
};
const kept = operations('m-3m').filter((op) => along111(op.matrix));
console.log(kept.length, 'operations:', pointGroupOf(kept));
for (const d of describeOperationsOf(kept).filter((x) => x.order === 3)) {
console.log(d.kind, d.order, d.sense, d.axis?.cartesian.map((x) => x.toFixed(3)).join(' '));
}
Output:
12 operations: { key: '-3m' }
rotation 3 + 0.577 0.577 0.577
rotation 3 - 0.577 0.577 0.577
rotoinversion 3 + 0.577 0.577 0.577
rotoinversion 3 - 0.577 0.577 0.577
import numpy as np
kept = [op for op in symcrys.operations("m-3m") if np.allclose(op["matrix"] @ [1, 1, 1], [1, 1, 1])
or np.allclose(op["matrix"] @ [1, 1, 1], [-1, -1, -1])]
symcrys.point_group_of(kept)
{'key': '-3m'}