Skip to content

Split ase integration into a separate metatomic-ase package#177

Merged
HaoZeke merged 1 commit intometatensor:mainfrom
Luthaf:split-ase
Mar 24, 2026
Merged

Split ase integration into a separate metatomic-ase package#177
HaoZeke merged 1 commit intometatensor:mainfrom
Luthaf:split-ase

Conversation

@Luthaf
Copy link
Copy Markdown
Member

@Luthaf Luthaf commented Mar 10, 2026

As we add more and more integrations to Python engines (see #167), we don't want to have to release the main metatomic package for every bug fix that only impacts one of the engine.

Toward this goal, this PR splits the ASE integration into it's own package, metatomic-ase. For backward compatibility, we add a dependency on metatomic-ase in metatomic-torch, and re-export the calculators at the same path.

Still TBD:

  • update [project.urls] in pyproject.toml
  • write a Readme for the new package

Contributor (creator of pull-request) checklist

  • Tests updated (for new features and bugfixes)?
  • Documentation updated (for new features)?
  • Issue referenced (for PRs that solve an issue)?

Reviewer checklist

  • CHANGELOG updated with public API or any other important changes?

@Luthaf Luthaf requested review from HaoZeke and frostedoyster March 10, 2026 13:51
@Luthaf Luthaf force-pushed the split-ase branch 2 times, most recently from 90a9d5e to 2f2e349 Compare March 11, 2026 10:05
@PicoCentauri
Copy link
Copy Markdown
Contributor

Shouldn't we maybe put this into a new repo?

@HaoZeke
Copy link
Copy Markdown
Member

HaoZeke commented Mar 11, 2026

Shouldn't we maybe put this into a new repo?

This discussion we had a while back IRL, we're basically going monorepo a la metatensor :D

@Luthaf
Copy link
Copy Markdown
Member Author

Luthaf commented Mar 11, 2026

My argument was that this is a small package, and we need to re-export it from metatomic-torch for backward compatibility reasons, so for now it's easier to have it in the same repo; and if it becomes an issue down the line we can always split it into its own repo (like metatomic was split out of metatensor.torch.atomistic ~9 months ago)

@Luthaf Luthaf force-pushed the split-ase branch 3 times, most recently from 56da4dc to 0044da1 Compare March 11, 2026 17:58
@Luthaf Luthaf marked this pull request as ready for review March 11, 2026 18:17
HaoZeke added a commit to CompRhys/metatomic that referenced this pull request Mar 16, 2026
Replace hatchling/hatch-vcs with setuptools for building metatomic-torchsim.
This aligns with the build system used in metatomic-torch (PR metatensor#177).

Changes:
- Add setup.py with custom version generation from git tags
- Update pyproject.toml to use setuptools.build_meta
- Remove hatchling/hatch-vcs from tox.ini test dependencies
- Add VERSION file with base version number
@Luthaf Luthaf force-pushed the split-ase branch 4 times, most recently from 32f1052 to 9e37da8 Compare March 23, 2026 14:15
Copy link
Copy Markdown
Member

@HaoZeke HaoZeke left a comment

Choose a reason for hiding this comment

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

LGTM, doc polish is for later. Thanks @Luthaf

Comment on lines +40 to +47
We offer two ASE calculators: :py:class:`metatomic_ase.MetatomicCalculator` is
the default one, and support all the features described above, while
:py:class:`metatomic_ase.SymmetrizedCalculator` is a wrapper around the former
that allows to compute rotationally-averaged energies, forces, and stresses for
non-equivariant architectures. Both calculators are designed to be used as
drop-in replacements for any ASE calculator, and can be used in any ASE
workflow. You can also check the :ref:`corresponding tutorial
<atomistic-tutorial-md>`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For later but I'd generalize this into base and derived and saying we only currently have one derived thing but more might come

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not sure what you mean by base & derived? SymmetrizedCalculator being the derived one?

Here the plan is not to add more derived calculators, but to move this code to a model wrapper, i.e. #119

Comment on lines +4 to +7
The integration of metatomic with the Atomic Simulation Environment (ASE) was
moved into it's own package, ``metatomic-ase``, which is available on PyPI. The
documentation for this package can be found in the :ref:`corresponding section
of the documentation <ase-integration-api>`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need this? The historical context I mean.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Just there to keep existing links to the corresponding doc page alive for a bit.

@HaoZeke HaoZeke merged commit af7282c into metatensor:main Mar 24, 2026
51 checks passed
@Luthaf Luthaf deleted the split-ase branch March 24, 2026 14:27
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