gnina / libmolgrid

Comprehensive library for fast, GPU accelerated molecular gridding for deep learning workflows
https://gnina.github.io/libmolgrid/
Apache License 2.0
144 stars 48 forks source link

example code in libmolgrid github #113

Open croshong opened 1 year ago

croshong commented 1 year ago

I'm now trying to reproduce 3D-cnn result with keras/tensorflow using cross dock dataset can I regard the example code in https://gnina.github.io/libmolgrid/tutorials/train_basic_CNN_with_Tensorflow.html

as def2017 model generation?

If it's true, to make another model such as HiRes Pose, HiRes Affinity, Def2018 the only thing that I need to do is modify create_model function in example code ?

Thanks in advance

dkoes commented 1 year ago

Yes, what problems are you running into that would make you think otherwise?

croshong commented 1 year ago

Thanks for your reply

I could find the model detail in https://github.com/gnina/models

Now I'm trying to make a simple 3D-cnn script with model in https://github.com/gnina/models in Keras/tensorflow

I can modify create model function

The thing that I'm not fully confident is the input generation part which involve molgrid.

In the example script in gnina.github.io/libmolgrid

The input data seems to be splitted into batch which has a size of 50 and fed into model

500 times( epoch) with next_batch() statement

I want to setup train/validation procedure and finally test procedure

to do that for each epoch

I extracted 10 bacth( maybe random?) for training and 10 batch( maybe random?) for validation and run train_on_batch and test_on_batch

and finally for test, extract 10 batch and predict with generated model and calculate R^2

attached files are the simple python code which does 3D cnn with keras/tensorlfow made by me

Can you please check whether there is problem or not?

really thanks for your hlep tt3_v2.txt

dkoes commented 1 year ago

Why do you think there might be a problem? Have you run the code? What is the output?

croshong commented 1 year ago

No there is no problem in running example code but I think there is only training data and training process in the example code so to include validation/test process for my purpose, I have modified the example code as attached file