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.
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Patch to XmlCmlReader
Test CML file to be loaded
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
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.
old CML test file
I've checked in a few changes in the CML reader that should take care of this.
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!
probably just need to do a clean build. Just delete the contents of the build/ directory and try again.