[Rdkit-discuss] Getting to grips with Open3DAlign
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
|
From: Tim D. <tdu...@gm...> - 2016-06-21 14:41:19
|
Hi All,
I'm trying to get to grips with using Open3D Align in RDKit, but hitting
problems.
My approach is to generate random conformers of the probe molecule and
align it to the reference molecule. My example is cobbled together from
the examples in the cookbook.
from rdkit import Chem, RDConfig
from rdkit.Chem import AllChem, rdMolAlign
ref =
Chem.MolFromSmiles('NC(=[NH2+])c1ccc(C[C@@H](NC(=O)CNS(=O)(=O)c2ccc3ccccc3c2)C(=O)N2CCCCC2)cc1')
mol1 =
Chem.MolFromPDBFile(RDConfig.RDBaseDir+'/rdkit/Chem/test_data/1DWD_ligand.pdb')
mol1 = AllChem.AssignBondOrdersFromTemplate(ref, mol1)
mol2 =
Chem.MolFromPDBFile(RDConfig.RDBaseDir+'/rdkit/Chem/test_data/1PPC_ligand.pdb')
mol2 = AllChem.AssignBondOrdersFromTemplate(ref, mol2)
pyO3A = rdMolAlign.GetO3A(mol1, mol2)
score = pyO3A.Align()
print "Orig",score
Chem.MolToMolFile(mol1, "orig.mol")
cids = AllChem.EmbedMultipleConfs(mol1, numConfs=100, maxAttempts=100,
pruneRmsThresh=0.1, useExpTorsionAnglePrefs=True, useBasicKnowledge=True)
pyO3As = rdMolAlign.GetO3AForProbeConfs(mol1, mol2, numThreads=0)
i = 0
lowest = 999999999.9
highest = 0.0
for pyO3A in pyO3As:
i +=1
score = pyO3A.Align()
if score < lowest:
lowest = score
lowestConfId = i
if score > highest:
highest = score
highestConfId = i
print "Lowest:", lowest, lowestConfId
print "Highest:", highest, highestConfId
Chem.MolToMolFile(mol1, "lowest.mol", confId=lowestConfId)
Chem.MolToMolFile(mol1, "highest.mol", confId=highestConfId)
What I'm finding is that the alignments with the lowest and highest O3A
scores are much worse alignments (visually) than the original structure
(the structure from 1DWD). Typical scores are:
Original 1DWD structure: 0.38
Lowest scoring conformer: 0.186
Highest scoring conformer: 0.78
Now I'm assuming that lower O3A align scores are better (though that's
not specifically stated), so as my lowest score is lower than the
original alignment I would have expected it to be a better alignment,
but its clearly much worse. And if I'm wrong and higher scores are
better then the same applies.
Clearly I've not understood something correctly!
Tim
|