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

[Feature request]: Interface to atomic properties #115

Open
1 of 6 tasks
laserkelvin opened this issue Feb 7, 2024 · 0 comments
Open
1 of 6 tasks

[Feature request]: Interface to atomic properties #115

laserkelvin opened this issue Feb 7, 2024 · 0 comments
Labels
code maintenance Issue/PR for refactors, code clean up, etc. enhancement New feature or request good first issue Good for newcomers

Comments

@laserkelvin
Copy link
Collaborator

Feature/behavior summary

Instead of hardcoded numbers littered around the codebase without units or traceability, we should provide a standardized interface for reference atomic/chemical property values by introducing maintained dependencies like mendeleev and periodictable.

As examples, MACE and M3gnet implementations have brought in dictionaries that provide utility, but are literally hardcoded mappings like matsciml.datasets.utils.atomic_number_map.

Request attributes

  • Would this be a refactor of existing code?
  • Does this proposal require new package dependencies?
  • Would this change break backwards compatibility?
  • Does this proposal include a new model?
  • Does this proposal include a new dataset?
  • Does this proposal include a new task/workflow?

Related issues

No response

Solution description

The core idea would be to provide a consistent, "vectorized" or broadcast-able interface to retrieve reference atomic and chemical properties, such as ionization energies and just atomic symbol-number mappings. I don't know if we need a class based implementation, but at the very least, functions that look like this:

import mendeleev

def symbols_to_elements(atomic_symbols: list[str]) -> list[mendeleev.Element]:
    return [mendeleev.element(symbol) for symbol in atomic_symbols]


def retrieve_atomic_numbers(elements: list[mendeleev.Element]) -> list[int]:
    return [element.atomic_number for element in elements]

We can choose to abstract things out more, but some things might get a bit more tricky (e.g. fully stripped ions, etc.)

Additional notes

No response

@laserkelvin laserkelvin added enhancement New feature or request good first issue Good for newcomers code maintenance Issue/PR for refactors, code clean up, etc. labels Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code maintenance Issue/PR for refactors, code clean up, etc. enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant