Matrix dimension error when I am trying to inference
Closed this issue · 12 comments
please use torchdrug=0.1.2
please use torchdrug=0.1.2
Thank you for your response. I installed torchdrug=0.1.2 but still have that issue.
That's strange. maybe creating a fresh new environment, and repeat the installation could solve it.
That's strange. maybe creating a fresh new environment, and repeat the installation could solve it.
Currently, I don't know why the TankBind_prediction return. Edge_attr with shape [200 x 18] rather than [200 x 19] induces the issue above. @luwei0917 Do you have any idea about this one?
node_s=[569, 6],
node_v=[569, 3, 3],
batch=[569],
ptr=[6]
},
compound={ x=[95, 56],
x_batch=[95],
x_ptr=[6],
batch=[95],
ptr=[6]
},
(protein, p2p, protein)={
edge_index=[2, 13707],
edge_s=[13707, 32],
edge_v=[13707, 1, 3]
},
(compound, c2c, compound)={
edge_index=[2, 200],
edge_weight=[200],
edge_attr=[200, 18]
}
)
could be the input smiles has an extra Hydrogen exists? maybe add something like "Chem.RemoveAllHs(mol)" could work.
@luwei0917
I just tried it, but that still does not work.
Can you try docking using this data in your environment?
This will help my project a lot, thank you so much.
Duy
This is what I got. (I updated my code, and below the most recent version result.)
Hope this helps.
Diphenhydramine_ligand
RDKit 3D
19 20 0 0 0 0 0 0 0 0999 V2000
10.3070 0.2890 -12.9240 C 0 0 0 0 0 0 0 0 0 0 0 0
9.2510 -0.2110 -12.0450 N 0 0 0 0 0 0 0 0 0 0 0 0
9.6180 -1.5130 -11.4920 C 0 0 0 0 0 0 0 0 0 0 0 0
7.9840 -0.3020 -12.7700 C 0 0 0 0 0 0 0 0 0 0 0 0
6.8530 -0.6830 -11.8280 C 0 0 0 0 0 0 0 0 0 0 0 0
6.3290 0.5010 -11.2400 O 0 0 0 0 0 0 0 0 0 0 0 0
5.5330 0.2090 -10.0990 C 0 0 0 0 0 0 0 0 0 0 0 0
6.3580 0.3570 -8.8370 C 0 0 0 0 0 0 0 0 0 0 0 0
7.6760 0.7630 -8.9370 C 0 0 0 0 0 0 0 0 0 0 0 0
8.4350 0.8990 -7.7760 C 0 0 0 0 0 0 0 0 0 0 0 0
7.8630 0.6280 -6.5330 C 0 0 0 0 0 0 0 0 0 0 0 0
6.5320 0.2200 -6.4510 C 0 0 0 0 0 0 0 0 0 0 0 0
5.7730 0.0830 -7.6140 C 0 0 0 0 0 0 0 0 0 0 0 0
4.2620 1.0360 -10.0750 C 0 0 0 0 0 0 0 0 0 0 0 0
3.0850 0.4470 -9.6520 C 0 0 0 0 0 0 0 0 0 0 0 0
1.9150 1.2070 -9.6280 C 0 0 0 0 0 0 0 0 0 0 0 0
1.9450 2.5430 -10.0270 C 0 0 0 0 0 0 0 0 0 0 0 0
3.1420 3.1200 -10.4500 C 0 0 0 0 0 0 0 0 0 0 0 0
4.3110 2.3590 -10.4750 C 0 0 0 0 0 0 0 0 0 0 0 0
7 6 1 0
6 5 1 0
2 4 1 0
2 1 1 0
2 3 1 0
7 8 1 0
7 14 1 0
8 9 2 0
8 13 1 0
14 15 2 0
14 19 1 0
5 4 1 0
9 10 1 0
15 16 1 0
13 12 2 0
19 18 2 0
10 11 2 0
16 17 2 0
12 11 1 0
18 17 1 0
M END
$$$$
This is what I got. (I updated my code, and below the most recent version result.) Hope this helps.
Diphenhydramine_ligand RDKit 3D
19 20 0 0 0 0 0 0 0 0999 V2000 10.3070 0.2890 -12.9240 C 0 0 0 0 0 0 0 0 0 0 0 0 9.2510 -0.2110 -12.0450 N 0 0 0 0 0 0 0 0 0 0 0 0 9.6180 -1.5130 -11.4920 C 0 0 0 0 0 0 0 0 0 0 0 0 7.9840 -0.3020 -12.7700 C 0 0 0 0 0 0 0 0 0 0 0 0 6.8530 -0.6830 -11.8280 C 0 0 0 0 0 0 0 0 0 0 0 0 6.3290 0.5010 -11.2400 O 0 0 0 0 0 0 0 0 0 0 0 0 5.5330 0.2090 -10.0990 C 0 0 0 0 0 0 0 0 0 0 0 0 6.3580 0.3570 -8.8370 C 0 0 0 0 0 0 0 0 0 0 0 0 7.6760 0.7630 -8.9370 C 0 0 0 0 0 0 0 0 0 0 0 0 8.4350 0.8990 -7.7760 C 0 0 0 0 0 0 0 0 0 0 0 0 7.8630 0.6280 -6.5330 C 0 0 0 0 0 0 0 0 0 0 0 0 6.5320 0.2200 -6.4510 C 0 0 0 0 0 0 0 0 0 0 0 0 5.7730 0.0830 -7.6140 C 0 0 0 0 0 0 0 0 0 0 0 0 4.2620 1.0360 -10.0750 C 0 0 0 0 0 0 0 0 0 0 0 0 3.0850 0.4470 -9.6520 C 0 0 0 0 0 0 0 0 0 0 0 0 1.9150 1.2070 -9.6280 C 0 0 0 0 0 0 0 0 0 0 0 0 1.9450 2.5430 -10.0270 C 0 0 0 0 0 0 0 0 0 0 0 0 3.1420 3.1200 -10.4500 C 0 0 0 0 0 0 0 0 0 0 0 0 4.3110 2.3590 -10.4750 C 0 0 0 0 0 0 0 0 0 0 0 0 7 6 1 0 6 5 1 0 2 4 1 0 2 1 1 0 2 3 1 0 7 8 1 0 7 14 1 0 8 9 2 0 8 13 1 0 14 15 2 0 14 19 1 0 5 4 1 0 9 10 1 0 15 16 1 0 13 12 2 0 19 18 2 0 10 11 2 0 16 17 2 0 12 11 1 0 18 17 1 0 M END $$$$
Thank you so much, can you share the newest code for this one?
I still cannot see any new commit on the main branch.
@luwei0917 I just evaluated the score for the result above, the result is very promising.
Affinity: -7.21968 (kcal/mol)
CNNscore: 0.45801
CNNaffinity: 5.54829
CNNvariance: 0.20558
Intramolecular energy: -0.64148
Please share the notebook / code that you ran for this example. This will help me a lot.
I'm sorry. I thought you only need a result. The new code is currently for in-house use only. I tried with with github version. It also works. I don't know what happened. I have uploaded my notebook to your google drive.
@luwei0917 can you reveal what is different between your in-house model with public models? I tried to evaluate both but your in-house model significant better.