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 three 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 up to 1000 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 a factor of ~5) 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 then safely rename this file to the original name name.jvxl

Important: Tested using Safari, Chrome and Firefox. File sizes: Cube files up to about 100 Mbyte have been tested. Generation of the NCI surface might take ~1min. For better resolutions (~0.044Å) some Cub files might exceed 500 Mbytes, but these exceed the browser memory limits for Javascript. You should use the Jmol application for such large files.


Select isosurface value:


Expected behaviour: On selecting one of the above surface thresholds, you should get the following prompts:
  1. (Chrome only)
  2. MO plot (Link to MO test file)
  3. SCF-NCI plot (Link to NCI test file,Link to NCI test file unzipped)
  4. Spin density (Link to Spin density test file)
  5. ESP (Link to ESP 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;
where

  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)

Viewing the outputs

  1. The outputs can be directly viewed from the Jmol.jar application by dragging and dropping either the .xyz and then the .jvxl file into the Jmol viewing window or instead just the .pngj file.
  2. Alternatively to invoke the output of the above transform of a cube file on a Web page, place this into the script of a JSmol invocation:
    'load "filename.xyz";isosurface "filename.jvxl"