Skip to main content

Fixes problems in PDB files

Project description

PDBFixer

CI Status PyPI Version Python Versions License: Apache-2.0 MkDocs Site neoralab Authors OpenMM Authors

PDBFixer

PDBFixer is a Python library for repairing and preparing Protein Data Bank (PDB) files before simulation. It focuses on an intuitive API that automates common cleanup steps so structures are ready for downstream workflows without manual editing.

This Neoralab-maintained fork builds on the original OpenMM release, extending the codebase with modern packaging, documentation, and interface updates reflected in the refreshed docs site.

Overview

PDBFixer can automatically:

  • Add missing heavy atoms and hydrogens.
  • Build missing loops.
  • Convert non-standard residues to standard equivalents.
  • Select a single position for atoms with alternate locations.
  • Remove unwanted chains or heterogens.
  • Build a water box for explicit solvent simulations.

Refer to the MkDocs site for detailed usage guidance, API notes, and examples.

Documentation

Improvements over the OpenMM fork

  • Published on PyPI as pdbfixer-neoralab with support for Python 3.11 and newer.
  • Modernized packaging via pyproject.toml and versioningit, keeping releases in sync with Git tags.
  • Distributed purely as a Python API, removing the legacy web and command-line interfaces to focus on library usability.

Installation

PyPI or uv

Install with pip or uv (Python 3.11+):

pip install pdbfixer-neoralab
uv pip install pdbfixer-neoralab

Conda

Install from conda-forge:

conda install -c conda-forge pdbfixer

From source

Clone the repository and follow the documentation for source installation details.

Optional extras

PDBFixer defines extras for common contributor workflows that match the entries in pyproject.toml:

  • Tests: pip install -e .[tests]
  • Documentation: pip install -e .[docs]

Versioning

PDBFixer uses versioningit to derive its version from Git tags. Building from a source checkout therefore requires either a cloned repository with Git metadata or a source distribution that already includes the generated version. When no tag information is available, the default reported version is 0+unknown. To preview the build version:

python -m versioningit

Quickstart

PDBFixer is distributed purely as a Python API. Use it directly from your code:

from pdbfixer import PDBFixer
from openmm.app import PDBFile

fixer = PDBFixer(filename="input.pdb")
fixer.findMissingResidues()
fixer.findMissingAtoms()
fixer.addMissingAtoms()
fixer.addMissingHydrogens(pH=7.0)

with open("fixed.pdb", "w") as handle:
    PDBFile.writeFile(fixer.topology, fixer.positions, handle)

For more examples—mutations, solvation, and template registration—see the MkDocs site or the source files under docs/.

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

pdbfixer_neoralab-1.1.0.tar.gz (59.6 kB view details)

Uploaded Source

Built Distribution

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

pdbfixer_neoralab-1.1.0-py3-none-any.whl (61.3 kB view details)

Uploaded Python 3

File details

Details for the file pdbfixer_neoralab-1.1.0.tar.gz.

File metadata

  • Download URL: pdbfixer_neoralab-1.1.0.tar.gz
  • Upload date:
  • Size: 59.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for pdbfixer_neoralab-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c951fbda958ad6d30bc8650ed33de95869f4d99654023e8e8af45ce7cd69ce1f
MD5 a4c7c0607d741e4e714b7a74e7733e63
BLAKE2b-256 20b251d449e0b4c49700e28d4fe06e0fcf076222bb6b33c67e740d430a9e7e79

See more details on using hashes here.

File details

Details for the file pdbfixer_neoralab-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pdbfixer_neoralab-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9b3a5bbdeb5c73d0ac50132f9b9fe1de69ff9929324218bd014366d6b30873c
MD5 d23d8d1529f883fd4972ca5abc9a0078
BLAKE2b-256 d5e4838f8d30e97ac72041331584df0da929000f400ea962dc0faa3e4eff79a9

See more details on using hashes here.

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