Hi,

I have this MDL file (I removed the header):

 12 11  0  0  0  0  0  0  0  0999 V2000
    0.0000    0.0000    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 O   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
    0.0000    0.0000    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  5  1  0  0  0  0
  1  2  1  0  0  0  0
  2  3  1  0  0  0  0
  3  9  1  0  0  0  0
  3  8  1  0  0  0  0
  3  4  1  0  0  0  0
  4 11  1  0  0  0  0
  4 10  1  0  0  0  0
  4  5  1  0  0  0  0
  5 12  1  0  0  0  0
  5  6  1  0  0  0  0
  6  7  1  0  0  0  0
M  END

It should correspond to this molecule: O1OCCC1O (in SMILES format). I
verified the MDL file manually. However, when I convert the file to a SMILES
string with openbabel, I get this: O1OCCC1O.[H], which is almost correct,
but for some reason it decides to add on a random hydrogen. I am treating
the hydrogens explicitly in the MDL file, because I have to keep track of
their exact indices, so I cannot remove them from the file. The script I am
using is

import pybel

mol = pybel.readfile('mdl', 'mol.mdl').next()
print mol.write(format='smi')

What am I missing?



--
View this message in context: 
http://forums.openbabel.org/Erroneous-molecule-from-MDL-file-tp4659331.html
Sent from the General discussion mailing list archive at Nabble.com.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://pubads.g.doubleclick.net/gampad/clk?id=1444514421&iu=/41014381
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to