How eightmm/bapred works
Main Components
• Data Input/Preprocessing Module:
• Processing of input files (the receptor PDB and ligand SDF) that are read by the “data” components in the repository.
• The “data/atom_feature.py” extracts features per atom, “data/data.py” handles the loading and preprocessing of the data, and “data/utils.py” provides helper functions.
• Model/Inference Engine:
• The “inference.py” is the orchestration layer that ties together data preprocessing and model evaluation.
• Within the “model” directory, include the core model components:
▪ GatedGCNLSPE (graph convolution with gated mechanisms for learning local substructure patterns).
▪ GraphGPS (which likely adds global message passing or integration techniques).
▪ MHA (Multi-Head Attention module to better capture interactions).
▪ The “model/model.py” which wraps or interfaces the various submodules and controls overall model execution.
• Weights/Pretrained Model:
• “weight/BAPred.pth” file which contains the saved state dict of the pretrained model utilized during inference.
• Execution & Output:
• The inference script receives input parameters (paths to receptor and ligand, model weights, device selection) and outputs a CSV file containing the ligand names/indices and predicted affinity scores.
• In the Inference Engine, show internal interactions between the “model wrapper” and the different GNN components (GatedGCNLSPE, GraphGPS, MHA). Indicate that these components are organized either in series or parallel (depending on the model design) and that they collectively integrate to produce the output.
Architectural Patterns & Design Principles
• Modularity by clearly separating data handling, model execution, and output generation.
• How the inference script acts as the “glue” that communicates between the data modules, the actual model architecture, and file I/O.
• That although this tool is not a full-stack web application, its design aligns with common machine learning pipelines where the computation is split into distinct, loosely coupled components.
Technologies, Frameworks, and Dependencies
• Mention the Python environment managed via Conda (env.yaml) that includes all required packages.
• That the project employs GNNs and possibly deep learning libraries (e.g., PyTorch or another DL framework) to implement and run the model.