ENH/TST: Vasp line-mode reading
VASP provides a syntax to specify k-point paths in "LINE-MODE" as a series of special points and fixed number of points spaced between them. While this is generally inferior to sampling evenly in k-space, it's a convenient syntax and users may reasonably wish to read in their existing band structure calculations with ASE.
Closes #352
This MR
- Provides support for line-mode in the
read_kpoints
method of theGenerateVaspInput
class shared by all Vasp calculators - Removes a redundant block from the Vasp XML reader which was getting stuck on line-mode calculations
- Adds tests for the
read_kpoints
method over all supported KPOINTS file formats
While implementing this I noted a couple of other deficiencies in read_kpoints
that I do not propose to address as part of this MR:
- Nothing is done with the grid offset information. If a user reads a KPOINTS file with offsets and then uses that to start a new calculation, they will get a different k-point grid. There is also no facility in GenerateVaspInput to write such information; the offsets are hard-coded to
0 0 0
. - When reading an explicit list of k-points, it is assumed that all remaining lines are k-point positions. This is not a safe assumption, as calculations with tetrahedron integration would provide an explicit list of tetrahedra following the k-point list. The correct way to read the k-point list (even if we do disregard the tetrahedra) is to use the number in the second line of the file to identify the number of k-points that should be read.