Cube Plugin, Version 1.1
This plugin reads the atom positions and volumetric data sets in the
plain text "cube" format as created by the
Gaussian program package.
The plugin supports cube files with single grid (e.g. densities,
laplacian, electrostatic potential) and orbital cube files with
multiple orbitals.
There are other programs that can create "cube" files natively
or convert native data to the "cube" files. This plugin can only
read those files, that comply with the following description:
C WRITE A FORMATTED CUBEFILE VERY SIMILAR TO THOSE CREATED BY C THE GAUSSIAN PROGRAM OR THE CUBEGEN UTILITY. C THE FORMAT IS AS FOLLOWS (LAST CHECKED AGAINST GAUSSIAN 98): C C LINE FORMAT CONTENTS C =============================================================== C 1 A TITLE C 2 A DESCRIPTION OF PROPERTY STORED IN CUBEFILE C 3 I5,3F12.6 #ATOMS, X-,Y-,Z-COORDINATES OF ORIGIN C 4-6 I5,3F12.6 #GRIDPOINTS, INCREMENT VECTOR C #ATOMS LINES OF ATOM COORDINATES: C ... I5,4F12.6 ATOM NUMBER, CHARGE, X-,Y-,Z-COORDINATE C REST: 6E13.5 CUBE DATA (WITH Z INCREMENT MOVING FASTEST, THEN C Y AND THEN X) C C FOR ORBITAL CUBE FILES, #ATOMS WILL BE < 0 AND THERE WILL BE ONE C ADDITIONAL LINE AFTER THE FINAL ATOM GIVING THE NUMBER OF ORBITALS C AND THEIR RESPECTIVE NUMBERS. ALSO THE ORBITAL NUMBER WILL BE C THE FASTEST MOVING INCREMENT. C C ALL COORDINATES ARE GIVEN IN ATOMIC UNITS.
Notes:
Coordinate Rotation / Periodic Display
VMD currently can only display periodic images of the
unit cell correctly, if the first cell vector is collinear
with the x-axis and the second cell vector in the xy-plane.
Upon loading of the cube file, the coordinates and the
grid vectors are rotated accordingly. Unfortunately, that
may make the atomic positions incompatible to some other
coordinate files containing matching coordinates.
Read-only
This plugin is only used to read files.
VMD does not currently support writing this file type.
Memory Usage / Large Cube Files
Due to the way cube files with multiple grids (e.g. orbitals)
are written, the plugin will temporarily hold all gridded data
in memory to get a huge performance increase. So
loading a single orbital data set from a large cube file with
many orbitals may need a machine with a lot of available
memory and/or swap space. Also the plugin uses some features
internally, which may not work for files larger than 2GB
on 32-bit systems.
Atom Masses
The plugin assigns masses to the atoms according to the
natural isotope distribution of the elements (see e.g.
http://www.webelements.com/).
If an element could not been recognized, a mass of 0 is assigned.
To set the mass for those elements or assign a different mass for
the other atoms, you have to use to create a selection with
atomselect and then use the selection subcommands to set
the mass.
Binary Cube Files
Unformatted binary cube files, as they were created by
versions before Gaussian 98 are not supported by this plugin.
Atomic Positions in Angstrom
The atomic positions and the grid vectors in a cube file
are always in atomic units. There is a comment in
the Gaussian documentation, that describes, how you can
provide a custom grid in angstrom in the input of
a gaussian job.
Incompatibilities
If VMD cannot read your cube file, please check the above
notices. If your cube file has a negative number of atoms,
but is missing the orbitals line, you may still be able
to read it, by changing the sign of the number of atoms.
But most likely the positions and the grid will be given
in angstrom then (see the comment above), so all distances
will be too short by a factor of about 1.9.