Failed data upload: parsers/cp2k

Hello!
I am trying to upload cp2k data. But I get failed data processing related to parsers/cp2k… and I can not figure out the issue. It corresponds to a typical MD run by cp2k, with .inp, .out, .xyz and a restart file.

upload id: KZGEg2lOQFu9sup5pzxX9w

I am getting:

“errors”: string"parser failed with exception"
“event”: string"process failed"
“proc”: string"Entry"
“process”: string"process_entry"
“process_worker_id”: string"eJv7h7SpSyWYm4ZoI9RqDw"
“parser”: string"parsers/cp2k"
“error”: string"‘NoneType’ object has no attribute ‘atomic_numbers’"
“step”: string"parsers/cp2k"
“logger”: string"nomad.processing"
“exception”: string"Traceback (most recent call last): File “/usr/local/lib/python3.9/site-packages/nomad/processing/data.py”, line 1484, in parsing parser.parse( File “/usr/local/lib/python3.9/site-packages/nomad/parsing/parser.py”, line 460, in parse self.mainfile_parser.parse(mainfile, archive, logger) File “/usr/local/lib/python3.9/site-packages/electronicparsers/cp2k/parser.py”, line 1806, in parse self.parse_method_quickstep() File “/usr/local/lib/python3.9/site-packages/electronicparsers/cp2k/parser.py”, line 1597, in parse_method_quickstep basis_set=self._parse_basis_set(), File “/usr/local/lib/python3.9/site-packages/electronicparsers/cp2k/parser.py”, line 1569, in _parse_basis_set ac.atom_number = self.get_atomic_number(atom.kind_label) File “/usr/local/lib/python3.9/site-packages/electronicparsers/cp2k/parser.py”, line 847, in get_atomic_number atomic_numbers = self.out_parser.get( AttributeError: ‘NoneType’ object has no attribute ‘atomic_numbers’"

Any hint on the issue?

Thanks in advance!
Guido

Dear Guido, thank you for reaching out.
This sounds similar to a recent bug fix that has not yet been put into production.
Let me see if the bug fix works, else I open an issue to track this.

Best,
Nathan D

Hi Guido,

