Hi Stephanie,

On Mon, Oct 17, 2016 at 7:58 PM, Stéphanie Valleau <svall...@stanford.edu>
wrote:

> For some reason I do not get a plot of H2 with the following code:
>
>     mole = Chem.MolFromSmiles('[H][H]')
>     AllChem.Compute2DCoords(mole)
>     Draw.MolToFile(mole,name,size=(300,300))
>
> I only get a white square in output, whereas other molecules such as
>
>     mole = Chem.MolFromSmiles('[N][CH][OH]')
>
> plot with no trouble.
>
> I am running on MacOsX
>
> Any reason for this?
>

It looks like a bug in AllChem.Compute2DCoords:

In [3]: m = Chem.MolFromSmiles('[H][H]')
   ...: AllChem.Compute2DCoords(m)
   ...:
Out[3]: 0

In [4]: print(Chem.MolToMolBlock(m))

     RDKit          2D

  2  1  0  0  0  0  0  0  0  0999 V2000
       nan       nan    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
       nan       nan    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0
M  END

I'll file that and we'll fix it.

Thanks for finding and reporting the problem.

Best,
-greg
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to