#26 Added support for new CML convention

open
Bob Hanson
File IO (8)
5
2011-03-16
2011-03-16
NickEngland
No

CML spec for representing a crystal structure has slightly changed, this patch allows the newer format (where the <crrystal> is outside the <molecule> inside a <module> to be loaded into jmol.

Discussion

  • NickEngland
    NickEngland
    2011-03-16

    Patch to XmlCmlReader

     
    Attachments
  • NickEngland
    NickEngland
    2011-03-16

    Test CML file to be loaded

     
    Attachments
  • Bob Hanson
    Bob Hanson
    2011-03-16

    Unfortunately, this patch breaks reading of older files. I will take a look at it, but please test using the test data set before submitting patches. Thanks,

    Also, this might be the time to update the CML reader as was done for the CIF reader. When bonding is shown, we now have the CIF reader loading the model as per general readers -- as a molecular model, not as a crystal model. Thus, the unit cell is only on by default when a lattice is given, as for example,

    load test-new.cif {1 1 1}

    It would make sense to do that. That way, a model loads the same way it would be loaded into Mercury.

    Bob

     
  • NickEngland
    NickEngland
    2011-03-16

    Odd, it works with the older files I have. It passed the JUnit tested when I tried running it in Eclipse. I normally work with Maven projects though, so I may not have run them properly. I'll upload the older file I was testing on.

     
  • NickEngland
    NickEngland
    2011-03-16

    old CML test file

     
    Attachments
  • Bob Hanson
    Bob Hanson
    2011-03-16

    I've checked in a few changes in the CML reader that should take care of this.

     
  • NickEngland
    NickEngland
    2011-03-17

    Thanks, that fixes the issue perfectly.

    RE Running the Jmol tests, I've installed ant again with the Junit library during the build so it can run the tests properly, but it fails with the message:

    [junit] java.lang.reflect.InvocationTargetException
    [junit] Caused by: java.lang.SecurityException: class "org.jmol.smiles.SmilesSearch"'s signer information does not match signer information of other classes in the same package

    I guess I haven't set up ant properly!

     
  • Bob Hanson
    Bob Hanson
    2011-03-17

    probably just need to do a clean build. Just delete the contents of the build/ directory and try again.