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

Redesigned metatensor-based Clebsch Gordan iterations #237

Merged
merged 105 commits into from
Nov 30, 2023
Merged

Conversation

jwa7
Copy link
Member

@jwa7 jwa7 commented Sep 28, 2023

Closes #178 and #185 . New API design for performing metatensor-based Clebsch Gordan iterations.

This PR:

  • Public functions correlate_density and correlate_density_metadata, which perform iterative CG tensor products of a density with itself, returning the a density correlation descriptor of specified correlation_order, or just the metadata that would wrap it.
  • Dispatches to numpy, or Mops (if installed). Placeholder for torch dispatch, but this needs fully checking. (@jwa7 @frostedoyster)
  • Unit tests (@agoscinski, @curiosity54, @jwa7)
  • Docstrings and the .rst from Added cg_utils to Rascaline #185 (@jwa7, @curiosity54, @ecignoni)

Not in this PR (see #239):

  • Public function correlate_tensors for doing a single CG product step on 2 arbitrary TensorMaps with the same samples
  • Public function correlate_tensors_different_samples for doing a single CG product step on 2 arbitrary TensorMaps with different samples.
  • Standalone documentation / tutorials / help guides

Authored by @jwa7 , @agoscinski , @curiosity54, @frostedoyster , @DivyaSuman14 , @Luthaf , @ecignoni


📚 Documentation preview 📚: https://rascaline--237.org.readthedocs.build/en/237/

jwa7 and others added 30 commits June 30, 2023 15:08
* computation of dense clebsch gordan matrices
* passing use_sparse argumentation through whole computation
* adding test file that compares output of sparse and dense
Copy link
Member

@Luthaf Luthaf left a comment

Choose a reason for hiding this comment

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

small comments, I'll do a full review later

@jwa7 jwa7 requested a review from Luthaf November 22, 2023 17:36
@jwa7
Copy link
Member Author

jwa7 commented Nov 23, 2023

@Luthaf In order to make the CI happy I had to add some dependencies in the min-deps env - for CG tests we need ase, metatensor-operations and sympy. Of course not ideal as defeats the purpose of being minimal dependencies - what's the best way to get around this? Is there a way to only run CG tests at a higher level of dependencies?

@Luthaf
Copy link
Member

Luthaf commented Nov 23, 2023

Is there a way to only run CG tests at a higher level of dependencies?

yes! https://docs.pytest.org/en/7.1.x/how-to/skipping.html#skipping-on-a-missing-import-dependency

python/rascaline/tests/utils/clebsch_gordan.py Outdated Show resolved Hide resolved
python/rascaline/tests/utils/clebsch_gordan.py Outdated Show resolved Hide resolved
python/rascaline/tests/utils/clebsch_gordan.py Outdated Show resolved Hide resolved
python/rascaline/tests/utils/clebsch_gordan.py Outdated Show resolved Hide resolved
python/rascaline/tests/utils/clebsch_gordan.py Outdated Show resolved Hide resolved
python/rascaline/tests/utils/clebsch_gordan.py Outdated Show resolved Hide resolved
@jwa7
Copy link
Member Author

jwa7 commented Nov 27, 2023

Thanks for the review @Luthaf ! I've made the changes re: your suggestions :)

@jwa7 jwa7 requested a review from Luthaf November 27, 2023 16:45
@Luthaf Luthaf merged commit 1c06940 into master Nov 30, 2023
25 checks passed
@Luthaf Luthaf deleted the clebsch_gordan branch November 30, 2023 15:04
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.

Clebsch-Gordan utils
4 participants