Particle-mesh based calculations of long-range interactions in PyTorch
Project description
torch-pme enables efficient, auto-differentiable computation of long-range interactions in PyTorch. Auto-differentiation is supported for particle positions, charges, and cell parameters, allowing not only the automatic computation of forces but also enabling general applications in machine learning tasks. The library offers classes for Particle-Particle Particle-Mesh Ewald (P3M), Particle Mesh Ewald (PME), standard Ewald, and non-periodic methods, with the flexibility to calculate potentials beyond \(1/r\) electrostatics, including arbitrary order \(1/r^p\) potentials.
Optimized for both CPU and GPU devices, torch-pme is fully TorchScriptable, allowing it to be converted into a format that runs independently of Python, such as in C++, making it ideal for high-performance production environments.
For details, tutorials, and examples, please have a look at our documentation.
Installation
You can install torch-pme using pip with
git clone https://github.com/lab-cosmo/torch-pme
cd torch-pme
pip install .
You can then import torchpme and use it in your projects!
We also provide bindings to metatensor which can optionally be installed together and used as torchpme.metatensor via
pip install .[metatensor]
Having problems or ideas?
Having a problem with torch-pme? Please let us know by submitting an issue.
Submit new features or bug fixes through a pull request.
Reference
If you use torch-pme for your work, please read and cite our preprint available on arXiv.
@article{loche_fast_2024,
title = {Fast and Flexible Range-Separated Models for Atomistic Machine Learning},
author = {Loche, Philip and {Huguenin-Dumittan}, Kevin K. and Honarmand, Melika and Xu, Qianjun and Rumiantsev, Egor and How, Wei Bin and Langer, Marcel F. and Ceriotti, Michele},
year = {2024},
month = dec,
number = {arXiv:2412.03281},
eprint = {2412.03281},
primaryclass = {physics},
publisher = {arXiv},
doi = {10.48550/arXiv.2412.03281},
urldate = {2024-12-05},
archiveprefix = {arXiv}
}
Contributors
Thanks goes to all people that make torch-pme possible:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file torch_pme-0.1.0rc2.tar.gz.
File metadata
- Download URL: torch_pme-0.1.0rc2.tar.gz
- Upload date:
- Size: 39.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74714c264316427b7cf6c3e858a546b860bdb9eb5f2e8d4f20e604b261b23a5c
|
|
| MD5 |
748291eadcd86de0ddea082f4c2389b9
|
|
| BLAKE2b-256 |
d2d001e4a418d4f4b1692ef118a1050f193e755553646fd70960f22eb4a07fc6
|
Provenance
The following attestation bundles were made for torch_pme-0.1.0rc2.tar.gz:
Publisher:
build-release.yml on lab-cosmo/torch-pme
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_pme-0.1.0rc2.tar.gz -
Subject digest:
74714c264316427b7cf6c3e858a546b860bdb9eb5f2e8d4f20e604b261b23a5c - Sigstore transparency entry: 153622217
- Sigstore integration time:
-
Permalink:
lab-cosmo/torch-pme@ffc689c020fedfe2aaf192c8dd38d223f62d910d -
Branch / Tag:
refs/tags/v0.1.0-rc2 - Owner: https://github.com/lab-cosmo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-release.yml@ffc689c020fedfe2aaf192c8dd38d223f62d910d -
Trigger Event:
push
-
Statement type:
File details
Details for the file torch_pme-0.1.0rc2-py3-none-any.whl.
File metadata
- Download URL: torch_pme-0.1.0rc2-py3-none-any.whl
- Upload date:
- Size: 54.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be837e7922ddb4d58d209401c715e5e898a8db176f36fbb136e1157a634e2079
|
|
| MD5 |
7c586b3d4de9dad721a96e35f3dc4731
|
|
| BLAKE2b-256 |
3d1976d74212326a52c1367f87995134f70dbaf6bd81193d683750e0aad2ad86
|
Provenance
The following attestation bundles were made for torch_pme-0.1.0rc2-py3-none-any.whl:
Publisher:
build-release.yml on lab-cosmo/torch-pme
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_pme-0.1.0rc2-py3-none-any.whl -
Subject digest:
be837e7922ddb4d58d209401c715e5e898a8db176f36fbb136e1157a634e2079 - Sigstore transparency entry: 153622218
- Sigstore integration time:
-
Permalink:
lab-cosmo/torch-pme@ffc689c020fedfe2aaf192c8dd38d223f62d910d -
Branch / Tag:
refs/tags/v0.1.0-rc2 - Owner: https://github.com/lab-cosmo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-release.yml@ffc689c020fedfe2aaf192c8dd38d223f62d910d -
Trigger Event:
push
-
Statement type: