Skip to content

Commit

Permalink
Complete equivariant embedding net
Browse files Browse the repository at this point in the history
  • Loading branch information
Isomorpfishm committed Sep 22, 2023
1 parent 4180f20 commit 5de8ca5
Show file tree
Hide file tree
Showing 12 changed files with 1,730 additions and 1,630 deletions.
6 changes: 3 additions & 3 deletions MakeGraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# ================== #
# 1. Find RMSD of docked ligand poses from crystal structure #
# 2. Retrieve molecular features of protein and ligand #
# 3. Prepare node and edge features (ODDT) #
# 4. Dump all relevant info to pickle file #
# 3. Prepare node and edge features (ODDT/RDKit) #
# 4. Dump all relevant info to PyTorch .pt file #
# #
#################################################################

Expand Down Expand Up @@ -42,7 +42,7 @@
parser.add_argument('--config', type=str,
default='./config/config.yml')
parser.add_argument('--outdir', type=str,
default='./dataset/crossdocked_graph10')
default='./dataset/crossdocked_graph10_v2')
args = parser.parse_args()

# Logging
Expand Down
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,35 @@ Principal Investigator: **[Assoc Prof MU Yuguang](https://dr.ntu.edu.sg/cris/rp/

## Introduction

![Protein-ligand complex as three-dimensional heterogeneous graph](img/PLComplex.png)
![Protein-ligand complex as three-dimensional heterogeneous graph](img/PLGraph.png)
<p align="center">
<em>Protein-ligand complex as a three-dimensional heterogeneous graph, with an emphasis on interactions between the protein and ligand.</em>
</p>

## Installation

Working inside a Conda virtual environment is hightly encouraged, but not necessary. Create a new environment with the command:

```
conda env create -f environment.yml
```

Otherwise, install the following dependencies sequentially.

```
conda create -n SINGA python=3.10
conda activate SINGA
conda install -c conda-forge openbabel
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
pip install torch_geometric==2.3.1
pip install torch-scatter==2.1.1 torch-sparse==0.6.17
pip install biopandas==0.4.1 pytorch-lightning==2.0.6
pip install rdkit==2023.3.3
pip install oddt==0.7
pip install easydict==1.10
pip install e3nn==0.5.1
```

## Directory tree

```
Expand All @@ -25,7 +49,7 @@ Principal Investigator: **[Assoc Prof MU Yuguang](https://dr.ntu.edu.sg/cris/rp/
|__ /ckpt
|__ /config
|__ /dataset
|__ /crossdocked_graph10
|__ /crossdocked_graph10_v2
|__ /example
|__ /features
|__ /img
Expand Down
49 changes: 28 additions & 21 deletions config/train.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,37 @@
dataset:
path: ./dataset/crossdocked_graph10
path: ./dataset/crossdocked_graph10_v2
split: ./dataset/split_by_name.pt
atomic_distance_cutoff: 4.0

embedding:
dataloader:
atomic_distance_cutoff: 4.0
batch_size: 64
dropout: 0.13
heads: 2
hetero_aggr: mean
hidden_channels_la:
- 48
- 76
- 121
hidden_channels_pa:
- 48
- 57
- 68
lr: 0.001
mlp_channels:
- 1
- 189
- 256
molecular_embedding_size: 4
num_layers: 3
str_for_hparams: 'InterMol length: 4.0A'
weight_decay: 0.0001
num_workers: 1

embedding:
edge_channels: 16
sphere_channels: 16
attn_hidden_channels: 128
attn_alpha_channels: 32
attn_value_channels: 16
ffn_hidden_channels: 512
lmax_list:
- 6
mmax_list:
- 2
cutoff: 10.0
max_num_elements: 43
num_heads: 7
num_layers: 3
norm_type: 'rms_norm_sh'
activation_type: 'scaled_silu'
use_atom_edge_embedding: True
share_atom_edge_embedding: True
grid_resolution: None
alpha_drop: 0.0
proj_drop: 0.0
drop_path_rate: 0.0

model:
name: SINGA
Loading

0 comments on commit 5de8ca5

Please sign in to comment.