mseok / PIGNet2

MIT License
15 stars 8 forks source link

errors while trying examples #5

Closed CLG68 closed 3 weeks ago

CLG68 commented 2 months ago

Hi,

I had a problem with a few things during installation such as with torch-sparse. I solved them by doing this:

conda create -n pignet2 python=3.9 conda activate pignet2 conda install rdkit=2022.03.4 openbabel pymol-open-source -c conda-forge conda install kalininalab::reduce conda install cudatoolkit=11.1 -c conda-forge pip install -r requirements.txt export LD_LIBRARY_PATH=/home/christian/anaconda3/envs/pignet2/lib:$LD_LIBRARY_PATH

It would not be compatible with my RTX4060 Ti as cuda 11.1 does not support Ada Lovelace GPU but I tried it with an RTX 3070.

This is the error I get now:

(pignet2) christian@christian-linux01:/media/christian/VS/VS/Scoring_PIGNet2$ python src/exe/predict.py ./src/ckpt/pda_0.pt -p examples/protein.pdb -l examples/ligand1.sdf examples/ligand2.sdf -o examples/case3.txt Load from: /media/christian/VS/VS/Scoring_PIGNet2/src/ckpt/pda_0.pt Writing results to: /media/christian/VS/VS/Scoring_PIGNet2/examples/case3.txt device: device(type='cuda', index=0) Warning: 'protein' may become a reserved selection keyword in the future Traceback (most recent call last): File "/media/christian/VS/VS/Scoring_PIGNet2/src/exe/predict.py", line 161, in main(args) File "/media/christian/VS/VS/Scoring_PIGNet2/src/exe/predict.py", line 106, in main data_list = [ File "/media/christian/VS/VS/Scoring_PIGNet2/src/exe/predict.py", line 107, in read_data( File "/media/christian/VS/VS/Scoring_PIGNet2/src/exe/predict.py", line 68, in read_data datum = complex_to_data(ligand, mol_target, key=name, conv_range=conv_range) File "/media/christian/VS/VS/Scoring_PIGNet2/src/data/data.py", line 260, in complex_to_data if attr in ligand.keys() and ligand[attr] is not None: # Check for None TypeError: 'list' object is not callable

sangyeon-hits commented 3 weeks ago

Hello, we apologize for our late response.

It seems the line

if attr in ligand.keys() and ligand[attr] is not None: # Check for None

appearing in your message is different from data.py we uploaded.

The ligand object is of type torch_geometric.data.Data, where the attribute keys is defined to be a property. The following lines in our data.py shows such:

https://github.com/mseok/PIGNet2/blob/f621aaaa9fe781e67763c8adbffff6faca6db95b/src/data/data.py#L272-L274

Please note that we require the torch-geometric version to be 2.0.3. I get that in more recent versions, Data.keys now has become a method. I personally don't like such incompatibility of PyG ☹️

sangyeon-hits commented 3 weeks ago

I'll close the issue. Please reopen it if similar errors still happen.