CLI tool
rdk/p2rank avatar
rdk/p2rank

P2Rank scores surface points, and drops B-factor for AlphaFold

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

464 stars62 forksGroovyMIT

At a glance

What is it?
rdk's prank predicts ligand-binding sites by scoring and clustering points on a protein's solvent accessible surface, with no template database and no external feature computation. The configuration is Groovy, the default model reads B-factor as a feature, and a separate alphafold profile exists precisely because that assumption breaks on predicted and cryo-EM structures.
Who is it for?
Use P2Rank when you have a structure and need candidate pockets fast, with no template database to curate and no external feature tooling to install, because a single binary plus a Java runtime is the whole dependency list and the surface-point formulation is what makes it fast.
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 31 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 October 8, 2026, and from our analysis. They are not legal advice.

Editorial analysis

It scores surface points, not residues

The algorithm is short enough to state in full. P2Rank predicts by scoring and clustering points on the protein's solvent accessible surface, and the ligandability score of an individual point is decided by a machine learning model trained on a dataset of known protein-ligand complexes. Two consequences follow from that formulation. Because the unit of prediction is a point on a surface rather than a residue, the clustering step is what turns a scored point cloud into discrete pockets, which is why the output is a ranked list of pockets rather than a residue score map alone. And because the training signal is the set of known complexes rather than a lookup of them, the tool claims high prediction success rates without relying on external software for the computation of complex features or on a database of known protein-ligand templates. For a structure with no close relative in any template database, that is the difference between an answer and a refusal. The project points to conference slides introducing the original version of the algorithm, plus a set of papers, for the derivation behind the feature aggregation. The earliest of those is the conference paper introducing the prediction algorithm itself, in which the method is described as knowledge-based ligand binding site prediction using aggregated local features, and the last is a software article covering the tool as a whole. Both are cited with DOIs in the repository rather than described, which for a tool this size is a reasonable proxy for how seriously the method is documented.

The alphafold profile exists because B-factor stops meaning temperature

The single most consequential piece of configuration advice in this project is a warning about a feature, not a flag. The default model uses B-factor as a feature. That is meaningful for X-ray crystal structures, where the B-factor is a temperature factor derived from the model. It is not meaningful in the same way elsewhere: in AlphaFold models that column stores pLDDT confidence, and in cryo-EM structures it stores resolution-based values. Both are stored in the same field and both mean something entirely different from what the model was trained on. The fix is a configuration switch rather than a code path. Passing `-c alphafold` selects the AlphaFold configuration and model, and that configuration drops B-factor from the feature set entirely. The tip is explicit that this is for AlphaFold models, NMR ensembles and cryo-EM structures, so the same switch covers three cases that share a failure mode. Getting this wrong does not crash; it produces a plausible ranking built on a column whose units have quietly changed, which is the harder kind of mistake to notice.

One binary, no installer, and a Java runtime

There is no installation step, which is unusual for a scientific tool and is the reason this one is easy to try. Binary packages are published as GitHub releases, so the setup is download and run. The runtime requirement is Java 17 or later, and the project states it has been tested up to Java 26. Visualization is optional and comes from PyMOL or ChimeraX, with ChimeraX support arriving in version 2.5 alongside new visualization output. The tool runs on Linux, macOS and Windows, and the Windows caveat is specific enough to save you an afternoon: run it from Git Bash to avoid command-line formatting issues. That is a statement about shell quoting and path handling rather than about Windows support, since the package itself runs there. Datasets are not bundled with the tool; they live in a separate datasets repository, which keeps the binary small and lets you point the predictor at whatever collection you actually want to run.

Six input shapes, including two compressed ones

The invocation surface is a single subcommand, `predict`, and the interesting variation is in the input argument. A dataset file listing many structures is passed positionally, while a single structure takes the `-f` flag, and the format is inferred from the extension rather than declared. Plain PDB and mmCIF are both accepted, and so is BinaryCIF with the `.bcif` extension. Compressed inputs work too, with a gzipped PDB and a mmCIF compressed using Zstandard both taking flags, and the note that other formats can be compressed as well. Parallelism and output location are the two other knobs: a thread count for parallel dataset processing, and an explicit output directory when the default is not where you want the results. Help and version are available as their own invocations rather than as flags on `predict`, which is the layout of a tool that expects to be scripted rather than typed at interactively.

Rescoring is a second stage that reads other people's pockets

