ComputArtCMCG / PLANET

45 stars 11 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'PLANET/PLANET.param' #2

Open gmf12 opened 1 year ago

gmf12 commented 1 year ago

Hi,

I was wondering if you could help me with this problem. I installed it on center Linux, however, when I was running the test (PLANET_run.py -p adrb2.pdb -l adrb2_ligand.sdf -m mols.sdf) return with this erro:

Traceback (most recent call last): File "PLANET_run.py", line 172, in predicted_affinities,mol_names,smis = workflow(protein_pdb,mol_file,ligand_sdf,centeriod_x,centeriod_y,centeriod_z) File "PLANET_run.py", line 102, in workflow estimator = PlanetEstimator(device) File "PLANET_run.py", line 12, in init self.model.load_parameters() File "/home/gmf/PLANET/PLANET_model.py", line 91, in load_parameters self.load_state_dict(torch.load(parameters,map_location=self.device)) File "/home/gmf/anaconda3/envs/planet/lib/python3.6/site-packages/torch/serialization.py", line 579, in load with _open_file_like(f, 'rb') as opened_file: File "/home/gmf/anaconda3/envs/planet/lib/python3.6/site-packages/torch/serialization.py", line 230, in _open_file_like return _open_file(name_or_buffer, mode) File "/home/gmf/anaconda3/envs/planet/lib/python3.6/site-packages/torch/serialization.py", line 211, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: 'PLANET/PLANET.param'

Thank you for your code and support.

Best, Glaucio

aquilazhang commented 1 year ago

Hello! It is my mistake to upload a previous version of the file "PLANET_model.py". I have updated the right code now. This will solve this issue. Thanks for your test!

gmf12 commented 1 year ago

Hi Zhang,

It works! Thank you for your support and help. However, I have a doubt when preparing the files to run PLANET. In -l I must put the file with coordinates from docking studies or just put the PLANET to running a docking pose as well? Do you have some tutorials on how to prepare these files?

Best, Glaucio

aquilazhang commented 1 year ago

Dear Glaucio, PLANET does not require ligand coordinates. It directly predicts binding affinity based on 2D molecule structures. Thus, there is no need to preprocess ligand files. Both 2D .sdf and SMILES (.smi) works. But, if you want to use PLANET to rank docked poses, I suggest that maybe PLANET is not a good choice. As you can see in the article, the docking power of PLANET is in middle class. PLANET was not designed for this purpose at the beginning and we do not provide the code for ranking poses. Sorry for that.Hope these can help with you~

Zhang, Xiangying