nomad-coe / nomad

NOMAD lets you manage and share your materials science data in a way that makes it truly useful to you, your group, and the community.
https://nomad-lab.eu
Apache License 2.0
71 stars 16 forks source link

CASTEP parser: charge reading from MD/GEOM jobs fails #35

Closed stenczelt closed 2 years ago

stenczelt commented 2 years ago

I have noticed the parsing of CASTEP outputs from geometry optimisations fail on parsing charges from the file. This prevents the whole file from being parsed and published.

code: Castep v21.11, calculation has been performed on Archer 2 in the UK

See traceback from the log file below:

Traceback (most recent call last):
  File "/app/nomad/processing/data.py", line 466, in parsing
    self._parser_results, logger=logger)
  File "/usr/local/lib/python3.7/site-packages/castepparser/castep_parser.py", line 1202, in parse
    self.parse_configurations()
  File "/usr/local/lib/python3.7/site-packages/castepparser/castep_parser.py", line 1099, in parse_configurations
    parse_calculation(calculation.get('final'))
  File "/usr/local/lib/python3.7/site-packages/castepparser/castep_parser.py", line 1045, in parse_calculation
    sec_scc = parse_scc(source)
  File "/usr/local/lib/python3.7/site-packages/castepparser/castep_parser.py", line 932, in parse_scc
    sec_mulliken.x_castep_mulliken_charge = mulliken['Charge'][n]
KeyError: 'Charge'

Plus find the example upload & log file form the platform here: 48ewILIbTZSloT-zx2PGWQ.zip YBhZO21WfBLDdo1vvAA-QmgEQy8R.log

markus1978 commented 2 years ago

@ladinesa could you address this rather soon? Maybe we should merge this into both 1.0.x and 1.1.x.

ladinesa commented 2 years ago

I do not see any error both on staging and public. This is still using the old parsers so I think this needs only reprocessing.

stenczelt commented 2 years ago

You are right, re-uploading works now. I have uploaded and published it on the site. Thanks!