From f47a245fd83f1825188027687dc65253aa065f50 Mon Sep 17 00:00:00 2001 From: mainguyenanhvu <26211591+mainguyenanhvu@users.noreply.github.com> Date: Fri, 21 Apr 2023 09:37:43 +0700 Subject: [PATCH 1/7] Create install.sh --- install.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..1a488f6 --- /dev/null +++ b/install.sh @@ -0,0 +1,32 @@ +conda create -n deepsurf python=3.6 +conda activate deepsurf +sudo apt update +sudo apt install -y p7zip +sudo apt install -y libopenbabel-dev +sudo apt install -y g++ +sudo apt install -y swig +conda install -c conda-forge openbabel +pip install numpy==1.13.3 +pip install tensorflow-gpu==1.13.1 +pip install scipy==1.2.2 +pip install scikit-learn==0.20.3 +pip install protobuf==3.6.1 + +git clone https://github.com/stemylonas/DeepSurf +cd DeepSurf + +cd lds +chmod a+x compile.sh +./compile.sh +cd .. + +pip install gdown +gdown 1nIBoD3_5nuMqgRGx4G1OHZwLsiUjb7JG +p7zip -d models.7z + +wget www.cgl.ucsf.edu/Overview/ftp/dms.zip +unzip dms.zip +rm dms.zip +cd dms +sudo make install +cd .. From ae2cd52d398d8e5074defd0856be9571fa52be94 Mon Sep 17 00:00:00 2001 From: mainguyenanhvu <26211591+mainguyenanhvu@users.noreply.github.com> Date: Fri, 21 Apr 2023 16:55:59 +0700 Subject: [PATCH 2/7] Update install.sh --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 1a488f6..ad1cd61 100644 --- a/install.sh +++ b/install.sh @@ -1,10 +1,11 @@ -conda create -n deepsurf python=3.6 +conda create -n deepsurf python=3.6.9 conda activate deepsurf sudo apt update sudo apt install -y p7zip sudo apt install -y libopenbabel-dev sudo apt install -y g++ sudo apt install -y swig +conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch conda install -c conda-forge openbabel pip install numpy==1.13.3 pip install tensorflow-gpu==1.13.1 From 871211c47b358c07c51582fff741f2fa860ec593 Mon Sep 17 00:00:00 2001 From: mainguyenanhvu <26211591+mainguyenanhvu@users.noreply.github.com> Date: Sat, 22 Apr 2023 10:38:31 +0700 Subject: [PATCH 3/7] Change import pybel to from openbabel import pybel --- tfbio_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tfbio_data.py b/tfbio_data.py index b60a089..ce5c5eb 100644 --- a/tfbio_data.py +++ b/tfbio_data.py @@ -7,7 +7,7 @@ import numpy as np -import pybel +from openbabel import pybel from math import ceil, sin, cos, sqrt, pi from itertools import combinations import collections From 80adfbbab1c8f8b1464db23af14fd1364efe65b1 Mon Sep 17 00:00:00 2001 From: mainguyenanhvu <26211591+mainguyenanhvu@users.noreply.github.com> Date: Sat, 22 Apr 2023 10:39:23 +0700 Subject: [PATCH 4/7] Change import pybel to from openbabel import pybel --- protein.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protein.py b/protein.py index 66ba471..a0b3407 100644 --- a/protein.py +++ b/protein.py @@ -7,7 +7,7 @@ """ import os, numpy as np -import pybel +from openbabel import pybel from utils import simplify_dms From b55c48203053fcd2cd738df1f00a247b4eadeec6 Mon Sep 17 00:00:00 2001 From: mainguyenanhvu <26211591+mainguyenanhvu@users.noreply.github.com> Date: Sat, 22 Apr 2023 10:40:54 +0700 Subject: [PATCH 5/7] Remove adundant dependencies and fix order install --- install.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index ad1cd61..16d3f15 100644 --- a/install.sh +++ b/install.sh @@ -7,11 +7,8 @@ sudo apt install -y g++ sudo apt install -y swig conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch conda install -c conda-forge openbabel -pip install numpy==1.13.3 pip install tensorflow-gpu==1.13.1 -pip install scipy==1.2.2 pip install scikit-learn==0.20.3 -pip install protobuf==3.6.1 git clone https://github.com/stemylonas/DeepSurf cd DeepSurf @@ -21,7 +18,7 @@ chmod a+x compile.sh ./compile.sh cd .. -pip install gdown +pip install gdown --ignore-installed certifi gdown 1nIBoD3_5nuMqgRGx4G1OHZwLsiUjb7JG p7zip -d models.7z @@ -29,5 +26,6 @@ wget www.cgl.ucsf.edu/Overview/ftp/dms.zip unzip dms.zip rm dms.zip cd dms +chmod 777 -R . sudo make install cd .. From 25e6bbf1fc0f56822d5e73e50fa9be91e776e9cf Mon Sep 17 00:00:00 2001 From: mainguyenanhvu <26211591+mainguyenanhvu@users.noreply.github.com> Date: Sat, 22 Apr 2023 10:48:12 +0700 Subject: [PATCH 6/7] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index b0999ce..153ec11 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,12 @@ sudo make install cd .. ``` +Or easily setup by using install.sh: +``` +chmod +x install.sh +./install.sh +``` + Usage example --------------- @@ -51,5 +57,10 @@ Usage example python predict.py -p protein.pdb -mp model_path -o output_path ``` +Ex: +``` +python predict.py -p protein.pdb -mp models/ -o output +``` + For more input options, check 'predict.py'. All other molecules (waters, ions, ligands) should be removed from the structure. If the input protein has not been protonated, add --protonate to the execution command.\ The provided models have been trained on a subset of scPDB (training_subset_of_scpdb.proteins) From 2d4d6acc6b888f4da721af97fb6b50755e72d9b0 Mon Sep 17 00:00:00 2001 From: mainguyenanhvu <26211591+mainguyenanhvu@users.noreply.github.com> Date: Sat, 22 Apr 2023 11:17:14 +0700 Subject: [PATCH 7/7] Change heavyprevalence to heavydegree, hetero too --- tfbio_data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tfbio_data.py b/tfbio_data.py index ce5c5eb..7428443 100644 --- a/tfbio_data.py +++ b/tfbio_data.py @@ -62,7 +62,7 @@ def __init__(self, atom_codes=None, atom_labels=None, specified this argument is ignored. named_properties: list of strings, optional Names of atomic properties to retrieve from pybel.Atom object. If - not specified ['hyb', 'heavyvalence', 'heterovalence', + not specified ['hyb', 'heavydegree', 'heterodegree', 'partialcharge'] is used. save_molecule_codes: bool, optional (default True) If set to True, there will be an additional feature to save @@ -151,7 +151,7 @@ def __init__(self, atom_codes=None, atom_labels=None, self.NAMED_PROPS = named_properties else: # pybel.Atom properties to save - self.NAMED_PROPS = ['hyb', 'heavyvalence', 'heterovalence', + self.NAMED_PROPS = ['hyb', 'heavydegree', 'heterodegree', 'partialcharge'] self.FEATURE_NAMES += self.NAMED_PROPS