<?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="projwfc.x" >
   <toc>
   </toc>
   <intro>
<b>Purpose of projwfc.x:</b>
    projects wavefunctions onto orthogonalized atomic wavefunctions,
    calculates Lowdin charges, spilling parameter, projected DOS
    (separated into up and down components for LSDA). Alternatively:
    computes the local DOS(E) integrated in volumes given in input
    (see <ref>tdosinboxes</ref>) or k-resolved DOS (see <ref>kresolveddos</ref>).
    Atomic projections are written to file &quot;atomic_proj.xml&quot;.

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

   <b>&amp;PROJWFC</b>
     ...
   <b>/</b>
   </intro>
   <namelist name="PROJWFC" >
      <var name="prefix" type="CHARACTER" >
         <info>
prefix of input file produced by <b>pw.x</b> (wavefunctions are needed)
         </info>
         <default> &apos;pwscf&apos;
         </default>
      </var>
      <var name="outdir" type="CHARACTER" >
         <info>
directory containing the input data, i.e. the same as in <b>pw.x</b>
         </info>
         <default>
value of the ESPRESSO_TMPDIR environment variable if set;
current directory (&apos;./&apos;) otherwise
         </default>
      </var>
      <var name="ngauss" type="INTEGER" >
         <default> 0
         </default>
         <info>
Type of gaussian broadening:
    0 ... Simple Gaussian (default)
    1 ... Methfessel-Paxton of order 1
   -1 ... &quot;cold smearing&quot; (Marzari-Vanderbilt-DeVita-Payne)
  -99 ... Fermi-Dirac function
         </info>
      </var>
      <var name="degauss" type="REAL" >
         <default> 0.0
         </default>
         <info> gaussian broadening, Ry (not eV!)
         </info>
      </var>
      <vargroup type="REAL" >
         <var name="Emin" >
         </var>
         <var name="Emax" >
         </var>
         <info> min &amp; max energy (eV) for DOS plot
         </info>
         <default> (band extrema)
         </default>
      </vargroup>
      <var name="DeltaE" type="REAL" >
         <info> energy grid step (eV)
         </info>
      </var>
      <var name="lsym" type="LOGICAL" >
         <default> .true.
         </default>
         <info>
if <b>.true.</b>  the projections are symmetrized,
           the partial density of states are computed
if <b>.false.</b> the projections are not symmetrized, the partial
           DOS can be computed only in the k-resolved case
         </info>
      </var>
      <var name="diag_basis" type="LOGICAL" >
         <default> .false.
         </default>
         <info>
if <b>.false.</b> the projections of Kohn-Sham states are
             done on the orthogonalized atomic orbitals
             in the global XYZ coordinate frame.
if <b>.true.</b> the projections of Kohn-Sham states are
             done on the orthogonalized atomic orbitals
             that are rotated to the basis in which the
             atomic occupation matrix is diagonal
             (i.e. local XYZ coordinate frame).
         </info>
      </var>
      <var name="pawproj" type="LOGICAL" >
         <default> .false.
         </default>
         <info>
if <b>.true.</b> use PAW projectors and all-electron PAW basis
functions to calculate weight factors for the partial
densities of states. Following Bloechl, <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.50.17953">PRB 50, 17953 (1994)</a>,
Eq. (4 &amp; 6), the weight factors thus approximate the real
charge within the augmentation sphere of each atom.
Only for PAW, not implemented in the noncolinear case.
         </info>
      </var>
      <var name="filpdos" type="CHARACTER" >
         <info> prefix for output files containing PDOS(E)
         </info>
         <default> (value of <ref>prefix</ref> variable)
         </default>
      </var>
      <var name="filproj" type="CHARACTER" >
         <default> (standard output)
         </default>
         <info>
file containing the projections
         </info>
      </var>
      <var name="lwrite_overlaps" type="LOGICAL" >
         <default> .false.
         </default>
         <info>
if <b>.true.,</b> the overlap matrix of the atomic orbitals
prior to orthogonalization is written to &quot;atomic_proj.xml&quot;.
Does not work together with parallel diagonalization:
for parallel runs, use &quot;mpirun -np N projwfc.x -nd 1 ... &quot;
         </info>
      </var>
      <var name="lbinary_data" type="LOGICAL" >
         <default> .false.
         </default>
         <info>
CURRENTLY DISABLED.
if <b>.true.,</b> write atomic projections to a binary file.
         </info>
      </var>
      <var name="kresolveddos" type="LOGICAL" >
         <default> .false.
         </default>
         <info>
if <b>.true.</b> the k-resolved DOS is computed: not summed over
all k-points but written as a function of the k-point index.
In this case all k-point weights are set to unity
         </info>
      </var>
      <var name="tdosinboxes" type="LOGICAL" >
         <default> .false.
         </default>
         <info>
if <b>.true.</b> compute the local DOS integrated in volumes

Volumes are defined as boxes with edges parallel to the unit cell,
containing the points of the (charge density) FFT grid included within
<ref>irmin</ref> and <ref>irmax</ref>, in the three dimensions:

from <ref>irmin</ref>(j,n) to <ref>irmax</ref>(j,n) for j=1,2,3 (n=1,<ref>n_proj_boxes</ref>).
         </info>
      </var>
      <var name="n_proj_boxes" type="INTEGER" >
         <default> 1
         </default>
         <info>
number of boxes where the local DOS is computed
         </info>
      </var>
      <multidimension name="irmin" start="1,1" end="3,n_proj_boxes" indexes="i,n_proj_boxes" type="INTEGER" >
         <default> 1 for each box
         </default>
         <info>
first point of the given box

