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

Remove _elements.py (NUMBER_TO_ELEMENT) #2699

Closed
IAlibay opened this issue May 27, 2020 · 0 comments · Fixed by #2700
Closed

Remove _elements.py (NUMBER_TO_ELEMENT) #2699

IAlibay opened this issue May 27, 2020 · 0 comments · Fixed by #2700

Comments

@IAlibay
Copy link
Member

IAlibay commented May 27, 2020

Context

We currently have two dictionaries that do the exact same thing, NUMBER_TO_ELEMENTS in MDAnalysis.topology._elements and Z2SYMB in MDAnalysis.topology.tables. These are quasi-identical except the fact that Z2SYMB is a little bit more IUPAC compliant for some of the newer elements (which makes sense since Z2SYMB was added after NUMBER_TO_ELEMENTS).

At the moment, NUMBER_TO_ELEMENTS is used solely for the TOPParser, and could be swapped out for Z2SYMB at nearly no cost.

Describe the solution you'd like

Remove NUMBER_TO_ELEMENTS, this should help us lose a decent chunk of code for free.

Describe alternatives you've considered

Keeping it if we really want it.

@IAlibay IAlibay mentioned this issue May 27, 2020
4 tasks
orbeckst added a commit that referenced this issue May 28, 2020
- Fixes #2699
- Changes made in this Pull Request:
    - Removes MDAnalysis.topology._elements.py (Remove `NUMBER_TO_ELEMENTS`)
    - Switches `NUMBER_TO_ELEMENTS` to `Z2SYMB` in TOPParser
    - Adds a more thorough elements test and starts cleaning up tests in anticipation of #2651
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants