Script for creating a JVXL compressed surface file from a (Gaussian) cube

This script will invoke a file dialog to open a .cub file and will save two resulting files to your local directory (in the downloads area by default). Important:. The .cub files must be located in a directory for a local hard drive rather than in a network directory. Thus drive C:\temp is fine, but drive H: is not (it is a network drive).

The .jvxl file will be around 100 to 150 times smaller than the original .cub (which is pretty much the purpose of doing all of this). You could if you wanted reduce it further in size by compressing it using gzip (JSmol will automatically detect and decompress this). You will end up with something that looks like name.jvxl.gz and you can safely rename this file to the original name.jvxl

Important: Tested using Safari, Chrome and Firefox.

Select isosurface value:

Expected behaviour: On selecting one of the above surface thresholds, you should get the following prompts:
  1. (Chrome only)
  2. SCF-based NCI plot (Link to NCI test file)

The following parameters are used to create the NCI surface based on SCF density;
isosurface parameters [0.5 1 0.0005 0.05 0.95 1.00] NCI "";color isosurface "bgyor" range -0.04 0.04;

  1. 0.5 is the surface cutoff. Use this value to reproduce the surfaces reported in the orginal article, and reduce it for smaller surfaces.
  2. 1 is the intramolecular option (2 for intermolecular)
  3. 0.0005 is the minimum ρ cutoff to remove very low density points
  4. 0.05 is the cutoff used to remove covalent density (recommended as 0.05; set to 0.02 to remove the covalent density surrounding a metal atom.
  5. 0.95, fraction of total ρ(r) that defines intramolecular
  6. scaling factor. Set to 0.01 if reading cube files from the original NCIPlot program.
  7. color isosurface range "bgyor" 0.04 -0.04 defines the range of gradients for the colour mapping and "bgyor" to match the colour scheme used in the original publications (blue= attractive, red=repulsive)
  8. To invoke the output of the above transform of a cube file, place this into the script of a JSmol invocation:
    'load "";isosurface "filename.jvxl" translucent;'