Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial 14 #6

Closed
wants to merge 12 commits into from
Closed

Tutorial 14 #6

wants to merge 12 commits into from

Conversation

JFRudzinski
Copy link
Collaborator

This is a dummy PR to get some feedback, this will/should never be merged

Copy link
Collaborator

@Bernadette-Mohr Bernadette-Mohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good news: It does run, both with a conda environment and a new python virtual environment. The latter only if nomad-simulations is installed not in editable mode.

Comparing the outputs of run in the venv (non-editable installation of nomad-simulations) and the conda environment (editable installation), I see the following differences:

<           "name": "Ac",
---
>           "name": "Ag",
79320c79320
<             "Ac"
---
>             "Ag"
79327c79327
<           "name": "Ag",
---
>           "name": "Ac",
79329c79329
<             "Ag"
---
>             "Ac"

Question: Where are the new energies supposed to be stored? I seem to be unable to find them in the output of nomad parse ....

@JFRudzinski
Copy link
Collaborator Author

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

@JFRudzinski
Copy link
Collaborator Author

@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

@Bernadette-Mohr
Copy link
Collaborator

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

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"
}

@JFRudzinski
Copy link
Collaborator Author

seems maybe like a version thing again. can you try importing the TotalEnergy class directly? If not we will have to solve it Mon :(

Copy link
Collaborator

@Bernadette-Mohr Bernadette-Mohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think everything is fine for now.

Bernadette-Mohr and others added 4 commits July 23, 2024 12:54
Added the interim solution (editing the `defaults.yaml`) to ensure that NOMAD uses the correct version of a parser.
@JFRudzinski
Copy link
Collaborator Author

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).

@ndaelman-hu ndaelman-hu deleted the branch older_alt September 26, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants