Problems reading cml files with Marvin

User 086627a2ec

15-08-2006 10:53:46

Hi,





I am trying to use cml files where the molecule propertylists are written like:





<propertyList dictRef="">


<property dictRef="">


<scalar dataType="xsd:integer" title="Step Number">1</scalar>


</property>


</propertyList>





The problem is that Marvin 4.1 won't read these. The error seems to be in dataType="" definition in the scalar element (while I remove it, all is OK). The format is openbabel2 type cml writing appended with the dataType declaration which we need in our application. Marvin 4.0 reads this OK. Is there any change to make 4.1 read these also?

ChemAxon 7c2d26e5cf

16-08-2006 17:39:34

We will check the issue.

User ef5e605ae6

16-08-2006 20:16:36

I think there's no change, marvin also reads things like this, you probably did something wrong. I tried this cml:


Code:
<?xml version="1.0" ?>


<molecule id="m1">


  <propertyList>


    <property dictRef="">


      <scalar dataType="xsd:integer" title="Step Number">1</scalar>


    </property>


  </propertyList>


  <atomArray>


  </atomArray>


  <bondArray>


  </bondArray>


</molecule>



If you convert it from cml to cml with molconvert, then the result is almost the same, only the title attribute is omitted from the <scalar>:


Code:
<?xml version="1.0" ?>


<molecule id="m1">


  <propertyList>


    <property dictRef="" title="">


      <scalar dataType="xsd:integer">1</scalar>


    </property>


  </propertyList>


  <atomArray>


  </atomArray>


  <bondArray>


  </bondArray>


</molecule>



So what is the problem exactly?

User 086627a2ec

17-08-2006 05:33:25

Hi,





I tested this some more and I noticed that the problem seems to be with dataTypes other than: string, boolean or integer. We have been using dataType="xsd:decimal" and some others (for identifying images etc. attached to the structure). To be more specific, the viewer, sketcher and mspace don't read these.





I'll attach one file that is not going into Marvin 4.1.0 but which is loaded nicely to 4.0.6.

User ef5e605ae6

17-08-2006 09:57:21

Because dataType was simply neglected earlier, only string properties were supported.


In Marvin 4.1, properties can have types. However, not all possible types are implemented, that is why you got NullPointerException for xsd:decimal. I fixed it:


1. xsd:decimal will be the same as xsd:double (converted to xsd:double by molconvert)


2. unknown xsd types are assumed to be string.


The fix will appear in Marvin 4.1.1.