Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ changelog = "https://docs.metatensor.org/metatomic/latest/torch/CHANGELOG.html"
### ======================================================================== ###

[build-system]
requires = [
"setuptools >=77",
"packaging >=23",
]
requires = ["setuptools >=77"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
Expand Down
2 changes: 1 addition & 1 deletion python/metatomic_torch/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ changelog = "https://docs.metatensor.org/metatomic/latest/torch/CHANGELOG.html"
[build-system]
requires = [
"setuptools >=77",
"packaging >=23",
"packaging >=26",
"cmake",
"metatensor-torch >=0.8.0,<0.9.0",
# we also add torch to this list in the build backend below
Expand Down
13 changes: 6 additions & 7 deletions python/metatomic_torch/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,12 @@ def create_version_number(version):
release = (major, minor + 1, 0)
pre = None

# this is using a private API which is intended to become public soon:
# https://github.com/pypa/packaging/pull/698. In the mean time we'll
# use this
version._version = version._version._replace(release=release)
version._version = version._version._replace(pre=pre)
version._version = version._version._replace(dev=("dev", n_commits))
version._version = version._version._replace(local=(git_hash,))
version = version.__replace__(
release=release,
pre=pre,
dev=n_commits,
local=git_hash,
)

return str(version)

Expand Down
5 changes: 5 additions & 0 deletions python/metatomic_torchsim/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Removed
-->

## [Unreleased](https://github.com/metatensor/metatomic/)

- `metatomic-torchsim` is now a standalone package, containing the TorchSim
integration for metatomic models.
1 change: 1 addition & 0 deletions python/metatomic_torchsim/LICENSE
1 change: 1 addition & 0 deletions python/metatomic_torchsim/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include AUTHORS
include LICENSE
include git_version_info
15 changes: 7 additions & 8 deletions python/metatomic_torchsim/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# metatomic-torchsim

TorchSim integration for metatomic atomistic models.
TorchSim integration for metatomic models.

Wraps metatomic models as TorchSim `ModelInterface` instances, enabling their
use in TorchSim molecular dynamics and other simulation workflows.
This package allows you to wrap metatomic models as TorchSim `ModelInterface`
instances, enabling their use in TorchSim molecular dynamics and other
simulation workflows.

## Installation

```bash
pip install metatomic-torchsim
```

For universal potential models, see
[upet](https://github.com/lab-cosmo/upet).

## Usage

```python
Expand All @@ -29,5 +27,6 @@ forces = output["forces"]
stress = output["stress"]
```

For full documentation, see the
[torch-sim engine page](https://docs.metatensor.org/metatomic/latest/engines/torch-sim.html).
For full documentation, see the [torch-sim engine
page](https://docs.metatensor.org/metatomic/latest/engines/torch-sim.html) in
metatomic documentation.
3 changes: 2 additions & 1 deletion python/metatomic_torchsim/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ dependencies = [
homepage = "https://docs.metatensor.org/metatomic/latest/engines/torch-sim.html"
documentation = "https://docs.metatensor.org/metatomic/latest/engines/torch-sim.html"
repository = "https://github.com/metatensor/metatomic/tree/main/python/metatomic_torchsim"
changelog = "https://github.com/metatensor/metatomic/blob/main/python/metatomic_torchsim/CHANGELOG.md"

### ======================================================================== ###

[build-system]
requires = [
"setuptools >=77",
"packaging >=23",
"packaging >=26",
]
build-backend = "setuptools.build_meta"

Expand Down
13 changes: 6 additions & 7 deletions python/metatomic_torchsim/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,12 @@ def create_version_number(version):
release = (major, minor + 1, 0)
pre = None

# this is using a private API which is intended to become public soon:
# https://github.com/pypa/packaging/pull/698. In the mean time we'll
# use this
version._version = version._version._replace(release=release)
version._version = version._version._replace(pre=pre)
version._version = version._version._replace(dev=("dev", n_commits))
version._version = version._version._replace(local=(git_hash,))
version = version.__replace__(
release=release,
pre=pre,
dev=n_commits,
local=git_hash,
)

return str(version)

Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

ROOT = os.path.realpath(os.path.dirname(__file__))
METATOMIC_TORCH = os.path.join(ROOT, "python", "metatomic_torch")
METATOMIC_TORCHSIM = os.path.join(ROOT, "python", "metatomic_torchsim")


if __name__ == "__main__":
Expand All @@ -13,8 +14,6 @@
# when packaging a sdist for release, we should never use local dependencies
METATOMIC_NO_LOCAL_DEPS = os.environ.get("METATOMIC_NO_LOCAL_DEPS", "0") == "1"

METATOMIC_TORCHSIM = os.path.join(ROOT, "python", "metatomic_torchsim")

if not METATOMIC_NO_LOCAL_DEPS and os.path.exists(METATOMIC_TORCH):
# we are building from a git checkout
extras_require["torch"] = f"metatomic-torch @ file://{METATOMIC_TORCH}"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ build_single_wheel = --no-deps --no-build-isolation --check-build-dependencies

packaging_deps =
setuptools >= 77
packaging >= 23
packaging >=26
cmake

testing_deps =
Expand Down
Loading