Plotting electron density and orbitals with VMD
Posted: Mon Oct 14, 2019 1:12 am
VMD can be used to plot the electronic density from a "cube" file generated e.g. with the
Invoke vmd with the "-e" option as follows: where the file `density.vmd` contains the following:
Note that the origin of coordinates in Qbox is located at the center of the domain represented in the cube file (i.e. an atom positioned at (0,0,0) will appear at the center of the domain).
VMD can also be used to plot orbitals from a cube file generated e.g. using the where the file "orbital.vmd" contains the following commands:
Note that the values of the isosurface are set arbitrarily in the "orbital.vmd" file to -0.2 and 0.2. You may have to adjust the isosurface levels using the Graphics->Representations menu in the VMD main window.
Note that the Qbox plot command can only generate density and orbital isosurface when only the gamma point (k=0) is used.
plot -density rho.cube
Qbox command.Invoke vmd with the "-e" option as follows:
Code: Select all
$ vmd -e density.vmd rho.cube
Code: Select all
display projection orthographic
# set background color
color Display Background blue2
#display backgroundgradient on
#color Display BackgroundTop white
#color Display BackgroundBot cyan
#axes location off
mol delrep 0 top
mol representation CPK 0.7 0.2 23.0 21.0
mol color Element
mol selection {all}
mol material Opaque
mol addrep top
mol selupdate 0 top 0
mol colupdate 0 top 0
mol scaleminmax top 0 0.000000 0.000000
mol smoothrep top 0 0
mol drawframes top 0 {now}
mol representation Isosurface 0.100000 0.000000 0.000000 0.000000
#mol color ColorID 0
mol modstyle 2 0 Isosurface 0.100000 0.000000 2.000000 0.000000 1 1
mol selection {all}
mol material Opaque
mol addrep top
VMD can also be used to plot orbitals from a cube file generated e.g. using the
plot -wf 5 orbital5.cube
Qbox command. In that case, the cube file contains two functions: one representing the positive isosurface and one representing the negative isosurface. VMD plots the positive isosurface in red and the negative isosurface in blue. VMD can be invoked as follows:
Code: Select all
$ vmd -e orbital.vmd orbital5.cube
Code: Select all
display projection orthographic
# set background color
color Display Background blue2
#display backgroundgradient on
#color Display BackgroundTop white
#color Display BackgroundBot cyan
#axes location off
mol delrep 0 top
mol representation CPK 0.7 0.2 23.0 21.0
mol color Element
mol selection {all}
mol material Opaque
mol addrep top
mol selupdate 0 top 0
mol colupdate 0 top 0
mol scaleminmax top 0 0.000000 0.000000
mol smoothrep top 0 0
mol drawframes top 0 {now}
mol representation Isosurface -0.200000 0.000000 0.000000 0.000000
mol color ColorID 0
mol selection {all}
#mol material Transparent
mol material Opaque
mol addrep top
mol selupdate 1 top 0
mol colupdate 1 top 0
mol scaleminmax top 1 0.000000 0.000000
mol smoothrep top 1 0
mol drawframes top 1 {now}
mol representation Isosurface 0.200000 0.000000 0.000000 0.000000
mol color ColorID 1
mol selection {all}
mol material Opaque
Note that the Qbox plot command can only generate density and orbital isosurface when only the gamma point (k=0) is used.