-
Notifications
You must be signed in to change notification settings - Fork 6
Add SO(3)/O(3)-averaging calculator wrappers #85
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
Conversation
Luthaf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks fine overall, it would need some tests and documentation (maybe even worth a separate tutorial!)
Luthaf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, thanks a lot!
Do you also want to add a tutorial here explaining why one would want to use this (I guess computing phonons?)
Co-authored-by: Guillaume Fraux <guillaume.fraux@epfl.ch>
…on-periodic systems
I would pospone tutorials at a later stage (I can open an issue about it) |
Luthaf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, only a couple of small improvement suggestions from me.
I would pospone tutorials at a later stage (I can open an issue about it)
That works, but please do open an issue about it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds symmetrization capabilities to the ASE calculator, enabling rotationally-averaged predictions for non-equivariant models. The changes introduce a new SymmetrizedCalculator class that wraps a MetatomicCalculator and averages its predictions over rotations to make them approximately equivariant.
- Adds
SymmetrizedCalculatorclass implementing O(3) rotational averaging via Lebedev quadrature - Extends
MetatomicCalculator.compute_energy()to support per-atom energy computation - Adds comprehensive test suite for symmetrization functionality
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| tox.ini | Adds scipy and spglib dependencies required for symmetrization features |
| python/metatomic_torch/tests/symmetrized_ase_calculator.py | New comprehensive test file covering symmetrization, quadrature, space group averaging, and rotational invariance |
| python/metatomic_torch/tests/ase_calculator.py | Updates test coverage for new compute_energies parameter in compute_energy() method |
| python/metatomic_torch/metatomic/torch/ase_calculator.py | Implements SymmetrizedCalculator class and adds per-atom energy support to compute_energy() |
| docs/src/torch/reference/ase.rst | Adds API documentation for new SymmetrizedCalculator class |
| docs/src/engines/ase.rst | Documents rotationally-averaged prediction capability for non-equivariant models |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Guillaume Fraux <guillaume.fraux@epfl.ch>
Co-authored-by: Guillaume Fraux <guillaume.fraux@epfl.ch>
Co-authored-by: Guillaume Fraux <guillaume.fraux@epfl.ch>
Luthaf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @ppegolo, this is very nice!
Contributor (creator of pull-request) checklist
Reviewer checklist
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request
📚 Download documentation for this pull-request