Problem reading mol files

User 25d107bd42

24-04-2013 13:42:37

Hi, having now Marvin 5.12.3 I found problems reading mol-files produced by another program.

Reading the following mol-file leads to an ERROR message

First line Ethene
Second line
Third line
  6  5  0  0  0  0  0  0  0  0  0    0
    1.3303    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.0003    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.9036    0.9243    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    1.9036   -0.9243    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
   -0.5736    0.9243    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
   -0.5736   -0.9243    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  2  0  0  0  0
  1  3  1  0  0  0  0
  1  4  1  0  0  0  0
  2  5  1  0  0  0  0
  2  6  1  0  0  0  0

ERROR:
Cannot read molecule.../ethene.mol. null

STACK TRACE:
chemaxon.formats.MolFormatException: Invalid header block.
    at chemaxon.marvin.io.formats.mdl.MolImport.readCtab(MolImport.java:865)
    at chemaxon.marvin.io.formats.mdl.MolImport.readMol0(MolImport.java:749)   and so on

After some analysis I found: The forth line should look like

6  5  0  0  0  0            999 V2000


May be it was in the definition of mol-files, but when programs do not produce 999 and V2000 (and the number of zeros after the
number of atoms and bonds is often also different) then we have problems transferring molecules.


So I have three questions:

1) What is the meaning of 999 and V2000 ?

2) Using Marvin 5.11.4 there were no problems. Why has Marvin changed this input policy ?

3) Does MarvinSketch need these two values ? It's OK, when Marvin writes the two values in the output. But is it necessary to check the input and to cancel reading the input mol file?


Best regards, Hans-Ulrich

ChemAxon 044c6721bc

25-04-2013 14:58:48










HUWagner wrote:

1) What is the meaning of 999 and V2000 ?

2) Using Marvin 5.11.4 there were no problems. Why has Marvin changed this input policy ?

3) Does MarvinSketch need these two values ? It's OK, when Marvin writes the two values in the output. But is it necessary to check the input and to cancel reading the input mol file?


Best regards, Hans-Ulrich



Dear Hans-Ulrich,


 


This is a bug. Yes, we changed the header verifying, and it became too strict. It will be fixed in the next version (5.12.4.).


No, Marvin Sketch doesn't need this values.


 


Best regards,


Janos

User 25d107bd42

25-04-2013 15:57:25

Dear Janos,


in the meantime we have found the following:


V2000 is the old version of a mol-file (coming from MDL as I remember)


V3000 is the "Extended Version" of a mol-file. (To use the same extender for different formats is absurd, but this is an old chemistry bug).


And: The good experience is: The old Marvin version 5.11.4 is able to read all four possibilities: V2000 with or without the parameter in the header line number 4 and V3000 also with or without the parameter.


Obviously Marvin is able to diagnose the format by reading the following very different lines.


To write the two types is an old feature of MarvinSketch (I just tried it in Marvin 4.1.13 which is still running on my Linux machine


So it's a really good decision to "relax" back. Thank you.


Best regards, Hans-Ulrich