From 4469259a5b408d2f5d45e7ed02a214400585de92 Mon Sep 17 00:00:00 2001 From: Qinqing Liu Date: Tue, 17 Nov 2020 13:58:32 -0500 Subject: [PATCH] checked all steps --- README.md | 7 ++-- pdbbind/python/Elements.java | 5 +++ pdbbind/python/clean_index_error.py | 2 ++ pdbbind/python/generate_pdb_list.py | 2 +- pdbbind/python/utils.py | 2 +- .../script/configs/test_resnet_depth6.yaml | 34 +++++++++++++++++++ .../script/configs/train_resnet_depth6.yaml | 2 +- tensorflow/script/network_factory.py | 5 +-- 8 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 tensorflow/script/configs/test_resnet_depth6.yaml diff --git a/README.md b/README.md index 81c1a7b..cd7c84e 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,14 @@ cd ../.. # set-up TF enviroment and compile cpp conda create -n OctSurf_env tensorflow-gpu==1.14.0 conda activate OctSurf_env +conda install -c conda-forge openbabel conda install -c conda-forge yacs tqdm pip install sklearn pip install matplotlib pip install seaborn -# uncomment if want to visualize +# uncomment if want to visualize in Paraview # pip install vtk -conda install -c conda-forge openbabel + cd octree/external && git clone --recursive https://github.com/wang-ps/octree-ext.git cd .. && mkdir build && cd build @@ -53,7 +54,7 @@ cd octree_folder ls -lh cd ../../../../ -# parse by python +# parse by python, and visualization(optional) cd python python octree_parse.py cd ../ diff --git a/pdbbind/python/Elements.java b/pdbbind/python/Elements.java index 070bb3a..266e240 100755 --- a/pdbbind/python/Elements.java +++ b/pdbbind/python/Elements.java @@ -1,3 +1,8 @@ +/* +From CDK +For Atom Radius Reference +*/ + /* * Copyright (C) 2006-2012 Egon Willighagen * 2014 Mark B Vine (orcid:0000-0002-7794-0426) diff --git a/pdbbind/python/clean_index_error.py b/pdbbind/python/clean_index_error.py index 09c830f..11570a6 100644 --- a/pdbbind/python/clean_index_error.py +++ b/pdbbind/python/clean_index_error.py @@ -5,6 +5,8 @@ def clean_index_for_file(folder): contents = folder.split('/') id = contents[-1] # ligand_file = folder + '/{}_ligand.mol2'.format(id) + if id == 'index' or id == 'readme': + return None file = folder + '/{}_pocket.pdb'.format(id) rewrite = False diff --git a/pdbbind/python/generate_pdb_list.py b/pdbbind/python/generate_pdb_list.py index 6a35c7b..4aa014e 100644 --- a/pdbbind/python/generate_pdb_list.py +++ b/pdbbind/python/generate_pdb_list.py @@ -225,4 +225,4 @@ def write_points_list(general_dic, core_folders, refined_folders, mode = 'reg', # check_dic_id(general_dic, general_folders, refined_folders, core_folders) # write_octree_list(general_dic, core_folders, refined_folders, depth = 5, mode = mode, view_num = 24) - write_points_list(general_dic, core_folders, refined_folders, mode=mode, density = 3) + write_points_list(general_dic, core_folders, refined_folders, mode=mode, density = None) diff --git a/pdbbind/python/utils.py b/pdbbind/python/utils.py index 8925f5c..6200758 100644 --- a/pdbbind/python/utils.py +++ b/pdbbind/python/utils.py @@ -1,4 +1,4 @@ -# utils for adaptive_octree_opt.py. +# utils for visualization import numpy as np diff --git a/tensorflow/script/configs/test_resnet_depth6.yaml b/tensorflow/script/configs/test_resnet_depth6.yaml new file mode 100644 index 0000000..e90ee1d --- /dev/null +++ b/tensorflow/script/configs/test_resnet_depth6.yaml @@ -0,0 +1,34 @@ +SOLVER: + gpu: 0, + run: test + ckpt: ./logs/pdbbind/resnet_points_reg_6/model/iter_188000.ckpt + test_iter: 11400 + task: reg + +DATA: + test: + dtype: points + distort: True + depth: 6 + full_depth: 2 + axis: xyz + angle: (180, 180, 180) + interval: (1, 1, 1) + scale: 0.0 + jitter: 0.125 + location: ../../pdbbind/data_folder/tfrecords/train_reg_points_den3.tfrecords + shuffle: 1 + batch_size: 1 + x_alias: data + +MODEL: + name: resnet #resnet or vgg + channel: 24 + nout: 1 + depth: 6 + resblock_num: 3 + dropout: (0.0, ) + +LOSS: + num_class: 1 + weight_decay: 0.001 \ No newline at end of file diff --git a/tensorflow/script/configs/train_resnet_depth6.yaml b/tensorflow/script/configs/train_resnet_depth6.yaml index 882efbb..6741ebc 100644 --- a/tensorflow/script/configs/train_resnet_depth6.yaml +++ b/tensorflow/script/configs/train_resnet_depth6.yaml @@ -41,7 +41,7 @@ DATA: x_alias: data MODEL: - name: resnet #ocnn or resnet + name: resnet #vgg or resnet channel: 24 nout: 1 depth: 6 diff --git a/tensorflow/script/network_factory.py b/tensorflow/script/network_factory.py index 265c6f5..f7b1b84 100644 --- a/tensorflow/script/network_factory.py +++ b/tensorflow/script/network_factory.py @@ -1,11 +1,8 @@ import tensorflow as tf from network_cls import network_ocnn, network_resnet, network_cnn_grids, network_resnet_grids -from network_unet import network_unet -from network_hrnet import HRNet -# from network_unet_scannet import network_unet34 def cls_network(octree, flags, training, reuse=False): - if flags.name.lower() == 'ocnn': + if flags.name.lower() == 'vgg': return network_ocnn(octree, flags, training, reuse) elif flags.name.lower() == 'resnet': return network_resnet(octree, flags, training, reuse)