Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: DOS parsing #146

Open
dev-zero opened this issue Jul 29, 2021 · 2 comments
Open

Feature: DOS parsing #146

dev-zero opened this issue Jul 29, 2021 · 2 comments

Comments

@dev-zero
Copy link
Contributor

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.

@dev-zero
Copy link
Contributor Author

@dev-zero
Copy link
Contributor Author

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')]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant