Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR cleans up valences in
atomic_data.cpp
. In addiition to a few missing-1
valences for some alkali metals (Rb, Cs, Fr), which I believe should be added in analogy to Li, Na and K, there were a number of higher valences for Al (6), Si (6), P, As, Sb, Bi (7) which I believe are incorrect. Al has only valence 3 (not 6), Si has only valence 4 (not 6), P, As, Sb, Bi can have 3 and 5 (not 7).The incorrect valences lead to non-existing compounds such as AlX6, PF6, AsF6, SbF6, BiF6 to be accepted.
The fact that these elements may form negatively charged complexes which higher valence thanks to their d orbitals can be more appropriately accounted for by modifying the code in
Atom.cpp
. With these modifications, all existing unit tests pass, while preventing species such as AlX6, PF6, AsF6, SbF6, BiF6 to be accepted.Two Java tests which were failing with the new code in this PR upon inspection turned out to refer to species which are actually incorrect and should be rejected. I have therefore amended such tests.
Incorrect species were:
while it should have rather been Al2(C2O42-)3
while it should have been
while it should have been