Skip to main content

Particle-mesh based calculations of long-range interactions in PyTorch

Project description

docs/src/logo/torch-pme.svg

Github Actions Tests Job Status Code coverage Documentation

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:

https://contrib.rocks/image?repo=lab-cosmo/torch-pme

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torch_pme-0.1.0rc3.tar.gz (39.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torch_pme-0.1.0rc3-py3-none-any.whl (54.5 kB view details)

Uploaded Python 3

File details

Details for the file torch_pme-0.1.0rc3.tar.gz.

File metadata

  • Download URL: torch_pme-0.1.0rc3.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

Hashes for torch_pme-0.1.0rc3.tar.gz
Algorithm Hash digest
SHA256 7735dbd301c3ffcf72f1dc5c0ba525abb88df7aaea945de8f8b49490802dc98b
MD5 4e425cf9c33e8a5d57af5c76784301ed
BLAKE2b-256 8313a2090dbafbf6de357ede5cf13ea9b36f03d83ca483fdd231f40aef70a9e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_pme-0.1.0rc3.tar.gz:

Publisher: build-release.yml on lab-cosmo/torch-pme

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_pme-0.1.0rc3-py3-none-any.whl.

File metadata

  • Download URL: torch_pme-0.1.0rc3-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

Hashes for torch_pme-0.1.0rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 9fa925cb20de7b836e347816b9a5f3dc07e747023619826d86aab23debff8f99
MD5 931e5318cbc58bf2900dde37b278326e
BLAKE2b-256 363f61e2b49b9a8ad3b3126a776ea64773d9adace77a6bd3293221c7de92da39

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_pme-0.1.0rc3-py3-none-any.whl:

Publisher: build-release.yml on lab-cosmo/torch-pme

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page