Recent site activity

Tutorials‎ > ‎

Bulk Solid

Introduction

Solids can be simulated in periodic boundary conditions using orbitals from a plane-wave DFT code such as ABINIT, PWscf (Quantum Espresso), or Qbox. This page explains the process of generating orbitals, converting them to QMCPACK's HDF5 format, and setting up the input files. As an example, we will use cubic boron nitride, an analog of diamond in the zincblende structure.

Tools for exercises (update 2011-07)

Download 

svn checkout http://qmctools.googlecode.com/svn/trunk/wfconvert wfconvert
Build ppconvert/wfconvert using cmake 
cd build
cmake ..
make
The same environmental variables, e.g., HDF5_HOME, and toolchain files on specific platforms for QMCPACK will work. 
When all goes well, bin directory has
    • ppconvert  : Pseudopotential conversion tool
    • wfconvert : Wavefunction conversion tool

Convert the pseudopotentials

Copy the following pseudopotential in GAMESS format into a file "B.BFD.gamess":

B-QMC GEN 2 1
3
3.00000000 1 5.40423964
16.21271892 3 5.71678458
-11.86640633 2 4.48974455
1
15.49737620 2 3.43781634

Likewise, the following into "N.BFD.gamess":

N-QMC GEN 2 1
3
5.00000000 1 9.23501007
46.17505034 3 7.66830008
-30.18893534 2 7.34486070
1
31.69720409 2 6.99536540

We will now convert the pseudopotentials into the FHI format used by ABINIT and the FSatom XML format used by QMCPACK. Put ''ppconvert'' into a directory in your PATH. The execute

ppconvert --gamess_pot B.BFD.gamess --s_ref "1s(2)2p(1)" --p_ref "1s(2)2p(1)" --fhi B.BFD.fhi --xml B.BFD.fsatom.xml
ppconvert --gamess_pot N.BFD.gamess --s_ref "1s(2)2p(3)" --p_ref "1s(2)2p(3)" --fhi N.BFD.fhi --xml N.BFD.fsatom.xml
  • The first argument given is the input pseudopotential file.
  • The second and third arguments give the reference state for forming Kleinmann-Bylander projectors.
    • Note this state specifies the reference for the valence electrons only, e.g. the neutral state for the valence electrons in a boron atom.
    • The last two arguments specify output file formats.

Generating orbitals with ABINIT

ABINIT (http://www.abinit.org) is a general-purpose plane-wave DFT code which supports pseudopotential and PAW calculations. It is well-documented, full-featured, and has a vibrant community support forum.

We will begin with a primitive cell of c-BN. Copy the following into cBNprim.in:

# Cubic Boron Nitride : primitive cell orbitals
#
# Definition of the unit cell
# BN lattice constant near experimental volume
acell  3*6.839904

# FCC lattice vectors
rprim 0.5 0.5 0.0
      0.0 0.5 0.5
      0.5 0.0 0.5

# Definition of the atom types
ntypat 2          # There is only one type of atom
znucl 5 7         # The keyword "znucl" refers to the atomic number of the
                  # possible type(s) of atom. The pseudopotential(s)
                  # mentioned in the "files" file must correspond
                  # to the type(s) of atom. Here, the only type is Silicon.
                         

# Definition of the atoms
natom 2           # There are two atoms
                  # They both of type boron and nitrogen
typat 1 2

xred
   0.0000  0.0000  0.0000  # B1
   0.2500  0.2500  0.2500  # N1

# Definition of the planewave basis set
ecut  200.0         # Maximal kinetic energy cut-off, in Hartree

# Allow non-primitive unit cell
chkprim 0


# Definition of the k-point grid
kptopt 3          # Manual k-points
ngkpt 1 1 1
istwfk 1
wtk 1

kpt
    0.000 0.000 0.000

prtwf 1

# Definition of the SCF procedure
nstep 100          # Maximal number of SCF cycles
toldfe 1.0d-12     # Will stop when, twice in a row, the difference
                   # between two consecutive evaluations of total energy
                   # differ by less than toldfe (in Hartree)
diemac 2.0         # Although this is not mandatory, it is worth to
                   # precondition the SCF cycle. The model dielectric
                   # function used as the standard preconditioner
                   # is described in the "dielng" input variable section.
                   # Here, we follow the prescription for bulk silicon.

# ixc 23           # Wu-Cohen
ixc 7             # LDA

Copy the following into cBNprim.files:

cBNprim.in
cBNprim.out
cBNprim.xi
cBNprim.xo
cBNprim_
B.BFD.fhi
N.BFD.fhi

Now, run

abinis < cBNprim.files

Converting the orbitals

With wfconv in your PATH, run

wfconvert --eshdf cBNprim.h5 cBNprim.xo_WFK

This will generated an orbital file in the ESHDF format that QMCPACK reads.

Running QMCPACK

Download cBNprim.qmc.xml

qmcapp cBNprim.qmc.xml 

The input file cBNprim.qmc.xml has gpu="yes" in several places. When QMCPACK is compiled without CUDA, gpu="yes" is ignored.

Analyzing the results

Several output files are written in the present directory. Those ending in ".scalar.dat" list the energies per block for each of the stages of the calculation

  1. Optimization cycle: 5 iterations
  2. VMC stage, generating initial population for DMC
  3. DMC simulation

In QMCPACK's "utils" directory are several python scripts for computing statistics. Add the "utils" directory to your PATH and run

Energy.py BN2_prim.s000.scalar.dat

This gives the variational energy of about -11.9550 +/- 0.0063 for the first stage, before any optimization is done. Now try,

Energy.py BN2_prim.s002.scalar.dat

The energy has decreased to -12.1394 +/- 0.0091, and you see that the optimization has reduced the energy.

Finally, run Energy.py BN2_prim.s003.scalar.dat DMC projection has caused the energy has dropped about another 50 mHa to -12.18501 +/- 0.00057 Hartrees.

Running on QMCPACK-GPU

qmcapp --gpu cBNprim.qmc.xml 

The input file cBNprim.qmc.xml can be used for both CPU- and GPU-compiled QMCPACK.

Updated 2011-07 The GPU can now be used to optimize with conjugate gradients or the linearized eigenvalue method. 

The GPU code is designed to run all walkers in parallel and at least 128 to 256 walkers be GPU are needed to get good efficiency.

Scaling to larger systems

Larger crystal supercells require small changes to the input. First, we need to run ABINIT with more k-points. Then we will need to update the sizes and dimensions in the QMCPACK input.

16-atom 2x2x2 supercell

Copy cBNprim.in to cBN_222.in Change the k-point section of the cBN_222.in to the following:

# Definition of the k-point grid
kptopt 3          # Manual k-points
ngkpt 2 2 2
istwfk 1
nshiftk 1
shiftk 0.0 0.0 0.0

This will use a 2x2x2 k-point grid centered at the gamma point of the supercell. To use the L point of the supercell, for example, change shiftk 0.0 0.0 0.0 to shiftk 0.5 0.5 0.5

64-atom cubic supercell

Č
ċ
ď
cBNprim.qmc.xml
(4k)
Jeongnim Kim,
Jul 21, 2011, 7:11 PM
Comments