CLI tool
rdk/p2rank avatar
rdk/p2rank

P2Rank: binding-site prediction without templates or external feature tools

P2Rank: Protein-ligand binding site prediction from protein structure based on machine learning.

459 stars62 forksGroovyMIT

At a glance

What is it?
P2Rank is a Java command-line predictor that scores points on a protein's solvent accessible surface with a trained model, then clusters the high-scoring ones into pockets. It is aimed at structural bioinformatics and virtual screening work where you have a structure and want ranked candidate sites.
Who is it for?
Adopt P2Rank if you already have protein structures in PDB, mmCIF or BinaryCIF form and want ranked pocket candidates without maintaining a template database or installing a feature-computation stack. Do not adopt it if you need binding affinity, pose prediction, or per-residue contact maps; it returns ranked pockets, not binding constants.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 5 days ago.
What is it written in?
Mainly Groovy, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The gap P2Rank fills: pockets from structure alone

Most structure-based screening pipelines start with a question that the structure itself does not answer: where on this surface would a small molecule actually sit? Template-matching tools answer it by looking up similar holo structures, which means their coverage is bounded by what has already been crystallised. Tools that compute geometric or energetic descriptors answer it directly but often pull in external software to do so. P2Rank's stated position, in the README, is that it achieves high prediction success rates "without relying on external software for computation of complex features or on a database of known protein-ligand templates." That is the whole pitch, and it is a narrow one. The output is a ranked list of pockets with scores, not docked poses and not affinities. The audience is people who have a structure and need candidate sites to feed into docking, mutagenesis design, or visual inspection: structural bioinformatics groups, early drug-discovery teams, and anyone running a web-server style prediction locally. The related PrankWeb server at prankweb.cz covers the same ground through a browser, so the command-line tool is for people who want the run on their own machine, in batch, or inside a larger pipeline.

Scoring points on the solvent accessible surface, then clustering them

The README's algorithm section is short but specific: P2Rank scores and clusters points on the protein's solvent accessible surface, and the ligandability score of each individual point comes from a machine learning model trained on a dataset of known protein-ligand complexes. So the unit of prediction is not a residue, a grid box, or a cavity, it is a surface point. Points that the model rates as ligandable are then grouped, and each group becomes a pocket with an aggregate score. Two consequences follow from that design. First, the method is template-free by construction, because nothing in the pipeline queries a database of holo structures; the model's knowledge is baked into its weights at training time. Second, the pocket boundaries are a product of clustering rather than of a cavity-detection geometry, which is why the tool can report sites on shallow or open surfaces that a purely geometric pocket finder would miss. The README also notes that the original algorithm was introduced in a 2015 conference paper, with the software article following in the Journal of Cheminformatics in 2018, and that a separate PRANK rescoring algorithm from 2015 is now included in P2Rank. That rescoring path is exposed as a command, so the project carries two ideas, not one.

Running it: prank predict, datasets, and the -c alphafold profile

P2Rank requires no installation step. Binary packages ship as GitHub Releases, and the runtime requirement is Java 17 or later, tested up to Java 26, on Linux, macOS and Windows. On Windows the README says to run from Git Bash to avoid command-line formatting issues. Commands are executed from the installation directory. The core invocation is prank predict -f test_data/1fbl.pdb for a single file, or prank predict test.ds for a dataset listing several structures. Input formats handled by the predict command include .pdb, .cif, .bcif, and compressed variants such as .pdb.gz and .cif.zst. Useful flags shown in the README are -threads 8 to set the number of working threads for dataset processing and -o output_here to name the output directory explicitly. The one configuration switch that matters most is -c alphafold, which loads config/alphafold.groovy. The README's tip is explicit that this profile is for AlphaFold models, NMR ensembles and cryo-EM structures, and it notes that the default model uses B-factor as a feature, which is the reason a separate profile exists at all: predicted or ensemble structures do not carry the same B-factor signal as a well-refined crystal structure. prank help and prank -v print help and version information respectively.

Rescoring someone else's pockets, and what 2.5 and 2.6 add

