Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hgarrereyn committed Jan 6, 2021
1 parent 27b2cbf commit 0fd6a7f
Show file tree
Hide file tree
Showing 92 changed files with 603 additions and 1,437 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
**/*.pyc
**/__pycache__
.ipynb_checkpoints
old

data/**
!data/README.md

pretrained/**
!pretrained/README.md

.DS_Store
grid_0.right_answer.json
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@

# 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

Expand Down
13 changes: 0 additions & 13 deletions config/partitions.py

This file was deleted.

7 changes: 6 additions & 1 deletion configurations/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
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 \
Expand Down
35 changes: 35 additions & 0 deletions configurations/final.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"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"
}
30 changes: 30 additions & 0 deletions configurations/layer_type_sweep/lig_simple.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"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",
"acc_type": 0,
"lig_typer": "simple"
}
30 changes: 30 additions & 0 deletions configurations/layer_type_sweep/lig_simple_h.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"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",
"acc_type": 0,
"lig_typer": "simple_h"
}
30 changes: 30 additions & 0 deletions configurations/layer_type_sweep/lig_single.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"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",
"acc_type": 0,
"lig_typer": "single"
}
30 changes: 30 additions & 0 deletions configurations/layer_type_sweep/lig_single_h.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"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",
"acc_type": 0,
"lig_typer": "single_h"
}
30 changes: 30 additions & 0 deletions configurations/layer_type_sweep/rec_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"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"
}
30 changes: 30 additions & 0 deletions configurations/layer_type_sweep/rec_meta_mix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"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"
}
30 changes: 30 additions & 0 deletions configurations/layer_type_sweep/rec_simple_h.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"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"
}
30 changes: 30 additions & 0 deletions configurations/layer_type_sweep/rec_single.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"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"
}
30 changes: 30 additions & 0 deletions configurations/layer_type_sweep/rec_single_h.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"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"
}
Loading

0 comments on commit 0fd6a7f

Please sign in to comment.