Skip to content

Add optional ML classifier for molecule prioritization within collections#62

Open
akshat998 wants to merge 1 commit into
vfvs-1from
add-ml-tranche-classifier
Open

Add optional ML classifier for molecule prioritization within collections#62
akshat998 wants to merge 1 commit into
vfvs-1from
add-ml-tranche-classifier

Conversation

@akshat998

@akshat998 akshat998 commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds an optional FNN classifier (Morgan fingerprints -> 512 -> 256 -> 128 -> 1, trained with Adam/BCE and early stopping) that prioritizes which molecules within a collection are worth docking, based on a prescreen run's docking scores. Disabled by default (use_ml_classifier=false in all.ctrl); default behavior is unchanged.
  • Implemented consistently on both execution paths: one-queue.sh (Slurm/HPC) invokes a small CLI bridge (ml_classifier_predict.py) once per collection since the rest of that pipeline is Bash; vf_aws_run.py (AWS Batch) calls the shared ml_classifier module in-process, batched once per subjob.
  • New one-shot training script tools/train_ml_classifier.py: trains on a prescreen run's existing docking-score summary files, no Slurm/AWS Batch job needed.
  • Unifies the Slurm and AWS Batch docking-score summary file schemas (both now include a SMILES column, and both use the correct best/most-negative score for the "maximum-score" column), and updates vf_report.sh's column extraction ($4->$5) to match, since the prior mismatch would have silently misreported average score as the top-hit ranking score.
  • README and docs updated with a full prescreen -> train -> primary-screen walkthrough for new users.

…ions

Adds an FNN classifier (Morgan fingerprints -> 512 -> 256 -> 128 -> 1,
trained with Adam/BCE and early stopping) that plugs into the existing
tranche/collection-based screening workflow: train it once on a
prescreen run's docking-score summaries (tools/train_ml_classifier.py),
then each queue (Slurm) or AWS Batch subjob filters its own
collection(s) through it before docking, keeping only molecules
predicted worth the cost of a full docking run. Implemented
consistently across both execution paths:
- Slurm/HPC: one-queue.sh invokes a small CLI bridge
  (ml_classifier_predict.py) once per collection, since the rest of
  the pipeline is Bash and cannot run PyTorch directly.
- AWS Batch: vf_aws_run.py calls the shared ml_classifier module
  in-process, batched once per subjob.

Activated via all.ctrl (use_ml_classifier); disabled by default with
no change to existing behavior.

Also unifies the two execution paths' docking-score summary file
schema (both now include a SMILES column, and both use the
best/most-negative score for the "maximum-score" column, matching
what the column name implies), and updates vf_report.sh's column
extraction to match the corrected schema.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant