-
Notifications
You must be signed in to change notification settings - Fork 187
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
Slight inconsistencies in conversion factors #161
Comments
Original comment by Andrea Cepellotti (Bitbucket: acepellotti, GitHub: cepellotti): Hi Tom, thanks for your feedback. You are right, we took them from QE, but they are not exactly equal to CODATA2006. |
The definition of these constants should not be the responsibility of The only constants that is still being used in |
We cannot move these fully yet, as some of the constants are still being used by classes that are still in |
In fact, upon checking again just now, only the Apparently, the same constants also already exist in qe-tools. So maybe we should just use those in I searched through all the repositories in |
|
This is exactly what I would do. The only thing is that we then have to be very careful to not change the constants, or at least be aware that the results of |
Indeed. I think it's ok though, we make sure now that we define them to put the correct values, and then put a comment not to change them as other packages (as aiida-qe) depend on them. Actually, the best (and what I think we should do) would be to namespace the constants, e.g. # Comment on where these data come from
CODATA2006 = {
'bohr_to_ang': xxx,
...
}
# Comment on where these data come from
QE64 = {
'bohr_to_ang': xxx,
...
} We can even start with only one of these dictionaries, but this essentially ensures that (if we define them correctly the first time) we will never have to change them, but rather have a new dictionary and the dependencies will use the correct one. |
Originally reported by: Tom Daff (Bitbucket: tdaff, GitHub: Unknown)
In aiida/common/constants.py several conversion factors are defined. Most of them follow CODATA 2006, making them compatible with Quantum ESPRESSO, however the Rydberg is slightly different (c.f http://physics.nist.gov/cuu/pdf/all_2006.pdf):
This leads to slight inconsistencies where the energy and force are converted with
ry_to_ev
but the stress is converted withry_si
from CODATA.The difference is small, but the constants should probably strictly adhere to the standard and ensure that standard is recorded somewhere, since it gets updated fairly regularly.
The text was updated successfully, but these errors were encountered: