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

Helper functions for species selection/conversion #190

Open
Luthaf opened this issue May 30, 2023 · 0 comments
Open

Helper functions for species selection/conversion #190

Luthaf opened this issue May 30, 2023 · 0 comments
Labels
Python Issues related to the Python API

Comments

@Luthaf
Copy link
Owner

Luthaf commented May 30, 2023

It would be nice to provide functions to convert between atomic symbols and atomic number, than can then be used as selection with rascaline. Something like

selection = rascaline.species_selection("species_center", "Au")
selection = rascaline.species_selection("species_center", ["Au", "Li", "S"])
selection = rascaline.species_selection(["species_center", "species_neighbor"], [("Au", "Li"), ("Au", "Au")])
descriptor = calculator.compute(frames, selected_keys=selection)

# or even something like
descriptor.block(species_center=rascaline.species_index("Au")

# since the species assignment can depend on the frames origin
descriptor.block(species_center=rascaline.species_index("Au", origin="ASE")

This would workaround metatensor/metatensor#15 and make code a bit more readable.

@Luthaf Luthaf added the Python Issues related to the Python API label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python Issues related to the Python API
Projects
None yet
Development

No branches or pull requests

1 participant