kiharalab / GNN_DOVE

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

AttributeError: 'NoneType' object has no attribute 'GetNumAtoms' #1

Closed BioLaoXu closed 3 years ago

BioLaoXu commented 3 years ago

Dear developers,GNN_DOVE is pretty cool tool for docking protein-complexes,traditional docking methods are too slow(auto-dock vina or zdock etc),I have successfully downloaded and deployed your software in centos7(GPU RTX 3090),then i test it with official '"correct.pdb",The software runs very quickly and successfully,just like bellow:

>**python main.py --mode=0 -F ./test2/correct.pdb --gpu=0 --fold=5**  
/Tools/AnalysisTools/GNN_DOVE-main/Predict_Result existed
/Tools/AnalysisTools/GNN_DOVE-main/Predict_Result/Single_Target existed
/Tools/AnalysisTools/GNN_DOVE-main/Predict_Result/Single_Target/Fold_5_Result existed
/Tools/AnalysisTools/GNN_DOVE-main/Predict_Result/Single_Target/Fold_5_Result/correct created
Extracting 1900/1900 atoms for receptor, 983/983 atoms for ligand
start alarm signal.
After filtering the interface region, 48/234 residue in receptor, 60/109 residue in ligand
After filtering the interface region, 387 receptor, 522 ligand
close alarm signal.
    Total params: 0.2175270000M

and then,I then input it from my own PDB files that genarate from MODELLER 10.1,i use the sub-tool pdb-tool(pdb_rplchain) change the chain ID for the two raw pdb files(set alpha.pdb with chain A and set beta.pdb with chain B ),then i run the GNN_DOVE with many protein-complexes model(only put alpha.pdb and beta.pdb in./test/),but an error occurred,just like bellow:

>python main.py --mode=1 -F ./test/ --gpu=0 --fold=5
/Tools/AnalysisTools/GNN_DOVE-main/Predict_Result existed
/Tools/AnalysisTools/GNN_DOVE-main/Predict_Result/Multi_Target created
/Tools/AnalysisTools/GNN_DOVE-main/Predict_Result/Multi_Target/Fold_5_Result created
/Tools/AnalysisTools/GNN_DOVE-main/Predict_Result/Multi_Target/Fold_5_Result/test created
    Total params: 0.2175270000M
/Tools/AnalysisTools/GNN_DOVE-main/Predict_Result/Multi_Target/Fold_5_Result/test/alpha created
Extracting 1628/1628 atoms for receptor, 0/0 atoms for ligand
start alarm signal.
After filtering the interface region, 0/200 residue in receptor, 0/0 residue in ligand
After filtering the interface region, 0 receptor, 0 ligand
close alarm signal.
Traceback (most recent call last):
  File "main.py", line 53, in <module>
    predict_multi_input(input_path, params)
  File "/Tools/AnalysisTools/GNN_DOVE-main/predict/predict_multi_input.py", line 89, in predict_multi_input
    input_file = Prepare_Input(structure_path)
  File "/Tools/AnalysisTools/GNN_DOVE-main/data_processing/Prepare_Input.py", line 50, in Prepare_Input
    receptor_count = receptor_mol.GetNumAtoms()
AttributeError: 'NoneType' object has no attribute 'GetNumAtoms'

there is my two pdb files(Set the txt suffix just for upload github), alpha.pdb.txt beta.pdb.txt In addition,i use the pdb_merge tools merge tow pdb files into one pdb file ,then testing the GNN_DOVE,an error occurred,lust like bellow:

>python main.py --mode=0 -F ./test/ab.pdb --gpu=0 --fold=5
/Tools/AnalysisTools/GNN_DOVE-main/Predict_Result existed
/Tools/AnalysisTools/GNN_DOVE-main/Predict_Result/Single_Target existed
/Tools/AnalysisTools/GNN_DOVE-main/Predict_Result/Single_Target/Fold_5_Result existed
/Tools/AnalysisTools/GNN_DOVE-main/Predict_Result/Single_Target/Fold_5_Result/ab created
Extracting 1628/1628 atoms for receptor, 1751/1751 atoms for ligand
start alarm signal.
After filtering the interface region, 0/201 residue in receptor, 0/208 residue in ligand
After filtering the interface region, 0 receptor, 0 ligand
close alarm signal.
Traceback (most recent call last):
  File "main.py", line 46, in <module>
    predict_single_input(input_path,params)
  File "/Tools/AnalysisTools/GNN_DOVE-main/predict/predict_single_input.py", line 85, in predict_single_input
    input_file=Prepare_Input(structure_path)
  File "/Tools/AnalysisTools/GNN_DOVE-main/data_processing/Prepare_Input.py", line 50, in Prepare_Input
    receptor_count = receptor_mol.GetNumAtoms()
AttributeError: 'NoneType' object has no attribute 'GetNumAtoms'

In the end, i check the difference between official '"correct.pdb" and my own alpha.pdb and beta.pdb and ab.pdb,i found that official '"correct.pdb" has an extra column of information,just like bellow: fig

So my question is that how to correctly prepare the input file format of GNN_DOVE, or how to convert my pdb format to official '"correct.pdb" format ,howerer maybe there are no residue in my case after filtering ,Looking forward to your reply ,thanks!

wang3702 commented 3 years ago

Thanks a lot for using our method! Actually, I checked your file and did not find obvious bugs for your pdb files. This error is raised by rdkit because of your pdb format problem. I have two suggestions for you that may help your: 1 Try to use first few residues to build a pdb to see if that works or not. If that works, that mean some lines in your file has some problems. 2 Post your issue here https://github.com/rdkit/rdkit to see if they can find out any bugs for your pdb files.

BioLaoXu commented 3 years ago

thanks,@wang3702, By the way, if the GNN_DOVE run is successful, is there any way to get the structure of the receptor-ligand complex pdb file.

wang3702 commented 3 years ago

I think you can use the dataset we used in our paper: Zdock benchmark or Dockground Benchmark.