CP2K parser crashes when Kerker mixing is used #228
Labels
bug
Something isn't working. It also represents a quick fix in response to a bug.
good first issue
Good for newcomers
The CP2K parser dies when Kerker type mixing is applied in the following way:
The resulting SCF iteration printout will then look as follows
as opposed to the output with default mixing:
In essence, the parser crashes on the output using Kerker mixing with
I tracked this down to
time_initial
first being initialized correctly, but while parsing the second SCF iteration,time_initial
is initialized toNone
, the reason being thatsec_scc.scf_iteration
does exist butsec_scc.scf_iteration[-1].time_physical
is empty.electronic-parsers/electronicparsers/cp2k/parser.py
Lines 1582 to 1584 in e7d1ffe
This propagates until line 1630/1631, where a value in seconds is added to
None
, causing the parser to crash:electronic-parsers/electronicparsers/cp2k/parser.py
Lines 1629 to 1631 in e7d1ffe
Complete input and output which crashes the parser:
H2O_regprint.inp.txt
H2O_regprint.out.txt
Input and output which processes smoothly for comparison:
H2O_regprint_nokerker.inp.txt
H2O_regprint_nokerker.out.txt
(strip the .txt extension for testing)
(that the final energies with Kerker mixing and with default mixing differ significantly from each other is a different story...)
The root cause for the issue is probably that in the defunct case, the second and the third column of the SCF iteration output are merged together so that the parser thinks that there is one column less.
Proposed fix: Make the parser somehow immune against columns that touch each other directly. Easier said than done, i know :-)
NOMAD version: 1.2.2.dev465+gc6aff391 in standalone parser development mode
Electronic parser: latest from Github
CP2K version: 2024.1
The text was updated successfully, but these errors were encountered: