Skip to main content

PocketMapper

PocketMapper is a command-line tool to compare the binding surfaces of protein-protein interactions. Give it two pockets, or a pocket and a set of targets, and it reports which residues the surfaces share, how well those residues are conserved, and how closely the pockets superpose.

Status: early development. Output names and locations may change between releases.

Installation

PocketMapper supports Python 3.10 to 3.14 and is published on PyPI.

pip install pocketmapper

Foldseek

Foldseek is the default aligner. It is a fast structural alignment tool that PocketMapper uses to align the query and target chains. Binaries are available at https://dev.mmseqs.com/foldseek/ or you can install it via conda or Homebrew:

# With conda
conda install -c conda-forge -c bioconda foldseek

# Or with Homebrew
brew tap brewsci/bio
brew trust brewsci/bio
brew install foldseek

To run without it, you must pass --aligner seq, which uses a built-in BLOSUM62 sequence aligner instead. Searching a Foldseek database target (human_domains, pdb) requires Foldseek.

Quick start

pocketmapper search 4Q5J:B_F 4Q5J:A_E --results_dir ./out

This compares the PISA interface of chain B against chain F of PDB entry 4Q5J with the interface of chain A against chain E. The main results in ./out:

File Contents
pocket_comparison.tsv One row per pocket pair: shared residues, overlap scores, RMSD.
alignment.tsv The chain alignments the comparison is built on.
aligned_structures/ The top targets superposed onto each query, as PDB files.

Downloads are cached in pocketmapper_cache/, so a second run over the same structures is fast. See Outputs for more details.

How it works

search runs six steps:

  1. parse: reads the query and target entries and decides how each pocket is derived.
  2. fetch_structures: downloads the mmCIF files (or AlphaFold models) it needs.
  3. align: aligns the query and target chains with Foldseek or the sequence aligner.
  4. pockets: gets the pocket residues from PDBe PISA, van der Waals contacts, or your list.
  5. compare: maps both pockets onto the alignment and scores their overlap.
  6. superpose: writes the top targets superposed onto each query.

Each step is also a command of its own, so you can run, inspect and rerun steps one at a time. See Running one step at a time.

Specifying entries

Each query and target uses the format:

STRUCTURE[:CHAIN[:RESIDUES]]

Queries automatically resolve to a pocket method based on the structure type, chain(s) and residues.

Example Structure Pocket Details
4Q5J:B_F PDB PISA Interface of chain B against chain F from PDBe PISA
4Q5J:A:10,11,12 PDB passthrough The listed residues, on chain A
P04637:A:10,11,12 AlphaFold passthrough The listed residues, on chain A
4Q5J:B PDB whole_chain Open search: the whole of chain B
path/to/model.cif Local file whole_chain Open search: defaults to chain A
human_domains Foldseek database whole_chain Open search against a bundled database of human domains
pdb Foldseek database pisa Interfaces from PDBe PISA

To compare many entries, pass a file with one entry per line instead. Every query is compared against every target.

The full rules (which methods each structure type allows, residue checks, and what the Foldseek databases return) are in Entries and targets.

If a target pocket specifies a subset of residues (any method other than whole_chain), PocketMapper performs a closed search. Otherwise, it performs an open search. Closed searches directly compare the query and target pockets, while open searches compare the query pocket against the region of the target which aligns to the pocket.

Examples

# One pair, aligned with Foldseek
pocketmapper search 4Q5J:B_F 4Q5J:A_E --results_dir ./out_fs

# The same pair with the built-in sequence aligner (no Foldseek needed)
pocketmapper search 4Q5J:B_F 4Q5J:A_E --aligner seq --results_dir ./out_local

# Open search: is this pocket anywhere on chain A of 4Q5J?
pocketmapper search 4Q5J:B_F 4Q5J:A --results_dir ./out_open

# Search the bundled Foldseek database of human domains
pocketmapper search 4Q5J:B_F human_domains --results_dir ./out_hd

# Batch mode: one entry per line, settings from a job file
pocketmapper search queries.txt targets.txt --job_file job.json

Run pocketmapper search --help for the full option list.

Documentation

  • Command-line reference: every option, the step commands, job files and the choice of aligner.
  • Entries and targets: the entry format, pocket methods, open vs closed search, and Foldseek databases.
  • Outputs: every result file, the cache, and every pocket_comparison.tsv column.
  • Python library: calling PocketMapper from Python.

Contact / Authors

PocketMapper is developed by Lachlan Ellingboe (Lachlan.Ellingboe@icr.ac.uk).

Source, issues and feature requests: https://github.com/lellingboe/pocketmapper

Metadata

Release files for pocketmapper 0.3.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 pocketmapper 0.3.0
File Size Uploaded Provenance Actions
pocketmapper-0.3.0.tar.gz 57.1 MB Without provenance Details for pocketmapper-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 114.3 MB

Release files / pocketmapper-0.3.0.tar.gz

Download URL pocketmapper-0.3.0.tar.gz
Size 57.1 MB
Tags Source
SHA-256 checksum
How to use checksums
98f806f3f5d94ede3daebbbced7bb7fe10469d64ca0785ad07debac778d89119
BLAKE2b-256 checksum
How to use checksums
b914da556e8ef50210fa4f004d99582e095bb30936998bae242408ad2383c7b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / pocketmapper-0.3.0-py3-none-any.whl

Download URL pocketmapper-0.3.0-py3-none-any.whl
Size 57.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0dcc6773267d83b8af766cdc5cb45b40afec6c3697d9e8cd288450d4095d6668
BLAKE2b-256 checksum
How to use checksums
340c3cbd02a5b7543e76c3f4df5d43572cd1f91be97f48049c931a5a50a4233c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for pocketmapper 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.

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