# sigma.inp

# G-vectors will be used with kinetic energies up to this cutoff (Ry)
# screened_coulomb_cutoff must be <= epsilon_cutoff used for Epsilon run
screened_coulomb_cutoff  8.0
bare_coulomb_cutoff      60.0

# number of bands to sum over
number_bands             146

# a list of which bands are occupied (1) and which are unoccupied (0)
band_occupation          18*1 128*0
# Note that what is above is Fortran shorthand for 18 1's and 128 0's.
# i.e. "4*1 4*0" is equivalent to "1 1 1 1 0 0 0 0"; either may be used here.

# If you have partially occupied bands (Metal) set                    
# number_partial_occup to the number of these bands.                            
# Set occupation of these bands to zero in the    
# band_occupation line above.
# This is for bands that cross the Fermi energy, so
# that they are occupied at some k-points and not at
# others, rather than for thermal partial occupations.
# (this is former ncrit)
#number_partial_occup    0

# Specify the Fermi level (in eV), if you want implicit doping
# Note that value refers to energies AFTER scissor shift or eqp corrections.
#fermi_level             0.0

# The Fermi level is treated as an absolute value
# or relative to that found from the mean field (default)
#fermi_level_absolute
#fermi_level_relative

# The matrix elements of Sigma
# < psi_n | Sigma(E_l) | psi_m >
# E_l is irrelevant for frequency_dependence -1 and 0

# The diagonal matrix elements of Sigma (n .eq. m .eq. l)
#number_diag   ndiag
#begin diag
#   n_1
#   n_2
#   ...
#   n_ndiag
#end
# or specify a range of bands spanned by n
band_index_min   15
band_index_max   22

# The off-diagonal matrix elements of Sigma
# band_index_min .le. n .le. band_index_max
# band_index_min .le. m .le. band_index_max
# band_index_min .le. l .le. band_index_max
# NOTE: the offdiag utility only works with the sigma_matrix syntax, below.
#number_offdiag   noffdiag
#begin offdiag
#   n_1   m_1   l_1
#   n_2   m_2   l_2
#   ...
#   n_noffdiag   m_noffdiag   l_noffdiag
#end
# or select a specific value of l and let n and m vary
# in the range from band_index_min to band_index_max
# Set l to 0 to skip the off-diagonal calculation (default)
# If l = -1 then l_i is set to n_i (i = 1 ... noffdiag)
# i.e. each row is computed at different eigenvalue
# If l = -2 then l_i is set to m_i (i = 1 ... noffdiag)
# i.e. each column is computed at different eigenvalue
# For l > 0, all elements are computed at eigenvalue of band l.
# Set t to 0 for the full matrix (default)
# or to -1/+1 for the lower/upper triangle
#sigma_matrix   l   t

# The range of spin indices for which Sigma is calculated
# The default is the first spin component
#spin_index_min   1
#spin_index_max   1

# What screening is present? (default = semiconductor)
# Does not apply for frequency_dependence = -1.
screening_semiconductor
#screening_metal
#screening_graphene
#  this is for a system with linear DOS at the Fermi level

# RECOMMENDED fast FFTW truncation schemes
# The Coulomb Interaction is cutoff on the edges of
# the Wigner-Seitz Cell in the non-periodic directions
# Periodic directions are a1,a2 for slabs and a3 for wires

#cell_box_truncation
#cell_wire_truncation
#cell_slab_truncation

# Analytic, but non Wigner-Seitz cell, truncation      

#spherical_truncation

# For Spherical Truncation, radius in Bohr
#coulomb_truncation_radius   10.00

# Cutoff energy for averaging the Coulomb Interaction
# in the mini-Brillouin Zones around the Gamma-point
# without Truncation or for Cell Wire or Cell Slab Truncation.
# The value is in Rydbergs, the default is 10^{-12}
#cell_average_cutoff 1.0d-12

# Frequency dependence of the inverse dielectric matrix.
# Set to -1 for the Hartree-Fock and hybrid functional approximation.
# Set to 0 for the static COHSEX approximation.
# Set to 1 for the Generalized Plasmon Pole model (default).
# Set to 2 for the full frequency dependence.
#frequency_dependence 1

# For Full Frequency Calculations.
# The number_frequency_eval is the number of frequency points 
# to evaluate Sigma(omega) at.  The init_frequency_eval (eV) 
# is the first frequency and delta_frequency_eval (eV) is the 
# frequency step. The variable init_frequency_eval should be set 
# relative to the Fermi energy (i.e., 0.0 means the Fermi energy) 
# in case of frequency_dependence = 2, or relative to ecor
# (3rd column of sigma.log) in case of frequency_dependence = 1.
# These are NOT the values used in Epsilon for the evaluation of chi 
# and epsilon - those are automatically read in from epsmat file. 
#init_frequency_eval 0.0
#delta_frequency_eval 0.1
#number_frequency_eval 501

# For Generalized Plasmon Pole.
# The matrix element of the self-energy operator is
# expanded to first order in the energy around Ecor.
# Finite difference form for numerical derivative of Sigma.
# grid     = -3 : dSigma/dE = 0 Specify grid. Sigma.log will show value 
#                 from second point. Spectrum.dat is more meaningful here.
# none     = -2 : dSigma/dE = 0 [skip the expansion].
# backward = -1 : dSigma/dE = (Sigma(Ecor) - Sigma(Ecor-dE)) / dE
# central  =  0 : dSigma/dE = (Sigma(Ecor+dE) - Sigma(Ecor-dE)) / (2*dE)
# forward  =  1 : dSigma/dE = (Sigma(Ecor+dE) - Sigma(Ecor)) / dE
# default  =  2 : forward for diagonal and none for off-diagonal
#finite_difference_form   2
# dE is finite difference spacing given in eV
# The default value is 1.0
#finite_difference_spacing   1.0

# For Hartree-Fock/hybrid functional, no epsmat/eps0mat files are needed.
# Instead provide a list of q-points and the grid size.
# The list of q-points should not be reduced with time
# reversal symmetry - because BerkeleyGW never uses time
# reversal symmetry to unfold the q/k-points. Instead,
# inversion symmetry does the job in the real version of
# the code.
# qx qy qz 1/scale_factor is_q0
# scale_factor is for specifying values such as 1/3
# You can generate this list with kgrid.x: just set the shifts to zero and use
# same grid numbers as for WFN_inner. Then replace the zero vector with q0.
#begin qpoints
#  0.0  0.0  0.0  1.0  1
#end
#qgrid  1  1  1

# Summing SX and CH over G and G' vectors.
# Set to 1 for half sum (default) or 2 for full sum.
# Using 1 assumes W(G,G') = W(G',G) which should be 
# satisfied in most situations. The only
# time you need to use 2 is if you are using a different
# Coulomb interaction (truncation scheme) between Epsilon
# and Sigma.  This is not really recommended anyway.
# If you are using no truncation, doing ggpsum = 1 is 
# not exactly correct: W(G,G') will not be symmetric because 
# we used an averaged V(0) in Sigma and a Non-Averaged V(q0)
# in Epsilon. This leads to errors on the order of 1 meV or less
# in examples.
# ggpsum 1 is (unintuitively) additionally slower than ggpsum 2
# do to poor load balancing with OpenMP and vectorization breakage.
# For these reasons ggpsum 2 will be made default in the future.
#ggpsum 1

# Add remainder from tail of epsilon for full frequency.
#use_epsilon_remainder

# Logging CH convergence.
# Set to 0 for the valence and conduction bands (default).
# Set to 1 for all bands, real part only.
# Set to 2 for all bands, real and imaginary parts.
# Note that CH in ch_converge.dat should be compared
# against unsymmetrized values in the standard output.
# This is different from sigma.log for degenerate states.
#full_ch_conv_log 0

# Use precalculated matrix elements of bare exchange from x.dat.
# The default is not to use them.
#use_xdat

# Do not use precalculated matrix elements of exchange-correlation from vxc.dat.
# The default is to use them.
#dont_use_vxcdat

# Read from traditional simple binary format for epsmat/eps0mat instead of HDF5 file format.
# Relevant only if code is compiled with HDF5 support.
#dont_use_hdf5

# Fraction of bare exchange.
# Set to 1.0 if you use the exchange-correlation matrix elements
# read from file vxc.dat. Set to 1.0 for local density functional,
# 0.0 for HF, 0.75 for PBE0, 0.80 for B3LYP if you use the local
# part of the exchange-correlation potential read from file VXC.
# For functionals such as HSE whose nonlocal part is not some
# fraction of bare exchange, use vxc.dat and not this option.
# This is set to 1.0 by default.
#bare_exchange_fraction   1.0

# Broadening for the energy denominator in CH and SX within GPP.
# If it is less than this value, the sum is better conditioned than
# either CH or SX directly, and will be assigned to SX while CH = 0.
# This is given in eV, the default value is 0.5
#gpp_broadening   0.5
# Cutoff for the poles in SX within GPP.
# Divergent contributions that are supposed to sum to zero are removed.
# This is dimensionless, the default value is 4.0
#gpp_sexcutoff   4.0

# kx ky kz 1/scale_factor
# scale_factor is for specifying values such as 1/3
begin kpoints
  0.0000  0.0000  0.0000  1.0
end

# Scissors operator (linear fit of the quasiparticle
# energy corrections) for the bands in WFN_inner
# e_cor = e_in + es + edel * (e_in - e0)
# Defaults below. evs, ev0, ecs, ec0 are in eV
#evs     0.0
#ev0     0.0
#evdel   0.0
#ecs     0.0
#ec0     0.0
#ecdel   0.0
# or
#cvfit   0.0 0.0 0.0 0.0 0.0 0.0

# Scissors operator (linear fit of the quasiparticle
# energy corrections) for the bands in WFN_outer
# e_cor = e_in + es + edel * (e_in - e0)
# Defaults below. evs_outer, ev0_outer, ecs_outer, ec0_outer are in eV
#evs_outer     0.0
#ev0_outer     0.0
#evdel_outer   0.0
#ecs_outer     0.0
#ec0_outer     0.0
#ecdel_outer   0.0
# or
#cvfit_outer   0.0 0.0 0.0 0.0 0.0 0.0

# Set this to use eigenvalues in eqp.dat
# If not set, this file will be ignored.
#eqp_corrections
# Set this to use eigenvalues in eqp_outer.dat
# If not set, this file will be ignored.
#eqp_outer_corrections

# The average potential on the faces of the unit cell
# in the non-periodic directions for the bands in WFN_inner
# This is used to correct for the vacuum level
# The default is zero, avgpot is in eV
#avgpot   0.0

# The average potential on the faces of the unit cell
# in the non-periodic directions for the bands in WFN_outer
# This is used to correct for the vacuum level
# The default is zero, avgpot_outer is in eV
#avgpot_outer   0.0

# Write the bare Coulomb potential V(q+G) to file
#write_vcoul

# Communication through MPI or DISK
# comm_mpi is usually much faster and preferable but if you have only
# a few CPUs you might not have enough memory to hold wavefunctions
# comm_disk results in temporary INT_* files being created and it
# may be faster for a small unit cell and a lot of k-points
# The default is comm_mpi.
comm_mpi
#comm_disk

# Number of pools for parallel sigma calculations
# The default is chosen to minimize memory in calculation
#number_sigma_pools 1

# Threshold for considering bands degenerate, for purpose of
# making sure all of degenerate subspaces are included,
# for band-averaging, and for setting offdiagonals to zero by symmetry. (Ry)
tol_degeneracy 1e-6

# EXPERIMENTAL FEATURES FOR TESTING PURPOSES ONLY
# 'unfolded BZ' is from the kpoints in the WFN_inner file
# 'full BZ' is generated from the kgrid parameters in the WFN_inner file
# See comments in Common/checkbz.f90 for more details
# Replace unfolded BZ with full BZ
#fullbz_replace
# Write unfolded BZ and full BZ to files
#fullbz_write

# The requested number of bands cannot break degenerate subspace
# Use the following keyword to suppress this check
# Note that you must still provide one more band in
# wavefunction file in order to assess degeneracy
#degeneracy_check_override

# The sum over q-points runs over the full Brillouin zone.
# For diagonal matrix elements between non-degenerate bands
# and for spherically symmetric Coulomb potential (no truncation
# or spherical truncation), the sum over q-points runs over
# the irreducible wedge folded with the symmetries of
# a subgroup of the k-point. The latter is the default.
# In both cases, WFN_inner should have the reduced k-points
# from an unshifted grid, i.e. same as q-points in Epsilon.
# With no_symmetries_q_grid, any calculation can be done;
# use_symmetries_q_grid is faster but only diagonal matrix elements
# of non-degenerate or band-averaged states can be done.
#no_symmetries_q_grid
#use_symmetries_q_grid

# Off-diagonal elements are zero if the two states belong to
# different irreducible representations. As a simple proxy,
# we use the size of the degenerate subspaces of the two states:
# if the sizes are different, the irreps are different, and the
# matrix element is set to zero without calculation.
# Turn off this behavior for testing by setting flag below.
# Using WFN_outer effectively sets no_symmetries_offdiagonals.
#no_symmetries_offdiagonals

# Rotation of the k-points may bring G-vectors outside of the sphere.
# Use the following keywords to specify whether to die if some of
# the G-vectors fall outside of the sphere. The default is to die.
# Set to die in case screened_coulomb_cutoff = epsilon_cutoff.
# Set to ignore in case screened_coulomb_cutoff < epsilon_cutoff.
#die_outside_sphere
#ignore_outside_sphere

# Dealing with the convergence of the CH term.
# Set to 0 to compute a partial sum over empty bands.
# Set to 1 to compute the exact static CH.
# In case of exact_static_ch = 1 and frequency_dependence = 1 (GPP) or 2 (FF),
# the partial sum over empty bands is corrected with the static remainder
# which is equal to 1/2 * (exact static CH - partial sum static CH),
# additional columns in sigma_hp.log labeled ch', sig', eqp0', eqp1'
# are computed with the partial sum without the static remainder,
# and ch_converge.dat contains the static limit of the partial sum.
# In case of exact_static_ch = 0 and frequency_dependence = 0 (COHSEX),
# columns ch, sig, eqp0, eqp1 contain the exact static CH,
# columns ch', sig', eqp0', eqp1' contain the partial sum static CH,
# and ch_converge.dat contains the static limit of the partial sum.
# For exact_static_ch = 1 and frequency_dependence = 0 (COHSEX),
# columns ch', sig', eqp0', eqp1' are not printed and
# file ch_converge.dat is not written.
# Default is 0 for frequency_dependence = 1 and 2;
# 1 for frequency_dependence = 0;
# has no effect for frequency_dependence  = -1.
#
# It is important to note that the exact static CH answer
# depends not only on the screened Coulomb cutoff but also on the bare Coulomb cutoff
# because G-G' for G's within the screened Coulomb cutoff can be outside the screened
# Coulomb cutoff sphere. And, therefore, the bare Coulomb cutoff sphere is used.
#exact_static_ch 0

# Do not average W over the minibz, and do not replace the head of eps0mat with
# averaged value.
#skip_averagew

