Skip to Content


Bioinformatics & Cheminformatics
One line description: 
Protein-Ligand binding site prediction
P2Rank is a machine learning based method for prediction of ligand binding sites from protein structure. P2Rank uses Random Forests classifier to infer ligandability of local chemical neighborhoods near the protein surface which are represented by specific near-surface points and described by aggregating physico-chemical features projected on those points from neighboring protein atoms. The points with high predicted ligandability are clustered and ranked to obtain the resulting list of binding site predictions. P2Rank is freely available at



P2Rank is a stand-alone command line program that predicts ligand binding pockets from a protein structure. It achieves high prediction success rates without relying on an external software for computation of complex features or on a database of known protein-ligand templates.
P2Rank makes predictions by scoring and clustering points on the protein's solvent accessible surface. Ligandability score of individual points is determined by a machine learning based model trained on the dataset of known protein-ligand complexes. For more details see slides and publications.



p2rank_2.0.1 (109MB)
(stand-alone, platform independent binary package, requires Java 1.8 or newer)

Check out GitHub release page for the latest development releases.


Source code and documentation is available on GitHub:


If you use P2Rank, please cite relevant papers:

  • Software article in JChem about P2Rank pocket prediction tool: Krivák R, Hoksza D. P2Rank: machine learning based tool for rapid and accurate prediction of ligand binding sites from protein structure. Journal of cheminformatics. 2018 Aug.
  • Conference paper inroducing P2Rank prediction algorithm: Krivák R, Hoksza D. P2RANK: Knowledge-Based Ligand Binding Site Prediction Using Aggregated Local Features. International Conference on Algorithms for Computational Biology 2015 Aug 4 (pp. 41-52). Springer, Cham.
  • Research article in JChem about PRANK rescoring algorithm: Krivák R, Hoksza D. Improving protein-ligand binding site prediction accuracy by classification of inner pocket points using local features. Journal of cheminformatics. 2015 Dec;7(1):12.


We would be happy to hear about your use cases, experiences and ideas/feature requests. Either raise an issue on GitHub issue tracker or get in touch by mail. Please address any correspondence to both (rkrivak [at] and (david.hoksza [at]





   prank <command> <dataset.ds> [options]


   predict      ... predict pockets (P2RANK)

   eval-predict ... evaluate model on a dataset with known ligands

   rescore      ... rescore previously detected pockets (PRANK)

   eval-rescore ... evaluate rescoring model on a dataset with known ligands


      Dataset files for prediction should contain list of pdb files.
      Dataset files for rescoring should contain list of protein files
      that are outputs of one of the supported pocket prediction methods
      (fpocket, ConCavity). In datasets for evaluation and training they
      must be paired with liganated-proteins (correct solutions).
      See example datasets in test_data/ directory.


   -f <path>   run on single pdb file instead of a dataset

   -c <path>   use configuration file that overrides default configuration
               in config/default.groovy, path relative to config/ directory

   -m <path>   use previously trained classifier file relative to models/ directory
               default: models/default.model

   -o <path>   specify output directory (relative to working dir)
               default: test_output/<comamnd>_<dataset>

other parameters:

   -threads <int>         number of execution threads
                          dafault: num. of processors + 1

   -visualizations <0/1>  produce PyMOL visualizations
                          default: true

   -<param> <value>       for full list of parameters see config/default.groovy


More usage examples

# Print help:

prank help

# Ligand binding site prediction (P2RANK algorithm):

prank predict test.ds                                  # run on whole dataset (list of pdb files)
prank predict -f test_data/liganated/1aaxa.pdb         # run on individual pdb file
prank predict test.ds     -o output_here               # explicitly specify output directory

prank predict -threads 8          test.ds              # specify no. of working threads for parallel processing
prank predict -c predict2.groovy  test.ds              # specify configuration file (predict2.groovy uses different
                                                         prediction model and combination of parameters)

# Evaluate model for pocket prediction:

prank eval-predict test.ds
prank eval-predict -f test_data/liganated/1aaxa.pdb

# Prediction output notes:
#   For each file in the dataset program produces a CSV file in the output directory named 
#   <pdb_file_name>_predictions.csv, which contains an ordered list of predicted pockets, their scores, coordinates 
#   of their centroids and list of PDBSerials of adjacent amino acids and solvent exposed atoms.
#   If coordinates connolly points that belong to individual pockets are needed they can be found
#   in viualisations/data/<pdb_file_name>_points.pdb. There "Residue sequence number" (23-26) of HETATM record 
#   cocrresponds to the rank of corresponding pocket (points with value 0 do not belong to any pocket).

# Rescore pocket detected by other methods (PRANK algorithm):

prank rescore test_data/fpocket.ds
prank rescore fpocket.ds                 # test_data/ is default 'dataset_base_dir'
prank rescore fpocket.ds -o output_dir   # test_output/ is default 'output_base_dir'

# Override default params with custom config file:

prank rescore -c config/example.groovy test_data/fpocket.ds
prank rescore -c example.groovy        fpocket.ds

# It is also possible to override default params on a command line with their full name:
# (to see complete list of params look into config/default.groovy)

prank rescore                   -seed 151 -threads 8  test_data/fpocket.ds
prank rescore -c example.groovy -seed 151 -threads 8  test_data/fpocket.ds

# Evaluate model for pocket rescoring:

prank eval-rescore                        fpocket-pairs.ds
prank eval-rescore -m model/default.model fpocket-pairs.ds
prank eval-rescore -m default.model       fpocket-pairs.ds
prank eval-rescore -m other.model         fpocket-pairs.ds
prank eval-rescore -m other.model         fpocket-pairs.ds -o output_dir