ComputArtCMCG / PLANET

44 stars 11 forks source link

Problem:Tensors must have same number of dimensions: got 2 and 3 #6

Open AIM132 opened 2 months ago

AIM132 commented 2 months ago

I encountered the following error while running the program. How can I resolve it? Thanks

Traceback (most recent call last): File "../../../PLANET_run.py", line 174, in predicted_affinities,mol_names,smis = workflow(protein_pdb,mol_file,ligand_sdf,centeriod_x,centeriod_y,centeriod_z) File "../../../PLANET_run.py", line 109, in workflow estimator.set_pocket_from_coordinate(protein_pdb,centeriod_x,centeriod_y,centeriod_z) File "../../../PLANET_run.py", line 29, in set_pocket_from_coordinate self.res_features = self.model.cal_res_features_helper(self.pocket.res_features,self.pocket.alpha_coordinates) File "/home/liyixiang/PLANET-main/PLANET_model.py", line 97, in cal_res_features_helper fresidues = self.proteinegnn.pre_cal_res_features(fresidues,coordinates) File "/home/liyixiang/PLANET-main/layers.py", line 305, in pre_cal_res_features ],dim=-1) RuntimeError: Tensors must have same number of dimensions: got 2 and 3

aquilazhang commented 2 months ago

This happens when your protein structure is not read correctly by PLANET. You may need check the protein structure. Or, the you may input an inappropriate command. Please make sure you have gone through the example in demo.

AIM132 commented 2 months ago

I also report the same error when using the protein file provided by the DUD dataset

AIM132 commented 2 months ago

I tried PDBfixer and SPDBV, but neither of them had any effect

aquilazhang commented 2 months ago

Would you show me the command?

AIM132 commented 2 months ago

Thank you for your persistent answer. It may be that there was an issue with my command. Once again, thank you

AIM132 commented 2 months ago

But I found that there are still some structures that have been fixed by PDBFixer and still report the error 'protein need fix'

aquilazhang commented 2 months ago

PDBFixer may not fix residues missing alpha-carbon. You may try other softwares for molecule modeling.

AIM132 commented 2 months ago

ok,thanks