Skip to main content

MolPACD

MolPACD is the Molecular Pore Aperture Cap Designer. It designs, adds, analyzes, and removes molecular aperture caps in protein structures.

The first implementation is derived from the MemGen beta-barrel water-cap script, but generalizes the workflow for PDB and mmCIF structures with configurable axes, cap identity, and cap removal metadata.

Install

From PyPI:

python -m pip install molpacd

From a local checkout:

python -m pip install .

For development:

python -m pip install -e ".[dev]"

With Conda, keep the environment local to the checkout:

conda env create -p .conda/molpacd-dev -f environment-dev.yml
conda run -p .conda/molpacd-dev python -m nox -s lint format mypy tests-3.13 build

Common development tasks are also available through make:

make env
make check

For documentation work:

make docs-deps
make docs-serve

CLI

Analyze candidate apertures:

molpacd analyze input.pdb --json

Add caps to both apertures:

molpacd add input.pdb -o capped.pdb

Use a membrane-oriented z-axis and a fixed cap residue name:

molpacd add input.pdb -o capped.pdb --axis z --resname DUM

Use each aperture's inferred radius instead of sharing the larger radius:

molpacd add input.pdb -o capped.pdb --axis z --independent-radius

Remove MolPACD-generated caps:

molpacd remove capped.pdb -o decapped.pdb

Remove matching caps from a file without MolPACD metadata:

molpacd remove capped.pdb -o decapped.pdb --resname DUM --chain Z --force

MolPACD writes cap provenance metadata and uses it during removal so matching non-cap atoms are not removed accidentally. If metadata is absent, or if you override metadata values such as residue name, chain, or atom name, removal requires --force.

Format Notes

MolPACD reads PDB and mmCIF files and writes minimal PDB/mmCIF outputs focused on atom records plus MolPACD metadata. It preserves PDB header lines before the coordinate section, but it does not attempt to reproduce every original record or mmCIF category. Multi-model structures are not supported for analysis or cap addition; split those structures into single-model inputs before running MolPACD.

Library

from pathlib import Path

from molpacd import CapOptions, add_caps, read_structure, write_structure

structure = read_structure(Path("input.pdb"))
capped, result = add_caps(structure, CapOptions(axis="z", resname="DUM"))
write_structure(capped, Path("capped.pdb"))

print(result.resname, result.added_count)

Development Checks

python -m nox

The nox sessions run tests, linting, formatting checks, type checks, and package build validation. GitHub Actions runs the same checks on pushes and pull requests.

Documentation

The project documentation is built with MkDocs:

make docs

Download files

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

Source Distribution

molpacd-0.2.0.tar.gz (72.5 kB view details)

Uploaded Source

Built Distribution

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

molpacd-0.2.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file molpacd-0.2.0.tar.gz.

File metadata

  • Download URL: molpacd-0.2.0.tar.gz
  • Upload date:
  • Size: 72.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for molpacd-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f04cdb372c8afa389663b1586fea2b75fe1d752f4192f276c4061ecbdd219000
MD5 225b704343f6d9dac518e34cc5a722a5
BLAKE2b-256 7bd96948e1f5d1af42dbea48bc05cbe0e3697d886289dabbeb7e688ff5762021

See more details on using hashes here.

Provenance

The following attestation bundles were made for molpacd-0.2.0.tar.gz:

Publisher: publish.yml on BlankenbergLab/molpacd

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

File details

Details for the file molpacd-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: molpacd-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for molpacd-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dbdf9bbe9e6c932cb11a2976a6bf5aba6d934e3c405deef70e2a2e93d5ff90d0
MD5 f754e9d523a15bc3e20aa012aa285202
BLAKE2b-256 02dfd465b9f11dc23ad5ac46cbe8bbf0f6008d4b49ecdded4eb1e38fab55c1ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for molpacd-0.2.0-py3-none-any.whl:

Publisher: publish.yml on BlankenbergLab/molpacd

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

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

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