<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="input_xx.xsl"?>
<!-- FILE AUTOMATICALLY CREATED: DO NOT EDIT, CHANGES WILL BE LOST -->
    
<input_description distribution="Quantum Espresso" package="PWscf" program="pw2bgw.x" >
   <toc>
   </toc>
   <intro>
<b>Purpose of pw2bgw.x:</b>
   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 &quot;K_POINTS gamma&quot; in a pw.x run for BerkeleyGW.
Use &quot;K_POINTS { tpiba | automatic | crystal }&quot; even for the
Gamma-point calculation.

It is recommended to run a pw.x &quot;bands&quot; calculation with &quot;K_POINTS crystal&quot;
and a list of k-points produced by kgrid.x, which is a part of BerkeleyGW
package (see BerkeleyGW documentation for details).

You can also run a pw.x &quot;nscf&quot; calculation instead of &quot;bands&quot;, but in this
case pw.x may generate more k-points than provided in the input file of pw.x.
If this is the case for your calculation you will get errors in BerkeleyGW.

Examples showing how to run BerkeleyGW on top of Quantum ESPRESSO including
the input files for pw.x and pw2bgw.x are distributed together with the
BerkeleyGW package.

<b>Structure of the input data:</b>
============================

   <b>&amp;INPUT_PW2BGW</b>
     ...
   <b>/</b>
   </intro>
   <namelist name="INPUT_PW2BGW" >
      <var name="prefix" type="STRING" >
         <status> MANDATORY
         </status>
         <info>
prefix of files saved by program pw.x
         </info>
      </var>
      <var name="outdir" type="STRING" >
         <default> &apos;./&apos;
         </default>
         <info>
the scratch directory where the massive data-files are written
         </info>
      </var>
      <var name="real_or_complex" type="INTEGER" >
         <default> 2
         </default>
         <info>
1 | 2
<b>1</b> for real flavor of BerkeleyGW (for systems with inversion symmetry and
time-reversal symmetry) or <b>2</b> for complex flavor of BerkeleyGW (for systems
without inversion symmetry and time-reversal symmetry)
         </info>
      </var>
      <var name="symm_type" type="STRING" >
         <default> &apos;cubic&apos;
         </default>
         <options>
            <info>
Options are:
            </info>
            <opt val="'cubic'" >
            </opt>
            <opt val="'hexagonal'" >
            </opt>
            <info>
type of crystal system, <b>&apos;cubic&apos;</b> for space groups 1 ... 142 and 195 ... 230
and <b>&apos;hexagonal&apos;</b> for space groups 143 ... 194. Only used if ibrav = 0 in a
pw.x run. Written to BerkeleyGW WFN, RHO, VXC and VKB files but no longer
used (except in SAPO code in BerkeleyGW). You can use the default value for
all systems. Don&apos;t set to different values in different files for the same
system or you will get errors in BerkeleyGW.
            </info>
         </options>
      </var>
      <var name="wfng_flag" type="LOGICAL" >
         <default> .FALSE.
         </default>
         <info>
write wavefunctions in G-space to BerkeleyGW WFN file
         </info>
      </var>
      <var name="wfng_file" type="STRING" >
         <default> &apos;WFN&apos;
         </default>
         <info>
name of BerkeleyGW WFN output file. Not used if <ref>wfng_flag</ref> = .FALSE.
         </info>
      </var>
      <var name="wfng_kgrid" type="LOGICAL" >
         <default> .FALSE.
         </default>
         <info>
overwrite k-grid parameters in BerkeleyGW WFN file.
If pw.x input file contains an explicit 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
         </info>
      </var>
      <var name="wfng_nk1" type="INTEGER" >
         <default> 0
         </default>
         <info>
number of k-points along b_1 reciprocal lattice vector.
Not used if <ref>wfng_kgrid</ref> = .FALSE.
         </info>
      </var>
      <var name="wfng_nk2" type="INTEGER" >
         <default> 0
         </default>
         <info>
number of k-points along b_2 reciprocal lattice vector.
Not used if <ref>wfng_kgrid</ref> = .FALSE.
         </info>
      </var>
      <var name="wfng_nk3" type="INTEGER" >
         <default> 0
         </default>
         <info>
number of k-points along b_3 reciprocal lattice vector.
Not used if <ref>wfng_kgrid</ref> = .FALSE.
         </info>
      </var>
      <var name="wfng_dk1" type="REAL" >
         <default> 0.0
         </default>
         <info>
k-grid offset (0.0 unshifted, 0.5 shifted by half a grid step)
along b_1 reciprocal lattice vector. Not used if <ref>wfng_kgrid</ref> = .FALSE.
         </info>
      </var>
      <var name="wfng_dk2" type="REAL" >
         <default> 0.0
         </default>
         <info>
k-grid offset (0.0 unshifted, 0.5 shifted by half a grid step)
along b_2 reciprocal lattice vector. Not used if <ref>wfng_kgrid</ref> = .FALSE.
         </info>
      </var>
      <var name="wfng_dk3" type="REAL" >
         <default> 0.0
         </default>
         <info>
k-grid offset (0.0 unshifted, 0.5 shifted by half a grid step)
along b_3 reciprocal lattice vector. Not used if <ref>wfng_kgrid</ref> = .FALSE.
         </info>
      </var>
      <var name="wfng_occupation" type="LOGICAL" >
         <default> .FALSE.
         </default>
         <info>
overwrite occupations in BerkeleyGW WFN file
         </info>
      </var>
      <var name="wfng_nvmin" type="INTEGER" >
         <default> 0
         </default>
         <info>
index of the lowest occupied band (normally = 1).
Not used if <ref>wfng_occupation</ref> = .FALSE.
         </info>
      </var>
      <var name="wfng_nvmax" type="INTEGER" >
         <default> 0
         </default>
         <info>
index of the highest occupied band (normally = number of occupied bands).
Not used if <ref>wfng_occupation</ref> = .FALSE.
         </info>
      </var>
      <var name="rhog_flag" type="LOGICAL" >
         <default> .FALSE.
         </default>
         <info>
write charge density in G-space to BerkeleyGW RHO file.
Only used for the GPP model in sigma code in BerkeleyGW
         </info>
      </var>
      <var name="rhog_file" type="STRING" >
         <default> &apos;RHO&apos;
         </default>
         <info>
name of BerkeleyGW RHO output file. Only used for the GPP model in sigma
code in BerkeleyGW. Not used if <ref>rhog_flag</ref> = .FALSE.
         </info>
      </var>
      <var name="rhog_nvmin" type="INTEGER" >
         <default> 0
         </default>
         <info>
index of the lowest band used for calculation of charge density. This is
needed if one wants to exclude semicore states from charge density used
for the GPP model in sigma code in BerkeleyGW. Make sure to include the
same k-points as in scf calculation. Self-consistent charge density is
used if rhog_nvmin = 0 and rhog_nvmax = 0. Not used if <ref>rhog_flag</ref> = .FALSE.
<b>BEWARE:</b> this feature is highly experimental and may not work at all in
parallel, with pools, with spins, etc.
         </info>
      </var>
      <var name="rhog_nvmax" type="INTEGER" >
         <default> 0
         </default>
         <info>
index of the highest band used for calculation of charge density. See
description of rhog_nvmin for more details
         </info>
      </var>
      <var name="vxcg_flag" type="LOGICAL" >
         <default> .FALSE.
         </default>
         <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 <ref>vxc_flag</ref> instead
         </info>
      </var>
      <var name="vxcg_file" type="STRING" >
         <default> &apos;VXC&apos;
         </default>
         <info>
name of BerkeleyGW VXC output file. Only used in sigma code in BerkeleyGW,
it is recommended to use <ref>vxc_flag</ref> instead. Not used if <ref>vxcg_flag</ref> = .FALSE.
         </info>
      </var>
      <var name="vxc0_flag" type="LOGICAL" >
         <default> .FALSE.
         </default>
         <info>
