Skip to content

Conversation

@ppegolo
Copy link
Contributor

@ppegolo ppegolo commented Sep 10, 2025

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.

The code looks fine overall, it would need some tests and documentation (maybe even worth a separate tutorial!)

@ppegolo ppegolo marked this pull request as ready for review October 9, 2025 12:07
@ppegolo ppegolo requested review from Luthaf and jwa7 October 9, 2025 12:55
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.

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?)

@ppegolo
Copy link
Contributor Author

ppegolo commented Oct 29, 2025

Do you also want to add a tutorial here explaining why one would want to use this (I guess computing phonons?)

I would pospone tutorials at a later stage (I can open an issue about it)

@ppegolo ppegolo requested a review from Luthaf October 29, 2025 15:37
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.

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!

@ppegolo ppegolo requested a review from Copilot November 10, 2025 15:53
Copy link

Copilot AI left a 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 SymmetrizedCalculator class 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.

@ppegolo ppegolo requested a review from Luthaf November 10, 2025 17:24
ppegolo and others added 2 commits November 11, 2025 10:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ppegolo ppegolo requested a review from Luthaf November 13, 2025 10:47
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.

Thanks a lot @ppegolo, this is very nice!

@Luthaf Luthaf merged commit 1a4c22c into main Nov 14, 2025
7 checks passed
@Luthaf Luthaf deleted the rotational-average branch November 14, 2025 12:45
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