Reduce the expansion of user provided k-point list from lattice symmetry to crystal symmetry
When user provides a k-point list with crystal symmetry already, the
irreducible_BZ() method will still expand the list to enforce lattice symmetry. It will increase the number of distinct k-points, yet not improve accuracy commensurately (at the price of increase CPU time).
As an example, structure with 4/m point symmetry will be expanded using the 4/mmm symmetry, at a potential of doubling the number of distinct k-points. Below is an illustration of a real calculation example: The left is a user-provided grid for a 4/m structure (2D projection). It's not a common Monkhorst-Pack grid, but tilted to maximally sample the reciprocal space evenly and fulfill crystal symmetry. The irreducible BZ is the first quadrant. After expansion, the irreducible k-points increase from 14 to 26 (The picture is only 2D projection and only 7 are visible). Yet the energy difference is less than 1^10-5 Ry.
In addition, this patch will fix the problem mentioned at #2 , where a perturbed fcc structure in cubic lattice saw a surge of k-points.
I added an internal variable, nrot_c, to keep track of the Laue group of the crystal (since reciprocal lattice assume time-reversal, unless explicitly remove them). Then in
symm_base.f90, I reorganized the symop array to always keep the first nrot_c matrices of s(3,3,48) as the laue group of the crystal. Last, in "setup.f90", the code expands the k-point list by the Laue group.
- CALL irreducible_BZ (nrot_, s, nsym, time_reversal, ... + CALL irreducible_BZ (nrot_c, s, nsym, time_reversal, ...
Since I thought the k-point strings in Berry phase might also don't need a k-point list with lattice symmetry, I move the
find_sym() code to the front of
I put the calculation mentioned above, and a concise series of tests for symmetry-related tags in a Google drive: https://drive.google.com/drive/folders/1u-brAlUQwjaQkKJ9OkIBwJH4UO6a9b6x?usp=sharing
(Added 2019-02-05) Although N x N x N Monkhorst-Pack grids are unaffected by the patch, a tilted k-point grid (above picture) or a Monkhorst-Pack grid that is not 'N x N x N', would see a large saving in computation time, for a scf (relaxation & static) calculation. The benchmark results below demonstrate the point.