Skip to content
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

Corrections to NIST dataset #142

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Corrections to NIST dataset #142

wants to merge 4 commits into from

Conversation

gabrielasd
Copy link
Collaborator

@gabrielasd gabrielasd commented Feb 26, 2025

This pull request addresses the following issues related to the NIST dataset:

  • Incorrect energy conversion from $cm^{-1}$ to $Ha$ in the compilation script.
    For example the energy for hydrogen should be about $-0.5 Ha$ not this humongous value:
h_neutral = load(elem='H', charge=0, mult=2, dataset='nist')
print(h_neutral.energy)     # -24071707996.6 Ha ?!!!

this is caused by using $energy * CMINV$ when converting units. I've changed this to $energy / CMINV$ but alternatively we may want to redefine the CMINV variable.

  • Anionic species with charge -1 returning None value of energy.
    This problem was raised in issue NIST dataset #100. As solution I used: $E_{anion} = E_{neutral} - IP_{anion}$

  • Incorrect variable being returned by the Species.atmass attribute.
    This is not a specific problem of NIST dataset, but was caught by this dataset tests in PR Add zero-electron species to gaussian dataset #138 causing the checks to fail for python > v3.9. The attribute was returning the value from the .msg file instead of the one from the Element class instance in the periodic module.

This changes are a WIP, the following tasks remain to be completed:

  • Fix NIST test module
  • Recompile NIST test files

Changes
- Correct atomic mass unit conversion in the test cases dict.
- Use pytest.approx to handle comparison of floating point numbers.
- Recompile test files for this dataset and add dianion species to test cases.
@gabrielasd gabrielasd marked this pull request as ready for review March 4, 2025 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant