Skip to main content

pypotlib Contributor Covenant Builds Wheels

Python bindings and ASE adapters for potlib.

Details

The library consists of thin wrappers to potlib under cpot and a PyPotLibCalc class which is an ase calculator under ase_adapters.

Installation

This is on PyPI, with wheels, so usage is simply:

pip install pypotlib

Users are advised to not try to build from source, since the underlying potlib code includes fortran and cpp dependencies which can be slightly tricky to work with.

Local Development

The easiest way is to use the environment file, compatible with conda, mamba, micromamba etc.

mamba env create -f environment.yml
mamba activate rgpotpy
pdm install

Production

As such, due to the compiled extensions and what not, cibuildwheel is used to generate macos and linux wheels. Locally this may be emulated (on linux) by:

cibuildwheel --output-dir wheelhouse --platform linux

Usage examples

The simplest usage is just:

import pypotlib as ppl
import numpy as np
ljpot = ppl.cpot.LJPot()
pos = np.array([1, 2, 3, 1.2, 2.3, 3.6]).reshape(-1, 3)
atm_types = [0, 0]
cell_dim = np.eye(3)*50
print(ljpot(pos, atm_types, cell_dim))

For using the ASE calculator we need an instantiated class.

from ase import Atoms
from pypotlib import cpot
from pypotlib.ase_adapters import PyPotLibCalc
atoms = Atoms(symbols=['Cu', 'H'], positions=[[0, 0, 0], [0.5, 0.5, 0.5]])
calc = PyPotLibCalc(cpot.CuH2Pot())
atoms.set_calculator(calc)
print(atoms.get_potential_energy())
print(atoms.get_forces())

To run an NEB with this, consider the following toy example:

from ase import Atoms
from ase.neb import NEB
from ase.optimize import BFGS

from pypotlib import cpot
from pypotlib.ase_adapters import PyPotLibCalc

atoms_initial = Atoms(symbols=['H', 'H'], positions=[(0, 0, 0), (0, 0, 1)])
atoms_final = Atoms(symbols=['H', 'H'], positions=[(0, 0, 2), (0, 0, 3)])

images = [atoms_initial]
images += [atoms_initial.copy() for idx in range(3)]
images += [atoms_final]

for image in images:
    image.calc = PyPotLibCalc(cpot.LJPot())

neb = NEB(images)
neb.interpolate(method = 'idpp')
optimizer = BFGS(neb)
optimizer.run(fmax=0.04)

Contributions

All contributions are welcome, this includes code and documentation contributions but also questions or other clarifications. Note that we expect all contributors to follow our Code of Conduct.

License

MIT.

Metadata

Release files for pypotlib 0.0.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pypotlib 0.0.13
File Size Uploaded Provenance Actions
pypotlib-0.0.13.tar.gz 18.7 kB Without provenance Details for pypotlib-0.0.13.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pypotlib 0.0.13
File Actions
pypotlib-0.0.13-cp311-cp311-musllinux_1_1_x86_64.whl CPython 3.11 CPython 3.11 Linux musl 1.1+ x86-64 Details for pypotlib-0.0.13-cp311-cp311-musllinux_1_1_x86_64.whl
pypotlib-0.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for pypotlib-0.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pypotlib-0.0.13-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details for pypotlib-0.0.13-cp311-cp311-macosx_10_9_x86_64.whl
pypotlib-0.0.13-cp310-cp310-musllinux_1_1_x86_64.whl CPython 3.10 CPython 3.10 Linux musl 1.1+ x86-64 Details for pypotlib-0.0.13-cp310-cp310-musllinux_1_1_x86_64.whl
pypotlib-0.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for pypotlib-0.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pypotlib-0.0.13-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details for pypotlib-0.0.13-cp310-cp310-macosx_10_9_x86_64.whl
pypotlib-0.0.13-cp39-cp39-musllinux_1_1_x86_64.whl CPython 3.9 CPython 3.9 Linux musl 1.1+ x86-64 Details for pypotlib-0.0.13-cp39-cp39-musllinux_1_1_x86_64.whl
pypotlib-0.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for pypotlib-0.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pypotlib-0.0.13-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details for pypotlib-0.0.13-cp39-cp39-macosx_10_9_x86_64.whl
pypotlib-0.0.13-cp38-cp38-musllinux_1_1_x86_64.whl CPython 3.8 CPython 3.8 Linux musl 1.1+ x86-64 Details for pypotlib-0.0.13-cp38-cp38-musllinux_1_1_x86_64.whl
pypotlib-0.0.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details for pypotlib-0.0.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pypotlib-0.0.13-cp38-cp38-macosx_10_9_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.9+ x86-64 Details for pypotlib-0.0.13-cp38-cp38-macosx_10_9_x86_64.whl

Total release size: 39.1 MB

Release files / pypotlib-0.0.13.tar.gz

Download URL pypotlib-0.0.13.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
92aa4f689f122d8ee99fec17394c02d03517431b6152f0bedc297e7da036e737
BLAKE2b-256 checksum
How to use checksums
6f5969985be9c72e38bf544371bc0c1b0231bdc55b5a25705466455897d8816c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / pypotlib-0.0.13-cp311-cp311-musllinux_1_1_x86_64.whl

