Now, you have to decide, what kind of charge distributions, wavefunctions etc. to plot. In the current example, we will plot the total charge distribution of the water molecule, the charge distribution (wavefunction squared) for the highest occupied molecular orbital (HOMO), the wave function for the HOMO, and the total charge difference, which tells us, how the chemical bonding between the atoms modified the total charge distribution compared to the superpositions of neutral atomic densities.
The appropriate waveplot input (waveplot_in.hsd) could look
like the following:
# General options
Options = {
TotalChargeDensity = Yes # Total density be plotted?
TotalChargeDifference = Yes # Total density difference plotted?
ChargeDensity = Yes # Charge density for each state?
RealComponent = Yes # Plot real component of the wavefunction
PlottedSpins = { 1 -1 }
PlottedLevels = { 4 } # Levels to plot
PlottedRegion = OptimalCuboid {} # Region to plot
NrOfPoints = { 50 50 50 } # Number of grid points in each direction
NrOfCachedGrids = -1 # Nr of cached grids (speeds up things)
Verbose = Yes # Wanna see a lot of messages?
}
DetailedXML = "detailed.xml" # File containing the detailed xml output
# of DFTB+
EigenvecBin = "eigenvec.bin" # File cointaining the binary eigenvecs
# Definition of the basis
Basis = {
Resolution = 0.01
# Including mio-0-1.hsd. (If you use a set, which depends on other sets,
# the wfc.*.hsd files for each required set must be included in a similar
# way.)
<<+ "wfc.mio-0-1.hsd"
}
Some notes to the input:
TotalChargeDensity controls the plotting of the total charge
density. If turned on, the file wp-abs2.cube is created.
TotalChargeDifference instructs Waveplot to plot
the difference between the actual total charge density and the
density you would obtain by summing up the densities of the neutral
atoms.
ChargeDensity tells the code, that the charge distribution
for some orbitals (specified later) should be plotted. Similarly,
RealComponent instructs Waveplot to create cube files for the real part
of the one-electron wavefunctions for the specified orbitals. (For
non-periodic systems the wavefunctions are real.)
PlottedSpins, PlottedLevels (for periodic
systems also PlottedKPoints) controls the levels (orbitals) to
plot.
In the current example we are plotting level 4 (is the HOMO
of the water molecule) for all available spins. Since the
DFTB+ calculation was spin unpolarised, we obtain only one plot
for the HOMO in file wp-1-1-4-abs2.cube (1-1-4 in the file
name indicates first K-point, first spin, 4th level).
PlottedRegion. Instead of specifying the box origin and box
dimensions by hand, Waveplot can be instructed by using the
OptimalCuboid method to take the smallest cuboid, which
contains all the atoms and enough space around them, so that the
wavefunctions are not leaking out of it. (For details and other
options for PlottedRegion please consult the manual.) The
selected region in the example is sampled by a mesh of 50 by 50 by
50. (NrOfPoints)
Basis) is made by including the file
containing the approrpiate wave function coefficient definitions.
You must make sure that you use the file for the same set, which you
used during your DFTB+ calculation. Here, the mio-0-1 set
was using for calculating the H2O molecule, and therefore the file
wfc.mio-0-1.hsd is included.
You can download the wavefuntion coefficients for all published sets from the Waveplot website.
================================================================================
WAVEPLOT 0.2
================================================================================
Interpreting input file 'waveplot_in.hsd'
--------------------------------------------------------------------------------
WARNING!
-> The following 3 node(s) had been ignored by the parser:
(1)
Path: waveplot/Basis/C
Line: 1-33 (File: wfc.mio-0-1.hsd)
(2)
Path: waveplot/Basis/N
Line: 52-84 (File: wfc.mio-0-1.hsd)
(3)
Path: waveplot/Basis/S
Line: 120-170 (File: wfc.mio-0-1.hsd)
Processed input written as HSD to 'waveplot_pin.hsd'
Processed input written as XML to 'waveplot_pin.xml'
--------------------------------------------------------------------------------
Doing initialisation
Starting main program
Origin
-5.00000 -6.35306 -6.47114
Box
10.00000 0.00000 0.00000
0.00000 11.08472 0.00000
0.00000 0.00000 12.94228
Spatial resolution [1/Bohr]:
5.00000 4.51071 3.86331
Total charge of atomic densities: 7.981973
Spin KPoint State Action Norm W. Occup.
1 1 1 read
1 1 2 read
1 1 3 read
1 1 4 read
Calculating grid
1 1 1 calc 0.996855 2.000000
1 1 2 calc 1.003895 2.000000
1 1 3 calc 0.998346 2.000000
1 1 4 calc 1.000053 2.000000
File 'wp-1-1-4-abs2.cube' written
File 'wp-1-1-4-real.cube' written
File 'wp-abs2.cube' written
Total charge: 7.998297
File 'wp-abs2diff.cube' written
================================================================================
Some notes on the output:
wfc.mio-0-1.hsd contained also wave function
coefficients for some elements (C, N, S), which were are not present
in the calculated system, so that those definitions were ignored.
Total charge of atomic densities tells you the amount
of charge found in the selected region, if atomic densities are
superposed. This number should be approximately equal to the number
of electrons in your system (here 8).
There could be two reasons for a substantial deviation. Either the
grid is not dense enough (option NrOfPoints) or the box for
the plotted region is too small or misplaced (PlottedRegion).
The total charge and the total charge difference are stored in the files 'wp-abs2.cube' and 'wp-abs2diff.cube', respectively.