<?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="hp.x" >
   <toc>
   </toc>
   <intro>
<b>Input data format:</b> { } = optional, [ ] = it depends, # = comment

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

<b>&amp;INPUTHP</b>
   ...
<b>/</b>
   </intro>
   <namelist name="INPUTHP" >
      <var name="prefix" type="CHARACTER" >
         <default> &apos;pwscf&apos;
         </default>
         <info>
Prepended to input/output filenames; must be the same
used in the calculation of unperturbed system.
         </info>
      </var>
      <var name="outdir" type="CHARACTER" >
         <default>
value of the <tt>ESPRESSO_TMPDIR</tt> environment variable if set;
<br/> current directory (&apos;./&apos;) otherwise
         </default>
         <info>
Directory containing input, output, and scratch files;
must be the same as specified in the calculation of
the unperturbed system.
         </info>
      </var>
      <var name="iverbosity" type="INTEGER" >
         <default> 1
         </default>
         <info>
= 1 : minimal output
= 2 : as above + symmetry matrices, final response
      matrices chi0 and chi1 and their inverse matrices,
      full U matrix
= 3 : as above + various detailed info about the NSCF
      calculation at k and k+q
= 4 : as above + response occupation matrices at every
      iteration and for every q point in the star
         </info>
      </var>
      <var name="max_seconds" type="REAL" >
         <default> 1.d7
         </default>
         <info>
Maximum allowed run time before the job stops smoothly.
         </info>
      </var>
      <vargroup type="INTEGER" >
         <var name="nq1" >
         </var>
         <var name="nq2" >
         </var>
         <var name="nq3" >
         </var>
         <default> 1,1,1
         </default>
         <info>
Parameters of the Monkhorst-Pack grid (no offset).
Same meaning as for nk1, nk2, nk3 in the input of pw.x.
         </info>
      </vargroup>
      <var name="skip_equivalence_q" type="LOGICAL" >
         <default> .false.
         </default>
         <info>
If .true. then the HP code will skip the equivalence
analysis of q points, and thus the full grid of q points
will be used. Otherwise the symmetry is used to determine
equivalent q points (star of q), and then perform
calculations only for inequivalent q points.
         </info>
      </var>
      <var name="determine_num_pert_only" type="LOGICAL" >
         <default> .false.
         </default>
         <see> find_atpert
         </see>
         <info>
If .true. determines the number of perturbations
(i.e. which atoms will be perturbed) and exits smoothly
without performing any calculation. For DFT+U+V, it also
determines the indices of inter-site couples.
         </info>
      </var>
      <var name="determine_q_mesh_only" type="LOGICAL" >
         <default> .false.
         </default>
         <see> perturb_only_atom
         </see>
         <info>
If .true. determines the number of q points
for a given perturbed atom and exits smoothly.
This keyword can be used only if perturb_only_atom
is set to .true.
         </info>
      </var>
      <var name="find_atpert" type="INTEGER" >
         <default> 1
         </default>
         <info>
Method for searching of atoms which must be perturbed.
1 = Find how many inequivalent Hubbard atoms there are
    by analyzing unperturbed occupations.
2 = Find how many Hubbard atoms to perturb based on
    how many different Hubbard atomic types there are.
    Warning: atoms which have the same type but which
    are inequivalent by symmetry or which have different
    occupations will not be distinguished in this case
    (use option 1 or 3 instead).
3 = Find how many inequivalent Hubbard atoms
    there are using symmetry. Atoms which have the
    same type but are not equivalent by symmetry will
    be distinguished in this case.
4 = Perturb all Hubbard atoms (the most expensive option)
         </info>
      </var>
      <var name="docc_thr" type="REAL" >
         <default> 5.D-5
         </default>
         <info>
Threshold for a comparison of unperturbed occupations
which is needed for the selection of atoms which must
be perturbed. Can be used only when <ref>find_atpert</ref> = 1.
         </info>
      </var>
      <dimension name="skip_type" start="1" end="ntyp" type="LOGICAL" >
         <default> skip_type(i) = .false.
         </default>
         <see> equiv_type
         </see>
         <info>
<ref>skip_type</ref>(i), where i runs over types of atoms.
If <ref>skip_type</ref>(i)=.true. then no linear-response
calculation will be performed for the i-th atomic type:
in this case <ref>equiv_type</ref>(i) must be specified, otherwise
the HP code will stop. This option is useful if the
system has atoms of the same type but opposite spin
pollarizations (anti-ferromagnetic case).
This keyword cannot be used when <ref>find_atpert</ref> = 1.
         </info>
      </dimension>
      <dimension name="equiv_type" start="1" end="ntyp" type="INTEGER" >
         <default> equiv_type(i) = 0
         </default>
         <see> skip_type
         </see>
         <info>
<ref>equiv_type</ref>(i), where i runs over types of atoms.
<ref>equiv_type</ref>(i)=j, will make type i equivalent to type j
(useful when nspin=2). Such a merging of types is done
only at the post-processing stage.
This keyword cannot be used when <ref>find_atpert</ref> = 1.
         </info>
      </dimension>
      <dimension name="perturb_only_atom" start="1" end="ntyp" type="LOGICAL" >
         <default> perturb_only_atom(i) = .false.
         </default>
         <see> compute_hp
         </see>
         <info>
If <ref>perturb_only_atom</ref>(i)=.true. then only the i-th
atom will be perturbed and considered in the run.
This variable is useful when one wants to split
the whole calculation on parts.

<b>Note:</b> this variable has a higher priority than <ref>skip_type</ref>.
         </info>
      </dimension>
      <var name="start_q" type="INTEGER" >
         <default> 1
         </default>
         <see> last_q, sum_pertq
         </see>
         <info>
Computes only the q points from <ref>start_q</ref> to <ref>last_q</ref>.

<b>IMPORTANT:</b> <ref>start_q</ref> must be smaller or equal to
the total number of q points found.
         </info>
      </var>
      <var name="last_q" type="INTEGER" >
         <default> number of q points
         </default>
         <see> start_q, sum_pertq
         </see>
         <info>
Computes only the q points from <ref>start_q</ref> to <ref>last_q</ref>.

<b>IMPORTANT:</b> <ref>last_q</ref> must be smaller or equal to
the total number of q points found.
         </info>
      </var>
      <var name="sum_pertq" type="LOGICAL" >
         <default> .false.
         </default>
         <see> start_q, last_q, perturb_only_atom
         </see>
         <info>
If it is set to .true. then the HP code will collect
pieces of the response occupation matrices for all
q points. This variable should be used only when
<ref>start_q</ref>, <ref>last_q</ref> and <ref>perturb_only_atom</ref> are used.
         </info>
      </var>
      <var name="compute_hp" type="LOGICAL" >
         <default> .false.
         </default>
         <see> perturb_only_atom
         </see>
         <info>
If it is set to .true. then the HP code will collect
pieces of the chi0 and chi matrices (which must have
been produced in previous runs) and then compute
Hubbard parameters. The HP code will look for files
tmp_dir/HP/prefix.chi.i.dat. Note that all files
prefix.chi.i.dat (where i runs over all perturbed
atoms) must be placed in one folder tmp_dir/HP/.
<ref>compute_hp</ref>=.true. must be used only when the
calculation was parallelized over perturbations.
         </info>
      </var>
      <var name="conv_thr_chi" type="REAL" >
         <default> 1.D-5
         </default>
         <info>
Convergence threshold for the response function chi,
which is defined as a trace of the response
occupation matrix.
         </info>
      </var>
      <var name="thresh_init" type="REAL" >
         <default> 1.D-14
         </default>
         <info>
Initial threshold for the solution of the linear
system (first iteration). Needed to converge the
bare (non-interacting) response function chi0.
The specified value will be multiplied by the
number of electrons in the system.
         </info>
      </var>
      <var name="ethr_nscf" type="REAL" >
         <default> 1.D-11
         </default>
         <info>
Threshold for the convergence of eigenvalues during
the iterative diagonalization of the Hamiltonian in
the non-self-consistent-field (NSCF) calculation at
k and k+q points. Note, this quantity is NOT extensive.
         </info>
      </var>
      <var name="niter_max" type="INTEGER" >
         <default> 100
         </default>
         <info>
Maximum number of iterations in the iterative
solution of the linear-response Kohn-Sham equations.
         </info>
      </var>
      <var name="alpha_mix(i)" type="REAL" >
         <default> alpha_mix(1)=0.3
         </default>
         <info>
Mixing parameter (for the i-th iteration) for updating
the response SCF potential using the modified Broyden
method. See: D.D. Johnson, <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.38.12807">PRB 38, 12807 (1988)</a>.
         </info>
      </var>
      <var name="nmix" type="INTEGER" >
         <default> 4
         </default>
         <info>
Number of iterations used in potential mixing
using the modified Broyden method. See:
D.D. Johnson, <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.38.12807">PRB 38, 12807 (1988)</a>.
         </info>
      </var>
      <var name="num_neigh" type="INTEGER" >
         <default> 6
         </default>
         <info>
Number of nearest neighbors of every Hubbard atom which
will be considered when writting Hubbard V parameters to
the file parameters.out, which can be used in the
subsequent DFT+U+V calculation. This keyword is used only
for DFT+U+V (post-processing stage).
         </info>
      </var>
      <var name="lmin" type="INTEGER" >
         <default> 2
         </default>
         <info>
Minimum value of the orbital quantum number of the Hubbard
atoms starting from which (and up to the maximum l in the
system) Hubbard V will be written to the file parameters.out.
<ref>lmin</ref> refers to the orbital quantum number of the atom
corresponding to the first site-index in Hubbard_V(:,:,:).
This keyword is used only for DFT+U+V and only
in the post-processing stage. Example: <ref>lmin</ref>=1 corresponds to
writing to file V between e.g. oxygen (with p states) and its
neighbors, and including V between transition metals (with d
states) and their neighbors. Instead, when <ref>lmin</ref>=2 only the
latter will be written to parameters.out.
         </info>
      </var>
      <var name="rmax" type="REAL" >
         <default> 100.D0
         </default>
         <info>
Maximum distance (in Bohr) between two atoms to search
neighbors (used only at the postprocessing step for
DFT+U+V). This keyword is useful when there
are e.g. defects in the system.
         </info>
      </var>
      <var name="dist_thr" type="REAL" >
         <default> 6.D-4
         </default>
         <info>
Threshold (in Bohr) for comparing inter-atomic distances
when reconstructing the missing elements of the response
susceptibility in the post-processing step.
         </info>
      </var>
      <var name="no_metq0" type="LOGICAL" >
         <default> .false.
         </default>
         <info>
If .true. the metallic response term at q=0 is ignored
(i.e. the last term in Eq. (22) in <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.103.045141">PRB 103, 045141 (2021)</a>).
This is useful for magnetic insulators to avoid the divergence
of the calculation.
         </info>
      </var>
   </namelist>
</input_description>
