kiharalab / GNN_DOVE

Code for "Protein Docking Model Evaluation by Graph Neural Networks"
GNU General Public License v3.0
56 stars 22 forks source link

Which GPU or should I use? #9

Open Tizzzzy opened 1 week ago

Tizzzzy commented 1 week ago

Hi author, All of my package version is same as README, but I am using a RTX 4090 GPU. After I run this command: python main.py --mode=0 -F=../1ypo.pdb --gpu=0 --fold=1 I got this:

(gnn_dove) root@C.12289559:/GNN_DOVE$ python main.py --mode=0 -F=../1ypo.pdb --gpu=0 --fold=1
/GNN_DOVE/Predict_Result created                                                                                                                                                      
/GNN_DOVE/Predict_Result/Single_Target created                                                                                                                                        
/GNN_DOVE/Predict_Result/Single_Target/Fold_1_Result created                                                                                                                          
/GNN_DOVE/Predict_Result/Single_Target/Fold_1_Result/1ypo created                                                                                                                     
Extracting 1044/0 atoms for receptor, 7314/8358 atoms for ligand                                                                                                                      
start alarm signal.                                                                                                                                                                   
After filtering the interface region, 718/1044 residue in receptor, 873/7314 residue in ligand                                                                                        
After filtering the interface region, 718 receptor, 1264 ligand                                                                                                                       
['ATOM      1  N   ALA A 142      29.218  41.101  17.063  1.00 42.98           N  \n', 'ATOM      2  CA  ALA A 142      27.727  41.114  17.117  1.00 43.02           C  \n', 'ATOM      3  C   ALA A 142      27.217  40.248  18.265  1.00 42.75 ... ]
close alarm signal.
/GNN_DOVE/Predict_Result/Single_Target/Fold_1_Result/1ypo/Input.rinterface /GNN_DOVE/Predict_Result/Single_Target/Fold_1_Result/1ypo/Input.linterface
    Total params: 0.2175270000M
/opt/conda/envs/gnn_dove/lib/python3.6/site-packages/torch/cuda/__init__.py:104: UserWarning: 
NVIDIA GeForce RTX 4090 with CUDA capability sm_89 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70 sm_75.
If you want to use the NVIDIA GeForce RTX 4090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

  warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))
Traceback (most recent call last):
  File "main.py", line 46, in <module>
    predict_single_input(input_path,params)
  File "/GNN_DOVE/predict/predict_single_input.py", line 112, in predict_single_input
    Final_Pred=Get_Predictions(dataloader, device, model)
  File "/GNN_DOVE/predict/predict_single_input.py", line 62, in Get_Predictions
    pred= model.test_model((H, A1, A2, V, Atom_count), device)
  File "/GNN_DOVE/model/GNN_Model.py", line 144, in test_model
    c_hs = self.embede(c_hs)
  File "/opt/conda/envs/gnn_dove/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/opt/conda/envs/gnn_dove/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 93, in forward
    return F.linear(input, self.weight, self.bias)
  File "/opt/conda/envs/gnn_dove/lib/python3.6/site-packages/torch/nn/functional.py", line 1692, in linear
    output = input.matmul(weight.t())
RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling `cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)`

I am wondering what GPU and CUDA version did you use? Thank you

wang3702 commented 1 week ago

I think your torch version did not work well with your cuda and cudnn version. please check here to install proper torch: https://pytorch.org/get-started/previous-versions/#v170. Simple test after torch installation:

import torch
torch.cuda.is_available()
Tizzzzy commented 1 week ago

Hi author, Thanks, it works now. However, I want to double check with you about the latent representation of a protein in the model. You said the representation of the model is on this line: c_hs = self.embede_graph((c_hs, c_adjs1, c_adjs2)) However, when I print it out, most of its value is zero and with shape of torch.Size([1, 1982, 140]) image

But if I print out c_hs = self.Get_Prediction(c_hs, num_atoms) this line, I got below image with shape torch.Size([1, 140]). image I was wondering with one is correct representation of the protein. Thank you

wang3702 commented 1 week ago

This is because this is sum up of all atoms embedding to get per protein encoding. I think you are right, this is more suitable if you want to use embedding for the protein complex.