I guess you haven’t published your upload yet. That’s completely fine, but I won’t have access to look into it.
To do this securely, pls add [email protected] as a reviewer to your upload. (I’m linking this page as proof of accreditation: https://www.fairmat-nfdi.eu/fairmat/about-fairmat/team-fairmat)
As such, I will be able to see it. Pls also provide me with the specific entry id of the process that’s failing.
I will download these files to test them locally for debugging purposed. They are removed afterwards.

Best,
Nathan D

Hi Nathan,

many thanks for your prompt reply. The data is now published and accessible, this is the failed entry id ATbSPX7B-BEneL8gGX-Q0tR9H5ZI.

Thanks,
G

Thank you Guido!

So, locally, with the patch I get the following.

Let me know if this is satisfactory.
I’ll see to push this patch to deployment ( @mscheidgen fyi), and reach out to you when it is.

Best,
Nathan

That’s correct. Just, the dataset connected would be the .xyz file (now it sais no dataset…), the author name sounds wrong (no S. Cooper connected to this data), and that it would be useful in the future to be able to set “structure type” as amorphous at one point. All good for the rest.
Thanks

S. Cooper is just a test account. Nothing will be published under this name.
All of this was done with a local installation that already has the patch. The public one just needs it rolled out.
Metadata like the dataset will reflect whichever dataset you attached.

Hi Nathan,

I stumbled upon this issue with a test-upload. We are in the process of selecting a long-term feasible solution for publishing DFT-based datasets, with the possibility to utilize the API in other simulation-solutions based on the DFT calculated parameters.

My test-upload is a number of files from one of our calculations with CP2Kv2023.2. I also tried a local install but it seems it is based on a much older CP2K version, not able to parse necessary details from the main output.

“root”:{
“errors”:string"parser failed with exception"
“event”:string"process failed"
“proc”:string"Entry"
“process”:string"process_entry"
“process_worker_id”:string"qt49RQoKThi2iHC6YxcwVg"
“parser”:string"parsers/cp2k"
“error”:string"‘NoneType’ object has no attribute ‘atomic_numbers’"
“step”:string"parsers/cp2k"
“logger”:string"nomad.processing"
“exception”:string"Traceback (most recent call last): File “/usr/local/lib/python3.9/site-packages/nomad/processing/data.py”, line 1484, in parsing parser.parse( File “/usr/local/lib/python3.9/site-packages/nomad/parsing/parser.py”, line 460, in parse self.mainfile_parser.parse(mainfile, archive, logger) File “/usr/local/lib/python3.9/site-packages/electronicparsers/cp2k/parser.py”, line 1806, in parse self.parse_method_quickstep() File “/usr/local/lib/python3.9/site-packages/electronicparsers/cp2k/parser.py”, line 1597, in parse_method_quickstep basis_set=self._parse_basis_set(), File “/usr/local/lib/python3.9/site-packages/electronicparsers/cp2k/parser.py”, line 1569, in _parse_basis_set ac.atom_number = self.get_atomic_number(atom.kind_label) File “/usr/local/lib/python3.9/site-packages/electronicparsers/cp2k/parser.py”, line 847, in get_atomic_number atomic_numbers = self.out_parser.get( AttributeError: ‘NoneType’ object has no attribute ‘atomic_numbers’"
“timestamp”:string"2024-05-14 13:40.32"
“level”:string"ERROR"
}

The upload-ID is “xCS-EO4IQjiNYEIofmEGbA”. Not published, but I added you as reviewer.

Would that be possible to check it with your patch?
Or do you have any information on when the new version might be deployed to the main site?

Thank you very much in advance!
Best Regards,
Zoltán

Hi,

i seem to have stumbled upon a similar problem. I tried to upload my simulation data for a WIP paper and the CP2K files failed to parse. I compiled CP2K from the main-branch on github and use some features that didn’t make it into an official release yet.

My upload ID is: vOI1IJqwSUSzrLrc2Wrvgw
I also added you as a Co-Author if you find the time to take a look.

Thank you in advance!

Dear both,

I took note and am looking into the error. It isn’t the previous CP2K error, which I think has been released already.
I will let you know once I’ve found the bug.

Best,
Nathan

2 Likes

Hi,

i just reprocessed my files and now it works. Thank you for your help!

That’s great to hear @miasb ! What about you, @Zoltan ?

thank you, Nathan,
I didn’t find the option to reprocess (just getting acquainted with the interface),
but tried another upload, with the same result (failure) unfortunately.

Added you as a reviewer to this upload_id, too: SD6gZ2JEQYq2JxydDfmElQ

Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/nomad/processing/data.py”, line 1499, in parsing
parser.parse(
File “/usr/local/lib/python3.9/site-packages/nomad/parsing/parser.py”, line 463, in parse
self.mainfile_parser.parse(mainfile, archive, logger)
File “/usr/local/lib/python3.9/site-packages/electronicparsers/cp2k/parser.py”, line 2288, in parse
self.parse_settings()
File “/usr/local/lib/python3.9/site-packages/electronicparsers/cp2k/parser.py”, line 1492, in parse_settings
section.m_set(section.m_get_quantity_definition(f’x_cp2k_{key}‘), val)
File “/usr/local/lib/python3.9/site-packages/nomad/metainfo/metainfo.py”, line 1769, in m_get_quantity_definition
return resolve_variadic_name(self.m_def.all_quantities, quantity_name, hint)
File “/usr/local/lib/python3.9/site-packages/nomad/metainfo/util.py”, line 602, in resolve_variadic_name
raise ValueError(f’Cannot find a proper definition for name {name}’)
ValueError: Cannot find a proper definition for name x_cp2k_id

Okay, thank you for checking. Good to know that it now produces a different error message. Were these the same files you uploaded?

Btw, you can reprocess an upload by navigating to it, then clicking in the upper-right corner the circle with 2 arrows, 5th symbol from the left. It says “Reprocess”, when you hover over it with your mouse.

Thanks for the quick response, Nathan,
Regarding the uploads: no, the second test set is a collection of files from a different calculation.

And thank you for the hint on the “reprocess” button. I was looking for it in – now obviously – the wrong place among the file panel options. Repeating the processing for the previous upload, I now get a different error, regarding DoS parsing, see below:

Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/nomad/processing/data.py”, line 1499, in parsing
parser.parse(
File “/usr/local/lib/python3.9/site-packages/nomad/parsing/parser.py”, line 463, in parse
self.mainfile_parser.parse(mainfile, archive, logger)
File “/usr/local/lib/python3.9/site-packages/electronicparsers/cp2k/parser.py”, line 2302, in parse
self.parse_configurations_quickstep()
File “/usr/local/lib/python3.9/site-packages/electronicparsers/cp2k/parser.py”, line 1993, in parse_configurations_quickstep
self.parse_dos(sec_run.calculation[-1], pdos_files)
File “/usr/local/lib/python3.9/site-packages/electronicparsers/cp2k/parser.py”, line 1765, in parse_dos
atom_kind_in_files_sorted = sorted(
TypeError: ‘<’ not supported between instances of ‘NoneType’ and ‘str’