From: Bob H. <ha...@st...> - 2006-07-08 04:46:48
|
Jmol developers -- advice needed Wavefunction xxx.spartan files are binary format OLE 2 "compound document" files. This is the format used by Microsoft for Excel and Word. (see http://sc.openoffice.org/compdocfileformat.pdf) There is interest among some users to be able to open these files, because they contain the calculation and property archives, thus providing access to molecular orbitals and properties such as calculated charges and dipole moments. I can write something myself that is very simple and basically does the job (you just have to read a couple of 0.5K blocks, then follow the stream), but perhaps this is the time to add an official POI (whatever that stands for) compound document reader to Jmol. Or not. All I'm looking to do, really, is pull out the ARCHIVE section, which has all the geometry/basis/molecular orbital business in it, and perhaps PROPERTY ARCHIVE (which has the other stuff). I think with Apache POI API I could do this in about three lines of code, but I'm worried about the overhead in terms of delivering the applet. Q: Should we add a generic compound document reader that is already written and open source? Q: Is that overkill? Too much to add for one little reader? Q: Should we just write a little method that does this specifc task for this reader? A SIMPLE implemenation would just: a) read the header (0.5K) b) read the file system pointer blocks (a few K) c) read the directory (a few more K) d) find the desired file (ARCHIVE) e) read the file data into a string buffer f) pass the job to the spartanReader we already have (which can right now read the archive for MOs) This is all easy. The file format, at least for .spartan files, is about as simple as they get. Q: Should we NOT do this? Bob Hanson |