write Vxc(G = 0) to text file. Only for testing, not required for BerkeleyGW
         </info>
      </var>
      <var name="vxc0_file" type="STRING" >
         <default> &apos;vxc0.dat&apos;
         </default>
         <info>
name of output text file for Vxc(G = 0). Only for testing, not required for
BerkeleyGW. Not used if <ref>vxc0_flag</ref> = .FALSE.
         </info>
      </var>
      <var name="vxc_flag" type="LOGICAL" >
         <default> .FALSE.
         </default>
         <info>
write matrix elements of exchange-correlation potential to text file.
Only used in sigma code in BerkeleyGW
         </info>
      </var>
      <var name="vxc_file" type="STRING" >
         <default> &apos;vxc.dat&apos;
         </default>
         <info>
name of output text file for Vxc matrix elements. Only used in sigma code
in BerkeleyGW. Not used if <ref>vxc_flag</ref> = .FALSE.
         </info>
      </var>
      <var name="vxc_integral" type="STRING" >
         <default> &apos;g&apos;
         </default>
         <info>
&apos;g&apos; | &apos;r&apos;
&apos;g&apos; to compute matrix elements of exchange-correlation potential in G-space.
&apos;r&apos; to compute matrix elements of the local part of exchange-correlation
potential in R-space. It is recommended to use &apos;g&apos;. Not used if <ref>vxc_flag</ref> = .FALSE.
         </info>
      </var>
      <var name="vxc_diag_nmin" type="INTEGER" >
         <default> 0
         </default>
         <info>
minimum band index for diagonal Vxc matrix elements. Not used if <ref>vxc_flag</ref> = .FALSE.
         </info>
      </var>
      <var name="vxc_diag_nmax" type="INTEGER" >
         <default> 0
         </default>
         <info>
maximum band index for diagonal Vxc matrix elements. Not used if <ref>vxc_flag</ref> = .FALSE.
         </info>
      </var>
      <var name="vxc_offdiag_nmin" type="INTEGER" >
         <default> 0
         </default>
         <info>
minimum band index for off-diagonal Vxc matrix elements. Not used if <ref>vxc_flag</ref> = .FALSE.
         </info>
      </var>
      <var name="vxc_offdiag_nmax" type="INTEGER" >
         <default> 0
         </default>
         <info>
maximum band index for off-diagonal Vxc matrix elements. Not used if <ref>vxc_flag</ref> = .FALSE.
         </info>
      </var>
      <var name="vxc_zero_rho_core" type="LOGICAL" >
         <default> .TRUE.
         </default>
         <info>
set to .TRUE. to zero out NLCC or to .FALSE. to keep NLCC when computing
exchange-correlation potential. This flag has no effect for pseudopotentials
without NLCC.
<b>BEWARE:</b> setting <ref>vxc_zero_rho_core</ref> to .FALSE. will produce
incorrect results. This functionality is only included for testing purposes
and is not meant to be used in a production environment
         </info>
      </var>
      <var name="vscg_flag" type="LOGICAL" >
         <default> .FALSE.
         </default>
         <info>
write local part of self-consistent potential in G-space to
BerkeleyGW VSC file. Only used in SAPO code in BerkeleyGW
         </info>
      </var>
      <var name="vscg_file" type="STRING" >
         <default> &apos;VSC&apos;
         </default>
         <info>
name of BerkeleyGW VSC output file. Only used in SAPO code in BerkeleyGW.
Not used if <ref>vscg_flag</ref> = .FALSE.
         </info>
      </var>
      <var name="vkbg_flag" type="LOGICAL" >
         <default> .FALSE.
         </default>
         <info>
write Kleinman-Bylander projectors in G-space to BerkeleyGW VKB file.
Only used in SAPO code in BerkeleyGW
         </info>
      </var>
      <var name="vkbg_file" type="STRING" >
         <default> &apos;VKB&apos;
         </default>
         <info>
name of BerkeleyGW VKB output file. Only used in SAPO code in BerkeleyGW.
Not used if <ref>vkbg_flag</ref> = .FALSE.
         </info>
      </var>
   </namelist>
</input_description>
