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

cue.IrrepsAndLayout, cue.EquivariantTensorProduct, cuex.RepArray #46

Merged
merged 24 commits into from
Dec 19, 2024

Conversation

mariogeiger
Copy link
Collaborator

@mariogeiger mariogeiger commented Dec 12, 2024

Problem this PR fixes

Not all representation are well handled by the cue.Irreps class. This PR aims to relax the necessity to use the class cue.Irreps

API addition

New class

class IrrepsAndLayout(cue.Rep):
    irreps: cue.Irreps = field()
    layout: cue.IrrepsLayout = field()

API breaking changes

in cue

cue.EquivariantTensorProduct field .operands is now a list of cue.Rep instead of

class Operand:
    irreps: cue.Irreps
    layout: cue.IrrepsLayout

in cuex

Rename IrrepsArray in RepArray (but keep an alias called IrrepsArray for backward compatiblity)

  • RepArray has now a reps: dict[int, cue.Rep] field instead of a dirreps: dict[int, cue.Rep].
  • .irreps and .segments are now attributes instead of functions (like it was in e3nn-jax)

@mariogeiger mariogeiger changed the title [WIP] Improve support of non Irreps representations cue.IrrepsAndLayout, cue.EquivariantTensorProduct, cuex.RepArray Dec 18, 2024
@mariogeiger mariogeiger merged commit 163f5f1 into main Dec 19, 2024
10 checks passed
@mariogeiger mariogeiger deleted the rep_array branch January 13, 2025 22:50
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.

1 participant