Skip to content

Conversation

@CompRhys
Copy link
Member

@CompRhys CompRhys commented Jan 9, 2026

Use the TorchSim Calc from https://github.com/mir-group/nequip rather than duplicating code. Not clear how to get dtype from AOTInductor, upstream to match the contract they just set the dtype to float64. Adds warning for end users. Implement basic cache for the compiled models to speed up repeat tests locally.

@CompRhys
Copy link
Member Author

CompRhys commented Jan 9, 2026

@cw-tan Can you give this a look over and okay?

r_max: float,
type_names: list[str],
device: torch.device | None = None,
neighbor_list_fn: Callable = torchsim_nl,
Copy link
Member Author

Choose a reason for hiding this comment

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

Here this the main regression in so far as we loose the ability to vary the nl if using the nequip implementation upstream.

"""Checkpoint download URLs for NequIP models."""

Si = "https://github.com/abhijeetgangan/pt_model_checkpoints/raw/refs/heads/main/nequip/Si.nequip.pth"
# Cache directory for compiled models (under tests/ for easy cleanup)
Copy link
Member Author

@CompRhys CompRhys Jan 9, 2026

Choose a reason for hiding this comment

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

Introduced just to speed up repeat testing locally. Nequip tests will take a long time in CI due to needing to compile step. Should consider if we can cache compiled models in CI also.

@CompRhys CompRhys linked an issue Jan 9, 2026 that may be closed by this pull request
assert model._device == DEVICE # noqa: SLF001


# NOTE: we take [:-1] to skip benzene. This is because the stress calculation in NequIP
Copy link
Member Author

Choose a reason for hiding this comment

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

Benzene test failed on github CI runner. Similar numerical issue existed for SevenNet when PBC turned off. Stress is not meaningful when PBC is off.

@CompRhys CompRhys merged commit 1ae3ee4 into main Jan 10, 2026
109 checks passed
@CompRhys CompRhys deleted the wrap-nequip branch January 10, 2026 17:30
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.

Nequip Framework: remove in-house and just wrap first-party?

3 participants