How drugbud-suite/dockm8 works
Main Components
• User Interface Layer:
• Streamlit GUI (gui.py, supported by the .streamlit directory)
• Jupyter Notebooks (dockm8.ipynb, dockm8_ensemble.ipynb, dockm8_decoys.ipynb, and various result notebooks)
• Command-line interface via dockm8.py
• Core Workflow/Engine:
• Docking Process Controller: The core logic that handles workflow stages like library and protein preparation, docking, pose selection, rescoring, and ranking.
• Scripts Module: Under the “scripts” directory (includes docking_functions.py, protein_preparation.py, postprocessing.py, utilities.py, etc.) that encapsulate the individual functional components.
• Supporting and Auxiliary Modules:
• Decoy Generation & Consensus Docking: The “software/DeepCoy” submodule that houses an independent tool integrating decoy generation and additional scoring mechanisms.
• Models & Evaluation: The “software/models” folder containing pre-trained models for scoring (RFScore, PLEC, etc.) and evaluation scripts in “software/DeepCoy/evaluation”.
• Deployment & Environment:
• Docker configurations (docker/Dockerfile, docker/environment.yml) for containerized deployments.
• Environment definition files (environment.yml, pyproject.toml) that specify dependencies and technical stack.
• Data Input/Output & Results:
• Input Data: Files under “dockm8_testing” (which include ligand and protein structure files) and “optimal_conditions.txt”.
• Output & Result Analysis: The “results” folder containing Jupyter notebooks that analyze performance and generate plots.
• Media & Documentation: “media” (for logos and images), installation and usage PDFs, and guides.
Relationships and Interactions
• At the top, the UI layer where users either interact via the Streamlit web app or trigger the process via command-line / Jupyter environments.
• The UI calls the core workflow engine which orchestrates the various tasks:
▪ Protein and library preparation (invoked from scripts such as protein_preparation.py and library_preparation.py).
▪ Docking execution (scripts/docking_functions.py, consensus methods, clustering functions, etc.).
▪ Postprocessing and scoring (rescoring_functions.py, consensus_methods.py, performance_calculation.py).
• The engine may also optionally integrate the “DeepCoy” module for enhanced decoy generation and evaluation.
• Data flows through these steps: input data (ligands, protein structures, configuration files) → preparation modules → docking execution → consensus scoring → results generation → output into the “results” directory.
• The Docker container encapsulates the entire workflow and environment settings for deployment consistency.
Architectural Patterns and Design Principles
• Modularity: Emphasize that components (scripts, DeepCoy submodule, model evaluation files) are decoupled enough to allow easy upgrades or replacements.
• Configuration and Environment Management: Highlight the use of configuration files (.streamlit/config.toml, docker/environment.yml) that ensure reproducible setups.
• Extensibility: Noting both the core engine and the “software/DeepCoy” integration shows the readiness for additional modules or plugins in future contributions.