BEWARE: <ref>irmin</ref> is a 2D array of the form: <ref>irmin</ref>(3,<ref>n_proj_boxes</ref>)
         </info>
      </multidimension>
      <multidimension name="irmax" start="1,1" end="3,n_proj_boxes" indexes="i,n_proj_boxes" type="INTEGER" >
         <default> 0 for each box
         </default>
         <info>
last point of the given box;
( 0 stands for the last point in the FFT grid )

BEWARE: <ref>irmax</ref> is a 2D array of the form: <ref>irmax</ref>(3,<ref>n_proj_boxes</ref>)
         </info>
      </multidimension>
      <var name="plotboxes" type="LOGICAL" >
         <default> .false.
         </default>
         <info>
if <b>.true.,</b> the boxes are written in output as <b>xsf</b> files with
3D datagrids, valued 1.0 inside the box volume and 0 outside
(visualize them as isosurfaces with isovalue 0.5)
         </info>
      </var>
   </namelist>
   <section title="Notes" >
      <subsection title="Format of output files" >
         <text>
Projections are written to standard output, and also to file
<ref>filproj</ref> if given as input.

The total DOS and the sum of projected DOS are written to file
&quot;filpdos&quot;.pdos_tot.

* The format for the collinear, spin-unpolarized case and the
  non-collinear, spin-orbit case is:
      E DOS(E) PDOS(E)
      ...

* The format for the collinear, spin-polarized case is:
      E DOSup(E) DOSdw(E)  PDOSup(E) PDOSdw(E)
      ...

* The format for the non-collinear, non spin-orbit case is:
      E DOS(E) PDOSup(E) PDOSdw(E)
      ...

In the collinear case and the non-collinear, non spin-orbit case
projected DOS are written to file &quot;filpdos&quot;.pdos_atm#N(X)_wfc#M(l),
where N = atom number , X = atom symbol, M = wfc number, l=s,p,d,f
(one file per atomic wavefunction found in the pseudopotential file)

* The format for the collinear, spin-unpolarized case is:
      E LDOS(E) PDOS_1(E) ... PDOS_2l+1(E)
      ...
  where LDOS = \sum m=1,2l+1 PDOS_m(E)
  and PDOS_m(E) = projected DOS on atomic wfc with component m

* The format for the collinear, spin-polarized case and the
  non-collinear, non spin-orbit case is as above with
  two components for both  LDOS(E) and PDOS_m(E)

In the non-collinear, spin-orbit case (i.e. if there is at least one
fully relativistic pseudopotential) wavefunctions are projected
onto eigenstates of the total angular-momentum.
Projected DOS are written to file &quot;filpdos&quot;.pdos_atm#N(X)_wfc#M(l_j),
where N = atom number , X = atom symbol, M = wfc number, l=s,p,d,f
and j is the value of the total angular momentum.
In this case the format is:
    E LDOS(E) PDOS_1(E) ... PDOS_2j+1(E)
    ...

If <ref>kresolveddos</ref>=.true., the k-point index is prepended
to the formats above, e.g. (collinear, spin-unpolarized case)
    ik E DOS(E) PDOS(E)

All DOS(E) are in states/eV plotted vs E in eV
         </text>
      </subsection>
      <subsection title="Orbital Order" >
         <text>
Order of m-components for each l in the output:

    1, cos(phi), sin(phi), cos(2*phi), sin(2*phi), .., cos(l*phi), sin(l*phi)

where phi is the azimuthal angle: x=r cos(theta)cos(phi), y=r cos(theta)sin(phi)
This is determined in file upflib/ylmr2.f90 that calculates spherical harmonics.

for l=1:
  1 pz     (m=0)
  2 px     (real combination of m=+/-1 with cosine)
  3 py     (real combination of m=+/-1 with sine)

for l=2:
  1 dz2    (m=0)
  2 dzx    (real combination of m=+/-1 with cosine)
  3 dzy    (real combination of m=+/-1 with sine)
  4 dx2-y2 (real combination of m=+/-2 with cosine)
  5 dxy    (real combination of m=+/-2 with sine)
         </text>
      </subsection>
      <subsection title="Defining boxes for the Local DOS(E)" >
         <text>
Boxes are specified using the variables <ref>irmin</ref> and <ref>irmax</ref>:

FFT grid points are included from irmin(j,n) to irmax(j,n)
for j=1,2,3 and n=1,...,<ref>n_proj_boxes</ref>

<ref>irmin</ref> and <ref>irmax</ref> range from 1 to nr1 or nr2 or nr3

Values larger than nr1/2/3 or smaller than 1 are folded
to the unit cell.

If <ref>irmax</ref>&lt;<ref>irmin</ref> FFT grid points are included from 1 to irmax
and from irmin to nr1/2/3.
         </text>
      </subsection>
      <subsection title="Important notices" >
         <text>
The tetrahedron method is used if

    - the input data file has been produced by pw.x using the option
      occupations=&apos;tetrahedra&apos;, AND

    - a value for degauss is not given as input to namelist &amp;projwfc

* Gaussian broadening is used in all other cases:

    - if <ref>degauss</ref> is set to some value in namelist &amp;PROJWFC, that value
      (and the optional value for ngauss) is used

    - if <ref>degauss</ref> is NOT set to any value in namelist &amp;PROJWFC, the
      value of <ref>degauss</ref> and of <ref>ngauss</ref> are read from the input data
      file (they will be the same used in the pw.x calculations)

    - if <ref>degauss</ref> is NOT set to any value in namelist &amp;PROJWFC, AND
      there is no value of <ref>degauss</ref> and of <ref>ngauss</ref> in the input data
      file, <ref>degauss</ref>=<ref>DeltaE</ref> (in Ry) and <ref>ngauss</ref>=0 will be used


Obsolete variables, ignored:
    io_choice
    smoothing
         </text>
      </subsection>
   </section>
</input_description>
