Dear James,
On Fri, May 20, 2011 at 4:54 PM, James Davidson jepdavid...@gmail.com wrote:
Dear All,
I am currently having some problems using the AllChem.ConstrainedEmbed() -
which I have previously used successfully in version 2010_09_1 (Windows py26
binary). The following example demonstrates the issue:
from rdkit import Chem
from rdkit.Chem import AllChem
template = Chem.MolFromSmiles(c1cnn(Cc2c2)c1)
mol = Chem.MolFromSmiles(c1ccc(Cn2ncc(-c3c3)c2)cc1)
Now I give the template some 3D coordinates:
AllChem.EmbedMolecule(template)
AllChem.UFFOptimizeMolecule(template)
and finally, try to force an overlay of 'mol' onto 'template'
AllChem.ConstrainedEmbed(mol, template, True)
Traceback (most recent call last):
File pyshell#7, line 1, in module
AllChem.ConstrainedEmbed(mol, template, True)
File C:\RDKit_2010_12_1\rdkit\Chem\AllChem.py, line 294, in
ConstrainedEmbed
rms = AlignMol(mol,core,atomMap=algMap)
RuntimeError: Range Error
Yep, there's a bug here. Something changed and apparently this bit of
code isn't being tested.
I'll check in a real fix and some tests, but the quick fix is to
modify the area around line 294 of AllChem.py from:
# rotate the embedded conformation onto the core:
rms = AlignMol(mol,core,atomMap=algMap)
to:
# rotate the embedded conformation onto the core:
algMap = [(y,x) for (x,y) in algMap]
rms = AlignMol(mol,core,atomMap=algMap)
Thanks for reporting this,
-greg
--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss