Marshall,

On Tue, Mar 31, 2009 at 6:56 AM, Marshall Levesque
<[email protected]> wrote:
> I found there are a few molecules that have undergone a crazy transformation
> from 2D to 3D with RDKit in my batch conversion due to having a long carbon
> chain.
> Here is one example molecules on eMolecules.com:
> http://www.emolecules.com/cgi-bin/more?vid=600149
> I've attached the input (2D) and output (3D) SDFs.
> Here are other examples that result in the same "messy" 3D structures:
> http://www.emolecules.com/cgi-bin/more?vid=479405
> http://www.emolecules.com/cgi-bin/more?vid=445711
> Has anyone seen this type of problem before?  Is there a way to fix the
> "messy" conversion?  Or a way to detect when this long carbon chain is
> present and tell RDKit to not convert/output these molecules?

looks to me like the UFF optimization just didn't converge. Here's a
better version, generated as follows:

#---------------
[3]>>> m = Chem.MolFromMolFile('crazymol.2D.sdf')

[6]>>> mh = Chem.AddHs(m)

[7]>>> AllChem.EmbedMolecule(mh)
Out[7] 0

[8]>>> AllChem.UFFOptimizeMolecule(mh)
Out[8] 1

[9]>>> AllChem.UFFOptimizeMolecule(mh)
Out[9] 1

[10]>>> AllChem.UFFOptimizeMolecule(mh)
Out[10] 1

[11]>>> AllChem.UFFOptimizeMolecule(mh)
Out[11] 0

[12]>>> print >>file('crazymol.3D.gl.sdf','w+'),Chem.MolToMolBlock(mh)
#---------------

converting that series of calls to UFFOptimizeMolecule to something
general is left as an exercise to the reader. :-)

-greg

Attachment: crazymol.3D.gl.sdf
Description: StarMath document

Reply via email to