Add optional ML tranche-prioritization classifier for ATG Primary Screen#5
Open
akshat998 wants to merge 1 commit into
Open
Conversation
Adds a machine learning classifier that, after tranche selection, scores every ligand of every tranche-selected collection and keeps only the ones predicted worth docking, reducing the number of ligands actually docked in the ATG Primary Screen. - tools/templates/ml_classifier.py: FNN classifier (Morgan fingerprints -> 1024-512-256-128-1, ReLU/ReLU/ReLU/Sigmoid) with training, atomic save/load, and batched inference helpers. - tools/afvs_train_ml_classifier.py: trains the classifier on postprocessed ATG Prescreen results (AWS ranking file or raw Slurm summary CSVs). - tools/afvs_apply_ml_classifier_atg-primaryscreen.py: fetches each tranche-selected collection's full ligand set (reusing afvs_run.py's unpack_item()/get_attrs() and afvs_prepare_workunits.py's collection addressing helpers) and writes a csv_collection_key_ligand-format ligand list consumable by the existing collection_list_type mechanism, with no changes needed to the docking engine itself. - afvs_prepare_atg-primary-screen-folders.sh: optional ml_classifier_model: and ml_classifier_cutoff: arguments wire the filtered ligand list into a new Primary Screen run's all.ctrl. Fully backward compatible when omitted. - docker/Dockerfile: adds the CPU-only torch and rdkit dependencies needed by the classifier. - Tutorial docs updated with usage instructions for both the AWS and Slurm workflows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional machine learning classifier to the ATG-VS (Adaptive Target-Guided Virtual Screening) pipeline. After tranches/collections are selected for the ATG Primary Screen, this classifier scores every ligand in each selected collection (not just the sparse sample docked during the ATG Prescreen) and keeps only the ones predicted worth docking, which can substantially reduce the number of ligands actually docked.
The classifier is a fully-connected network over 1024-bit/radius-2 Morgan fingerprints (1024-512-256-128-1, ReLU/ReLU/ReLU/Sigmoid), trained on the ATG Prescreen's own docking results (top-25% most-negative scores labeled positive, with majority-class undersampling).
tools/templates/ml_classifier.py: the classifier itself -- model definition, training (Adam, BCE loss, early stopping), atomic save/load, and batched inference.tools/afvs_train_ml_classifier.py: one-shot host-side CLI that trains the classifier on postprocessed ATG Prescreen results (supports both the AWS/Athena ranking file and the raw Slurm per-collection summary CSVs).tools/afvs_apply_ml_classifier_atg-primaryscreen.py: fetches each tranche-selected collection's full ligand set -- reusingafvs_run.py's ownunpack_item()/get_attrs()andafvs_prepare_workunits.py's collection-addressing helpers directly rather than reimplementing them -- and writes acsv_collection_key_ligand-format ligand list. This is an existing, already-supportedcollection_list_typeinall.ctrl, so no changes are needed to the docking engine (afvs_run.py) itself.afvs_prepare_atg-primary-screen-folders.sh: two new optional trailing arguments,ml_classifier_model:<path>andml_classifier_cutoff:<value>, following the script's existing prefix-tagged argument convention. When omitted, behavior is unchanged.docker/Dockerfile: adds the CPU-only torch wheel and rdkit, the classifier's only new dependencies.tutorials/tutorial-1-afvs-on-awsandtutorial-2-afvs-on-slurm,preparing-the-atg-primary-screen.md): usage instructions for training and applying the classifier.