Skip to content

Improve lattice recognition

Ask Hjorth Larsen requested to merge improve-lattice-recognition into master

Multiple changes related to Bravais lattices and band structures. See also #350 (closed).

This may well still be buggy as there are many pitfalls in lattice and symmetry stuff. Changes:

  • Recognize all 3d lattices except perhaps particularly tricky forms of MCL, MCLC, TRI. This is based on a reduction and following table loop-up: any cell --> Niggli-reduced cell --> canonical cell.

  • Requesting a bandpath from a cell now (hopefully) transforms the bandpath correctly back to the original cell.

  • 3D lattice detection now uses a greatly improved cell comparison method, where the tolerance compares lengths and angles fairly. Also this mechanism is more pluggable, so we can change if we want e.g. different tolerances for angles/lengths.

  • (2D lattices in geometry/bravais.py now moved to right after the 3D lattice classes, which generates a lot of diff lines but represents no change)

Closes: #350 (closed)

Edited by Ask Hjorth Larsen

Merge request reports