aiidateam / aiida-common-workflows

A repository for the implementation of common workflow interfaces across materials-science codes and plugins
https://aiida-common-workflows.readthedocs.io
MIT License
52 stars 32 forks source link

`quantum_espresso`: Fix stress units #282

Closed mbercx closed 2 years ago

mbercx commented 2 years ago

Fixes #262

Currently, the extract_from_trajectory calculation function simply passes the stress from the last frame of the trajectory to the stress output. However, the units of this output array are in GPa, not the agreed upon eV/angstrom^3.

Here we use the pint library to convert the stress array into the correct units.

mbercx commented 2 years ago

I've added the pint library as a dependency, but of course it's already a subdependency through the aiida-pseudo package. So not sure if this is necessary?

sphuber commented 2 years ago

I've added the pint library as a dependency, but of course it's already a subdependency through the aiida-pseudo package. So not sure if this is necessary?

I think it is good practice to add it as a direct dependency since we are directly using their code here as well.

mbercx commented 2 years ago

So if you are confident as well @mbercx I will let you have final responsibility ;)

I better double check it then 😅