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

Changed the stress and forces to be eV/A and GPa #6

Open
wants to merge 12 commits into
base: support/mc3d-reruns
Choose a base branch
from

Conversation

Minotakm
Copy link

@Minotakm Minotakm commented May 6, 2024

Added a correction so as the units for forces and stresses are eV/A and GPa respectively.

sphuber and others added 11 commits December 20, 2023 12:13
The earliest versions of the `PwParser` exclusively parsed from the
stdout because that was all tha `pw.x` produced. At some point, it
started also writing output in an XML file, however, this format was
deprecated as of QE v6.2 and replaced by an XML with a different schema.
The advantage of the latter is that it comes with an XSD file which can
be used to validate and parse XML output files.

For backwards compatibility reasons, the `PwParser` has never fully
transitioned to parsing exclusively from the XML. This is also because
the XML does not provide all data that was currently parsed from the
stdout.

The time has come to start getting rid of the stdout parsing as it is
intrinsically fragile. The current version of `aiida-quantumespresso`
anyway only supports QE v6.6 and up, all of which have full support for
the schema based XML output. The idea is to migrate the `PwParser` to
parse almost exclusively from the XML file and only fetch that from the
stdout which the XML does not provide.

To prepare this move, the test fixtures, which often contain reference
files generated by old QE versions with the old deprecated XML format,
need to be updated to provide reference output with modern QE versions.
Here we replace the output files with output generated by QE pw.x v6.6.

For the "success" calculations, a new calculation was run and the output
files were used. The same technique was applied for certain "failed"
cases wherever that was possible by setting a specific input. For
example, the out-of-walltime error could easily be simulated by setting
the `max_seconds` input to 1 second, guaranteeing the error to be hit.
There are however a number of errors that are very specific and
difficult to reproduce, notably the BFGS errors for the vc-relax tests.
For these, the XML has been replaced with outputs of a similar
calculation that actually succeeded. These files are then naturally not
commensurate with the stdout file, but this is not important since they
are testing the parsing of the error, which is only done from the
stdout anyway.

Following are notes related to changes for specific tests cases:

* `vcrelax_success_rVV10`: Has been renamed to `scf_success_rVV10`. The
reason being that the calculation had to be reperformed and a `vc-relax`
kept failing with a `ERROR_IONIC_CONVERGENCE_REACHED_FINAL_SCF_FAILED`
Since the relaxation is not the point of the test, an `scf` calculation
was done instead.
Parsing failure was due to `ks_energies` being missing in XML
Parse the magnetization from the stdout as this information is not available in the XML.

Co-authored-by: Timo Reents <[email protected]>
See

electronic-structure/q-e-sirius#45

Also:

* Add some basic parsing for charge and magnetic moments.
* Add `DIRECT_MINIMIZATION` to the possible namelists.
Based on more extensive tests that also involved a broad range of smearings,
a new set of protocols were devised:

| Name       | Smearing (Ry) | k-points distance (1/A) |
|------------|---------------|-------------------------|
| Precision  |        0.0125 |                    0.10 |
| Efficiency |        0.0200 |                    0.15 |
| Fast       |        0.0275 |                    0.30 |

Here we already update the values in the `PwBaseWorkChain` protocol file. In
a future PR it would be nice to set up a system for protocol aliasing, so
we can also change the names without breaking protocol methods downstream.
@Minotakm
Copy link
Author

Minotakm commented May 7, 2024

Used only the q_e_tools units in order to convert the forces and stress tensor units to eV/A and GPa.

@mbercx
Copy link
Owner

mbercx commented May 7, 2024

Thanks @Minotakm! Let's merge + release aiidateam/qe-tools#76 and then we can merge this one.

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.

4 participants