Skip to main content

PDBFixer

CI Status PyPI Version Python Versions License: MIT 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.

Fork notice

This repository is a fork of openmm/pdbfixer. The upstream project is available under the MIT License, and its original copyrights and notices are preserved in this fork. This fork contains additional modifications maintained by neoralab and contributors.

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/.

Metadata

Release files for pdbfixer-neoralab 1.1.1

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

Source distribution (sdist)

Source distribution for pdbfixer-neoralab 1.1.1
File Size Uploaded
pdbfixer_neoralab-1.1.1.tar.gz 53.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pdbfixer-neoralab 1.1.1
File Interpreter ABI Platform
pdbfixer_neoralab-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 108.1 kB

Release files / pdbfixer_neoralab-1.1.1.tar.gz

Download URL pdbfixer_neoralab-1.1.1.tar.gz
Size 53.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fe0c15daadc6374b38b321d70e75513198fe44aa2a32c44e0383ed82400888d4
BLAKE2b-256 checksum
How to use checksums
de093bc3cf36db519522c9a1589775b0bdd1478e056b2db1ad1d3d950ef7e53f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / pdbfixer_neoralab-1.1.1-py3-none-any.whl

Download URL pdbfixer_neoralab-1.1.1-py3-none-any.whl
Size 55.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8820af1c8ce5e092054d698a51a282d957539c465574b1b6d2b16850fb95b78
BLAKE2b-256 checksum
How to use checksums
c1e96ed54e887fabef84b216d4a7eb357ab6a20e11e354c82d2da2d117e0ec5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.4

2 release 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