Download URL pypotlib-0.0.13-cp311-cp311-musllinux_1_1_x86_64.whl
Size 3.3 MB
Tags CPython 3.11 Linux musl 1.1+ x86-64
SHA-256 checksum
How to use checksums
31427128a4a05aedcf4275696aebdfa0853ba93b4c5ec9bd0aa5daa505547a61
BLAKE2b-256 checksum
How to use checksums
7e98db914042c9d6187ee70d57a00f218c13c059fe7f39043d56ba77a3c41f5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / pypotlib-0.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pypotlib-0.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.1 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
0dfca6236916d5c9a9e65931705822d7e56b5117071eb9a4c4174062203f6e80
BLAKE2b-256 checksum
How to use checksums
0313a2c12d4b43e747178709adb1f080f1cb184b99594cd533e3907811d1ecc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / pypotlib-0.0.13-cp311-cp311-macosx_10_9_x86_64.whl

Download URL pypotlib-0.0.13-cp311-cp311-macosx_10_9_x86_64.whl
Size 3.4 MB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
57cf11c47f866606f20e16bf3a225e1bb54094215980aea19e2591de689fe6a1
BLAKE2b-256 checksum
How to use checksums
c9d5237d3cfeb051e79ddd4e61784a8c3d7ea56513a6951a8c390a98c4f33ce0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / pypotlib-0.0.13-cp310-cp310-musllinux_1_1_x86_64.whl

Download URL pypotlib-0.0.13-cp310-cp310-musllinux_1_1_x86_64.whl
Size 3.3 MB
Tags CPython 3.10 Linux musl 1.1+ x86-64
SHA-256 checksum
How to use checksums
52863036928f364449577147fd55d18f354b5895f34578222b08714c4b99d3ec
BLAKE2b-256 checksum
How to use checksums
7d191aa306973c3a45521c6f099f4e5b130cc9357c7233c64c314f17dc0860bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / pypotlib-0.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pypotlib-0.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
7ae67abc91a20f22c9dd1f9f807da552c7509bf8fcf9ac9d69695805db8c3a35
BLAKE2b-256 checksum
How to use checksums
cdd803c9c69438f2e7db3bb2e8cb662d0ab0728e68ddd27886a51d83a8d3482a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / pypotlib-0.0.13-cp310-cp310-macosx_10_9_x86_64.whl

Download URL pypotlib-0.0.13-cp310-cp310-macosx_10_9_x86_64.whl
Size 3.4 MB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
ea5a1d1f5cb49efd6a8d3c6de7388da12d12f1b497e35210614669adc3286b0b
BLAKE2b-256 checksum
How to use checksums
9a0a05876dbb3b63f8913c849ded9d2562aa2cbaea2302244e2ba07271920b62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / pypotlib-0.0.13-cp39-cp39-musllinux_1_1_x86_64.whl

Download URL pypotlib-0.0.13-cp39-cp39-musllinux_1_1_x86_64.whl
Size 3.3 MB
Tags CPython 3.9 Linux musl 1.1+ x86-64
SHA-256 checksum
How to use checksums
86e8539d58617d9e53a995b43226bdafe0d10a1b9f1a128e186c19355449ba87
BLAKE2b-256 checksum
How to use checksums
43da336d4be39eced7ff765ec31bcfcc88316270fb66b460bd8806087c3c82a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / pypotlib-0.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pypotlib-0.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.1 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
91c858c9af172707ef8403a4605911a76c0c036633bce5fa0b8d4aa910686dd3
BLAKE2b-256 checksum
How to use checksums
f8a610a3edae3ec6039781c979b156edaae0c8384feb7dc74897e687cfc47c1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / pypotlib-0.0.13-cp39-cp39-macosx_10_9_x86_64.whl

Download URL pypotlib-0.0.13-cp39-cp39-macosx_10_9_x86_64.whl
Size 3.4 MB
Tags CPython 3.9 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
9daf5ed07df9064f9e669f69edfaa860e9f5c3ca1bccd523fc458372b247accb
BLAKE2b-256 checksum
How to use checksums
d9b1b2ff3cb8bd49952826ba4a2f0c1b88c66962436582954d3eefa84268b515
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / pypotlib-0.0.13-cp38-cp38-musllinux_1_1_x86_64.whl

Download URL pypotlib-0.0.13-cp38-cp38-musllinux_1_1_x86_64.whl
Size 3.3 MB
Tags CPython 3.8 Linux musl 1.1+ x86-64
SHA-256 checksum
How to use checksums
3608b37d5bdf07a290bf5b12a7ab80221e9a25a6eca8e0f900c899a4a05e361b
BLAKE2b-256 checksum
How to use checksums
4ced69ff66402a3e88d6a7ad247b1c77225d2a4bc177437cf07bde38f3f1d3e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / pypotlib-0.0.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pypotlib-0.0.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.1 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
de80211e3a6bcb33f69fcd64fae61f67633f88e8c0c7302849db1ce5327bf1e4
BLAKE2b-256 checksum
How to use checksums
93ba0d6bd5e035957eedb0e6c36f9b6dbc1008055f03d58d7a2083f0792c43c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / pypotlib-0.0.13-cp38-cp38-macosx_10_9_x86_64.whl

Download URL pypotlib-0.0.13-cp38-cp38-macosx_10_9_x86_64.whl
Size 3.4 MB
Tags CPython 3.8 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
cbc571b431100420e239b00d590bed3166fd3e882cc15dbe125bf0479793f492
BLAKE2b-256 checksum
How to use checksums
e9bf516bdc2a5ef7885efec5160f9eb1f0a2b5e5511ad555c72bfc301bbd6d63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Security for pypotlib 0.0.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page