Closed JFRudzinski closed 2 days ago
outputs of run in the venv (non-editable installation of
nomad-simulations
) and the
See archive.data.outputs[0].total_energy[0], I have a notebook with tests: tests/test_parser.ipynb
, you can check the locations there
@Bernadette-Mohr I pushed a few small changes to the branch, I don't think it really affects you, but you may want to pull them for consistency
outputs of run in the venv (non-editable installation of
nomad-simulations
) and theSee archive.data.outputs[0].total_energy[0], I have a notebook with tests:
tests/test_parser.ipynb
, you can check the locations there
When running the second cell of the notebook (conda kernel), I run into the following error:
{
"name": "AttributeError",
"message": "total_energy",
"stack": "---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[2], line 4
2 p = VasprunXMLParser()
3 a = EntryArchive()
----> 4 p.parse(path + 'vasprun.xml.relax', a, logger=logger)
6 MetainfoNormalizer().normalize(archive=a)
File ~/software/nomad-parser-vasp/src/nomad_parser_vasp/parsers/xml_parser.py:109, in VasprunXMLParser.parse(self, mainfile, archive, logger, child_archives)
107 output = Outputs()
108 archive.data.outputs.append(output)
--> 109 output.total_energy.append(TotalEnergy(value=total_energy))
110 output.total_energy[0].contributions.append(HartreeDCEnergy(value=hartreedc))
111 output.total_energy[0].contributions.append(XCdcEnergy(value=xcdc))
File ~/micromamba/envs/nomad/lib/python3.9/site-packages/nomad/metainfo/metainfo.py:1131, in MSection.__getattr__(self, name)
1127 raise AttributeError(name)
1129 return self.m_get_annotations(annotation_name)
-> 1131 raise AttributeError(name)
AttributeError: total_energy"
}
seems maybe like a version thing again. can you try importing the TotalEnergy class directly? If not we will have to solve it Mon :(
This branch can now be installed with the proper nomad-simulations dependencies in the toml, and so only the explicit installation of the parser plugin (not nomad-simulations) needs to be done for this example. However, this means that to run the parser example, one MUST use the notebook rather than the nomad-lab interface (unless you link up the parser of course).
This is a dummy PR to get some feedback, this will/should never be merged