Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

openbind-rescore

A pipeline for rescoring OpenBind compounds generated from placed Fragmenstein merges or Syndirella elaborations via BulkDock, using GNINA for structure minimization and rescoring.

The pipeline groups ligands by reference protein structure, runs GNINA minimization, and aggregates rescoring outputs into summary tables for downstream analysis.


Overview

The standard pipeline has the following steps:

  1. Loads ligands from an input SDF
  2. Groups ligands by their ref_pdb property
  3. Perform a rescore on the exact input pose
  4. Runs GNINA minimization and rescoring per reference structure
  5. Aggregates GNINA outputs into a CSV summary
  6. Produces a brief overview of basic data metrics

Input data typically originates from other tools frequently used at the OpenBind project:


Dependencies

GNINA (required)

This pipeline depends on GNINA for minimization and rescoring.

  • GNINA is not distributed with this repository
  • GNINA v1.3.2 is recommended for reproducibility
  • The executable is expected at:
gnina/gnina

Installation, troubleshooting, and optional Singularity/Apptainer runtime environment instructions are provided in gnina/README.md.


Python dependencies

  • RDKit
  • pandas

A typical conda environment:

conda create -n openbind-rescore python=3.10 rdkit pandas
conda activate openbind-rescore

Inputs

Ligands

Ligands are provided as an SDF file and should include:

  • ref_pdb: reference PDB identifier (matching the PDB filename stem)
  • Optional metadata from Fragmenstein, BulkDock, or HIPPO
  • GNINA output fields are added during minimization and rescoring

Ligands without a valid ref_pdb are skipped.


Reference PDBs

Reference protein structures may be supplied as either:

  • a directory containing .pdb files, or
  • a .zip archive containing .pdb files

The ref_pdb ligand property must match the reference PDB filename stem.


Usage

Basic usage:

python gnina_rescore.py --input_ligands ligands.sdf --ref_pdbs reference_pdbs/ --output_path results/

Optional arguments include:

  • --cpu_cores : Number of parallel GNINA subprocesses (default: 1)
  • --seed : Random seed for reproducibility (default: 42)
  • --only_acceptable : Only keep ligands with fragmenstein_outcome == acceptable
  • --gnina_path : Path to GNINA executable
  • --device : CUDA device ID to use (e.g. 0)
  • --no_gpu / --cpu_only : Force CPU-only execution
  • --cnn_model : One or more GNINA CNN model .pt files (ensemble rescoring supported)
  • --cnn_scoring : CNN scoring mode (rescore or refinement, default: rescore)
  • --score_only : Only score poses (GNINA --score_only, no minimization)
  • --no_prescore : Skip prescoring; minimize and score only the minimized pose
  • --no_csv : Do not write the CSV summary file
  • --no_log : Do not write GNINA log files

Scoring modes

The pipeline supports three GNINA workflows, controlled by command-line flags:

Default (prescore + minimize + rescore)

This is the default behavior when no mode flags are provided.

  1. GNINA first scores the input pose (--score_only)
  2. Ligands are then minimized
  3. The minimized pose is rescored

Scores from the initial pose are retained with a _pre suffix in the output.


Score-only mode (via --score_only)

  • Runs GNINA scoring on the input pose only
  • No minimization is performed
  • Useful for fast rescoring of pre-aligned or fixed poses

No-prescore minimization (via --no_prescore)

  • Skips scoring of the input pose
  • Ligands are minimized directly
  • Only the minimized pose is scored

Outputs

results/
+-- grouped_sdf/ # Ligands grouped by reference PDB
+-- output_sdfs/ # GNINA output SDFs
+-- logs/ # GNINA log files (unless --no_log)
+-- output_ligand_summary.csv # Per-ligand scores and metadata
+-- rescore_analysis_summary.txt
  • minimized_ligand_summary.csv: per-ligand GNINA scores and properties
  • minimized_analysis_summary.txt: basic aggregate metrics

Notes

  • Ligands without a valid ref_pdb are skipped
  • Ligands referencing missing PDBs are skipped
  • GNINA failures are logged but do not halt the pipeline
  • Intended for rescoring and minimization after placement, not docking

About

A pipeline for rescoring OpenBind compounds generated from placed Fragmenstein merges

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages