A QMC tutorial
using Quantum Espresso & CASINO
Kenta Hongo, Ryo Maezono
Japan Advanced Institute of Science and Technology
Hands-on
p Setup
p Installation of CASINO & QE 5.0.2
p QMC band gap calculation for Aluminum Nitride
p Target system: AlN/1x1x1 (16 electrons)
p SCF calculation with PWSCF
p SCF calculation for generating the blip wavefunction.
p QMC calculations with CASINO
p Ground state/Excited state
p Optimization
p DMC
p Discussions & Project work
Setup
p Open a terminal.
p Go to:
~/Desktop/20160703_icme/1_tutorial/2_casino
CASINO
p To get CASINO, visit the following web:
http://vallico.net/casinoqmc/download-casino/
p You can also find the site by searching “qmc casino
download”.
p You can find important information regarding CASINO at
this site.
Target system
¤ AlN
¤ Wurtzite phase
¤ Wide bandgap: (direct trans.)
6.01-6.05 eV (room temp.)
¤ DFT reference values:
¤ DMC: 3.9-4.7 eV
¤ How about QMC?
How QMC evaluates band gap?
¤ QMC treats correlated many-body wavefunctions.
¤ It is hard to extract one-body informations from many-body
wavefunction.
¤ QMC evalutes the band gap from the total energy difference
between the ground and the corresponding excited states.
QMC calculations: overview
¤ Generate one-body wavefunctions entering many-body one
by Quantum Espresso.
¤ Construct the many-body QMC wavefunction and optimize
the parameters in the Jastrow part.
¤ Do the DMC calculations using the above many-body
wavefunction as the fixed-node (i.e., starting point)
Generate Blip WaveFunction
p SCF calculation to generate blip wavefunction data (bwfn.data)
l Working directory: 1_genwfn
l Requisite files: input.in
pw2casino.dat
al_ppot.gon; n_ppot.gon
1. Run the Quantum Espresso with an option of generating “bwfn.data” :
% pw.x -pw2casino < input.in > out &
Generate Blip WaveFunction
2. Check files
% ls
pw2casino.dat
blip wavefunction file for
CASINO
aln.bwfn.data etc.....
3. Copy “aln.bwfn.data” to the QMC working directories and rename it
to “bwfn.data” : (omit this, already copied for saving time)
% mv aln.bwfn.data ../2_gs_opt/bwfn.data
Turn to QMC Part !
Move on to the working directory “../2_gs_opt” Optimization of the wavefunction
p Optimize parameters in the jastrow factor for the ground state
l Working directory : 2_gs_opt
l Requisite files : bwfn.data, input, al/n_pp.data, correlation.data
1. To run CASINO, just to execute:
% casino &
(That‘s it. It takes about 4 minutes.)
2. To check energies, just execute
% ve
CASINO keywords
#-------------------#
# CASINO input file #
#-------------------#
# AlN GS (blip basis)
# SYSTEM
neu
:8
ned
:8
periodic
:T
atom_basis_type : blip
%block npcell
111
%endblock npcell
psi_s
: slater
complex_wf
:F
#*! Number of up electrons (Integer)
#*! Number of down electrons (Integer)
#*! Periodic boundary conditions (Boolean)
#*! Basis set type (Text)
#*! Type of [anti]symmetrizing wfn (Text)
#*! Wave function real or complex (Boolean)
Parameters for optimization
# RUN
runtype
newrun
testrun
: vmc_opt
#*! Type of calculation (Text)
:T
#*! New run or continue old (Boolean)
:F
#*! Test run flag (Boolean)
# VMC
vmc_equil_nstep : 1000
#*! Number of equilibration steps (Integer)
vmc_nstep
: 10000
#*! Number of steps (Integer)
vmc_nblock
:1
#*! Number of checkpoints (Integer)
vmc_nconfig_write : 10000
#*! Number of configs to write (Integer)
vmc_decorr_period : 10
#*! Decorrelation loop length (Integer)
Cont’d
# OPTIMIZATION
opt_method
: varmin_linjas #*! Opt method (varmin/madmin/emin/...)
opt_cycles
:1
#*! Number of optimization cycles (Integer)
opt_jastrow
:T
#*! Optimize Jastrow factor (Boolean)
opt_det_coeff : F
#*! Optimize determinant coeffs (Boolean)
opt_backflow
:F
#*! Optimize backflow parameters (Boolean)
opt_orbitals
:F
#*! Optimize orbital parameters (Boolean)
# GENERAL PARAMETERS
use_jastrow
:T
#*! Use a Jastrow function (Boolean)
backflow
:F
#*! Use backflow corrections (Boolean)
Check the optimization results
% ve
(ß CASINO utility)
…..
VMC #1: E = -23.52(2) ; var = 2.52(2) (correlation.out.0)
VMC #2: E = -23.83(2) ; var = 1.60(6) (correlation.out.1)
Total CASINO CPU time ::: 210.2800 seconds
We usually run
more optimization
l Save “correlation.out.1” as correlation.data :
calculations to find
% cp correlation.out.1 ../3_gs_dmc/correlation.data
the best possible
solution, but omit
them for tutorial
purpose.
DMC for GS
p DMC for the ground state
l Working directory : 3_gs_dmc
l Requisite files : bwfn.data, input, al/n_pp.data, correlation.data
1. To run CASINO, just to execute:
% casino &
That‘s it. It takes about 20-30 minutes.
Key parameters for DMC
VMC for generating random walkers;
then DMC simulations
# CASINO input file
# RUN
runtype
newrun
testrun
: vmc_dmc
:T
:F
# VMC
vmc_equil_nstep : 1000
vmc_nstep
: 5000
vmc_nblock
:1
vmc_nconfig_write : 512
vmc_decorr_period : 10
#*! Type of calculation (Text)
#*! New run or continue old (Boolean)
#*! Test run flag (Boolean)
#*! Number of equilibration steps (Integer)
#*! Number of steps (Integer)
#*! Number of checkpoints (Integer)
#*! Number of configs to write (Integer)
#*! Decorrelation loop length (Integer)
Key parameters (cont’d)
# DMC
dmc_equil_nstep : 100
#*! Number of steps (Integer)
dmc_equil_nblock : 1
#*! Number of checkpoints (Integer)
dmc_stats_nstep : 500
#*! Number of steps (Integer)
dmc_stats_nblock : 1
#*! Number of checkpoints (Integer)
dmc_target_weight : 512.d0
#*! Total target weight in DMC (Real)
dtdmc
: 0.01
#*! DMC time step (Real)
use_tmove
:T
#*! Casula nl pp for DMC (Boolean)
# GENERAL PARAMETERS
use_jastrow
:T
#*! Use a Jastrow function (Boolean)
Check the DMC result
p Extract the DMC energy from “out”:
% grep ‘Total energy‘ out | grep +
Total energy
= -23.981269141303 +/-
0.006886667262
Next, we move on to the ES calculation,
but its procedure is the same as the GS.
How can we obtain the ES wavefunction?
The excited state
p Optimize parameters in the jastrow factor for the excited state
l Working directory : 4_es_opt
l Requisite files : bwfn.data, input, al/n_pp.data, correlation.data
ü To run CASINO, just to execute:
% casino &
It may take about 4 minitutes.
In fact, “input” (except for titles), bwfn.data, x_pp.data (x=al,n)
are common to both the sates.
GS vs. ES
p Their difference is described in correlation.data.
diff 2_gs_opt/correlation.data 4_es_opt/correlation.data
…..
START MDET
Title
AlN/ES/111
Multideterminant/excitation specification (see manual)
SD
DET 1 1 PR 8 1 9 1
END MDET
Check the optimization results
% ve
…..
VMC #1: E = -23.36(2) ; var = 2.13(9) (correlation.out.0)
VMC #2: E = -23.69(2) ; var = 1.7(2) (correlation.out.1)
Total CASINO CPU time ::: 211.0800 seconds
We usually run
more optimization
l Save “correlation.out.1” as correlation.data :
calculations to find
% cp correlation.out.1 ../5_es_dmc/correlation.data
the best possible
solution, but omit
them for tutorial
purpose.
DMC for ES
p DMC for the excited state
l Working directory : 5_es_dmc
l Requisite files : bwfn.data, input, al/n_pp.data, correlation.data
1. To run CASINO, just to execute:
% casino &
It takes about 20-30 minutes.
Check the DMC result
p Extract the DMC energy from “out”:
% grep ‘Total energy‘ out | grep +
Total energy
= -23.841880696901 +/-
0.007862118958
How to calculate the difference of two values
with error bars?
For { Ei ± σ i ;i = 1,2} , Statistics tells us the following answer:
( E1 − E2 ) ± (
σ +σ
2
1
2
2
)
GAP within DMC/1x1x1
p Just to execute a script “gap.sh” at QMC_ASESMA_15/aln/111
./gap.sh
GAP = 3.8 +/- 0.3 eV
p This significantly underesitmates the experimental value of 6.0 eV.
DMC is known to be one of the most accurate methods, but…
Discussions
¤ We only consider a 1x1x1 simulation cell, i.e., a primitive
unit cell, which cannot describe the periodicity of
crystals. This discrepancy is known as the finite-size error.
¤ To remove the FSE, one should perform a larger
simulation cell size calculations, eg. 2x2x1, or 4x4x2.
¤ Our preliminary calculation of 2x2x1 acutually gives a
GAP of 5.3 +/- 0.3 eV, which is much better than the 1x1x1
case.
Project work
¤ Such larger simulations, however, need much more
computational costs. The costs scales as N3 where N
stands for the number of electrons.
¤ But the QMC algorithm is intrinsically parapllel, so QMC is
very suitable for massively parallel computers.
¤ We propose you to consider our projective work on 4x4x2
using supercomputers at our institute. Relevant materials
such as GaN are also challenging.
© Copyright 2026 Paperzz