nomad-coe / nomad-parser-cp2k

This is a NOMAD parser for CP2K. It will read CP2K input and output files and provide all information in NOMAD's unified Metainfo based Archive format.
Apache License 2.0
1 stars 0 forks source link

Exceptions during parsing and other errors. #1

Open markus1978 opened 3 years ago

markus1978 commented 3 years ago

These are the entries (not published):

https://nomad-lab.eu/prod/rae/gui/entry/id/sa6kfegYRumPwIR2ZEptlQ/x6ggFOMoG3EZUXlZgGvOyn7LlpSa/logs

https://nomad-lab.eu/prod/rae/gui/entry/id/sa6kfegYRumPwIR2ZEptlQ/14mjscjcq8Yy7N1c64neFlOV-uBV/logs

These are the exceptions:

Traceback (most recent call last):
  File "/app/nomad/processing/data.py", line 460, in parsing
    self._parser_results, logger=logger)
  File "/usr/local/lib/python3.7/site-packages/cp2kparser/cp2k_parser.py", line 1425, in parse
    self.parse_configurations_quickstep()
  File "/usr/local/lib/python3.7/site-packages/cp2kparser/cp2k_parser.py", line 1137, in parse_configurations_quickstep
    parse_calculations(md_steps)
  File "/usr/local/lib/python3.7/site-packages/cp2kparser/cp2k_parser.py", line 1113, in parse_calculations
    sec_system = self.parse_system(atomic_coord)
  File "/usr/local/lib/python3.7/site-packages/cp2kparser/cp2k_parser.py", line 1004, in parse_system
    lattice_vectors = self.get_lattice_vectors(trajectory._frame)
  File "/usr/local/lib/python3.7/site-packages/cp2kparser/cp2k_parser.py", line 852, in get_lattice_vectors
    cell.get('ABC').split(), dtype=float), units).to('angstrom').magnitude
ValueError: could not convert string to float: '${LBOX}'
Traceback (most recent call last):
  File "/app/nomad/processing/data.py", line 460, in parsing
    self._parser_results, logger=logger)
  File "/usr/local/lib/python3.7/site-packages/cp2kparser/cp2k_parser.py", line 1425, in parse
    self.parse_configurations_quickstep()
  File "/usr/local/lib/python3.7/site-packages/cp2kparser/cp2k_parser.py", line 1137, in parse_configurations_quickstep
    parse_calculations(md_steps)
  File "/usr/local/lib/python3.7/site-packages/cp2kparser/cp2k_parser.py", line 1107, in parse_calculations
    parse_md_step(calculation)
  File "/usr/local/lib/python3.7/site-packages/cp2kparser/cp2k_parser.py", line 1080, in parse_md_step
    val = val.to('joule').magnitude
AttributeError: 'numpy.ndarray' object has no attribute 'to'

There are other errors: "Error reading trajectory", "Error reading MD energies".

markus1978 commented 3 years ago

@ladinesa responded:

The Error reading MD energies is expected for the other upload since the trajectory and energies files present do not match what are indicated in the output. I do not try to read these files as I suppose that these belong to another calculation. Maybe the the uploader can shed light on why this is the case maybe I am missing something as this seems to be a restart calculation.

The other issue concerns a variable assignment in the input file. I provided support for such a case in the latest commit.

sanabgr commented 3 years ago

Dear @ladinesa
I am doing some tests on NOMAD, so I didn't check all the files that I uploaded (I am not the one who has run these simulations). I have taken few examples from my colleagues and tried to upload them on NOMAD. I think the problem come from our outputs. I have taken today one Gaussian output and one example of CP2K outputs where I know that the simulations have finished without problems and this time the data has been uploaded without problem. I will check with my colleagues for the other folders that they gave me and for which the upload has not been successful. I keep you updated if the problem is related to CP2K parser or to the output.

In our team, we launch MD simulations using CP2K or Gaussian. For the servers that we use, we need to restart calculations each 24h that's why you see restart files. May be the examples that I got from my colleagues were not complete.

Thanks for you help.