P2Rank is not only a predictor. The release notes describe a rescoring path that takes pockets produced elsewhere and re-ranks them: version 2.5 improved the fpocket-rescore command, and 2.4.2 added rescoring of fpocket predictions in .cif format. That is a different use of the same trained model, and it is worth separating from prediction when you evaluate the tool, because rescoring quality depends on the pocket definitions you feed in. Version 2.4 added mmCIF input plus a profile for predictions on AlphaFold models and NMR/cryo-EM structures. Version 2.5 reports speed optimizations described as roughly 2x faster prediction, along with ChimeraX visualizations. The current alpha, 2.6-alpha, lists pocket-grid and per-pocket descriptor exports, cofactor-as-surface handling, modified-to-canonical residue mapping, and additional supported methods for rescoring. Those 2.6 items are alpha, and the release is labelled as such, so treat the descriptor exports and cofactor handling as moving targets until a stable 2.6 lands. The stable line at the time of writing is 2.5.1, released in August 2025.

Where P2Rank is the wrong tool

Three boundaries are worth stating plainly. The output is ranked pockets with scores, and the README never claims affinity, residence time, or pose accuracy; if your question is how tightly something binds, this tool does not answer it. Second, the model is trained on known protein-ligand complexes, so performance on targets that are poorly represented in that training distribution is an open question, and nothing in the supplied material quantifies it. Third, the default configuration uses B-factor as a feature, which is a real failure mode for structures where B-factors are missing, uniform, or predicted rather than experimental. The README handles this with the alphafold profile rather than by making the default adaptive, so if you feed a predicted model through the default config you are using a feature that carries no useful signal. The project is written primarily in Groovy and runs on the JVM, so embedding it in a Python pipeline means shelling out to the prank script rather than importing a library. There is no Python API described in the material. If your pipeline is Python-native and you want in-process calls, that mismatch is a genuine cost.

The alternative: template-based pocket transfer

The obvious comparison is a template-based approach, where you align your query structure to holo structures of related proteins and transfer the bound ligand's location as the predicted site. The difference in approach is fundamental rather than incremental. Template transfer gives you a site that is, by construction, a real observed binding location, which is easy to interpret and easy to justify in a paper. Its coverage collapses when no suitable holo template exists, which is exactly the case for many predicted models and for protein families with little structural characterisation. P2Rank inverts the trade: it will produce ranked pockets for any structure you hand it, including an AlphaFold model, but each pocket is a model output rather than a transferred observation. For a target with a close holo template, template transfer is the more defensible answer and P2Rank adds little. For a target without one, P2Rank is the only one of the two that produces anything at all. The rescoring commands matter here too: if you already run fpocket, you can keep that pocket definition and use P2Rank only to re-rank, which is a lower-commitment way to try the model.

Licence, maintenance, and the cost of upgrading

P2Rank is MIT licensed, which is permissive and places few obligations on how you redistribute or embed it. The usual caveat applies: the MIT text governs the code, and the trained model weights and any bundled data may carry their own terms, so check the repository before shipping a derived product. This is not legal advice. On maintenance, the project is active rather than archived, with a last push in August 2026 and a release cadence of roughly one stable release per year (2.5 in November 2024, 2.5.1 in August 2025) plus alphas in between. The upgrade cost is low in the ordinary case, because there is no installation and no service to migrate: you replace the release directory and re-run your commands. The cost that is not zero is behavioural. Version 2.5 changed prediction speed and rescoring, 2.4 changed input handling and added a model profile, and 2.6-alpha changes cofactor handling and residue mapping. If your downstream analysis parses pocket output or depends on how modified residues are treated, pin a release and re-check your parsing when you move. The project also maintains a separate datasets repository, which is where the training and evaluation data live if you need to understand what the model saw.

Editorial conclusion

Adopt P2Rank if you already have protein structures in PDB, mmCIF or BinaryCIF form and want ranked pocket candidates without maintaining a template database or installing a feature-computation stack. Do not adopt it if you need binding affinity, pose prediction, or per-residue contact maps; it returns ranked pockets, not binding constants. Before you commit, run prank predict -f on one structure from your own target class, check the pocket ranking against a known site, and confirm that the config you want (alphafold for models, NMR and cryo-EM) actually improves that case.

Official sources

  1. Issues
  2. License: MIT
  3. rdk/p2rank on GitHub
  4. README
  5. Releases
Community notes

Community notes