Very nice Bob. I am impressed with the quality of the surface. It is indistinguishable from the original cube file. I can see this being very useful. I have made use of a lot of isosurfaces, and have run into the problem of the large file size causing significant delays in downloading. I assume it will be a simple process to generate the jvxl file from a cube file? (using Jmol?)
I had been planning on asking Miguel about the idea of "slices" through a cube file, i.e. a color mapped slice at a constant value (x, y or z). This should be a small (and hopefully easy) extension of existing functions. Would this be possible with the jvxl files? Rick Richard Spinney Dept. of Chemistry Ohio State University Message: 5 Date: Mon, 22 May 2006 16:05:40 -0500 From: Bob Hanson <[EMAIL PROTECTED]> To: [email protected] Subject: Re: [Jmol-developers] isosurface/orbital breakthrough Reply-To: [email protected] Well, guess what? It really does work! I can hardly believe it. See http://www.stolaf.edu/people/hansonr/jmol/test/proto/new.htm http://www.stolaf.edu/people/hansonr/jmol/test/proto/ch3cl.jvxl contains two surfaces I found in the data file directory. It is only 7486 bytes. A bit better, I think, than the 3.6 Mb original file, http://www.stolaf.edu/people/hansonr/jmol/test/proto/ch3cl.cub. cutoff nBytesData nBytesFractions 0.05 1829 2236 compressionRatio=445.87946 0.05 1238 1518 compressionRatio=657.656 Not bad for a first try, I'd say. Can you tell any difference? When the cube file is processed we: 1) determine which vertices are inside and which outside the surface. 2) check the 12 edges of each "voxel cube" for edges that span the surface (have one end in and one out. 3) for each such edge, an interpolation is done to estimate the surface point along that edge. The fractional distance from "A" to "B" is determined. For the JVXL format, each surface is represented by two (long) lines. A) we simply catalog how many vertices are found outside, then inside, then outside, then inside... the surface. This forms "line 1" of the surface information. 39562 2 52 4 50 5 50 5 51 3 2472 4 50 6 48 7 48 8 47 8 47 ... B) we encode the fraction as an ascii character between 35 (#) and 125 (right brace). With the one exception that (92) "\" is encoded as 33 ("!") so as to allow this to be part of a quoted string someday. (double quote is ascii 34, so it's outside the range and won't be an issue). This is the second line of the surface information. 0g);/i9p)CIr;be/INAq8/;A3N?/RY1Iu_wcdU1.4nGIpz_###+_uBH(cyIP= ... In this way we have identified all vertices used in the isosurface display and nearly perfectly (within 1%) nailed the position of the surface between any two given vertices. More testing needed, for sure, but I thought I would share this now, jsut cause I'm so excited. btw: I think there's something wrong with the coloring -- reloading an isosurface changes its color for some reason. There are several issues with the isosurface code -- I will be checking that more thoroughly soon. (multiple model visibility comes to mind.) Bob Miguel wrote: >>Hi Bob, >> >>That sounds indeed interesting and promising. >> >>I do seem to recall (it has been a while since I played with the cube >>files and my memory isn't very good :-) ), that when I tried to >>reduce a cube file to 0s and 1s and set the cutoff at 0.5 (to try to >>keep the file size down), the generated surfaces were very angled >>looking. So I think (and didn't check) that in the code some kind of >>interpolation is done, i.e., the actual values are used to generate >>a smoother representation of the data. > > > That is correct. There is a linear interpolation that takes place to > determine the point along the segment that is closest to the surface. > > ** 2 minutes later ** > > I just looked at Isosurface.getInterpolatedValue() > > It looks like I was lazy and did not actually complete this. Independent > of Bob's work, that should probably be cleaned up. > > >>It looks like you are >>capturing the result of this 'pre-processing'. > > > Yes, it looks like that is what Bob is doing. > > > > Miguel > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd_________________________________________ ______ > Jmol-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jmol-developers -- Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107 Professor of Chemistry, St. Olaf College 1520 St. Olaf Ave., Northfield, MN 55057 mailto:[EMAIL PROTECTED] http://www.stolaf.edu/people/hansonr "Imagination is more important than knowledge." - Albert Einstein ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Jmol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-developers
