hi all, the current nightly build of JChemPaint now fully works with InChI's. http://www.ebi.ac.uk/steinbeck-srv/jchempaint-nightly/ You can now paste/generate/open/save InChI's.
Previously InChI strings could be parsed, but not generated. The problem with generation using jniinchi is that somewhere down the line the Java method System.load(..) is called. At this point a platform specific library needs to be loaded, and for applets and Java stored procedures (like in Orchem) this spells trouble. The current solution relies on a C to Java conversion done with nestedVm (http://wiki.brianweb.net/NestedVM/NestedVM) resulting in a single whopper class. This class is put in a Jar file accompanied by a few required runtime nestedVM classes. The code has been committed to SVN, for those interested it's here: http://cdk.svn.sourceforge.net/viewvc/cdk/jchempaint/trunk/src/main/org/openscience/jchempaint/inchi/ http://cdk.svn.sourceforge.net/viewvc/cdk/jchempaint/trunk/lib/ The good thing about this solution is obviously that it works for Orchem and for the applet cross platform (tested on Centos, Windows XP and Leopard). Also, if new InChI software is released you can build a new jar file immediately (providing nestedVM converts it without problems as it does now) The downside is the size of the class: the Jar file measures 1.5Mb, the source file is 23Mb (!) of low level Java. Also, the interaction is command-line style, because it is a class representation of the executable 'stdinchi'. You need to communicate with the class through input/output/log files. This is not very elegant, it would be nice to talk strings and exceptions rather than files and error logs. So I'm not sure if this solution would be a candidate to go into the CDK as such. The current jniinchi solution is more elegant. By the way I applied the CDK's InChIGeneratorTest to this solution, and all tests pass except "testGetInchiFromMethylRadical". This is because the atomcontainer needs to be put into a Molfile first, and there certain details get lost. Perhaps this could be fixed though. cheers, Mark ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ Cdk-user mailing list Cdk-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdk-user