I'm finding that h-bond interactions can differ depending on whether hydrogens have been added to the protein. On digging into this I find that the same interactions are found but the 'strict' property can be different.
Example code:
from oddt import toolkit, interactions
pfile = '/home/timbo/github/im/docking-validation/targets/mpro/expts/virtual-screening/work/Mpro-x1093_0/receptor_apo-desolv.pdb'
lfile = '/home/timbo/github/im/docking-validation/datasets/XChem/MPRO/Mpro-x1093_0/Mpro-x1093_0.mol'
print('Using protein:', pfile)
print('Using ligand:', lfile)
protein = next(toolkit.readfile('pdb', pfile))
protein.protein = True
print('Original (no Hs)')
ligands = toolkit.readfile('sdf', lfile)
for mol in ligands:
protein_atoms, ligand_atoms, strict = interactions.hbonds(protein, mol)
for p, l, s in zip(protein_atoms, ligand_atoms, strict):
print(p['coords'], l['coords'], s)
protein.addh()
print('Hs added')
ligands = toolkit.readfile('sdf', lfile)
for mol in ligands:
protein_atoms, ligand_atoms, strict = interactions.hbonds(protein, mol)
for p, l, s in zip(protein_atoms, ligand_atoms, strict):
print(p['coords'], l['coords'], s)
protein.removeh()
print('Hs removed')
ligands = toolkit.readfile('sdf', lfile)
for mol in ligands:
protein_atoms, ligand_atoms, strict = interactions.hbonds(protein, mol)
for p, l, s in zip(protein_atoms, ligand_atoms, strict):
print(p['coords'], l['coords'], s)
The corresponding output is:
Original (no Hs)
[ 2.714 1.994 15.977] [ 4.601 1.537 18.494] True
[ 3.132 -1.458 17.76 ] [ 4.601 1.537 18.494] False
[ 9.532 2.713 18.513] [ 8.937 1.388 21.144] True
Hs added
[ 2.714 1.994 15.977] [ 4.601 1.537 18.494] True
[ 3.132 -1.458 17.76 ] [ 4.601 1.537 18.494] False
[ 9.532 2.713 18.513] [ 8.937 1.388 21.144] False
Hs removed
[ 2.714 1.994 15.977] [ 4.601 1.537 18.494] True
[ 3.132 -1.458 17.76 ] [ 4.601 1.537 18.494] False
[ 9.532 2.713 18.513] [ 8.937 1.388 21.144] True
I can provide the inputs if needed (seems like I can add attachments here).
Any thoughts on this would be welcome.
Tim