Open Dadiao-shuai opened 9 months ago
Hi @Dadiao-shuai, similar to get_ligand_center
, maybe you could also define a get_ligand_range
. Take a look at the largest rectangular box when you go through the dataset and see if that fits the [25, 25, 25]
cubic box. (Not very familiar with PDBbind but there seems to be ligands with MW > 1000)
Hope this is mildly helpful..
Hi @Kerro-junior,
I feel that the way you check "can_molecule_fit" should work if you center the grid box at the mid-range x, y, z, which is:
[(max(x_coords) + min(x_coords)) / 2, (max(y_coords) + min(y_coords)) / 2, (max(z_coords) + min(z_coords)) / 2]
If you still want to center the grid box at the center of ligand, you should check the distances from the center of the ligand to the x, y, z extrema and make sure all extrema are within the box. In principle, the distances should be no more than 30/2 but I would leave some room for errors (so maybe leave some minimal distance to the actual boundary and don't let them fit with the equal sign).
Edits: My initial reply was very unclear, sorry
Everything goes fine, your suggestion is nice. @rwxayheee
Hi @Kerro-junior, To me it's a bit difficult to tell what the problem is without looking at the files and the rest of your codes. I have the following suggestions –
min_point = center - size/2
max_point = center + size/2
can be done outside of the function.
min_point = center - size/2 + 0.05
max_point = center + size/2 - 0.05
Hope this helps..
Edits: wrong sign, my bad..
For more information, when I used the sdf files of ligand in PDBbind dataset to convert into PDBQT,
mk_prepare_ligand.py -i ligand.sdf -o ligand.pdbqt
, the mk_prepare_ligand.py reported some error informations like:[17:07:07] ERROR: Could not sanitize molecule ending on line 39 [17:07:07] ERROR: Can't kekulize mol. Unkekulized atoms: 3 4 5 6 7 [17:07:22] Can't kekulize mol. Unkekulized atoms: 14 15 16 17 18
Does this influence the coordinates of sdf files and therir corresponding pdbqt files?
These messages indicated problems with bond order or atom type assignment in your input sdf. Were you still able to generate the ligand.pdbqt?
I already have computed the ligand center according to the input ligand.pdbqt, then I use the following script to calculate the vina.score( ) :
I think [25,25,25] is big enough for ligands in PDBbind dataset, But it raises error: