Jmol developers:

I've been thinking tonight about the orbital problem.

What if I told you I could compress CUBE file data for molecular orbital display with a compression ratio of 1000:1? For example, turn a 3.7 Mb cube file representing an orbital into a file of about 4K. Would that be good?

What if I told you we could have "inline" orbitals -- orbitals just defined right on the script line like this:

isosurfce orbital1 "inline" ...
color $orbital1 red


It's possible! Here's the idea:

Really what an isosurface is either:

1) a bitset -- an n x m x p set of points, each of which is either the point is or is not within a certain cutoff, or
2) a set of 35-value color indices representing a color of the rainbow.

OK, so for an orbital we have (1), for a mapped charge density plot or the like, we have (2). Right now I'm focusing on (1), orbitals. They have just one color.
(We could do two colors as well, but for now, just one.)

I was looking at a cube files and realized that > 99.9% of it is garbage. Look, we don't need to be transmitting cube files to view orbitals. All we need are the key "surface" points.

So I propose a new file format. I'll call it JVX for "Jmol Voxel" for now.

Here is a sample JVX file. (I'm making this up. Bear with me.) The file is actually just 14 lines and 3630 bytes long. It looks a lot like a cube file (EXACTLY like a cube file, in fact, so the cube file reader will read the coordinates).

 Title Card Required potential=scf
 Electrostatic potential from Total SCF Density
   -5   -8.140940   -8.140940   -8.643459
   50    0.333333    0.000000    0.000000
   50    0.000000    0.333333    0.000000
   55    0.000000    0.000000    0.333333
    6    6.000000    0.000000    0.000000   -2.130707
    1    1.000000    0.000000    1.932284   -2.775380
    1    1.000000    1.673407   -0.966142   -2.775380
    1    1.000000   -1.673407   -0.966142   -2.775380
   17   17.000000    0.000000    0.000000    1.241787
-1 633 0.05
-2 487 0.05
39562 2 52 4 50 5 50 5 51 3 2472 4 50 6 48 7 48 8 47 8 47 7 49 6 51 2 2307 4 49 7 48 8 46 9 46 10 45 10 45 9 47 8 48 6 51 3 2250 6 48 8 46 10 45 10 45 10 45 11 44 11 44 11 45 9 47 8 49 4 2140 3 50 7 47 9 46 10 44 12 43 13 42 18 37 20 36 19 36 19 37 18 38 10 2 2 43 6 2083 3 50 7 47 10 45 11 43 14 41 20 35 22 33 22 34 22 33 22 34 20 35 19 37 17 39 8 47 6 49 4 1922 2 50 8 46 10 45 12 42 21 34 22 33 23 32 24 31 24 32 23 32 23 32 22 34 20 35 18 37 10 45 8 48 6 49 5 1865 7 47 10 44 19 35 22 33 24 31 24 31 25 30 25 30 25 31 24 31 23 32 22 33 21 34 19 36 11 45 8 47 8 48 6 51 1 1758 6 47 16 38 21 34 22 32 24 31 25 30 25 30 26 29 26 29 25 30 25 31 23 32 22 33 20 35 12 43 10 45 9 47 8 48 5 1756 6 48 17 37 20 34 23 31 25 30 25 30 26 29 26 29 26 29 26 29 25 30 25 30 24 31 22 33 19 37 11 44 10 45 9 47 7 51 2 1703 6 47 17 37 21 33 23 31 25 30 26 29 26 29 26 29 26 29 26 29 25 30 25 30 24 31 22 33 20 35 12 44 10 45 9 47 7 50 3 1703 6 47 17 37 21 33 23 31 25 30 26 29 26 29 26 29 26 29 26 29 25 30 25 30 24 31 22 33 20 35 12 44 10 45 9 47 7 50 3 1702 6 48 17 37 20 34 23 31 25 30 25 30 26 29 26 29 26 29 26 29 25 30 25 30 24 31 22 33 19 37 11 44 10 46 8 48 6 51 1 1702 7 47 11 2 3 38 20 35 22 32 24 31 25 30 25 30 25 30 25 30 25 30 25 31 23 32 22 33 20 35 12 43 10 45 9 47 7 49 5 1755 7 47 10 44 19 35 22 33 23 32 24 31 25 30 25 30 25 31 24 31 23 32 22 33 21 34 19 36 11 45 8 47 7 49 5 1756 3 50 8 46 10 45 12 42 20 35 22 33 23 32 24 31 24 32 23 32 22 34 21 34 20 35 18 37 10 46 7 48 6 50 4 1811 3 50 7 47 10 45 11 43 13 42 20 35 21 34 22 34 21 34 21 35 20 36 18 37 16 40 8 47 5 51 2 1923 2 50 7 47 9 46 10 44 12 43 12 43 14 42 18 37 19 37 18 37 17 40 8 48 6 2137 6 48 8 46 9 46 10 45 10 45 10 45 11 44 10 46 9 47 7 51 2 2196 3 51 6 48 8 46 9 46 9 46 9 47 8 47 8 48 6 2360 3 51 6 48 7 48 7 48 7 48 7 49 5 2526 3 52 4 51 4 52 2 39966 47922 3 52 3 52 2 2582 4 51 5 50 5 50 5 51 4 9 1 54 1 2406 3 51 5 49 7 8 1 39 7 6 5 37 7 5 6 38 6 5 7 38 4 6 7 39 2 7 6 50 5 2294 3 51 6 7 3 38 7 5 6 37 8 3 8 36 8 3 8 36 8 2 10 36 7 2 10 37 5 4 8 39 3 5 8 48 6 51 2 2186 3 9 2 40 6 5 6 37 8 3 8 36 20 35 20 35 20 35 20 36 19 36 7 2 10 37 5 4 8 38 4 6 6 40 2 2142 4 7 5 38 6 4 8 36 20 35 20 35 21 34 21 34 21 34 21 35 19 36 8 1 10 36 6 4 8 37 5 7 4 40 3 2088 2 7 6 38 7 3 8 37 19 35 21 34 21 34 14 2 5 34 14 2 5 34 21 34 20 35 20 35 8 3 8 36 7 6 5 38 5 50 4 1990 1 42 2 7 7 37 7 2 10 36 19 35 21 34 14 2 5 34 13 1 2 1 4 34 13 1 2 1 4 34 14 2 5 34 21 34 20 35 8 2 9 36 7 5 6 37 7 49 5 1989 1 42 2 7 7 37 7 2 10 36 19 35 21 34 14 2 5 34 13 1 2 1 4 34 13 1 2 1 4 34 14 2 5 34 21 34 20 35 8 3 8 36 7 5 6 37 7 49 5 2032 2 7 6 38 7 3 8 36 20 35 21 34 21 34 14 2 5 34 14 2 5 34 21 34 20 35 20 35 8 3 8 36 7 6 5 38 5 51 3 2032 4 7 5 38 6 4 8 36 20 35 20 35 20 35 21 34 21 34 20 36 19 36 7 2 10 36 6 5 7 37 5 7 4 40 3 2087 3 51 6 5 6 37 8 3 8 36 20 35 20 35 20 36 19 36 19 36 7 2 10 37 5 4 8 38 4 7 5 2184 3 51 5 8 2 39 7 5 6 37 8 4 7 36 8 3 8 36 8 2 9 37 7 3 8 38 5 4 8 39 3 6 7 49 5 52 1 2186 3 51 5 49 7 48 7 6 4 38 7 6 5 38 6 5 6 39 4 6 6 50 5 50 4 2349 4 51 5 50 5 50 5 51 3 2582 2 53 2 48271

OK, so that's 3630 bytes, and THIS IS ALL THAT IS NEEDED TO DISPLAY THE TWO SURFACES CONTAINED IN http://www.stolaf.edu/people/hansonr/jmol/test/proto/ch3cl.cub (3.6 Mb).

The line starting with -1 clues us in that this is NOT a cube file. A cube file here would have a positive number indicating the number of surfaces in the file; my number is negative, starting a list of surfaces in the file, but telling us that this is a JVX file instead. The other numbers on those two lines are the number of data points and the cutoffs, but they might be color ranges -- anyway, there's a line there for some sort of information. What do we need there? We could discuss that.

That last block of numbers is actually just two separate lines, and there are no blank lines. See http://www.stolaf.edu/people/hansonr/jmol/test/proto/ch3cl.jvx

Q: Where did this file come from?
A: The Jmol applet, of course! I just added a few lines to Isosurface.java, and these numbers appeared on the Java console when I ran the isosurface script at

file:///C:/temp/jmol/proto/new.htm?model=ch3cl.jvx

For now I just added the header information and clipped it all into a file by hand. But Jmol could easily create this whole thing.

Q: What does it mean?
A: It's really just TOO simple:

 39562 2 52 4 50 5 50 5 51 3 2472 4 50 6 48 7 48 8 47 8 47 ...

says:

"The first 39562 data points are outside the cutoff. The next 2 are inside, the next 52 are outside, the next 4 are inside, the next 50 are outside..."

Q: What more do we need?
A: You tell me, but I say you could just toss those numbers into a script and have an isosurface WITHOUT any underlying file:

isosurface mydata1 "inline" {-8.140940 -8.140940 -8.643459} 50 {0.333333 0 0} 50 {0 0.333333 0} 55 {0 0 0.333333} 633 39562 2 52 4 50 5 50 5 51 3 2472 4 50 ...

isosurface mydata2 "inline" {-8.140940 -8.140940 -8.643459} 50 {0.333333 0 0} 50 {0 0.333333 0} 55 {0 0 0.333333} 487 47922 3 52 3 52 2 2582 4 51 5 50 5 50 5 51 4 9 1 54 1 2406 3 51 5 49 7 8 1 39 7 ...

OK, it's a long line for a script. But what of it?

Q: What's the catch?
A: You can't adjust the cutoff. It's going to be *THE* representation of the surface for that particular web page.

My point is that THAT is all we need. As a web designer you would first load a cube file into Jmol.jar or the applet and experiment with a cutoff. Then have Jmol create the .jvx file for you. Maybe using something like "show isosurfaces" or "getproperty isosurfaceInfo". Then instead of placing the cube file on the web, put the .jvx file there, or maybe just create the orbital as an inline isosurface.

What do you think?

Bob

--
--

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

Reply via email to