Commit 3d8d2338 authored by giannozz's avatar giannozz

Added interface with BerkeleyGW code, courtesy of Georgy Samsonidze


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@8760 c92efa57-630b-4861-b058-cf58834340f0
parent 53578638
input_description -distribution {Quantum Espresso} -package PWscf -program bgw2pw.x {
toc {}
intro {
Converts BerkeleyGW WFN and RHO files to the format of pw.x.
This can be useful, for example, if you generate the plane waves
on top of the valence bands and want to diagonalize them in pw.x.
Look at the documentation for SAPO code in BerkeleyGW for more information.
bgw2pw.x reads common parameters from file prefix.save/data-file.xml and
writes files prefix.save/charge-density.dat (charge density in R-space),
prefix.save/gvectors.dat (G-vectors for charge density and potential),
prefix.save/K$n/eigenval.xml (eigenvalues and occupations for nth k-point),
prefix.save/K$n/evc.dat (wavefunctions in G-space for nth k-point), and
prefix.save/K$n/gkvectors.dat (G-vectors for nth k-point).
bgw2pw.x doesn't modify file prefix.save/data-file.xml so make changes to this
file manually (for example, you will need to change the number of bands if you
are using bgw2pw.x in conjunction with SAPO code in BerkeleyGW).
Structure of the input data:
============================
&INPUT_BGW2PW
...
/
}
namelist INPUT_BGW2PW {
var prefix -type STRING {
status { MANDATORY }
info {
prefix of files saved by program pw.x
}
}
var outdir -type STRING {
default { './' }
info {
the scratch directory where the massive data-files are written
}
}
var real_or_complex -type INTEGER {
default { 2 }
info {
1 | 2
1 for real flavor of BerkeleyGW (for systems with inversion symmetry and
time-reversal symmetry) or 2 for complex flavor of BerkeleyGW (for systems
without inversion symmetry and time-reversal symmetry)
}
}
var wfng_flag -type LOGICAL {
default { .FALSE. }
info {
read wavefunctions in G-space from BerkeleyGW WFN file
}
}
var wfng_file -type STRING {
default { 'WFN' }
info {
name of BerkeleyGW WFN input file. Not used if wfng_flag = .FALSE.
}
}
var wfng_nband -type INTEGER {
default { 0 }
info {
number of bands to write (0 = all). Not used if wfng_flag = .FALSE.
}
}
var rhog_flag -type LOGICAL {
default { .FALSE. }
info {
read charge density in G-space from BerkeleyGW RHO file
}
}
var rhog_file -type STRING {
default { 'RHO' }
info {
name of BerkeleyGW RHO input file. Not used if rhog_flag = .FALSE.
}
}
}
}
input_description -distribution {Quantum Espresso} -package PWscf -program pw2bgw.x {
toc {}
intro {
Converts the output files produced by pw.x to the input files for BerkeleyGW.
You cannot use USPP, PAW, or spinors in a pw.x run for BerkeleyGW.
You cannot use "K_POINTS gamma" in a pw.x run for BerkeleyGW.
Use "K_POINTS { tpiba | automatic | crystal }" even for the
Gamma-point calculation.
It is recommended to run a pw.x nscf calculation with "K_POINTS crystal"
and a list of k-points produced by kgrid.x, which is a part of BerkeleyGW
package (see BerkeleyGW documentation for details).
Sometimes pw.x adds more k-points when they are specified manually.
Always check if this is the case in the output. If this is the case
then there are several ways to go around this issue:
(1) You can apply the patch provided with BerkeleyGW. This will prevent
pw.x from producing more k-points if they are supplied manually.
(2) Do not supply atomic positions in the input file of kgrid.x (set
number of atoms = 0). Then pw.x will generate additional k-points
which are the correct ones. Do not forget to use noinv = .true. if
time-reversal symmetry is not used in the generation of k-points.
(3) You can do "bands" calculation instead of "nscf" but in this case
you have to explicitly specify occupations in the input file of
pw2bgw.x.
Choose the option that best fits your needs.
Structure of the input data:
============================
&INPUT_PW2BGW
...
/
}
namelist INPUT_PW2BGW {
var prefix -type STRING {
status { MANDATORY }
info {
prefix of files saved by program pw.x
}
}
var outdir -type STRING {
default { './' }
info {
the scratch directory where the massive data-files are written
}
}
var real_or_complex -type INTEGER {
default { 2 }
info {
1 | 2
1 for real flavor of BerkeleyGW (for systems with inversion symmetry and
time-reversal symmetry) or 2 for complex flavor of BerkeleyGW (for systems
without inversion symmetry and time-reversal symmetry)
}
}
var symm_type -type STRING {
default { 'cubic' }
info {
'cubic' | 'hexagonal'
type of crystal system, 'cubic' for space groups 1 ... 142 and 195 ... 230
and 'hexagonal' for space groups 143 ... 194. Only used if ibrav = 0 in a
pw.x run
}
}
var wfng_flag -type LOGICAL {
default { .FALSE. }
info {
write wavefunctions in G-space to BerkeleyGW WFN file
}
}
var wfng_file -type STRING {
default { 'WFN' }
info {
name of BerkeleyGW WFN output file. Not used if wfng_flag = .FALSE.
}
}
var wfng_kgrid -type LOGICAL {
default { .FALSE. }
info {
overwrite k-grid parameters in BerkeleyGW WFN file.
If pw.x input file contains the manual list of k-points,
the k-grid parameters in the output of pw.x will be set to zero.
Since sigma and absorption in BerkeleyGW both need to know the
k-grid dimensions, we patch these parameters into BerkeleyGW WFN file
}
}
var wfng_nk1 -type INTEGER {
default { 0 }
info {
number of k-points along b_1 reciprocal lattice vector.
Not used if wfng_kgrid = .FALSE.
}
}
var wfng_nk2 -type INTEGER {
default { 0 }
info {
number of k-points along b_2 reciprocal lattice vector.
Not used if wfng_kgrid = .FALSE.
}
}
var wfng_nk3 -type INTEGER {
default { 0 }
info {
number of k-points along b_3 reciprocal lattice vector.
Not used if wfng_kgrid = .FALSE.
}
}
var wfng_dk1 -type REAL {
default { 0.0 }
info {
k-grid offset (0.0 unshifted, 0.5 shifted by half a grid step)
along b_1 reciprocal lattice vector. Not used if wfng_kgrid = .FALSE.
}
}
var wfng_dk2 -type REAL {
default { 0.0 }
info {
k-grid offset (0.0 unshifted, 0.5 shifted by half a grid step)
along b_2 reciprocal lattice vector. Not used if wfng_kgrid = .FALSE.
}
}
var wfng_dk3 -type REAL {
default { 0.0 }
info {
k-grid offset (0.0 unshifted, 0.5 shifted by half a grid step)
along b_3 reciprocal lattice vector. Not used if wfng_kgrid = .FALSE.
}
}
var wfng_occupation -type LOGICAL {
default { .FALSE. }
info {
overwrite occupations in BerkeleyGW WFN file
}
}
var wfng_nvmin -type INTEGER {
default { 0 }
info {
index of the lowest occupied band (normally = 1).
Not used if wfng_occupation = .FALSE.
}
}
var wfng_nvmax -type INTEGER {
default { 0 }
info {
index of the highest occupied band (normally = number of occupied bands).
Not used if wfng_occupation = .FALSE.
}
}
var rhog_flag -type LOGICAL {
default { .FALSE. }
info {
write charge density in G-space to BerkeleyGW RHO file.
Only used for the GPP model in sigma code in BerkeleyGW
}
}
var rhog_file -type STRING {
default { 'RHO' }
info {
name of BerkeleyGW RHO output file. Only used for the GPP model in sigma
code in BerkeleyGW. Not used if rhog_flag = .FALSE.
}
}
var vxcg_flag -type LOGICAL {
default { .FALSE. }
info {
write local part of exchange-correlation potential in G-space to
BerkeleyGW VXC file. Only used in sigma code in BerkeleyGW, it is
recommended to use vxc_flag instead
}
}
var vxcg_file -type STRING {
default { 'VXC' }
info {
name of BerkeleyGW VXC output file. Only used in sigma code in BerkeleyGW,
it is recommended to use vxc_flag instead. Not used if vxcg_flag = .FALSE.
}
}
var vxc0_flag -type LOGICAL {
default { .FALSE. }
info {
write Vxc(G = 0) to text file. Only for testing, not required for BerkeleyGW
}
}
var vxc0_file -type STRING {
default { 'vxc0.dat' }
info {
name of output text file for Vxc(G = 0). Only for testing, not required for
BerkeleyGW. Not used if vxc0_flag = .FALSE.
}
}
var vxc_flag -type LOGICAL {
default { .FALSE. }
info {
write matrix elements of exchange-correlation potential to text file.
Only used in sigma code in BerkeleyGW
}
}
var vxc_file -type STRING {
default { 'vxc.dat' }
info {
name of output text file for Vxc matrix elements. Only used in sigma code
in BerkeleyGW. Not used if vxc_flag = .FALSE.
}
}
var vxc_integral -type STRING {
default { 'g' }
info {
'g' | 'r'
'g' to compute matrix elements of exchange-correlation potential in G-space.
'r' to compute matrix elements of the local part of exchange-correlation
potential in R-space. It is recommended to use 'g'. Not used if vxc_flag = .FALSE.
}
}
var vxc_diag_nmin -type INTEGER {
default { 0 }
info {
minimum band index for diagonal Vxc matrix elements. Not used if vxc_flag = .FALSE.
}
}
var vxc_diag_nmax -type INTEGER {
default { 0 }
info {
maximum band index for diagonal Vxc matrix elements. Not used if vxc_flag = .FALSE.
}
}
var vxc_offdiag_nmin -type INTEGER {
default { 0 }
info {
minimum band index for off-diagonal Vxc matrix elements. Not used if vxc_flag = .FALSE.
}
}
var vxc_offdiag_nmax -type INTEGER {
default { 0 }
info {
maximum band index for off-diagonal Vxc matrix elements. Not used if vxc_flag = .FALSE.
}
}
var input_dft -type STRING {
default { 'sla+pz' }
info {
exchange-correlation functional, same as in pw.x. Not used if vxcg_flag = .FALSE. and
vxc_flag = .FALSE.
}
}
var exx_flag -type LOGICAL {
default { .FALSE. }
info {
set to .TRUE. when using EXX. Not used if vxcg_flag = .FALSE. and vxc_flag = .FALSE.
}
}
var vnlg_flag -type LOGICAL {
default { .FALSE. }
info {
write Kleinman-Bylander projectors in G-space to BerkeleyGW VNL file.
Only used in SAPO code in BerkeleyGW
}
}
var vnlg_file -type STRING {
default { 'VNL' }
info {
name of BerkeleyGW VNL output file. Only used in SAPO code in BerkeleyGW.
Not used if vnlg_flag = .FALSE.
}
}
}
}
......@@ -5,7 +5,9 @@ HTMLS = INPUT_PP.html \
INPUT_PROJWFC.html \
INPUT_DOS.html \
INPUT_BANDS.html \
INPUT_pw_export.html
INPUT_pw_export.html \
INPUT_pw2bgw.html \
INPUT_bgw2pw.html
PDFS = eps_man.pdf
AUXS = $(PDFS:.pdf=.aux)
......
......@@ -54,7 +54,8 @@ all : tldeps average.x bands.x dos.x epsilon.x initial_state.x \
plan_avg.x plotband.x plotproj.x plotrho.x pmw.x pp.x projwfc.x \
pawplot.x sumpdos.x wfdd.x \
pw2wannier90.x pw_export.x pw2gw.x \
wannier_ham.x wannier_plot.x
wannier_ham.x wannier_plot.x \
pw2bgw.x bgw2pw.x
qexml.x: qexml.o qexml_example.o
$(LD) $(LDFLAGS) -o $@ qexml_example.o qexml.o $(QEOBJS) $(LIBOBJS)
......@@ -165,7 +166,17 @@ wannier_plot.x : wannier_plot.o $(PPOBJS) $(MODULES) $(LIBOBJS)
$(LD) $(LDFLAGS) -o $@ \
wannier_plot.o $(PPOBJS) $(MODULES) $(LIBOBJS) $(LIBS)
- ( cd ../../bin ; ln -fs ../PP/src/$@ . )
pw2bgw.x : pw2bgw.o $(PPOBJS) $(MODULES) $(LIBOBJS)
$(LD) $(LDFLAGS) -o $@ \
pw2bgw.o $(PPOBJS) $(MODULES) $(LIBOBJS) $(LIBS)
- ( cd ../../bin ; ln -fs ../PP/src/$@ . )
bgw2pw.x : bgw2pw.o $(PPOBJS) $(MODULES) $(LIBOBJS)
$(LD) $(LDFLAGS) -o $@ \
bgw2pw.o $(PPOBJS) $(MODULES) $(LIBOBJS) $(LIBS)
- ( cd ../../bin ; ln -fs ../PP/src/$@ . )
tldeps:
test -n "$(TLDEPS)" && ( cd ../.. ; $(MAKE) $(MFLAGS) $(TLDEPS) || exit 1) || :
......
This diff is collapsed.
......@@ -545,3 +545,25 @@ xctest.o : ../../Modules/kind.o
xctest.o : ../../Modules/mp.o
xsf.o : ../../Modules/constants.o
xsf.o : ../../Modules/kind.o
pw2bgw.o bgw2pw.o : ../../Modules/cell_base.o
pw2bgw.o bgw2pw.o : ../../Modules/constants.o
pw2bgw.o bgw2pw.o : ../../Modules/control_flags.o
pw2bgw.o bgw2pw.o : ../../Modules/environment.o
pw2bgw.o : ../../Modules/funct.f90
pw2bgw.o bgw2pw.o : ../../Modules/io_files.o
pw2bgw.o bgw2pw.o : ../../Modules/io_global.o
pw2bgw.o : ../../Modules/ions_base.o
pw2bgw.o bgw2pw.o : ../../Modules/kind.o
pw2bgw.o bgw2pw.o : ../../Modules/mp.o
pw2bgw.o bgw2pw.o : ../../Modules/mp_global.o
pw2bgw.o : ../../Modules/mp_wave.o
pw2bgw.o bgw2pw.o : ../../Modules/parallel_include.o
pw2bgw.o : ../../Modules/uspp.o
pw2bgw.o bgw2pw.o : ../../Modules/wavefunctions.o
pw2bgw.o : ../../Modules/paw_variables.o
pw2bgw.o bgw2pw.o : ../../PW/src/pwcom.o
pw2bgw.o bgw2pw.o : ../../PW/src/scf_mod.o
pw2bgw.o bgw2pw.o : ../../PW/src/symm_base.o
bgw2pw.o : ../../iotk/src/iotk_module.o
bgw2pw.o : ../../Modules/xml_io_base.o
bgw2pw.o : ../../PW/src/io_rho_xml.o
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment