* Visualization of molecular orbitals of a water monomer [#l6023889]

In this tutorial, how to visualize the electron (charge) density and molecular orbitals of a molecule by using pp.x.
We use a water molecule (H2O) in a large box.

** Prep [#ya703441]
If pp.x is not found in the bin/ directory, type
 $ make pp
in the root directory.

** SCF/geometry optimization [#k847656e]

First of all, we perform an SCF calculation or geometry optimization to obtain the wave functions.
Below is the input file (h2o_relax.in) for the geometry optimization:

 H2O in a box
  &control
     calculation   = 'relax'
     restart_mode  = 'from_scratch'
     prefix        = 'h2o'
     pseudo_dir    = '/home/ikutaro/QE/pseudo/'
     outdir        = './tmp/'
     forc_conv_thr = 1.0D-4
  /
  &system
     ibrav     = 1
     celldm(1) = 20.00
     nat       = 3
     ntyp      = 2
     ecutwfc   = 50.0
     ecutrho   = 400.0
     nbnd      = 8
  /
  &electrons
     mixing_beta = 0.5
     conv_thr    = 1.0d-10
  /
  &ions
  /
 ATOMIC_SPECIES
  H 0.0000  H.pbe-kjpaw_psl.1.0.0.UPF
  O 0.0000  O.pbe-n-kjpaw_psl.1.0.0.UPF
 ATOMIC_POSITIONS (bohr)
  H      1.447909955222      0.000000000000      1.127167146902
  H     -1.447909955222      0.000000000000      1.127167146902      
  O      0.000000000000      0.000000000000      0.000000000000
 K_POINTS (GAMMA)

Execute pw.x:

 $ mpirun -np 4 ${HOME}/QE/src/qe-6.6/bin/pw.x < h2_relax.in > h2_relax.out

or submit a job by using a job script, say, h2o.sh

 $ qsub h2o.sh

After the convergence, we obtain the wave functions and can calculate the electron (charge) density.

** Postprocessing [#l8b85e55]

*** Electron density in real space [#u7eb85da]

Let us plot the electron density in real space.
Input file (pp_rho.in) for pp.x looks like:

 &inputpp
     prefix     = 'h2o'
     outdir     = './tmp/'
     filplot    = 'h2o'
     plot_num   = 0 
 /
 &plot
  iflag         = 3
  output_format = 5
  fileout       = 'h2o_rho.xsf'
 /

NOTE: prefix and outdir should be consistent with the previous SCF calculation.

In this example we set

     plot_num   = 0 

in &inputpp ... / to plot the electron density in real space,
and

  iflag         = 3

to plot the density in 3D.
Further, we choose to dump the density in the XSF format by setting

  output_format = 5

The data is written to 'h2o_rho.xsf` by setting

  fileout       = 'h2o_rho.xsf'

Execute

 $ mpirun -np 4 ${HOME}/QE/src/qe-6.6/bin/pp.x < pp_rho.in > pp_rho.out

or alike. 
Note that the number of CPUs used for pp.x should be the same as that for pw.x unless wf_collect = .true. is set.

*** Wave functions [#z3970fc6]

Here let us plot the wave functions, actually, the electron densities, corresponding to each wave functions ( | psi(r) |**2 ) in real space.

Input file for pp.x (pp_psi2.in) looks like:

 &inputpp
     prefix     = 'h2o'
     outdir     = './tmp/'
     filplot    = 'h2o'
     plot_num   = 7
     kpoint(1)  = 1
     kband(1)   = 1
     kband(2)   = 5
     lsign      = .true.
 /
 &plot
  iflag         = 3
  output_format = 5
  fileout       ='.xsf'
 /
We use kpoint(1) and kpoint(2) to specify the initial and final k-points at which real-space wave functions are calculated.
We also use kband(1) and kband(2) to specify the initial and final bands at which real-space wave functions are calculated.
At the Gamma-point, we can add the sign by setting lsign = .true.

NOTE: For the wave function plot, the variable fileout is used in a different way: it is used to specify the suffix of the file. In this case '.xsf' is used as the wave functions are plotted in the XSF format.
By executing pp.x using this input you may obtain the wave function files as follows:

 h2o_K001_B001.xsf  h2o_K001_B002.xsf  h2o_K001_B003.xsf  h2o_K001_B004.xsf  h2o_K001_B005.xsf  

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS