IntroductionSolids 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)
Build ppconvert/wfconvert using cmake
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
Convert the pseudopotentialsCopy the following pseudopotential in GAMESS format into a file "B.BFD.gamess": B-QMC GEN 2 133.00000000 1 5.4042396416.21271892 3 5.71678458-11.86640633 2 4.48974455115.49737620 2 3.43781634Likewise, the following into "N.BFD.gamess": N-QMC GEN 2 135.00000000 1 9.2350100746.17505034 3 7.66830008-30.18893534 2 7.34486070131.69720409 2 6.99536540We 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.xmlppconvert --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
Generating orbitals with ABINITABINIT (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 volumeacell 3*6.839904# FCC lattice vectorsrprim 0.5 0.5 0.0 0.0 0.5 0.5 0.5 0.0 0.5# Definition of the atom typesntypat 2 # There is only one type of atomznucl 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 atomsnatom 2 # There are two atoms # They both of type boron and nitrogentypat 1 2xred 0.0000 0.0000 0.0000 # B1 0.2500 0.2500 0.2500 # N1# Definition of the planewave basis setecut 200.0 # Maximal kinetic energy cut-off, in Hartree# Allow non-primitive unit cellchkprim 0# Definition of the k-point gridkptopt 3 # Manual k-pointsngkpt 1 1 1istwfk 1wtk 1kpt 0.000 0.000 0.000prtwf 1# Definition of the SCF procedurenstep 100 # Maximal number of SCF cyclestoldfe 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-Cohenixc 7 # LDACopy the following into cBNprim.files: cBNprim.incBNprim.outcBNprim.xicBNprim.xocBNprim_B.BFD.fhiN.BFD.fhiNow, run abinis < cBNprim.filesConverting the orbitalsWith wfconv in your PATH, run wfconvert --eshdf cBNprim.h5 cBNprim.xo_WFKThis will generated an orbital file in the ESHDF format that QMCPACK reads. Running QMCPACKDownload cBNprim.qmc.xml
The input file cBNprim.qmc.xml has Analyzing the resultsSeveral 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
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.datThis gives the variational energy of about -11.9550 +/- 0.0063 for the first stage, before any optimization is done. Now try,
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
The input file cBNprim.qmc.xml can be used for both CPU- and GPU-compiled QMCPACK. 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 supercellCopy cBNprim.in to cBN_222.in Change the k-point section of the cBN_222.in to the following: # Definition of the k-point gridkptopt 3 # Manual k-pointsngkpt 2 2 2istwfk 1nshiftk 1shiftk 0.0 0.0 0.0This 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 |
