MolPACD
MolPACD is the Molecular Pore Aperture Cap Designer. It designs, adds, analyzes, and removes molecular aperture caps in protein structures, and removes lipids packed inside protein cavities.
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.
Remove lipids packed inside a protein cavity (e.g. by packmol-memgen inside a beta barrel interior):
molpacd remove-lipids packed.pdb -o cleaned.pdb
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
Metadata
Release files for molpacd 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| molpacd-0.3.0.tar.gz | 86.1 kB | With provenance | Details for molpacd-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| molpacd-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for molpacd-0.3.0-py3-none-any.whl |
Total release size: 113.6 kB
Release files / molpacd-0.3.0.tar.gz
| Download URL | molpacd-0.3.0.tar.gz |
|---|---|
| Size | 86.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82408e123905790d3630f93040e66dcfa6210eaadcf2be3adc718354bd3af081
|
|
BLAKE2b-256 checksum How to use checksums |
1666b34fe65f9e3557fd991905399de6b5a5f60686bb95ee26acc9f5e421f70d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logRelease files / molpacd-0.3.0-py3-none-any.whl
| Download URL | molpacd-0.3.0-py3-none-any.whl |
|---|---|
| Size | 27.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f036cada5c20c9d9c3c60101a9ceaa5df00bd18c1c6e8a5b0469a42d49e607bf
|
|
BLAKE2b-256 checksum How to use checksums |
c3478f47bfb9b73d4f7010e8753035132a1c6e6ad075673a383ceff55966dc07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logSecurity for molpacd 0.3.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for molpacd-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logA 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.