Open dev-zero opened 3 years ago
Just released v0.5.0 with the API, now what's left is to define a filename, add it to the list of files if respective attributes are present in the CP2K input, and onvert the data to BasisData
. ETA: tomorrow, maybe this evening.
One gotcha (maybe): CP2K has "sets" of kpoint data where a set is a path from one special point to another (usually). While the bands data seems to assume one connected path. What we can do for sure is to merge repeated special points, meaning that when we have GAMMA-X
and X-U
, we get
bands_data.labels = [(0, 'GAMMA'),
(5, 'X'),
(11, 'U')]
instead of
bands_data.labels = [(0, 'GAMMA'),
(5, 'X'),
(6, 'X'),
(12, 'U')]
But what if we have disconnected sets, so something like GAMMA-X
, GAMMA-U
? Would that then be
bands_data.labels = [(0, 'GAMMA'),
(5, 'X'),
(6, 'GAMMA'),
(12, 'U')]
For the aiida-common-workflows we do require parsing the bandstructure from CP2K. I have this already implemented here in a separate tool which does a conversion of the CP2K bandstructure output to more common CSV format: https://github.com/cp2k/cp2k-output-tools/blob/develop/cp2k_output_tools/scripts/bandstructure.py
Since we're already pulling in the cp2k-output-tools I'd suggest I refactor the parsing and dataclass generation into a separate function (
cp2k_output_tools.parser::parse_bandstructure(fhandle)
?) to make it easier to use from aiida-cp2k.