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

add all_atomic_numbers flag #10

Merged
merged 2 commits into from
Mar 1, 2024
Merged

add all_atomic_numbers flag #10

merged 2 commits into from
Mar 1, 2024

Conversation

PicoCentauri
Copy link
Contributor

@PicoCentauri PicoCentauri commented Feb 29, 2024

To be compatible with torch_spex this PR adds a new parameter all_atomic_numbers to set a global list of elements at initialization. If this is not set we use the "old" behavior and obtain the elements from the given systems.

One question is how we want to name it. I followed the internal logic and named the parameter all_atomic_numbers even though in torch_spex it is called all_species.

I also did some minor docs layout work.


📚 Documentation preview 📚: https://meshlode--10.org.readthedocs.build/en/10/

@Luthaf
Copy link
Contributor

Luthaf commented Feb 29, 2024

how about all_atomic_types? Since that's the naming we use elsewhere

@PicoCentauri
Copy link
Contributor Author

yes good idea.

Copy link
Contributor

@kvhuguenin kvhuguenin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in general. I just added one comment regarding the use of words like atomic "species" and atomic "type". Are we using "type" to also include isotopes and/or ions? For now, it seems like the code is mixing "type" and "species" (see comment) for some variable names.

I approved the changes since this is not such an urgent issue and goes beyond just MeshLODE, but it might be good to agree on how to homogenize this across our different softwares.

@@ -129,18 +119,25 @@ def compute(
# of center_type and neighbor_type
blocks: List[TensorBlock] = []
for keys, values in feat_dic.items():
spec_center = atomic_numbers[keys // n_species]
spec_center = atomic_types[keys // n_species]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we rename everything to "atomic_types", should we perhaps also rename spec_center to type_center etc. and homogenize the documentation to use "type" instead of "species"?

@kvhuguenin kvhuguenin merged commit e60c6e5 into main Mar 1, 2024
4 checks passed
@PicoCentauri PicoCentauri deleted the all_elements branch April 11, 2024 05:44
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.

3 participants