process_protein_3d.py
11140321 opened this issue · 4 comments
Hello, I download the source code and extract the data set PDB file, run the problem occurred, how to solve it
0%| | 0/229 [00:02<?, ?it/s]
Traceback (most recent call last):
File "/home/lq/Ligand_Generation-main/process_protein_3d.py", line 30, in
torch.save(protein_graph, os.path.join(root, "res_graph", f"{folder}.pt"))
File "/root/anaconda3/envs/cold/lib/python3.7/site-packages/torch/serialization.py", line 422, in save
with _open_zipfile_writer(f) as opened_zipfile:
File "/root/anaconda3/envs/cold/lib/python3.7/site-packages/torch/serialization.py", line 309, in _open_zipfile_writer
return container(name_or_buffer)
File "/root/anaconda3/envs/cold/lib/python3.7/site-packages/torch/serialization.py", line 287, in init
super(_open_zipfile_writer_file, self).init(torch._C.PyTorchFileWriter(str(name)))
RuntimeError: Parent directory data/kiba/prot_3d_for_KIBA/res_graph does not exist.
Process finished with exit code 1
Sorry for our incomplete instructions, you should create a folder named "res_graph" in the directory with /data/kiba/prot_3d_for_KIBA before running this code. I shall update the README file. Thank you for your question.
Thank you for your answer. Sorry to bother you again, when I ran the process_protein_3d.py, I found that transform = BaseTransform(device = args.device) was not used, and I want to ask what the atom.py file in the gvp folder is probably processed, and I found that it was not used when I ran the target affinity prediction? And the ligand_to_graph.pkl and ligand_to_ecfp.pkl are directly given in the dataset, how is it processed?
Thanks for your question. Sorry for our mistake that makes you confused. Actually, the transform=BaseTransform(device = args.device) should be removed (I forgot to remove this line when cleaning my code). Also for the atom.py file, I cloned the GVP folder from its repository. You can remove this file without affecting the codebase. Finally, two data files ligand_to_graph.pkl and ligand_to_ecfp.pkl are the hand-engineered features of the drug-like ligands. They are provided from the work of Voitsitskyi et al [1], which are the second reference in the README file. In fact, the chemical features of the ligands are processed by Rdkit, and these molecules are parsed to graphs by torch geometric.
Thank you very much for your answer. Thank you!