Guidance for selecting a spacegroup setting that is compatible with a given cell
Sagar Ramchandi suggested that a distorted honeycomb lattice is a good way to build a model that supports Kitaev interactions:
```jl
latvecs = lattice_vectors(0.99,1.0,1.01,90,90,120)
cryst = Crystal(latvecs, [[1/3,2/3,0],[2/3,1/3,0]])
```
Sunny infers spacegroup 10:
```jl
Spacegroup 'P 2/m = P 1 2/m 1' (10)
Lattice params a=0.99, b=1, c=1.01, α=90°, β=90°, γ=120°
```
But the setting (i.e., rotation into the ITA standard cell) is non-obvious:
```
cryst.sg.setting # P = x-y,z,-y
```
It would be nice to construct a crystal with the same spacegroup symmetries, but without any distortion. Naively selecting spacegroup 10 reports a mysterious error:
```
latvecs = lattice_vectors(1, 1, 1, 90, 90, 120)
cryst = Crystal(latvecs, [[1/3,2/3,0]], 10)
# ERROR: Incompatible monoclinic cell shape for spacegroup 10
```
The problem is that the ITA standard setting for spacegroup 10 is "P 1 2/m 1", and this expects a monoclinic cell with angles α=90 and γ=90. However, "P 1 1 2/m" is an alternative setting for spacegroup 10 that _does_ work.
```
latvecs = lattice_vectors(1, 1, 1, 90, 90, 120)
cryst = Crystal(latvecs, [[1/3,2/3,0]], "P 1 1 2/m")
```
The error messages in Sunny should make this more discoverable.
关闭于 2025-11-20 1 条评论