Skip to content

pritampanda15/PandaDock

Repository files navigation

🐼 PandaDock

A Python-based GPU/CPU-accelerated molecular docking platform for computational drug discovery and bioinformatics.

PandaDock Logo

PyPI Version License GitHub Stars GitHub Issues Downloads


πŸš€ Overview

PandaDock is a modern, modular molecular docking toolkit that combines cutting-edge algorithms with high-performance computing capabilities. Built for drug discovery, computational chemistry, and bioinformatics workflows.

✨ Key Features

  • 🎯 Multiple Docking Algorithms: Genetic Algorithm, Monte Carlo, PANDADOCK, Random Search, Metal-based docking
  • ⚑ Hardware Acceleration: Native GPU (PyTorch/CUDA) and multi-core CPU parallelization
  • πŸ“Š Advanced Scoring: Physics-based scoring with MM-GBSA inspired energy decomposition
  • 🧬 Flexible Residues: Automatic and manual flexible residue detection
  • πŸ“ˆ Virtual Screening: High-throughput screening with batch processing
  • πŸ”¬ Comprehensive Analysis: Binding affinity calculations, pose clustering, interaction analysis
  • 🎨 Rich Visualization: Interactive HTML reports with energy breakdowns and plots
  • πŸ› οΈ Modular Architecture: Clean, extensible Python API for custom workflows

πŸ“¦ Installation

Quick Install

# Install PandaDock
pip install pandadock

# For GPU acceleration (optional)
pip install pandadock[gpu]

# For RDKit integration (recommended)
pip install pandadock[rdkit]

# Install all optional dependencies
pip install pandadock[gpu,rdkit,dev]

Development Install

# Clone the repository
git clone https://github.com/pritampanda15/PandaDock.git
cd PandaDock

# Install in development mode
pip install -e .

System Requirements

  • Python: 3.8+
  • OS: Linux, macOS, Windows
  • Memory: 4GB+ RAM (8GB+ recommended)
  • GPU: CUDA-compatible GPU (optional, for acceleration)

πŸ”₯ Quick Start

Basic Docking

# Simple protein-ligand docking
pandadock -p protein.pdb -l ligand.sdf -o results

# With binding site specification
pandadock -p protein.pdb -l ligand.sdf -o results -s -15.7 -17.7 8.1 -r 10.0

# Enhanced docking with GPU acceleration
pandadock -p protein.pdb -l ligand.sdf -o results --enhanced --use-gpu

Physics-Based Docking

# High-accuracy physics-based scoring
pandadock -p protein.pdb -l ligand.sdf -o results --physics-based

# PANDADOCK algorithm with simulated annealing
pandadock -p protein.pdb -l ligand.sdf -o results -a pandadock --physics-based

# With flexible residues
pandadock -p protein.pdb -l ligand.sdf -o results --physics-based --auto-flex

Virtual Screening

# High-throughput screening
pandadock -p protein.pdb -l ligand_library/ -o screening_results --enhanced

# Batch processing with parallel execution
pandadock -p protein.pdb -l compounds.sdf -o batch_results --cpu-workers 8

🐍 Python API

Basic Usage

from pandadock.core import DockingEngine
from pandadock.molecules import LigandHandler, ProteinHandler

# Load molecules
protein_handler = ProteinHandler()
ligand_handler = LigandHandler()

protein = protein_handler.load_protein("protein.pdb")
ligand = ligand_handler.load_ligand("ligand.sdf")

# Configure docking
config = {
    'algorithm': 'genetic',
    'scoring': 'enhanced',
    'site_center': [10.0, 20.0, 30.0],
    'site_radius': 12.0,
    'iterations': 100
}

# Run docking
engine = DockingEngine(config)
results = engine.dock(protein, ligand)

# Analyze results
for pose in results['poses']:
    print(f"Pose {pose['rank']}: Score = {pose['score']:.2f}")

Advanced Workflow

from pandadock.scoring import ScoringFunctionFactory
from pandadock.algorithms import AlgorithmFactory
from pandadock.analysis import BindingAffinityCalculator

# Create custom scoring function
scoring_factory = ScoringFunctionFactory()
scorer = scoring_factory.create_scoring_function(
    type='physics-based',
    use_gpu=True
)

# Use specialized algorithm
algorithm_factory = AlgorithmFactory()
algorithm = algorithm_factory.create_algorithm(
    type='pandadock',
    population_size=200,
    temperature=500
)

# Calculate binding affinities
affinity_calc = BindingAffinityCalculator()
affinities = affinity_calc.calculate_batch_affinities(results['poses'])

for affinity in affinities:
    print(f"Ξ”G: {affinity.delta_g:.2f} kcal/mol, Kd: {affinity.kd:.2e} M")

πŸ“Š Output & Analysis

Each docking run generates comprehensive results:

results/
β”œβ”€β”€ poses/                          # Individual pose PDB files
β”‚   β”œβ”€β”€ pose_1_score_-14.25.pdb
β”‚   └── pose_2_score_-14.07.pdb
β”œβ”€β”€ complexes/                      # Protein-ligand complexes
β”‚   └── complex_pose_1_score_-14.25.pdb
β”œβ”€β”€ reports/                        # Analysis reports
β”‚   β”œβ”€β”€ docking_report.html         # Interactive HTML report
β”‚   β”œβ”€β”€ binding_affinity_report.csv
β”‚   └── detailed_analysis.txt
β”œβ”€β”€ plots/                          # Visualization plots
β”‚   β”œβ”€β”€ score_distribution.png
β”‚   β”œβ”€β”€ energy_breakdown.png
β”‚   └── binding_modes.png
└── docking_results.json           # Machine-readable results

Sample Analysis Report

πŸ”¬ DOCKING ANALYSIS REPORT
═══════════════════════════════════════

ALGORITHM: Genetic Algorithm (Enhanced)
SCORING: Physics-based with MM-GBSA
POSES GENERATED: 20
BEST SCORE: -14.25 kcal/mol

πŸ“Š BINDING AFFINITY ANALYSIS
─────────────────────────────
Pose 1: Ξ”G = -14.25 kcal/mol, Kd = 3.60e-11 M, IC50 = 7.20e-11 M
Pose 2: Ξ”G = -14.07 kcal/mol, Kd = 4.87e-11 M, IC50 = 9.75e-11 M
Pose 3: Ξ”G = -13.94 kcal/mol, Kd = 6.02e-11 M, IC50 = 1.20e-10 M

🧬 INTERACTION ANALYSIS
─────────────────────────
Hydrogen Bonds: 3
Hydrophobic Contacts: 12
Ο€-Ο€ Stacking: 1
Salt Bridges: 0

🧠 Algorithms

Available Algorithms

Algorithm Description Best For
Genetic Evolutionary optimization General docking, large ligands
Monte Carlo Metropolis sampling Conformational sampling
PANDADOCK Simulated annealing + MD High accuracy, flexible ligands
Random Search Stochastic exploration Quick screening, benchmarking
Metal Docking Coordination constraints Metalloproteins, metal cofactors

Scoring Functions

  • Basic: VDW + Hydrogen bonding
  • Enhanced: + Electrostatics + Desolvation + Hydrophobic
  • Physics-based: Full MM-GBSA with entropy estimation
  • Metal-aware: Coordination geometry constraints

βš™οΈ Configuration

Command Line Options

# Essential options
-p, --protein PROTEIN       Protein PDB file
-l, --ligand LIGAND         Ligand MOL/SDF file
-o, --output OUTPUT         Output directory
-s, --site X Y Z            Binding site center
-r, --radius RADIUS         Binding site radius (Γ…)

# Algorithm selection
-a, --algorithm {genetic,monte-carlo,pandadock,random}
-i, --iterations N          Number of generations/steps
--exhaustiveness N          Independent runs

# Hardware acceleration
--use-gpu                   Enable GPU acceleration
--cpu-workers N             Number of CPU cores

# Scoring options
--enhanced-scoring          Enhanced scoring function
--physics-based            Physics-based scoring (MM-GBSA)
--local-opt                 Local optimization

# Flexibility
--auto-flex                 Automatic flexible residues
--flex-residues RES1 RES2   Manual flexible residues

# Output formats
--report-format {html,csv,json,all}
--detailed-energy           Energy component breakdown

πŸ—οΈ Architecture

PandaDock features a clean, modular architecture:

pandadock/
β”œβ”€β”€ core/                   # Core docking engine
β”œβ”€β”€ algorithms/             # Docking algorithms
β”œβ”€β”€ scoring/               # Scoring functions
β”œβ”€β”€ molecules/             # Molecule handling
β”œβ”€β”€ analysis/              # Post-processing & analysis
β”œβ”€β”€ hardware/              # GPU/CPU abstraction
β”œβ”€β”€ screening/             # Virtual screening
β”œβ”€β”€ cli/                   # Command-line interface
└── utils/                 # Utilities & helpers

πŸ§ͺ Testing

# Run tests
pytest

# Run with coverage
pytest --cov=pandadock

# Run specific test categories
pytest tests/test_basic.py
pytest tests/test_scoring.py

πŸ“š Documentation

  • GitHub Wiki: Comprehensive guides and tutorials
  • API Reference: Full Python API documentation
  • Examples: Sample scripts and workflows
  • Paper: [Cite PandaDock] (if published)

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ“ž Support


πŸ“– Citation

If you use PandaDock in your research, please cite:

@software{pandadock2025,
  title={PandaDock: A Python-based Molecular Docking Platform},
  author={Panda, Pritam Kumar},
  year={2025},
  url={https://github.com/pritampanda15/PandaDock},
  version={3.0.0}
}

πŸ™ Acknowledgments

  • RDKit community for cheminformatics tools
  • PyTorch team for GPU acceleration framework
  • AutoDock Vina for inspiration
  • Scientific Python ecosystem

βš—οΈ Dock Smarter. Discover Faster. Build Better.

About

PandaDock: A Physics-Based Molecular Docking using Python

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages