As an alternative to the output format discussed above, all of the $plots
data may be output directly to a sub-directory named plots in the job’s
scratch directory, which must therefore be saved using the –save option
described in Section 2.7. The plotting data in this
sub-directory are not written in the plot.* format described above, but
rather in the form of so-called “cube” file, one for each orbital or density
that is requested. The cube file format is a standard one for volumetric data
and consists of a small header followed by the orbital or density values at
each grid point, in ASCII format. (Consult Ref. 448 for
the complete format specification.) Because the grid coordinates themselves are
not printed (their locations are implicit from information contained in the
header), each individual cube file is much smaller than the corresponding
plot.* file would be. Cube files can be read by many standard (and
freely-available) graphics programs, including
J. Mol. Graphics Mod.
(1998), 16, pp. 133. 12 J. Chem. Phys.
(1961), 34, pp. 1476. and VMD. 478 J. Molec. Graphics
(1996), 14, pp. 33. 15 J. Comput. Chem.
(1982), 3, pp. 385. VMD, in particular, is recommended for generation of high-quality images for publication. Cube files for the MOs and densities requested in the $plots section are requested by setting MAKE_CUBE_FILES to TRUE, with the $plots section specified as described in Section 10.5.3.
The following example illustrates the generation of cube files for a ground and an excited-state density, including the corresponding spin densities. In this example, the plots sub-directory of the job’s scratch directory should contain files named dens.N.cube (total density for state , where or 1 represents the ground and first excited state, respectively), dens_alpha.N.cube and dens_beta.N.cube ( and for each state), and dens_spin.N.cube ( for each state.)
$molecule 0 2 H 1.004123 -0.180454 0.000000 O -0.246002 0.596152 0.000000 O -1.312366 -0.230256 0.000000 $end $rem PLOT_SPIN_DENSITY true MAKE_CUBE_FILES true SCF_CONVERGENCE 8 METHOD b3lyp BASIS 6-31+G* CIS_N_ROOTS 1 $end $plots grid information and request to plot 2 densities 20 -5.0 5.0 20 -5.0 5.0 20 -5.0 5.0 0 2 0 0 0 1 $end
Cube files are also available for natural transition orbitals (Sections 7.14.2 and 10.5.2) by setting MAKE_CUBE_FILES to NTOS, although in this case the procedure is somewhat more complicated, due to the state-specific nature of these quantities. Cube files for the NTOs are generated only for a single excited state, whose identity is specified using CUBEFILE_STATE. Cube files for additional states are readily obtained using a sequence of Q-Chem jobs, in which the second (and subsequent) jobs read in the converged ground- and excited-state information using SCF_GUESS and SKIP_CIS_RPA.
An additional complication is the manner in which to specify which NTOs will be output as cube files. When MAKE_CUBE_FILES is set to TRUE, this is specified in the $plots section, in the same way that MOs would be specified for plotting. However, one must understand the order in which the NTOs are stored. For a system with -spin MOs, the occupied NTOs are stored in order of increasing amplitudes, so that the ’th occupied NTO is the most important. The virtual NTOs are stored next, in order of decreasing importance. According to this convention, the principle NTO pair consists of the final occupied orbital and the first virtual orbital, for any particular excited state. Thus, orbitals and represent the most important NTO pair, while orbitals and represent the second most important NTO pair, etc..
$molecule 0 1 N -2.181263 0.068208 0.000000 C -2.927088 -1.059037 0.000000 N -4.320029 -0.911094 0.000000 C -4.926706 0.301204 0.000000 C -4.185901 1.435062 0.000000 C -2.754591 1.274555 0.000000 N -1.954845 2.338369 0.000000 H -0.923072 2.224557 0.000000 H -2.343008 3.268581 0.000000 H -4.649401 2.414197 0.000000 H -6.012020 0.301371 0.000000 H -4.855603 -1.768832 0.000000 O -2.458932 -2.200499 0.000000 $end $plots Plot the dominant NTO pair, N --> N+1 25 -5.0 5.0 25 -5.0 5.0 25 -5.0 5.0 2 0 0 0 29 30 $end $rem METHOD B3LYP BASIS 6-31+G* CIS_N_ROOTS 2 CIS_TRIPLETS FALSE NTO_PAIRS TRUE ! calculate the NTOs MAKE_CUBE_FILES NTOS ! generate NTO cube files... CUBEFILE_STATE 2 ! ...for the 2nd excited state $end
Cube files for Natural Bond Orbitals (for either the ground state or any CIS, RPA, of TDDFT excited states) can be generated in much the same way, by setting MAKE_CUBE_FILES equal to NBOS, and using CUBEFILE_STATE to select the desired electronic state. CUBEFILE_STATE = 0 selects ground-state NBOs. The particular NBOs to be plotted are selected using the $plots section, recognizing that Q-Chem stores the NBOs in order of decreasing occupancies, with all -spin NBOs preceding any -spin NBOs, in the case of an unrestricted SCF calculation. (For ground states, there is typically one strongly-occupied NBO for each electron.) NBO cube files are saved to the plots sub-directory of the job’s scratch directory. One final caveat: to get NBO cube files, the user must specify the AONBO option in the $nbo section, as shown in the following example.
$rem METHOD CIS BASIS CC-PVTZ CIS_N_ROOTS 1 CIS_TRIPLETS FALSE NBO 2 ! ground- and excited-state NBO MAKE_CUBE_FILES NBOS ! generate NBO cube files... CUBEFILE_STATE 1 ! ...for the first excited state $end $nbo AONBO $end $molecule 0 1 O H 1 0.95 H 1 0.95 2 104.5 $end $plots Plot the 5 high-occupancy NBOs, one for each alpha electron 40 -8.0 8.0 40 -8.0 8.0 40 -8.0 8.0 5 0 0 0 1 2 3 4 5 $end
$molecule 0 1 O H 1 0.95 H 1 0.95 2 104.5 $end $rem METHOD¯¯ cis BASIS¯¯ cc-pvtz CIS_N_ROOTS 1 CIS_TRIPLETS false nbo 2 ! ground- and excited-state NBO NTO_PAIRS 2 ! triggers NTO analysis MAKE_CUBE_FILES true PLOTS true $end $nbo aonbo $end $plots grid_points 50 50 50 nbo_state 0-1 natural_bond_orbital 1-5 natural_transition_orbital 1 $end