Results format¶
A run with output_format="atlas" writes one results folder. This is the default of pocketvina dock. The folder
has Parquet tables with the scores and one compressed pose file per protein, as in the PocketVina Atlas.
Results directory¶
A run writes this folder:
results/
MANIFEST.json the run: PocketVina version, settings, checksum of the ligand list
manifest/<protein_id>.json written last for each protein: the protein is done
poses/<protein_id>.poses best pose per ligand as SDF, every engine output as PDBQT
structures/<protein_id>.pdb.gz the input structure, gzipped
tables/
ligands.parquet one table for the whole run
proteins/<protein_id>.parquet the other tables have one part per protein
pockets/<protein_id>.parquet
pocket_runs/<protein_id>.parquet
modes/<protein_id>.parquet
pairs/<protein_id>.parquet
posebusters/<protein_id>.parquet after PoseBusters checks
A protein is done when its manifest/<protein_id>.json exists. A new run skips the done proteins.
A folder holds one run. MANIFEST.json keeps the settings that change the results, such as box, seed, pockets and
P2Rank model. Docking into the folder with other settings or ligands is refused. Use a new folder, or --force to
replace the run. You can change the GPUs, the temp folder and the timeouts.
Reading results¶
pandas¶
Results gives you the tables as pandas DataFrames:
from pocketvina.io.results import Results
res = Results("results")
res.proteins() # protein ids, sorted
pairs = res.pairs() # best pose per protein x ligand
pairs.sort_values("vina").head(10)
res.pockets("1fbl")[["pocket", "score", "probability", "center_x", "center_y", "center_z"]]
res.modes("1fbl", columns=["ligand_idx", "pocket", "mode", "affinity"])
res.ligands(columns=["ligand_idx", "ligand_id", "smiles_docked", "status"])
res.top_sdf("1fbl", "molecule1") # SDF text of the best pose
res.structure("1fbl") # the input structure (bytes)
Results reads only the proteins that are done.
DuckDB¶
Results.duckdb() gives you a DuckDB connection with one view per table:
con = res.duckdb()
con.sql("""
SELECT p.protein_id, p.ligand_id, p.vina, round(p.ligand_efficiency, 3) AS le, l.smiles_docked
FROM pairs p JOIN ligands l USING (ligand_idx)
ORDER BY p.vina LIMIT 10
""").df()
You can run the same SQL from the command line. Add --csv to save the rows:
pocketvina query --results results "SELECT ligand_id, min(vina) AS best FROM pairs GROUP BY ligand_id ORDER BY best"
pocketvina query --results results --csv strong.csv "SELECT * FROM modes WHERE affinity < -9"
Exports¶
pocketvina export writes poses and tables as plain files:
pocketvina export --results results --what best --format sdf --out best_poses # one SDF per protein x ligand
pocketvina export --results results --what all --format pdbqt --out outputs # every engine output
pocketvina export --results results --what best --format csv --out tables # best_poses.csv
pocketvina export --results results --what all --format csv --out tables # combined_results.csv, as in v0.1
In Python, use res.export(out_dir, what=..., fmt=...) and res.to_combined_csv(path).
Tables¶
All tables are Parquet files. "null" marks columns that can be empty. Vina scores are in kcal/mol, distances in Å.
Ids¶
protein_id: the structure file name without extension. Characters other thanA-Za-z0-9._-become_.ligand_id: themolecule_nameof the input.ligand_idxis its row intables/ligands.parquet, from 0.pocket: the P2Rank rank of the pocket, where 1 is the best.mode: the rank of a pose within one pocket, where 1 is the best.
The best pose of a ligand has the lowest Vina score over all docked pockets. Ties go to the lower pocket, then the lower mode.
ligands¶
The prepared ligands.
Column |
Type |
Meaning |
|---|---|---|
|
int32, string |
|
|
string |
the SMILES as given |
|
string, null |
the SMILES docked: the largest fragment of a salt or mixture |
|
string null, int16 null |
InChIKey and heavy atoms of the docked molecule |
|
string, int64 null |
|
|
string, string null |
|
|
string, null |
the input of the engine |
proteins¶
One row per protein.
Column |
Type |
Meaning |
|---|---|---|
|
string, string null |
|
|
string |
the input file, and its copy in the results folder |
|
binary(32) |
checksum of the receptor given to the engine |
|
int16 |
pockets found by P2Rank, and pockets docked |
|
string, string null |
|
pockets¶
Every P2Rank pocket, docked or not.
Column |
Type |
Meaning |
|---|---|---|
|
string, int16, string |
the P2Rank rank and name, such as |
|
float32, float32 null |
P2Rank score and probability |
|
float32 |
pocket centre, the centre of the docking box |
|
float32 |
size of the docking box |
|
string, null |
residues lining the pocket, such as |
pocket_runs¶
One row per ligand and docked pocket.
Column |
Type |
Meaning |
|---|---|---|
|
string, int32, string, int8 |
|
|
string |
|
|
int8, float32 null |
poses found, and the best Vina score in this pocket |
|
where the engine output is in the pose file |
|
|
int64 null, float32 null, string null |
engine seed, seconds per ligand, error message |
modes¶
One row per pose.
Column |
Type |
Meaning |
|---|---|---|
|
||
|
float32 |
Vina score |
|
float32 |
RMSD lower and upper bound to mode 1, as Vina reports them |
|
where the pose is in the pose file |
pairs¶
The best pose of each ligand in each protein.
Column |
Type |
Meaning |
|---|---|---|
|
||
|
float32 |
best Vina score. NaN without a pose |
|
int8 |
where the best pose is. -1 without a pose |
|
float32 |
of that mode |
|
string, null |
PoseBusters status of the best pose |
|
where its SDF is in the pose file |
|
|
string |
|
Results.pairs() and the DuckDB view pairs add ligand_efficiency, which is -vina / n_heavy. With PoseBusters
results they also add pb_valid.
posebusters¶
Written by pocketvina bust or posebusters=True. See PoseBusters checks.
Column |
Type |
Meaning |
|---|---|---|
|
the pose checked. -1: no pose |
|
|
string |
PoseBusters configuration and version |
|
string, bool null |
|
|
int32 |
bit b set: check b passed, or gave no result |
|
string, null |
names of the failed checks, comma-separated |
|
int16 null, float32 null, string null |
Pose files¶
poses/<protein_id>.poses holds all poses of one protein, in the PVATLAS1 format. Part A has the best pose of every
ligand as SDF, best first. Part B has every engine output as PDBQT, with all modes. The offset columns of the tables
point into this file. Results reads the poses for you with top_sdf(), pose_block() and pose_model().
The "files" format¶
pocketvina dock --format files writes the output folder of PocketVina 0.1. It is also the default of
PocketVinaConfig, for scripts written for 0.1. The folder has one PDBQT and JSON file per ligand and pocket, and
combined_results.csv. This format does not resume and has no PoseBusters step. pocketvina import-legacy
converts it into a results folder (Migrating from PocketVina 0.1).