Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process_protein_3d.py #1

Open
11140321 opened this issue Oct 9, 2023 · 4 comments
Open

process_protein_3d.py #1

11140321 opened this issue Oct 9, 2023 · 4 comments

Comments

@11140321
Copy link

11140321 commented Oct 9, 2023

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

@nnkhang19
Copy link
Collaborator

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.

@11140321
Copy link
Author

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?

@nnkhang19
Copy link
Collaborator

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.

@11140321
Copy link
Author

Thank you very much for your answer. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants