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

🐛 Issues with formatting in XML output for occupations #45

Open
mbercx opened this issue Nov 14, 2023 · 5 comments
Open

🐛 Issues with formatting in XML output for occupations #45

mbercx opened this issue Nov 14, 2023 · 5 comments
Assignees

Comments

@mbercx
Copy link

mbercx commented Nov 14, 2023

Very small values in the occupations output in the XML (possible also elsewhere) are not printed properly:

        <occupations size="11">
   1.000000000000000E+00   1.000000000000000E+00   1.000000000000000E+00
   1.000000000000000E+00   1.000000000000000E+00
   1.000000000000000E+00   9.513213811999113E-26   2.475414006339448-265
   0.000000000000000E+00   0.000000000000000E+00
   0.000000000000000E+00
        </occupations>

Note the missing E in 2.475414006339448-265. This seems to happen quite often, and breaks the parsers of aiida-quantumespresso since this produces a NoneType that subsequently fails to interoperate with e.g. floats:

  File "/Users/mbercx/project/sirius/git/aiida-quantumespresso/src/aiida_quantumespresso/parsers/pw.py", line 575, in build_output_bands
    occupations = 2. * numpy.array(parsed_bands['occupations'][0])
TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'
@mbercx
Copy link
Author

mbercx commented Dec 19, 2023

Just a quick note: I ran into this issue as well for the forces:

    <forces rank="2" dims="           3           6">
   3.220681500679849E-86   4.347898683069749-103  -3.696810758148386E-49
   0.000000000000000E+00   0.000000000000000E+00   0.000000000000000E+00
  -2.030916305444379E-63   5.726077947344848E-45  -3.696810758148386E-49
  -2.030916305444379E-63   5.726077947344848E-45  -3.696810758148386E-49
   2.527523082442126E-55  -7.126238607164159E-37  -2.320596130163241E-91
   2.468601466883413E-37   2.850495442865664E-37  -2.190254762280840E-74
    </forces>

@simonpintarelli
Copy link
Collaborator

Thanks @mbercx, I'll add a sensible threshold for force/stress too.

mbercx added a commit to mbercx/aiida-quantumespresso that referenced this issue Dec 19, 2023
mbercx added a commit to mbercx/aiida-quantumespresso that referenced this issue Dec 20, 2023
@mbercx
Copy link
Author

mbercx commented Dec 22, 2023

Another one I'm afraid...

        <starting_magnetization>-7.481963004351236-179</starting_magnetization>
        <starting_magnetization>-1.436278500171930-177</starting_magnetization>

@mbercx
Copy link
Author

mbercx commented Dec 23, 2023

It seems the atomic positions can also have this issue

      <atomic_positions>
        <atom name="Mn" index="1">
   9.492715137401231E-57   1.919671551571680E-36   9.854966977617403E+00
        </atom>
        <atom name="Mn" index="2">-7.906128800136544-150   1.919174004571837E-36   9.691860452671211E-77</atom>
        <atom name="Mo" index="3">4.746357568700615E-57   3.067994052813471E+00   4.927483488808702E+00</atom>
        <atom name="Mo" index="4">2.656960788448982E+00   1.533997026497647E+00   1.478245046642611E+01</atom>
        <atom name="N" index="5">1.659450767641205E-56   3.067994052813471E+00   1.722777127447125E+01</atom>
        <atom name="N" index="6">1.188363773579164E-56   3.067994052813471E+00   1.233712965838096E+01</atom>
        <atom name="N" index="7">2.656960788448982E+00   1.533997026497647E+00   7.372804296853846E+00</atom>
        <atom name="N" index="8">2.656960788448982E+00   1.533997026497647E+00   2.482162680763558E+00</atom>
      </atomic_positions>

See on LUMI

/scratch/project_465000416/mabercx/manual/sirius-tests/xml-positions

@simonpintarelli
Copy link
Collaborator

@mbercx , thanks for the input. I'll use it to test and let you know when it's done:
electronic-structure/SIRIUS#943

I think the problem was just the occupation numbers and then it can propagate via force > atomic positions.

mbercx added a commit to mbercx/aiida-quantumespresso that referenced this issue Jan 10, 2024
See

electronic-structure/q-e-sirius#45

Also:

* Add some basic parsing for charge and magnetic moments.
* Add `DIRECT_MINIMIZATION` to the possible namelists.
mbercx added a commit to mbercx/aiida-quantumespresso that referenced this issue Jul 16, 2024
See

electronic-structure/q-e-sirius#45

Also:

* Add some basic parsing for charge and magnetic moments.
* Add `DIRECT_MINIMIZATION` to the possible namelists.
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

No branches or pull requests

2 participants