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

PwParser: Parse structures from XML instead of stdout #735

Open
mbercx opened this issue Sep 18, 2021 · 2 comments
Open

PwParser: Parse structures from XML instead of stdout #735

mbercx opened this issue Sep 18, 2021 · 2 comments

Comments

@mbercx
Copy link
Member

mbercx commented Sep 18, 2021

I've noticed that in more recent versions of Quantum ESPRESSO (have to check from which version exactly), the structure is also in the XML output:

  <step n_step="1">
    <scf_conv>
      <convergence_achieved>true</convergence_achieved>
      <n_scf_steps>10</n_scf_steps>
      <scf_error>0.000000000000000e0</scf_error>
    </scf_conv>
    <atomic_structure nat="2" alat="5.354555981662e0">
      <atomic_positions>
        <atom name="Fe" index="1">0.000000000000000e0 0.000000000000000e0 0.000000000000000e0</atom>
        <atom name="Fe" index="2">2.677277990831121e0 2.677277990831121e0 2.677277990831121e0</atom>
      </atomic_positions>
      <cell>
        <a1>5.354555981662241e0 0.000000000000000e0 0.000000000000000e0</a1>
        <a2>0.000000000000000e0 5.354555981662241e0 0.000000000000000e0</a2>
        <a3>0.000000000000000e0 0.000000000000000e0 5.354555981662241e0</a3>
      </cell>
    </atomic_structure>
    <total_energy>
      <etot>-3.292707564170990e2</etot>
      <eband>-1.591327167812315e1</eband>
      <ehart>6.540299538320787e1</ehart>
      <vtxc>-3.582380599363634e1</vtxc>
      <etxc>-3.482422169431405e1</etxc>
      <ewald>-1.739908530725683e2</ewald>
      <demet>-4.317397130168570e-3</demet>
    </total_energy>
    <forces rank="2" dims="3 2" order="F">
      0.000000000000000e0 0.000000000000000e0 0.000000000000000e0
      0.000000000000000e0 0.000000000000000e0 0.000000000000000e0
      </forces>
  </step>

Hence, it would probably be good to move to parsing this from the XML, as this is more robust, especially when we have to support both SIRIUS-enabled and regular QE.

Also a step towards #353. Note that this issue is rather general, and cannot be closed anytime soon since some important output (e.g. the atomic magnetic moments) is not yet in the XML. Perhaps we can make this issue a place where we keep track of things that we would like to see parsed from the XML, and then check if it's there, and if not open an issue on the QE repo.

@mbercx
Copy link
Member Author

mbercx commented Sep 20, 2021

Will probably also fix this TODO here:

# TODO: should we parse 'steps' too? Are they already added in the output trajectory?

Basically, I'll try to add all information in the steps output in the XML to the output_trajectory node. This will require merging it with the output_trajectory parsed from the stdout.

@mbercx
Copy link
Member Author

mbercx commented Sep 20, 2021

Alright, digging through the parser code some more, I finally saw that the final structure is parsed from the XML. Bumping down the priority a bit then, since I only really needed that one for the SIRIUS direct minimization runs. ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant