Skip to main content

AtomPacker

PyPI - Version PyPI - Python Version PyPI - Downloads GitHub Workflow Status GitHub

A Python package for packing nanoclusters into supramolecular cages.

See also:

Installation

To install the latest release on PyPI, run:

pip install AtomPacker

Or, to install the development version, run:

pip install git+https://github.com/cnpem/AtomPacker.git

Usage

Packing nanoparticle atoms, based on ASE nanocluster, and filter atoms inside a target cavity.

>>> from AtomPacker import Cage
# 1: Load structure from file
>>> cage = Cage()
>>> cage.load("tests/data/ZOCXOH.pdb")
# Uncomment to preview the cage structure.
>>> # cage.preview()
# 2: Detect cavity
>>> cage.detect_cavity(step=0.6, probe_in=1.4, probe_out=10.0, removal_distance=1.0, volume_cutoff=5.0)
# Uncomment to preview the cavity structure for detection quality control.
>>> # cage.cavity.preview()
# Show volume
>>> print(f"Cavity volume: {cage.cavity.volume} A^3")
# Uncomment to save the cavity structure.
>>> # cage.cavity.save("tests/cavity.pdb")
# 3: Detect openings in the cavity
>>> cage.cavity.detect_openings()
# Show openings areas
>>> print(f"Openings areas: {cage.cavity.openings.areas}")
# Show openings diameters
>>> print(f"Openings diameters: {cage.cavity.openings.diameters}")
# Uncomment to preview the openings structure for detection quality control.
>>> # cage.cavity.openings.preview()
# Uncomment to save the openings structure.
>>> # cage.cavity.openings.save("tests/openings.pdb")
# 4: Pack nanocluster into the cavity
>>> cage.pack(atom_type="Au", lattice_type="fcc", a=None, b=None, c=None)
# Optional: allow a small host-guest overlap (Å) to mimic cage flexibility
>>> # cage.pack(atom_type="Au", lattice_type="fcc", clash_tolerance=0.5)
# Uncomment to preview the cluster structure for quality control.
>>> # cage.cluster.preview()
# Uncomment to save the cluster structure.
>>> # cage.cluster.save("tests/cluster.pdb")
# Uncomment to preview the cage, cavity, openings and cluster structures.
>>> # cage.preview(show_cavity=True, show_cluster=True, show_openings=True)
# Show optimization details
>>> print(cage.cluster.number_of_atoms)
# Show summary
>>> print(cage.cluster.summary)

Citing

If you find AtomPacker useful for you, please cite the following references:

  • Guerra, J. V. S., Ribeiro-Filho, H. V., Jara, G. E., Bortot, L. O., Pereira, J. G. C., & Lopes-de-Oliveira, P. S. (2021). pyKVFinder: an efficient and integrable Python package for biomolecular cavity detection and characterization in data science. BMC bioinformatics, 22(1), 607. https://doi.org/10.1186/s12859-021-04519-4.

  • (manuscript in preparation) Guerra, J. V. S., Jara, G. E., Hokama, R. H., Bourissou, D. & Szalóki, G. (2026) Modellization of Confined Nanoparticles with AtomPacker.

License

The software is licensed under the terms of the GNU General Public License version 3 (GPL3) and is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Metadata

Release files for AtomPacker 0.7.0

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

Source distribution (sdist)

Source distribution for AtomPacker 0.7.0
File Size Uploaded Provenance Actions
atompacker-0.7.0.tar.gz 43.2 kB Without provenance Details for atompacker-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for AtomPacker 0.7.0
File Interpreter ABI Platform Actions
atompacker-0.7.0-py3-none-any.whl Python 3 none any Details for atompacker-0.7.0-py3-none-any.whl

Total release size: 91.9 kB

Release files / atompacker-0.7.0.tar.gz

Download URL atompacker-0.7.0.tar.gz
Size 43.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d4788f0d6d7431a20bc050d429171fcb5ecbc3ba9a03656fbc8594c474eaacb3
BLAKE2b-256 checksum
How to use checksums
24e0f2df49865420a1671fa9dbe0e68a6dc09e383ea048df635c306114fbc303
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / atompacker-0.7.0-py3-none-any.whl

Download URL atompacker-0.7.0-py3-none-any.whl
Size 48.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d5b187ac74b6e52416d65c7de1782715affa16ea5d724bde30e9e847cb24ab4
BLAKE2b-256 checksum
How to use checksums
561d0574c52a1951a3684a240dafd38764993fd1976177d46eccdca4b82f70f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for AtomPacker 0.7.0

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