Commit 0fd6a7f2 authored by hgarrereyn's avatar hgarrereyn
Browse files

cleanup

parent 27b2cbf5
**/*.pyc
**/__pycache__
.ipynb_checkpoints
old
data/**
!data/README.md
pretrained/**
!pretrained/README.md
.DS_Store
grid_0.right_answer.json
# Lead Optimization
# DeepFrag
This repository contains code for machine learning based lead optimization.
# Overview
- `config`: fixed configuration information (eg. TRAIN/VAL/TEST partitions)
- `configurations`: benchmark model configurations
- `configurations`: benchmark model configurations (see [`configurations/README.md`](configurations/README.md))
- `data`: training/inference data (see [`data/README.md`](data/README.md))
- `leadopt`: main module code
- `models`: pytorch architecture definitions
- `data_util.py`: utility code for reading packed fragment/fingerprint data files
- `grid_util.py`: GPU-accelerated grid generation code
- (outdated) `infer.py`: code for inference with a trained model
- `metrics.py`: pytorch implementations of several metrics
- `model_conf.py`: contains code to configure and train models
- `util.py`: utility code for rdkit/openbabel processing
- (outdated) `scripts`: data processing scripts (see [`scripts/README.md`](scripts/README.md))
- `scripts`: data processing scripts (see [`scripts/README.md`](scripts/README.md))
- `train.py`: CLI interface to launch training runs
- (outdated) `leadopt.py`: CLI interface to run inference on new samples
# Dependencies
......
This diff is collapsed.
This folder contains benchmark model configurations referenced in the paper.
You can retrain from these configurations using the `train.py` script:
Overview:
- `layer_type_sweep/*`: experimenting with different parent/receptor typing schemes
- `voxelation_sweep/*`: experimenting with different voxelation types and atomic influence radii
- `final.json`: final production model
You can train new models using these configurations with the `train.py` script:
```sh
python train.py \
......
{
"version": "voxelnet",
"no_partitions": false,
"fragments": "./data/moad.h5",
"fingerprints": "./data/rdk10_moad.h5",
"learning_rate": 0.001,
"num_epochs": 50,
"test_steps": 400,
"batch_size": 16,
"grid_width": 24,
"grid_res": 0.75,
"fdist_min": null,
"fdist_max": 4,
"fmass_min": null,
"fmass_max": 150,
"ignore_receptor": false,
"ignore_parent": false,
"output_size": 2048,
"pad": false,
"blocks": [
64,
64
],
"fc": [
512
],
"use_all_labels": true,
"dist_fn": "cos",
"loss": "direct",
"point_radius": 1,
"point_type": 0,
"rec_typer": "simple",
"acc_type": 0,
"lig_typer": "simple"
}
{
"version": "voxelnet",
"no_partitions": false,
"fragments": "./data/fragments_desc.h5",
"fingerprints": "./data/fp_rdk_desc.h5",
"learning_rate": 0.0001,
"num_epochs": 500,
"test_steps": 400,
"batch_size": 16,
"fragments": "./data/moad.h5",
"fingerprints": "./data/rdk10_moad.h5",
"learning_rate": 0.001,
"num_epochs": 15,
"test_steps": 400,
"batch_size": 16,
"grid_width": 24,
"grid_res": 0.5,
"grid_res": 0.75,
"fdist_min": null,
"fdist_max": 3,
"fdist_max": 4,
"fmass_min": null,
"fmass_max": 150,
"ignore_receptor": false,
"ignore_parent": false,
"rec_typer": "simple",
"lig_typer": "simple",
"rec_channels": 4,
"lig_channels": 3,
"in_channels": 7,
"output_size": 2048,
"pad": false,
"blocks": [64, 64],
"fc": [512],
"use_all_labels": true,
"dist_fn": "cos",
"loss": "direct"
"loss": "direct",
"point_radius": 1,
"point_type": 3,
"rec_typer": "simple",
"acc_type": 0,
"lig_typer": "simple"
}
{
"version": "voxelnet",
"no_partitions": false,
"fragments": "./data/fragments_desc.h5",
"fingerprints": "./data/fp_rdk_desc.h5",
"fragments": "./data/moad.h5",
"fingerprints": "./data/rdk10_moad.h5",
"learning_rate": 0.001,
"num_epochs": 100,
"test_steps": 400,
"batch_size": 32,
"num_epochs": 15,
"test_steps": 400,
"batch_size": 16,
"grid_width": 24,
"grid_res": 1.0,
"grid_res": 0.75,
"fdist_min": null,
"fdist_max": 3,
"fdist_max": 4,
"fmass_min": null,
"fmass_max": 150,
"ignore_receptor": false,
"ignore_parent": false,
"rec_typer": "simple",
"lig_typer": "simple",
"rec_channels": 4,
"lig_channels": 3,
"in_channels": 7,
"output_size": 2048,
"pad": false,
"blocks": [32, 64],
"fc": [2048],
"blocks": [64, 64],
"fc": [512],
"use_all_labels": true,
"dist_fn": "cos",
"loss": "direct"
"loss": "direct",
"point_radius": 1,
"point_type": 3,
"rec_typer": "simple",
"acc_type": 0,
"lig_typer": "simple_h"
}
{
"version": "voxelnet",
"no_partitions": false,
"fragments": "./data/fragments_desc.h5",
"fingerprints": "./data/fp_rdk_desc.h5",
"fragments": "./data/moad.h5",
"fingerprints": "./data/rdk10_moad.h5",
"learning_rate": 0.001,
"num_epochs": 100,
"test_steps": 400,
"batch_size": 32,
"num_epochs": 15,
"test_steps": 400,
"batch_size": 16,
"grid_width": 24,
"grid_res": 1.0,
"grid_res": 0.75,
"fdist_min": null,
"fdist_max": 3,
"fdist_max": 4,
"fmass_min": null,
"fmass_max": 150,
"ignore_receptor": false,
"ignore_parent": false,
"rec_typer": "simple",
"lig_typer": "simple",
"rec_channels": 4,
"lig_channels": 3,
"in_channels": 7,
"output_size": 2048,
"pad": false,
"blocks": [32, 64],
"fc": [2048],
"blocks": [64, 64],
"fc": [512],
"use_all_labels": true,
"dist_fn": "cos",
"loss": "direct"
"loss": "direct",
"point_radius": 1,
"point_type": 3,
"rec_typer": "simple",
"acc_type": 0,
"lig_typer": "single"
}
{
"version": "voxelnet",
"no_partitions": false,
"fragments": "./data/fragments_desc.h5",
"fingerprints": "./data/fp_rdk_desc.h5",
"fragments": "./data/moad.h5",
"fingerprints": "./data/rdk10_moad.h5",
"learning_rate": 0.001,
"num_epochs": 100,
"test_steps": 400,
"batch_size": 32,
"num_epochs": 15,
"test_steps": 400,
"batch_size": 16,
"grid_width": 24,
"grid_res": 1.0,
"grid_res": 0.75,
"fdist_min": null,
"fdist_max": 3,
"fdist_max": 4,
"fmass_min": null,
"fmass_max": 150,
"ignore_receptor": false,
"ignore_parent": false,
"rec_typer": "simple",
"lig_typer": "simple",
"rec_channels": 4,
"lig_channels": 3,
"in_channels": 7,
"output_size": 2048,
"pad": false,
"blocks": [32, 64],
"fc": [2048],
"blocks": [64, 64],
"fc": [512],
"use_all_labels": true,
"dist_fn": "cos",
"loss": "support_v1"
"loss": "direct",
"point_radius": 1,
"point_type": 3,
"rec_typer": "simple",
"acc_type": 0,
"lig_typer": "single_h"
}
{
"version": "voxelnet",
"no_partitions": false,
"fragments": "./data/moad.h5",
"fingerprints": "./data/rdk10_moad.h5",
"learning_rate": 0.001,
"num_epochs": 15,
"test_steps": 400,
"batch_size": 16,
"grid_width": 24,
"grid_res": 0.75,
"fdist_min": null,
"fdist_max": 4,
"fmass_min": null,
"fmass_max": 150,
"ignore_receptor": false,
"ignore_parent": false,
"output_size": 2048,
"pad": false,
"blocks": [64, 64],
"fc": [512],
"use_all_labels": true,
"dist_fn": "cos",
"loss": "direct",
"point_radius": 1,
"point_type": 3,
"rec_typer": "meta",
"acc_type": 0,
"lig_typer": "simple"
}
{
"version": "voxelnet",
"no_partitions": false,
"fragments": "./data/moad.h5",
"fingerprints": "./data/rdk10_moad.h5",
"learning_rate": 0.001,
"num_epochs": 15,
"test_steps": 400,
"batch_size": 16,
"grid_width": 24,
"grid_res": 0.75,
"fdist_min": null,
"fdist_max": 4,
"fmass_min": null,
"fmass_max": 150,
"ignore_receptor": false,
"ignore_parent": false,
"output_size": 2048,
"pad": false,
"blocks": [64, 64],
"fc": [512],
"use_all_labels": true,
"dist_fn": "cos",
"loss": "direct",
"point_radius": 1,
"point_type": 3,
"rec_typer": "meta_mix",
"acc_type": 0,
"lig_typer": "simple"
}
{
"version": "voxelnet",
"no_partitions": false,
"fragments": "./data/moad.h5",
"fingerprints": "./data/rdk10_moad.h5",
"learning_rate": 0.001,
"num_epochs": 15,
"test_steps": 400,
"batch_size": 16,
"grid_width": 24,
"grid_res": 0.75,
"fdist_min": null,
"fdist_max": 4,
"fmass_min": null,
"fmass_max": 150,
"ignore_receptor": false,
"ignore_parent": false,
"output_size": 2048,
"pad": false,
"blocks": [64, 64],
"fc": [512],
"use_all_labels": true,
"dist_fn": "cos",
"loss": "direct",
"point_radius": 1,
"point_type": 3,
"rec_typer": "simple_h",
"acc_type": 0,
"lig_typer": "simple"
}
{
"version": "voxelnet",
"no_partitions": false,
"fragments": "./data/moad.h5",
"fingerprints": "./data/rdk10_moad.h5",
"learning_rate": 0.001,
"num_epochs": 15,
"test_steps": 400,
"batch_size": 16,
"grid_width": 24,
"grid_res": 0.75,
"fdist_min": null,
"fdist_max": 4,
"fmass_min": null,
"fmass_max": 150,
"ignore_receptor": false,
"ignore_parent": false,
"output_size": 2048,
"pad": false,
"blocks": [64, 64],
"fc": [512],
"use_all_labels": true,
"dist_fn": "cos",
"loss": "direct",
"point_radius": 1,
"point_type": 3,
"rec_typer": "single",
"acc_type": 0,
"lig_typer": "simple"
}
{
"version": "voxelnet",
"no_partitions": false,
"fragments": "./data/moad.h5",
"fingerprints": "./data/rdk10_moad.h5",
"learning_rate": 0.001,
"num_epochs": 15,
"test_steps": 400,
"batch_size": 16,
"grid_width": 24,
"grid_res": 0.75,
"fdist_min": null,
"fdist_max": 4,
"fmass_min": null,
"fmass_max": 150,
"ignore_receptor": false,
"ignore_parent": false,
"output_size": 2048,
"pad": false,
"blocks": [64, 64],
"fc": [512],
"use_all_labels": true,
"dist_fn": "cos",
"loss": "direct",
"point_radius": 1,
"point_type": 3,
"rec_typer": "single_h",
"acc_type": 0,
"lig_typer": "simple"
}
{
"version": "voxelnet",
"no_partitions": false,
"fragments": "./data/fragments_desc.h5",
"fingerprints": "./data/fp_rdk_desc.h5",
"learning_rate": 0.001,
"num_epochs": 300,
"test_steps": 500,
"batch_size": 32,
"grid_width": 24,
"grid_res": 1.0,
"fdist_min": 0.5,
"fdist_max": 3,
"fmass_min": null,
"fmass_max": 150,
"ignore_receptor": false,
"ignore_parent": false,
"rec_typer": "simple",
"lig_typer": "simple",
"rec_channels": 4,
"lig_channels": 3,
"in_channels": 7,
"output_size": 2048,
"pad": false,
"blocks": [32, 64],
"fc": [2048],
"use_all_labels": true,
"dist_fn": "mse",
"loss": "direct"
}
{"version": "voxelnet", "no_partitions": false, "fragments": "./data/moad.h5", "fingerprints": "./data/rdk10_moad.h5", "learning_rate": 0.001, "num_epochs": 15, "test_steps": 400, "batch_size": 16, "grid_width": 24, "grid_res": 0.75, "fdist_min": null, "fdist_max": 4, "fmass_min": null, "fmass_max": 150, "ignore_receptor": false, "ignore_parent": false, "output_size": 2048, "pad": false, "blocks": [64, 64], "fc": [512], "use_all_labels": true, "dist_fn": "cos", "loss": "direct", "point_radius": 1, "point_type": 0, "rec_typer": "simple", "acc_type": 0, "lig_typer": "simple"}
\ No newline at end of file
{"version": "voxelnet", "no_partitions": false, "fragments": "./data/moad.h5", "fingerprints": "./data/rdk10_moad.h5", "learning_rate": 0.001, "num_epochs": 15, "test_steps": 400, "batch_size": 16, "grid_width": 24, "grid_res": 0.75, "fdist_min": null, "fdist_max": 4, "fmass_min": null, "fmass_max": 150, "ignore_receptor": false, "ignore_parent": false, "output_size": 2048, "pad": false, "blocks": [64, 64], "fc": [512], "use_all_labels": true, "dist_fn": "cos", "loss": "direct", "point_radius": 1, "point_type": 1, "rec_typer": "simple", "acc_type": 0, "lig_typer": "simple"}
\ No newline at end of file
{"version": "voxelnet", "no_partitions": false, "fragments": "./data/moad.h5", "fingerprints": "./data/rdk10_moad.h5", "learning_rate": 0.001, "num_epochs": 15, "test_steps": 400, "batch_size": 16, "grid_width": 24, "grid_res": 0.75, "fdist_min": null, "fdist_max": 4, "fmass_min": null, "fmass_max": 150, "ignore_receptor": false, "ignore_parent": false, "output_size": 2048, "pad": false, "blocks": [64, 64], "fc": [512], "use_all_labels": true, "dist_fn": "cos", "loss": "direct", "point_radius": 1.75, "point_type": 4, "rec_typer": "simple", "acc_type": 0, "lig_typer": "simple"}
\ No newline at end of file
{"version": "voxelnet", "no_partitions": false, "fragments": "./data/moad.h5", "fingerprints": "./data/rdk10_moad.h5", "learning_rate": 0.001, "num_epochs": 15, "test_steps": 400, "batch_size": 16, "grid_width": 24, "grid_res": 0.75, "fdist_min": null, "fdist_max": 4, "fmass_min": null, "fmass_max": 150, "ignore_receptor": false, "ignore_parent": false, "output_size": 2048, "pad": false, "blocks": [64, 64], "fc": [512], "use_all_labels": true, "dist_fn": "cos", "loss": "direct", "point_radius": 1.75, "point_type": 5, "rec_typer": "simple", "acc_type": 0, "lig_typer": "simple"}
\ No newline at end of file
{"version": "voxelnet", "no_partitions": false, "fragments": "./data/moad.h5", "fingerprints": "./data/rdk10_moad.h5", "learning_rate": 0.001, "num_epochs": 15, "test_steps": 400, "batch_size": 16, "grid_width": 24, "grid_res": 0.75, "fdist_min": null, "fdist_max": 4, "fmass_min": null, "fmass_max": 150, "ignore_receptor": false, "ignore_parent": false, "output_size": 2048, "pad": false, "blocks": [64, 64], "fc": [512], "use_all_labels": true, "dist_fn": "cos", "loss": "direct", "point_radius": 2.5, "point_type": 0, "rec_typer": "simple", "acc_type": 0, "lig_typer": "simple"}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment