-
Notifications
You must be signed in to change notification settings - Fork 857
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
Fix energy ordering of electronic configurations for Elements and Species #3851
Conversation
Note: due to 'prettifying' the .json file, the full diff is not very useful. I suggest viewing the changes associated only with the 2nd commit and/or using https://jsondiff.com/ to see exactly which values I changed. |
EDIT: OK, I think I corrected all the tests that were affected by ordering of orbitals. |
Thanks for fixing @rkingsbury, happy to merge this but could you add a reference to the docstring? If it was something peer-reviewed even better. Noting this NIST reference too via https://en.wikipedia.org/wiki/Electron_configurations_of_the_elements_(data_page) Separate to this PR, I wonder if the periodic table file might be better stored as yaml so we can include in-line comments. |
yes please! that would be great |
Will do! I will add this NIST reference as well, which also includes first cations. There seem to be a small number of cases where the ion configuration is NOT the same as that of the next lowest element. I'll investigate and either modify the docstring of the |
The plot thickens@mkhorton I've added a reference to the NIST resource you found, which is among the best available (I think) and includes a well formatted citation. However, reviewing this data raised two points that may complicate this PR:
Point 2) begs the question of how best to handle this within
This work should perhaps be a separate PR, in which case I can revert to the |
I don't have strong opinions on 1. provided that it's documented. For 2., I would always prefer we give accurate and referenced information when possible. In several places, pymatgen currently provides a "best guess", which might be helpful, but can mislead. Especially as pymatgen is now quite a widely-used and mature code, I am getting more concerned about these cases. At minimum, we should warn. For this PR, I am happy to proceed with your best judgement. |
@rkingsbury I suggest (a) follow the NIST convention in returning the electronic structure for the elements. I would note that that this is the reason why the existing electronic structure is defined the way it is in any case. (b) Clarify the docs that the electronic structure is based on the element, whether for Element or Species, (c) add a separate ion_electronic_structure For species, add an |
OK, agreed. After some further research, both NIST and the CRC handbook list the electronic configurations that way (i.e., NOT reflecting Madelung's rule). I was definitely taught to write them the other way, but this appears not to be the "best practice" anymore (or maybe it never was). So we don't need to change the order.
Do you mean that I'm concerned about potential for confusion / misinterpretation if we take that approach, as opposed to just using Whichever way we land on that, I think the best course of action is to close this PR without merging, and I'll open a new one with ion-specific electron config data. |
Summary
full_electronic_structure
,electronic_structure
, andvalence
forSpecies
periodic_table.json
to make it more readable as a standalone filehttps://ptable.com/#Electrons/Expanded
and
https://chem.libretexts.org/Bookshelves/Physical_and_Theoretical_Chemistry_Textbook_Maps/Supplemental_Modules_(Physical_and_Theoretical_Chemistry)/Quantum_Mechanics/10%3A_Multi-electron_Atoms/Electron_Configuration
Fixes #3850
Fixes #3849