-
Notifications
You must be signed in to change notification settings - Fork 26
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
DRAFT: Move periodic table definition to dictionary #138
Conversation
- Adds new dependency 'fhash' - Adds a new data type isotopes - Moves definition of isotopes to 'params' module - Moves definition of precisions to new module 'precision'
I briefly checked that everything compiles, but had some MPI-related issues when running tests, that I'll have to look into. |
It might be worth thinking of whether quantities like the average mass should be calculated in the constructor of the isotopes type, or whether to implement a function that returns the average mass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dear Nils. Thanks for the contribution, really appreciate it. I left some comments. Would you please consider these? One crucial point: the CI broke since the type check in lookup_periodic_table
caught an invalid type. Would be great if you could check this. Thanks a lot!
This is a good point. Since there is now two ways to think about the atomic mass -- virtual crystal approximation (VCA) or dominant isotope background (DIB) https://journals.aps.org/prb/abstract/10.1103/PhysRevB.109.165201 -- it would be good to have one or both of these masses served by someone on demand. Now whether this should be the |
Thank you for the feedback. I agree with everything. I will work on it soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I found the issue. You might just have to do call periodic_table%get_raw(key(element), raw_data)
-> call periodic_table%get_raw(key(trim(element)), raw_data)
in lookup_periodic_table
.
Yes, this is what I suspected. I will check tomorrow and update the branch. |
Nils, everything is in order. Thanks a lot for your contribution. |
As the title states, this PR moves the definition of the periodic table to a new datatype.
The following change are made:
isotopes
.r64
,r128
,i64
) to new module called 'precision'. I took the liberty of splitting this part ofparams
into a new module, to avoid circular imports. Otherwisem_isotopes
requiresr64
fromparams
andparams
requires the new datatypeisotopes
fromm_isotopes
. It seems like similar issues could arise in the future in other contexts.Before merge: