How drug-discovery-entc/p2pxml works
Project type and purpose
• This is an open-source computational biology / machine-learning toolkit (“P2PXML”) that implements a deep geometric model to predict antibody-antigen binding affinity.
• It provides (a) a curated PDB dataset, (b) Python code for data preprocessing, model definition and training/inference, (c) a CLI wrapper (shell script) and (d) a Jupyter/Colab demonstration.
File structure
• Top-level directories:
– data/ : raw PDB files + dataset README
– notebooks/ : demonstration Jupyter notebooks + README
– resources/ : static assets (plots, bibtex)
– src/ : core Python modules and shell script
• integrated_model_v1.py – orchestrator for feature extraction, training and inference
• models/ – model definition modules (graph conv, mesh layers, etc.)
• p2pxml.sh – CLI entry point for training/prediction workflows
• Configuration/build scripts: none external—everything is driven by Python code and the shell wrapper.
Key insights from README
• The pipeline reads PDB files, constructs geometric (graph) representations, feeds them into a deep neural network, and outputs predicted IC₅₀ values.
• A Colab notebook demonstrates minimal usage.
• Data is hosted on Zenodo; the notebook runs on Google Colab.
1. Data Source
• Local PDB files (data/)
• External dataset host (Zenodo)
2. Preprocessing / Featurization Module
• PDB parser → graph/mesh converter (inside integrated_model_v1)
3. Model Component
• Graph Neural Network modules (src/models/)
• Loss, optimizer, training loop (integrated_model_v1)
4. CLI / Orchestration
• p2pxml.sh shell script invokes Python modules with parameters (train vs infer)
5. Demonstration Interface
• Jupyter Notebook (notebooks/) / Colab
6. Outputs / Results
• Plots and metrics (resources/, notebooks output)
– Raw PDB files → Preprocessing Module
– Preprocessed features → Model Component
– Model Component “train” or “infer” → Predictions & Metrics
– CLI wrapper (p2pxml.sh) → orchestrates preprocessing & model calls
– Notebook → invokes Model Component (via integrated_model_v1 or directly imports modules) → visualizes outputs
c. Architectural patterns & principles
– Pipeline pattern: sequential stages (ingest → featurize → train/infer → evaluate)
– Modular design: clear separation between data loader, model definitions, orchestration script, and presentation layer
– Extensibility points: new model architectures can be added in src/models; parameters configurable via CLI
d. Key technologies & libraries
– Python 3.x, PyTorch or TensorFlow (as specified in src/readme.md)
– Shell scripting (bash) for CLI
– Jupyter/Colab for interactive demos
– PDB file format for molecular structures
Final remarks
• Every module in src (preprocessor, model, CLI) and how notebooks import/invoke them.
• Don’t overcomplicate—split the system into logical functional blocks and show their interactions clearly.