On 22/04/2008, Greg Landrum <[email protected]> wrote:
> Hi Noel,
>
>
> On Tue, Apr 22, 2008 at 2:48 PM, Noel O'Boyle <[email protected]> wrote:
> > Yes, I should have said - I'm using the latest release on Windows.
> >
> >
>
>
> By latest release do you mean the Jan2008 release or did you do a
> build of the svn version yourself?
"The most recent officially-blessed version". Jan2008. :-)
> I just tried this with the svn version on windows:
> [4] >>> print Chem.MolToMolBlock(Chem.MolFromSmiles("CCCC"))
>
>
> RDKit
>
> 4 3 0 0 0 0 0 0 0 0999 V2000
> 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> 1 2 1 0
> 2 3 1 0
> 3 4 1 0
> M END
>
>
> so that looks ok
>
> I can reproduce the error using the Jan2008 release though. The way to
> solve the problem with the Jan release is to add 2D coords to the
> molecule:
> [5] >>> from Chem import AllChem
> [6] >>> m = Chem.MolFromSmiles('CCCC')
> [7] >>> AllChem.Compute2DCoords(m)
> Out[7]: 0
> [8] >>> print Chem.MolToMolBlock(m)
>
>
>
>
> 4 3 0 0 0 0 0 0 0 0999 V2000
> 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
>
> 1.2990 0.7500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> 2.5981 -0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> 3.8971 0.7500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
>
> 1 2 1 0
> 2 3 1 0
> 3 4 1 0
> M END
>
Thanks,
Noel