Hi Dimitri,

AllChem.EmbedMolecule returns the ID of the conformer that is generated, -1
on failure. In this case you get -1.

In [13]: m = Chem.MolFromMolFile('./tetraoleylcardiolipin.sdf')
In [15]: AllChem.EmbedMolecule(m)
Out[15]: -1

For large molecules like this one, it is often more effective to provide
the useRandomCoords argument to EmbedMolecule:

In [16]: AllChem.EmbedMolecule(m,useRandomCoords=True)
Out[16]: 0

This also works if Hs have been added:

In [17]: m = Chem.MolFromMolFile('./tetraoleylcardiolipin.sdf')
In [18]: mh=Chem.AddHs(m)
In [21]: AllChem.EmbedMolecule(mh,useRandomCoords=True)
Out[21]: 0

Best,
-greg


On Mon, Feb 9, 2015 at 10:49 PM, Dimitri Maziuk <dmaz...@bmrb.wisc.edu>
wrote:

> Hi all,
>
> I'm generating a 3D mol:
>
>     assert isinstance( self._mol, rdkit.Chem.rdchem.Mol )
>     m = rdkit.Chem.AddHs( self._mol )
>     rdkit.Chem.AllChem.EmbedMolecule( m )
>     rdkit.Chem.AllChem.UFFOptimizeMolecule( m )
>     return rdkit.Chem.MolToMolBlock( m )
>
> and I get
>
>     rdkit.Chem.AllChem.UFFOptimizeMolecule( m )
>     ValueError: Bad Conformer Id
>
> on the attached molecule. I wonder if it's triggering a bug in RDKit
> somewhere. (I did try RemoveHs() instead of add, it made no difference.)
>
> It's not a nice molecule...
> --
> Dimitri Maziuk
> Programmer/sysadmin
> BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to