Blog
How to Find a Protein’s Binding Site for Docking with fpocket, CASTp and PrankWeb
- August 6, 2026
- Posted by: Stem Skills Lab
- Category: Molecular Modeling

Every docking tutorial starts the same way: download the structure, prepare the receptor, set the grid box around the binding site. Then it moves on. Nobody tells you what to do when the PDB file has no ligand in it, which is the situation most students land in the first time they pick their own target.
Answer: To find a protein’s binding site for docking without a co-crystallized ligand, run a pocket prediction tool. PrankWeb ranks pockets with machine learning in a browser, fpocket detects them from geometry on the command line, and CASTp measures pocket volume and area. Then convert the top pocket’s atoms into grid box center and size coordinates.
Why can’t you just guess where the ligand binds?
You can guess, and the docking program will happily return numbers either way. That is the trap. AutoDock Vina does not verify that your box contains a real pocket. It searches whatever volume you give it and reports the best score it found inside that volume. Point the box at a flat patch of surface and you still get a binding affinity in kcal/mol, and it will be meaningless.
So the binding site is not a detail you sort out later. It defines the search space, and the search space determines the answer. If you have a structure with a bound ligand, you already have your answer: copy the ligand’s coordinates and skip to the grid box step in our guide on setting the AutoDock Vina grid box center and size. If you do not, you need a prediction, and you need to be honest in your methods section that it is a prediction.
Which pocket finder should you use: PrankWeb, fpocket or CASTp?
All three are free, all three are published, and they answer slightly different questions. PrankWeb tells you which pocket is most likely to bind a ligand. fpocket tells you where every pocket is and gives you the atoms. CASTp tells you how big each pocket is in cubic angstroms.
| Feature | PrankWeb (P2Rank) | fpocket | CASTp 3.0 |
|---|---|---|---|
| How you run it | Web browser, no install | Command line (Linux, macOS, conda) | Web browser, no install |
| Method | Random forest on solvent-accessible surface points | Voronoi tessellation and alpha spheres | Alpha shape, weighted Delaunay triangulation |
| Ranks pockets by ligandability | Yes, this is its main output | Yes, by an empirical score plus a druggability score | No, it sorts by size |
| Reports pocket volume and area | No | Volume and SASA | Yes, this is its main output |
| Gives you pocket atom coordinates | Yes, via the residue list and downloadable output | Yes, one PDB file per pocket | Yes, as a residue and atom list |
| Evolutionary conservation option | Yes, optional | No | No |
| Accepts an AlphaFold model by UniProt ID | Yes, directly | Yes, upload the file | Yes, upload the file |
| Best for | Deciding which pocket is the real one | Scripting, batch runs, feeding a pipeline | Justifying pocket size in a paper |
The practical recommendation for a first project: run PrankWeb to decide which pocket, then run fpocket to get the atom coordinates you need for the box. CASTp joins in when a reviewer asks how large the cavity is.
There is a real accuracy gap worth knowing about. In the benchmark published with P2Rank, the machine-learning ranking identified the correct site in 72.0 percent of COACH420 structures and 68.6 percent of HOLO4K structures when only the top n pockets were considered, against 56.4 percent and 52.4 percent for fpocket on the same test (identification success measured with a 4 angstrom distance criterion). Krivák and Hoksza also report that P2Rank is among “the fastest available tools”, needing under one second per protein. See Krivák and Hoksza, Journal of Cheminformatics 2018, 10:39 for the full comparison.
That gap is the reason to start with PrankWeb rather than with raw geometry. Geometry alone finds every dent in the surface. Machine learning trained on real ligand-bound structures has learned which dents actually hold drugs.
How do you predict a binding site with PrankWeb?
PrankWeb is the web front end for P2Rank, hosted at prankweb.cz by the group at Charles University. It needs no install and no account.
- Open PrankWeb and choose your input. It accepts a four-character PDB ID for an experimental structure, a UniProt accession to pull the corresponding AlphaFold model, or a file you upload in PDB or mmCIF format.
- Decide whether to switch on evolutionary conservation. It costs you a few minutes of queue time and usually helps: the PrankWeb 3 paper reports 74.5 percent top-n success on HOLO4K with conservation against 72.7 percent without it.
- Submit and wait. A plain prediction is fast. The conservation pipeline, rebuilt in version 3 around the UniRef50 database and HMMER3, has a median runtime of roughly two minutes.
- Read the result. You get a 3D viewer with pockets coloured by rank, and a table listing each pocket with its score, probability, and the residues that line it.
Pocket 1 is the model’s best guess. Write down its residue list. That list is what you will sanity check in the next section, and it is also what you cite in your methods.
PrankWeb accepting a UniProt accession matters more than it sounds. It means a target with no experimental structure at all is still dockable: you point PrankWeb at the AlphaFold Protein Structure Database entry and get pockets from the predicted model. If that is your situation, read our walkthrough on predicting a protein structure with AlphaFold first, and treat the pLDDT scores in the pocket region as a hard gate. A pocket built out of low-confidence loops is not a pocket.
If prankweb.cz is unreachable or the queue is long, P2Rank is open source and runs locally from the cusbg/prankweb repository. The predictions are the same; you lose only the viewer.
How do you run fpocket on the command line?
fpocket is the workhorse. It was published by Le Guilloux, Schmidtke and Tuffery in BMC Bioinformatics 2009, 10:168 and it detects pockets by Voronoi tessellation, filling cavities with alpha spheres, spheres that touch four protein atoms and contain none.
Install it with conda, which is the least painful route:
conda config --add channels conda-forge
conda install fpocketOr build it from source, following the Discngine/fpocket repository:
git clone https://github.com/Discngine/fpocket.git
cd fpocket
make
sudo make installOn an Apple Silicon Mac, build with ARCH=MACOSXARM64 make instead of plain make. On an Intel Mac, use make ARCH=MACOSXX86_64.
Running it on a structure is one line. Here it is on 1UYD, the HSP90 example the fpocket documentation itself uses:
fpocket -f 1uyd.pdbThat creates a directory called 1uyd_out/. The files that matter:
1uyd_info.txtis the human-readable report, one block per pocket.pockets/pocket1_atm.pdb,pocket2_atm.pdband so on hold the protein atoms lining each pocket. This is the file you will turn into grid box numbers.1uyd_out.pdbis your structure with the alpha sphere centres appended, so you can load the whole thing at once.1uyd.pmland1uyd.tclare ready-made PyMOL and VMD scripts. Run1uyd_PYMOL.shto open the coloured result straight away.
Each block in the info file reports a Score, a Druggability Score, the number of alpha spheres, total, polar and apolar SASA, Volume, mean local hydrophobic density, mean alpha sphere radius and solvent accessibility, the apolar alpha sphere proportion, and a hydrophobicity score. The Druggability Score runs from 0 to 1 and comes from the logistic model trained by Schmidtke and Barril, Journal of Medicinal Chemistry 2010, 53(15):5858 on a curated set of druggable and non-druggable cavities. Treat it as a ranking aid, not a verdict.
Four flags are worth knowing when the defaults misbehave:
| Flag | Default | What it controls | When to change it |
|---|---|---|---|
-m | 3.4 Å | Minimum alpha sphere radius | Lower it to catch tight, small cavities |
-M | 6.2 Å | Maximum alpha sphere radius | Lower it if wide surface grooves are being reported as pockets |
-i | 15 | Minimum alpha spheres per pocket | Raise it to suppress a long tail of tiny false pockets |
-D | 2.4 Å | Clustering distance between alpha spheres | Raise it if one real pocket is being split into two |
Change one at a time and re-read the info file. Changing several at once and then reporting the result is how a methods section becomes unreproducible.
Want the guided, hands-on version?
Our live Molecular Modeling & MD Simulations cohort bootcamp takes you from zero to running real docking and MD workflows, with a portfolio project for your grad-school applications.
How do you use CASTp to measure a pocket’s volume and area?
CASTp answers the question a reviewer asks: how big is this cavity, in numbers. It computes pockets with the alpha shape method from computational geometry and reports solvent-accessible area and volume for each one, using the standard 1.4 angstrom probe radius. Version 3.0 is described in Tian and colleagues, Nucleic Acids Research 2018, 46(W1):W363, and the server handles on the order of 33,000 calculation requests a year.
Go to sts.bioe.uic.edu/castp, enter a PDB ID or upload your file, and submit. The result page gives a sortable table of pockets with area and volume, plus the residues lining each. Click a row and the structure viewer highlights it.
Use CASTp as a cross-check rather than a primary finder. If PrankWeb’s pocket 1 and fpocket’s pocket 1 both land on the same residues, and CASTp reports a substantial volume there rather than a sliver, you have three independent methods agreeing. That is a defensible binding site.
How do you turn a predicted pocket into an AutoDock Vina grid box?
Vina wants six numbers: center_x, center_y, center_z and size_x, size_y, size_z, all in angstroms. The pocket file from fpocket contains everything you need.
The centre is the centroid of the pocket’s atoms. The size is the pocket’s extent along each axis, plus padding so the ligand has room to rotate. This one command computes both from pocket1_atm.pdb:
awk '/^(ATOM|HETATM)/ {
x=substr($0,31,8)+0; y=substr($0,39,8)+0; z=substr($0,47,8)+0;
sx+=x; sy+=y; sz+=z; n++;
if(n==1){x0=x1=x; y0=y1=y; z0=z1=z}
if(x<x0)x0=x; if(x>x1)x1=x;
if(y<y0)y0=y; if(y>y1)y1=y;
if(z<z0)z0=z; if(z>z1)z1=z;
}
END {
printf "center_x = %.3f\ncenter_y = %.3f\ncenter_z = %.3f\n", sx/n, sy/n, sz/n;
printf "extent = %.1f %.1f %.1f\n", x1-x0, y1-y0, z1-z0;
}' 1uyd_out/pockets/pocket1_atm.pdbThe substring offsets are not arbitrary. The PDB format fixes x, y and z in columns 31 to 38, 39 to 46 and 47 to 54, which is why the coordinates are read by position rather than by splitting on whitespace. Structures with large coordinates run their columns together and break naive parsers.
Take the printed centre as your center_x/y/z. For the size, start from the extent and add roughly 8 angstroms to each dimension, giving about 4 angstroms of clearance on either side of the pocket. Then apply the two constraints that matter: the box must be comfortably larger than your ligand’s longest dimension so it can rotate freely, and it must stay tight enough that Vina is not searching empty solvent. Our detailed guide on choosing the grid box center and size covers how to check both, and the AutoDock Vina tutorial for beginners shows where these six numbers go in the config file.
Before you dock, make sure the receptor itself is ready. Predicting the pocket does not fix missing hydrogens, wrong protonation states or gaps in the chain. Work through preparing a protein and ligand for docking, and if the structure came from AlphaFold or homology modelling, run it past structure validation first.
How do you know which predicted pocket is the real one?
This is where students get stuck, because every tool returns a ranked list and the ranking is not a guarantee. Four checks, in order of how much weight they carry:
- Find a related structure that has a ligand. Search the PDB for homologues of your target. If any of them was solved with a ligand bound, superimpose it on your structure and see which predicted pocket it lands in. This is the strongest evidence available and it costs twenty minutes.
- Check the literature for known catalytic or binding residues. The UniProt entry for your protein lists active site, binding site and metal-binding annotations. If pocket 1 contains the annotated catalytic triad, you are done arguing.
- Look at conservation. Functional sites are conserved because mutations there break the protein. Switch on PrankWeb’s conservation option; a pocket lined with highly conserved residues is a better bet than an equally scored pocket lined with variable surface residues.
- Require agreement between methods. PrankWeb, fpocket and CASTp use genuinely different mathematics. When all three converge on the same residues, the odds of a shared artefact are low.
What none of these can settle is orthosteric against allosteric. If your target has a well-known active site and PrankWeb ranks a different pocket first, that second pocket may be a genuine allosteric site rather than an error. Both are worth docking into. Just do not silently swap one for the other in your write-up.
Troubleshooting: what usually goes wrong
| Symptom | Cause | Fix |
|---|---|---|
| fpocket returns 30 or more pockets with no clear winner | Default settings detect every surface dent | Raise -i above 15 to require more alpha spheres per pocket, and rank by Druggability Score rather than by pocket number |
| Top pockets look identical in score | Geometry alone cannot separate them | Bring in evidence geometry does not have: conservation, UniProt annotations, or a superimposed ligand from a homologue |
| Predicted pocket sits between two chains | The file is a multimer and the pocket is at the interface | Decide whether the biological unit really is a dimer. If yes, keep both chains and dock into the interface. If not, keep one chain with -k |
| No pocket found near the known active site | Apo structure with a closed or cryptic site that only opens on ligand binding | Find a holo structure of the same protein or a close homologue and use that, or run a short MD simulation and re-run pocket detection on representative frames |
| Pocket found on an AlphaFold model looks implausible | Low-confidence loops packing into a fake cavity | Colour by pLDDT. Discard any pocket whose lining residues fall below about 70, and prefer an experimental structure if one exists |
| fpocket reports the crystallisation buffer site | Glycerol, sulfate and PEG sites are real cavities but not the drug site | Strip HETATM records other than genuine cofactors before running, and check what the original paper says the extra density is |
| Docking scores are good but poses sit at the box edge | The box is centred on the wrong pocket, or is too small | Re-centre on the pocket centroid, enlarge the box, and re-dock. Poses pinned to a face mean the search space is wrong |
| Nothing agrees and no site is defensible | Genuinely unknown binding site | Run blind docking over the whole surface as a first pass, then focus a second, tighter run on wherever the poses cluster |
The last row deserves a warning. Blind docking uses a box large enough to cover the entire protein, which stretches the search and lowers pose reliability. Use it to generate a hypothesis, then confirm that hypothesis with a focused box. Reporting blind docking results as final is a common reason a manuscript comes back from review.
How does this fit into a full project?
Binding site prediction sits between structure preparation and docking. Get the structure, validate it, find the site, build the box, dock, then interpret. Our guide on interpreting docking results and binding affinity picks up where this one ends, the molecular docking pillar holds the whole sequence in order, and the computational biology skills roadmap shows where docking sits relative to everything else you need for a research career.
Frequently asked questions
Can I dock without knowing the binding site at all?
Yes, using blind docking, where the grid box covers the whole protein. It works as an exploratory pass but the poses are less reliable because the search space is much larger. Use it to generate a hypothesis, then re-dock into a focused box centred on the region where poses cluster.
Is fpocket or PrankWeb more accurate?
PrankWeb, on published benchmarks. Its P2Rank engine reported 72.0 percent top-n identification success on COACH420 and 68.6 percent on HOLO4K, against 56.4 percent and 52.4 percent for fpocket. fpocket remains the better tool when you need pocket atoms, volumes and descriptors for scripting.
Can I predict a binding site on an AlphaFold model?
Yes. PrankWeb takes a UniProt accession and pulls the AlphaFold model directly, and fpocket and CASTp accept the downloaded PDB file. Check pLDDT in the pocket region before trusting the result, because low-confidence loops can form cavities that do not exist.
What do I write in my methods section?
Name the tool and version, the input structure and its PDB accession, any non-default parameters, which ranked pocket you selected, and the evidence you used to select it. Then give the final grid box centre and size in angstroms. That is enough for someone else to reproduce your run.
How large should the grid box be around a predicted pocket?
Large enough that your ligand can rotate freely inside it, and no larger. Start from the pocket’s extent along each axis and add roughly 8 angstroms per dimension, then check the box visually against the pocket and against your largest ligand before committing.
Do I need all three tools?
No. One is enough to get a box. Agreement between two or three is what makes the choice defensible when a supervisor or reviewer asks why you docked where you did.
Written by the StemSkills Lab team, with over ten years of combined work in sequence and structural bioinformatics, drug discovery and design, and multiscale molecular modeling.
Want the guided, hands-on version?
Our live Molecular Modeling & MD Simulations cohort bootcamp takes you from zero to running real docking and MD workflows, with a portfolio project for your grad-school applications.