P2Rank treats rescoring as a distinct step with its own command, and its evolution is a good summary of how the tool matured. The original PRANK rescoring algorithm came from a separate research article, and the software article describes that work as now included in P2Rank. Version 2.5 brought improvements to rescoring and named the command, `fpocket-rescore`, which is the clearest signal that this stage is designed to consume another tool's output rather than only refine P2Rank's own. Version 2.4.2 extended that to rescoring fpocket predictions supplied in mmCIF format, on top of adding BinaryCIF input for prediction. The alpha release continues the trend by adding further supported methods for rescoring. The practical reading is that P2Rank positions itself as the prediction stage and treats fpocket as a peer whose pockets you can hand over, so comparing or combining the two is a supported workflow rather than an accident.

The alpha release exports descriptors, not just pockets

Version 2.6 is alpha and the label matters, but the feature list tells you what is changing and it is more than a version bump. Pocket-grid and per-pocket descriptor exports are the headline, which means the tool can emit the intermediate representations the model works with rather than only the final ranked pockets. That is the kind of addition that changes what you can do downstream, because descriptors are what you would need to train your own rescoring model on top of P2Rank instead of only consuming its answers. Two handling changes come with it. Cofactors can be treated as surface, which matters for metalloproteins where the metal sits in the pocket and the default treatment puts it somewhere unhelpful. And modified-to-canonical residue mapping is handled, so non-standard residue names no longer have to be resolved by hand before the structure is accepted. The same release substantially expands the documentation, with a new user guide covering installation, prediction, rescoring, configuration, performance tuning and troubleshooting in one place, plus topic-specific documents added alongside it.

The predictions CSV ships a calibrated probability next to the score

Output is two CSV files per structure, and their contents explain what the tool is actually measuring. The predictions file lists predicted pockets in order of score, and for each pocket it carries the score, the centre coordinates, the adjacent residues, the adjacent protein surface atoms, and a calibrated probability of being a ligand-binding site. That last field is the one to notice: the ordering is by raw score, while the probability is a separate calibrated statement, so the two can disagree and the file lets you check whether they do. Adjacency is given at two levels, residues and surface atoms, which is what makes the pockets usable downstream rather than just visualisable. A second file lists all residues from the input protein with their scores, mapping back to the predicted pockets, which is the format you want when you need a per-residue view instead of a per-pocket one. Version 2.5 also roughly halved prediction time, so the numbers in an older paper and the numbers you get now are not comparable.

Editorial conclusion

Use P2Rank when you have a structure and need candidate pockets fast, with no template database to curate and no external feature tooling to install, because a single binary plus a Java runtime is the whole dependency list and the surface-point formulation is what makes it fast. Do not use it if your structures are AlphaFold models, NMR ensembles or cryo-EM and you leave the default profile in place, because the default feature set assumes a B-factor column that means confidence or resolution rather than temperature factor. Three things to check before you run it. Which profile you are on, since `-c alphafold` is a configuration switch and not a heuristic. Whether you want the alpha release at all, since the descriptor exports and cofactor handling are new and the version is labelled alpha. And whether rescoring is part of your plan, because the second stage is designed to consume other tools' pocket predictions as well as P2Rank's own.

Frequently asked questions

how to use p2rank

Download a binary package from the GitHub releases, since P2Rank needs no installation, and run `prank predict -f test_data/1fbl.pdb` on a single structure. Positionally, `prank predict test.ds` runs over a dataset listing many files, `-threads 8` sets parallelism, `-o` chooses an output directory, and `prank help` and `prank -v` cover help and version.

What does P2Rank predict?

Ligand-binding sites on a protein structure. It scores and clusters points on the solvent accessible surface, and for each structure writes a predictions CSV listing pockets in score order with centre coordinates, adjacent residues, adjacent surface atoms and a calibrated probability, plus a residues CSV covering every input residue.

Does P2Rank need a template database or external feature software?

No. The stated design goal is high prediction success rates without relying on external software for the computation of complex features, or on a database of known protein-ligand templates. The ligandability model is trained on a dataset of known complexes but does not look them up at prediction time.

How do I run P2Rank on an AlphaFold model?

Pass `-c alphafold`, which selects the AlphaFold configuration and model. The default model uses B-factor as a feature, which is meaningful for X-ray structures but stores pLDDT confidence in AlphaFold models and resolution-based values in cryo-EM, so the alphafold configuration drops B-factor from the feature set.

What are the system requirements for P2Rank?

Java 17 or later, with the project tested up to Java 26. It runs on Linux, macOS and Windows, with the Windows advice being to run from Git Bash to avoid command-line formatting issues. PyMOL or ChimeraX is optional and only for visualisation.

Official sources

  1. Issues
  2. License: MIT
  3. rdk/p2rank on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/rdk-p2rank.svg)](https://hysenlabs.com/projects/rdk-p2rank)