TABLE OF CONTENTS
INTRODUCTION
&CONTROL
calculation  title  verbosity  restart_mode  wf_collect  nstep  iprint  tstress  tprnfor  dt  outdir  wfcdir  prefix  lkpoint_dir  max_seconds  etot_conv_thr  forc_conv_thr  disk_io  pseudo_dir  tefield  dipfield  lelfield  nberrycyc  lorbm  lberry  gdir  nppstr  lfcpopt  gate
&SYSTEM
ibrav  celldm  A  B  C  cosAB  cosAC  cosBC  nat  ntyp  nbnd  tot_charge  starting_charge  tot_magnetization  starting_magnetization  ecutwfc  ecutrho  ecutfock  nr1  nr2  nr3  nr1s  nr2s  nr3s  nosym  nosym_evc  noinv  no_t_rev  force_symmorphic  use_all_frac  occupations  one_atom_occupations  starting_spin_angle  degauss  smearing  nspin  noncolin  ecfixed  qcutz  q2sigma  input_dft  ace  exx_fraction  screening_parameter  exxdiv_treatment  x_gamma_extrapolation  ecutvcut  nqx1  nqx2  nqx3  localization_thr  lda_plus_u  lda_plus_u_kind  Hubbard_U  Hubbard_J0  Hubbard_V  Hubbard_alpha  Hubbard_beta  Hubbard_J  starting_ns_eigenvalue  U_projection_type  Hubbard_parameters  ensemble_energies  edir  emaxpos  eopreg  eamp  angle1  angle2  lforcet  constrained_magnetization  fixed_magnetization  lambda  report  lspinorb  assume_isolated  esm_bc  esm_w  esm_efield  esm_nfit  fcp_mu  vdw_corr  london  london_s6  london_c6  london_rvdw  london_rcut  dftd3_version  dftd3_threebody  ts_vdw_econv_thr  ts_vdw_isolated  xdm  xdm_a1  xdm_a2  space_group  uniqueb  origin_choice  rhombohedral  zgate  relaxz  block  block_1  block_2  block_height
&ELECTRONS
electron_maxstep  scf_must_converge  conv_thr  adaptive_thr  conv_thr_init  conv_thr_multi  mixing_mode  mixing_beta  mixing_ndim  mixing_fixed_ns  diagonalization  diago_thr_init  diago_cg_maxiter  diago_david_ndim  diago_full_acc  efield  efield_cart  efield_phase  startingpot  startingwfc  tqr  real_space
&IONS
ion_positions  ion_velocities  ion_dynamics  pot_extrapolation  wfc_extrapolation  remove_rigid_rot  ion_temperature  tempw  tolp  delta_t  nraise  refold_pos  upscale  bfgs_ndim  trust_radius_max  trust_radius_min  trust_radius_ini  w_1  w_2
&CELL
cell_dynamics  press  wmass  cell_factor  press_conv_thr  cell_dofree
ATOMIC_SPECIES
X  Mass_X  PseudoPot_X
ATOMIC_POSITIONS
X  x  y  z  if_pos(1)  if_pos(2)  if_pos(3)
K_POINTS
nks  xk_x  xk_y  xk_z  wk  nk1  nk2  nk3  sk1  sk2  sk3
CELL_PARAMETERS
v1  v2  v3
CONSTRAINTS
nconstr  constr_tol  constr_type  constr(1)  constr(2)  constr(3)  constr(4)  constr_target
OCCUPATIONS
f_inp1  f_inp2
ATOMIC_VELOCITIES
V  vx  vy  vz
ATOMIC_FORCES
X  fx  fy  fz
INTRODUCTION
Input data format: { } = optional, [ ] = it depends,  = or
All quantities whose dimensions are not explicitly specified are in
RYDBERG ATOMIC UNITS. Charge is "number" charge (i.e. not multiplied
by e); potentials are in energy units (i.e. they are multiplied by e).
BEWARE: TABS, DOS <CR><LF> CHARACTERS ARE POTENTIAL SOURCES OF TROUBLE
Namelists must appear in the order given below.
Comment lines in namelists can be introduced by a "!", exactly as in
fortran code. Comments lines in cards can be introduced by
either a "!" or a "#" character in the first position of a line.
Do not start any line in cards with a "/" character.
Leave a space between card names and card options, e.g.
ATOMIC_POSITIONS (bohr), not ATOMIC_POSITIONS(bohr)
Do not start any line in cards with a "/" character.
Structure of the input data:
===============================================================================
&CONTROL
...
/
&SYSTEM
...
/
&ELECTRONS
...
/
[ &IONS
...
/ ]
[ &CELL
...
/ ]
ATOMIC_SPECIES
X Mass_X PseudoPot_X
Y Mass_Y PseudoPot_Y
Z Mass_Z PseudoPot_Z
ATOMIC_POSITIONS { alat  bohr  crystal  angstrom  crystal_sg }
X 0.0 0.0 0.0 {if_pos(1) if_pos(2) if_pos(3)}
Y 0.5 0.0 0.0
Z O.0 0.2 0.2
K_POINTS { tpiba  automatic  crystal  gamma  tpiba_b  crystal_b  tpiba_c  crystal_c }
if (gamma)
nothing to read
if (automatic)
nk1, nk2, nk3, k1, k2, k3
if (not automatic)
nks
xk_x, xk_y, xk_z, wk
if (tpipa_b or crystal_b in a 'bands' calculation) see Doc/brillouin_zones.pdf
[ CELL_PARAMETERS { alat  bohr  angstrom }
v1(1) v1(2) v1(3)
v2(1) v2(2) v2(3)
v3(1) v3(2) v3(3) ]
[ OCCUPATIONS
f_inp1(1) f_inp1(2) f_inp1(3) ... f_inp1(10)
f_inp1(11) f_inp1(12) ... f_inp1(nbnd)
[ f_inp2(1) f_inp2(2) f_inp2(3) ... f_inp2(10)
f_inp2(11) f_inp2(12) ... f_inp2(nbnd) ] ]
[ CONSTRAINTS
nconstr { constr_tol }
constr_type(.) constr(1,.) constr(2,.) [ constr(3,.) constr(4,.) ] { constr_target(.) } ]
[ ATOMIC_FORCES
label_1 Fx(1) Fy(1) Fz(1)
.....
label_n Fx(n) Fy(n) Fz(n) ]
Namelist: &CONTROL

calculation 
CHARACTER 
Default: 
'scf'

A string describing the task to be performed. Options are:
 'scf'
 'nscf'
 'bands'
 'relax'
 'md'
 'vcrelax'
 'vcmd'
(vc = variablecell).

title 
CHARACTER 
Default: 
' '

reprinted on output.

verbosity 
CHARACTER 
Default: 
'low'

Currently two verbosity levels are implemented:
 'high'
 'low'
'debug' and 'medium' have the same effect as 'high';
'default' and 'minimal' as 'low'

restart_mode 
CHARACTER 
Default: 
'from_scratch'

Available options are:
 'from_scratch' :
From scratch. This is the normal way to perform a PWscf calculation
 'restart' :
From previous interrupted run. Use this switch only if you want to
continue, using the same number of processors and parallelization,
an interrupted calculation. Do not use to start a new one, or to
perform a nonscf calculations. Works only if the calculation was
cleanly stopped using variable max_seconds, or by user request
with an "exit file" (i.e.: create a file "prefix".EXIT, in directory
"outdir"; see variables prefix, outdir). Overrides startingwfc
and startingpot.

wf_collect 
LOGICAL 
Default: 
.TRUE.

This flag controls the way wavefunctions are stored to disk :
.TRUE. collect wavefunctions from all processors, store them
into the output data directory "outdir"/"prefix".save
The resulting format is portable to a different number
of processor, or different kind of parallelization
.FALSE. OBSOLETE  NO LONGER IMPLEMENTED
do not collect wavefunctions, leave them in temporary
local files (one per processor). The resulting format
is readable only on the same number of processors and
with the same kind of parallelization used to write it.
Note that this flag has no effect on reading, only on writing.

nstep 
INTEGER 
Default: 
1 if calculation == 'scf', 'nscf', 'bands';
50 for the other cases

number of moleculardynamics or structural optimization steps
performed in this run. If set to 0, the code performs a quick
"dry run", stopping just after initialization. This is useful
to check for input correctness and to have the summary printed.

iprint 
INTEGER 
Default: 
write only at convergence

band energies are written every iprint iterations

tstress 
LOGICAL 
Default: 
.false.

calculate stress. It is set to .TRUE. automatically if
calculation == 'vcmd' or 'vcrelax'

tprnfor 
LOGICAL 
calculate forces. It is set to .TRUE. automatically if
calculation == 'relax','md','vcmd'

dt 
REAL 
Default: 
20.D0

time step for molecular dynamics, in Rydberg atomic units
(1 a.u.=4.8378 * 10^17 s : beware, the CP code uses
Hartree atomic units, half that much!!!)

outdir 
CHARACTER 
Default: 
value of the ESPRESSO_TMPDIR environment variable if set;
current directory ('./') otherwise

input, temporary, output files are found in this directory,
see also wfcdir

wfcdir 
CHARACTER 
Default: 
same as outdir

This directory specifies where to store files generated by
each processor (*.wfc{N}, *.igk{N}, etc.). Useful for
machines without a parallel file system: set wfcdir to
a local file system, while outdir should be a parallel
or network file system, visible to all processors. Beware:
in order to restart from interrupted runs, or to perform
further calculations using the produced data files, you
may need to copy files to outdir. Works only for pw.x.

prefix 
CHARACTER 
Default: 
'pwscf'

prepended to input/output filenames:
prefix.wfc, prefix.rho, etc.

lkpoint_dir 
LOGICAL 
Default: 
.true.

If .false. a subdirectory for each k_point is not opened
in the "prefix".save directory; KohnSham eigenvalues are
stored instead in a single file for all kpoints. Currently
doesn't work together with wf_collect

max_seconds 
REAL 
Default: 
1.D+7, or 150 days, i.e. no time limit

Jobs stops after max_seconds CPU time. Use this option
in conjunction with option restart_mode if you need to
split a job too long to complete into shorter jobs that
fit into your batch queues.

etot_conv_thr 
REAL 
Default: 
1.0D4

Convergence threshold on total energy (a.u) for ionic
minimization: the convergence criterion is satisfied
when the total energy changes less than etot_conv_thr
between two consecutive scf steps. Note that etot_conv_thr
is extensive, like the total energy.
See also forc_conv_thr  both criteria must be satisfied

forc_conv_thr 
REAL 
Default: 
1.0D3

Convergence threshold on forces (a.u) for ionic minimization:
the convergence criterion is satisfied when all components of
all forces are smaller than forc_conv_thr.
See also etot_conv_thr  both criteria must be satisfied

disk_io 
CHARACTER 
Default: 
see below

Specifies the amount of disk I/O activity:
(only for binary files and xml data file in data directory;
other files printed at each molecular dynamics / structural
optimization step are not controlled by this option )
 'high' :
save charge to disk at each SCF step,
keep wavefunctions on disk (in "distributed" format),
save mixing data as well.
Do not use this option unless you have a good reason to
 'medium' :
save charge to disk at each SCF step,
keep wavefunctions on disk only if more than one kpoint,
per process is present, otherwise keep them in memory;
save them to disk only at the end (in "portable" format)
 'low' :
save charge to disk at each SCF step,
keep wavefunctions in memory (for all kpoints),
save them to disk only at the end (in "portable" format).
Reduces I/O but increases memory wrt the previous cases
 'nowf' :
save to disk only the xml data file,
never save wavefunctions and charge density
 'none' :
do not save anything to disk
Default is 'low' for the scf case, 'medium' otherwise.
Note that the needed RAM increases as disk I/O decreases!
It is no longer needed to specify 'high' in order to be able
to restart from an interrupted calculation (see restart_mode)
but you cannot restart in disk_io=='nowf' or 'none'

pseudo_dir 
CHARACTER 
Default: 
value of the $ESPRESSO_PSEUDO environment variable if set;
'$HOME/espresso/pseudo/' otherwise

directory containing pseudopotential files

tefield 
LOGICAL 
Default: 
.FALSE.

If .TRUE. a sawlike potential simulating an electric field
is added to the bare ionic potential. See variables edir,
eamp, emaxpos, eopreg for the form and size of
the added potential.

dipfield 
LOGICAL 
Default: 
.FALSE.

If .TRUE. and tefield==.TRUE. a dipole correction is also
added to the bare ionic potential  implements the recipe
of L. Bengtsson, PRB 59, 12301 (1999). See variables edir,
emaxpos, eopreg for the form of the correction. Must
be used ONLY in a slab geometry, for surface calculations,
with the discontinuity FALLING IN THE EMPTY SPACE.

lelfield 
LOGICAL 
Default: 
.FALSE.

If .TRUE. a homogeneous finite electric field described
through the modern theory of the polarization is applied.
This is different from tefield == .true. !

nberrycyc 
INTEGER 
Default: 
1

In the case of a finite electric field ( lelfield == .TRUE. )
it defines the number of iterations for converging the
wavefunctions in the electric field Hamiltonian, for each
external iteration on the charge density

lorbm 
LOGICAL 
Default: 
.FALSE.

If .TRUE. perform orbital magnetization calculation.
If finite electric field is applied (lelfield==.true.) only Kubo terms are computed
[for details see New J. Phys. 12, 053032 (2010), doi:10.1088/13672630/12/5/053032].
The type of calculation is 'nscf' and should be performed on an automatically
generated uniform grid of k points.
Works ONLY with normconserving pseudopotentials.

lberry 
LOGICAL 
Default: 
.FALSE.

If .TRUE. perform a Berry phase calculation.
See the header of PW/src/bp_c_phase.f90 for documentation.

gdir 
INTEGER 
For Berry phase calculation: direction of the kpoint
strings in reciprocal space. Allowed values: 1, 2, 3
1=first, 2=second, 3=third reciprocal lattice vector
For calculations with finite electric fields
(lelfield==.true.) "gdir" is the direction of the field.

nppstr 
INTEGER 
For Berry phase calculation: number of kpoints to be
calculated along each symmetryreduced string.
The same for calculation with finite electric fields
(lelfield==.true.).

lfcpopt 
LOGICAL 
Default: 
.FALSE.

See: 
fcp_mu 
If .TRUE. perform a constant bias potential (constantmu) calculation
for a static system with ESM method. See the header of PW/src/fcp.f90
for documentation.
NB:
 The total energy displayed in 'prefix.out' includes the potentiostat
contribution (mu*N).
 calculation must be 'relax'.
 assume_isolated = 'esm' and esm_bc = 'bc2' or 'bc3' must be set
in SYSTEM namelist.

gate 
LOGICAL 
Default: 
.FALSE.

See: 
zgate, relaxz, block, block_1, block_2, block_height

In the case of charged cells (tot_charge .ne. 0) setting gate = .TRUE.
represents the counter charge (i.e. tot_charge) not by a homogeneous
background charge but with a charged plate, which is placed at zgate
(see below). Details of the gate potential can be found in
T. Brumme, M. Calandra, F. Mauri; PRB 89, 245406 (2014).
Note, that in systems which are not symmetric with respect to the plate,
one needs to enable the dipole correction! (dipfield=.true.).
Currently, symmetry can be used with gate=.true. but carefully check
that no symmetry is included which maps z to z even if in principle one
could still use them for symmetric systems (i.e. no dipole correction).
For nosym=.false. verbosity is set to 'high'.
Note: this option was called "monopole" in v6.0 and 6.1 of pw.x



Namelist: &SYSTEM

ibrav 
INTEGER 
Status: 
REQUIRED

Bravaislattice index. Optional only if space_group is set.
If ibrav /= 0, specify EITHER [ celldm(1)celldm(6) ]
OR [ A, B, C, cosAB, cosAC, cosBC ]
but NOT both. The lattice parameter "alat" is set to
alat = celldm(1) (in a.u.) or alat = A (in Angstrom);
see below for the other parameters.
For ibrav=0 specify the lattice vectors in CELL_PARAMETERS,
optionally the lattice parameter alat = celldm(1) (in a.u.)
or = A (in Angstrom). If not specified, the lattice parameter is
taken from CELL_PARAMETERS
IMPORTANT NOTICE 1:
with ibrav=0 lattice vectors must be given with a sufficiently large
number of digits and with the correct symmetry, or else symmetry
detection may fail and strange problems may arise in symmetrization.
IMPORTANT NOTICE 2:
do not use celldm(1) or A as a.u. to Ang conversion factor,
use the true lattice parameters or nothing,
specify units in CELL_PARAMETERS and ATOMIC_POSITIONS
ibrav structure celldm(2)celldm(6)
or: b,c,cosbc,cosac,cosab
0 free
crystal axis provided in input: see card CELL_PARAMETERS
1 cubic P (sc)
v1 = a(1,0,0), v2 = a(0,1,0), v3 = a(0,0,1)
2 cubic F (fcc)
v1 = (a/2)(1,0,1), v2 = (a/2)(0,1,1), v3 = (a/2)(1,1,0)
3 cubic I (bcc)
v1 = (a/2)(1,1,1), v2 = (a/2)(1,1,1), v3 = (a/2)(1,1,1)
3 cubic I (bcc), more symmetric axis:
v1 = (a/2)(1,1,1), v2 = (a/2)(1,1,1), v3 = (a/2)(1,1,1)
4 Hexagonal and Trigonal P celldm(3)=c/a
v1 = a(1,0,0), v2 = a(1/2,sqrt(3)/2,0), v3 = a(0,0,c/a)
5 Trigonal R, 3fold axis c celldm(4)=cos(gamma)
The crystallographic vectors form a threefold star around
the zaxis, the primitive cell is a simple rhombohedron:
v1 = a(tx,ty,tz), v2 = a(0,2ty,tz), v3 = a(tx,ty,tz)
where c=cos(gamma) is the cosine of the angle gamma between
any pair of crystallographic vectors, tx, ty, tz are:
tx=sqrt((1c)/2), ty=sqrt((1c)/6), tz=sqrt((1+2c)/3)
5 Trigonal R, 3fold axis <111> celldm(4)=cos(gamma)
The crystallographic vectors form a threefold star around
<111>. Defining a' = a/sqrt(3) :
v1 = a' (u,v,v), v2 = a' (v,u,v), v3 = a' (v,v,u)
where u and v are defined as
u = tz  2*sqrt(2)*ty, v = tz + sqrt(2)*ty
and tx, ty, tz as for case ibrav=5
Note: if you prefer x,y,z as axis in the cubic limit,
set u = tz + 2*sqrt(2)*ty, v = tz  sqrt(2)*ty
See also the note in Modules/latgen.f90
6 Tetragonal P (st) celldm(3)=c/a
v1 = a(1,0,0), v2 = a(0,1,0), v3 = a(0,0,c/a)
7 Tetragonal I (bct) celldm(3)=c/a
v1=(a/2)(1,1,c/a), v2=(a/2)(1,1,c/a), v3=(a/2)(1,1,c/a)
8 Orthorhombic P celldm(2)=b/a
celldm(3)=c/a
v1 = (a,0,0), v2 = (0,b,0), v3 = (0,0,c)
9 Orthorhombic basecentered(bco) celldm(2)=b/a
celldm(3)=c/a
v1 = (a/2, b/2,0), v2 = (a/2,b/2,0), v3 = (0,0,c)
9 as 9, alternate description
v1 = (a/2,b/2,0), v2 = (a/2, b/2,0), v3 = (0,0,c)
91 Orthorhombic oneface basecentered Atype
celldm(2)=b/a
celldm(3)=c/a
v1 = (a, 0, 0), v2 = (0,b/2,c/2), v3 = (0,b/2,c/2)
10 Orthorhombic facecentered celldm(2)=b/a
celldm(3)=c/a
v1 = (a/2,0,c/2), v2 = (a/2,b/2,0), v3 = (0,b/2,c/2)
11 Orthorhombic bodycentered celldm(2)=b/a
celldm(3)=c/a
v1=(a/2,b/2,c/2), v2=(a/2,b/2,c/2), v3=(a/2,b/2,c/2)
12 Monoclinic P, unique axis c celldm(2)=b/a
celldm(3)=c/a,
celldm(4)=cos(ab)
v1=(a,0,0), v2=(b*cos(gamma),b*sin(gamma),0), v3 = (0,0,c)
where gamma is the angle between axis a and b.
12 Monoclinic P, unique axis b celldm(2)=b/a
celldm(3)=c/a,
celldm(5)=cos(ac)
v1 = (a,0,0), v2 = (0,b,0), v3 = (c*cos(beta),0,c*sin(beta))
where beta is the angle between axis a and c
13 Monoclinic basecentered celldm(2)=b/a
(unique axis c) celldm(3)=c/a,
celldm(4)=cos(gamma)
v1 = ( a/2, 0, c/2),
v2 = (b*cos(gamma), b*sin(gamma), 0 ),
v3 = ( a/2, 0, c/2),
where gamma=angle between axis a and b projected on xy plane
13 Monoclinic basecentered celldm(2)=b/a
(unique axis b) celldm(3)=c/a,
celldm(5)=cos(beta)
v1 = ( a/2, b/2, 0),
v2 = ( a/2, b/2, 0),
v3 = (c*cos(beta), 0, c*sin(beta)),
where beta=angle between axis a and c projected on xz plane
IMPORTANT NOTICE: until QE v.6.4.1, axis for ibrav=13 had a
different definition: v1(old) =v2(now), v2(old) = v1(now)
14 Triclinic celldm(2)= b/a,
celldm(3)= c/a,
celldm(4)= cos(bc),
celldm(5)= cos(ac),
celldm(6)= cos(ab)
v1 = (a, 0, 0),
v2 = (b*cos(gamma), b*sin(gamma), 0)
v3 = (c*cos(beta), c*(cos(alpha)cos(beta)cos(gamma))/sin(gamma),
c*sqrt( 1 + 2*cos(alpha)cos(beta)cos(gamma)
 cos(alpha)^2cos(beta)^2cos(gamma)^2 )/sin(gamma) )
where alpha is the angle between axis b and c
beta is the angle between axis a and c
gamma is the angle between axis a and b

Either:
celldm(i), i=1,6 
REAL 
See: 
ibrav 
Crystallographic constants  see the ibrav variable.
Specify either these OR A,B,C,cosAB,cosBC,cosAC NOT both.
Only needed values (depending on "ibrav") must be specified
alat = celldm(1) is the lattice parameter "a" (in BOHR)
If ibrav==0, only celldm(1) is used if present;
cell vectors are read from card CELL_PARAMETERS

Or:
A, B, C, cosAB, cosAC, cosBC 
REAL 
See: 
ibrav 
Traditional crystallographic constants:
a,b,c in ANGSTROM
cosAB = cosine of the angle between axis a and b (gamma)
cosAC = cosine of the angle between axis a and c (beta)
cosBC = cosine of the angle between axis b and c (alpha)
The axis are chosen according to the value of ibrav.
Specify either these OR celldm but NOT both.
Only needed values (depending on ibrav) must be specified.
The lattice parameter alat = A (in ANGSTROM ).
If ibrav == 0, only A is used if present, and
cell vectors are read from card CELL_PARAMETERS.


nat 
INTEGER 
Status: 
REQUIRED

number of atoms in the unit cell (ALL atoms, except if
space_group is set, in which case, INEQUIVALENT atoms)

ntyp 
INTEGER 
Status: 
REQUIRED

number of types of atoms in the unit cell

nbnd 
INTEGER 
Default: 
for an insulator, nbnd = number of valence bands
(nbnd = # of electrons /2);
for a metal, 20% more (minimum 4 more)

Number of electronic states (bands) to be calculated.
Note that in spinpolarized calculations the number of
kpoint, not the number of bands per kpoint, is doubled

tot_charge 
REAL 
Default: 
0.0

Total charge of the system. Useful for simulations with charged cells.
By default the unit cell is assumed to be neutral (tot_charge=0).
tot_charge=+1 means one electron missing from the system,
tot_charge=1 means one additional electron, and so on.
In a periodic calculation a compensating jellium background is
inserted to remove divergences if the cell is not neutral.

starting_charge(i), i=1,ntyp 
REAL 
Default: 
0.0

starting charge on atomic type 'i',
to create starting potential with startingpot = 'atomic'.

tot_magnetization 
REAL 
Default: 
1 [unspecified]

Total majority spin charge  minority spin charge.
Used to impose a specific total electronic magnetization.
If unspecified then tot_magnetization variable is ignored and
the amount of electronic magnetization is determined during
the selfconsistent cycle.

starting_magnetization(i), i=1,ntyp 
REAL 
Starting spin polarization on atomic type 'i' in a spin
polarized calculation. Values range between 1 (all spins
down for the valence electrons of atom type 'i') to 1
(all spins up). Breaks the symmetry and provides a starting
point for selfconsistency. The default value is zero, BUT a
value MUST be specified for AT LEAST one atomic type in spin
polarized calculations, unless you constrain the magnetization
(see tot_magnetization and constrained_magnetization).
Note that if you start from zero initial magnetization, you
will invariably end up in a nonmagnetic (zero magnetization)
state. If you want to start from an antiferromagnetic state,
you may need to define two different atomic species
corresponding to sublattices of the same atomic type.
starting_magnetization is ignored if you are performing a
nonscf calculation, if you are restarting from a previous
run, or restarting from an interrupted run.
If you fix the magnetization with tot_magnetization,
you should not specify starting_magnetization.
In the spinorbit case starting with zero
starting_magnetization on all atoms imposes time reversal
symmetry. The magnetization is never calculated and
kept zero (the internal variable domag is .FALSE.).

ecutwfc 
REAL 
Status: 
REQUIRED

kinetic energy cutoff (Ry) for wavefunctions

ecutrho 
REAL 
Default: 
4 * ecutwfc

Kinetic energy cutoff (Ry) for charge density and potential
For normconserving pseudopotential you should stick to the
default value, you can reduce it by a little but it will
introduce noise especially on forces and stress.
If there are ultrasoft PP, a larger value than the default is
often desirable (ecutrho = 8 to 12 times ecutwfc, typically).
PAW datasets can often be used at 4*ecutwfc, but it depends
on the shape of augmentation charge: testing is mandatory.
The use of gradientcorrected functional, especially in cells
with vacuum, or for pseudopotential without nonlinear core
correction, usually requires an higher values of ecutrho
to be accurately converged.

ecutfock 
REAL 
Default: 
ecutrho

Kinetic energy cutoff (Ry) for the exact exchange operator in
EXX type calculations. By default this is the same as ecutrho
but in some EXX calculations, a significant speedup can be obtained
by reducing ecutfock, at the expense of some loss in accuracy.
Must be .gt. ecutwfc. Not implemented for stress calculation
and for USPP and PAW pseudopotentials.
Use with care, especially in metals where it may give raise
to instabilities.

nr1, nr2, nr3 
INTEGER 
Threedimensional FFT mesh (hard grid) for charge
density (and scf potential). If not specified
the grid is calculated based on the cutoff for
charge density (see also ecutrho)
Note: you must specify all three dimensions for this setting to
be used.

nr1s, nr2s, nr3s 
INTEGER 
Threedimensional mesh for wavefunction FFT and for the smooth
part of charge density ( smooth grid ).
Coincides with nr1, nr2, nr3 if ecutrho = 4 * ecutwfc ( default )
Note: you must specify all three dimensions for this setting to
be used.

nosym 
LOGICAL 
Default: 
.FALSE.

if (.TRUE.) symmetry is not used. Consequences:
 if a list of k points is provided in input, it is used
"as is": symmetryinequivalent kpoints are not generated,
and the charge density is not symmetrized;
 if a uniform (MonkhorstPack) kpoint grid is provided in
input, it is expanded to cover the entire Brillouin Zone,
irrespective of the crystal symmetry.
Time reversal symmetry is assumed so k and k are considered
as equivalent unless noinv=.true. is specified.
Do not use this option unless you know exactly what you want
and what you get. May be useful in the following cases:
 in lowsymmetry large cells, if you cannot afford a kpoint
grid with the correct symmetry
 in MD simulations
 in calculations for isolated atoms

nosym_evc 
LOGICAL 
Default: 
.FALSE.

if (.TRUE.) symmetry is not used, and k points are
forced to have the symmetry of the Bravais lattice;
an automatically generated MonkhorstPack grid will contain
all points of the grid over the entire Brillouin Zone,
plus the points rotated by the symmetries of the Bravais
lattice which were not in the original grid. The same
applies if a kpoint list is provided in input instead
of a MonkhorstPack grid. Time reversal symmetry is assumed
so k and k are equivalent unless noinv=.true. is specified.
This option differs from nosym because it forces kpoints
in all cases to have the full symmetry of the Bravais lattice
(not all uniform grids have such property!)

noinv 
LOGICAL 
Default: 
.FALSE.

if (.TRUE.) disable the usage of k => k symmetry
(time reversal) in kpoint generation

no_t_rev 
LOGICAL 
Default: 
.FALSE.

if (.TRUE.) disable the usage of magnetic symmetry operations
that consist in a rotation + time reversal.

force_symmorphic 
LOGICAL 
Default: 
.FALSE.

if (.TRUE.) force the symmetry group to be symmorphic by disabling
symmetry operations having an associated fractionary translation

use_all_frac 
LOGICAL 
Default: 
.FALSE.

if (.FALSE.) force realspace FFT grids to be commensurate with
fractionary translations of nonsymmorphic symmetry operations,
if present (e.g.: if a fractional translation (0,0,c/4) exists,
the FFT dimension along the c axis must be multiple of 4).
if (.TRUE.) do not impose any constraints to FFT grids, even in
the presence of nonsymmorphic symmetry operations.
BEWARE: use_all_frac=.TRUE. may lead to wrong results for
hybrid functionals and phonon calculations. Both cases use
symmetrization in real space that works for nonsymmorphic
operations only if the realspace FFT grids are commensurate.

occupations 
CHARACTER 
Available options are:
 'smearing' :
gaussian smearing for metals;
see variables smearing and degauss
 'tetrahedra' :
Tetrahedron method, Bloechl's version:
P.E. Bloechl, PRB 49, 16223 (1994)
Requires uniform grid of kpoints, to be
automatically generated (see card K_POINTS).
Well suited for calculation of DOS,
less so (because not variational) for
force/optimization/dynamics calculations.
 'tetrahedra_lin' :
Original linear tetrahedron method.
To be used only as a reference;
the optimized tetrahedron method is more efficient.
 'tetrahedra_opt' :
Optimized tetrahedron method:
see M. Kawamura, PRB 89, 094515 (2014).
Can be used for phonon calculations as well.
 'fixed' :
for insulators with a gap
 'from_input' :
The occupation are read from input file,
card OCCUPATIONS. Option valid only for a
single kpoint, requires nbnd to be set
in input. Occupations should be consistent
with the value of tot_charge.

one_atom_occupations 
LOGICAL 
Default: 
.FALSE.

This flag is used for isolated atoms (nat=1) together with
occupations='from_input'. If it is .TRUE., the wavefunctions
are ordered as the atomic starting wavefunctions, independently
from their eigenvalue. The occupations indicate which atomic
states are filled.
The order of the states is written inside the UPF pseudopotential file.
In the scalar relativistic case:
S > l=0, m=0
P > l=1, z, x, y
D > l=2, r^23z^2, xz, yz, xy, x^2y^2
In the noncollinear magnetic case (with or without spinorbit),
each group of states is doubled. For instance:
P > l=1, z, x, y for spin up, l=1, z, x, y for spin down.
Up and down is relative to the direction of the starting
magnetization.
In the case with spinorbit and timereversal
(starting_magnetization=0.0) the atomic wavefunctions are
radial functions multiplied by spinangle functions.
For instance:
P > l=1, j=1/2, m_j=1/2,1/2. l=1, j=3/2,
m_j=3/2, 1/2, 1/2, 3/2.
In the magnetic case with spinorbit the atomic wavefunctions
can be forced to be spinangle functions by setting
starting_spin_angle to .TRUE..

starting_spin_angle 
LOGICAL 
Default: 
.FALSE.

In the spinorbit case when domag=.TRUE., by default,
the starting wavefunctions are initialized as in scalar
relativistic noncollinear case without spinorbit.
By setting starting_spin_angle=.TRUE. this behaviour can
be changed and the initial wavefunctions are radial
functions multiplied by spinangle functions.
When domag=.FALSE. the initial wavefunctions are always
radial functions multiplied by spinangle functions
independently from this flag.
When lspinorb is .FALSE. this flag is not used.

degauss 
REAL 
Default: 
0.D0 Ry

value of the gaussian spreading (Ry) for brillouinzone
integration in metals.

smearing 
CHARACTER 
Default: 
'gaussian'

Available options are:
 'gaussian', 'gauss' :
ordinary Gaussian spreading (Default)
 'methfesselpaxton', 'mp', 'mp' :
MethfesselPaxton firstorder spreading
(see PRB 40, 3616 (1989)).
 'marzarivanderbilt', 'cold', 'mv', 'mv' :
MarzariVanderbiltDeVitaPayne cold smearing
(see PRL 82, 3296 (1999))
 'fermidirac', 'fd', 'fd' :
smearing with FermiDirac function

nspin 
INTEGER 
Default: 
1

nspin = 1 : nonpolarized calculation (default)
nspin = 2 : spinpolarized calculation, LSDA
(magnetization along z axis)
nspin = 4 : spinpolarized calculation, noncollinear
(magnetization in generic direction)
DO NOT specify nspin in this case;
specify noncolin=.TRUE. instead

noncolin 
LOGICAL 
Default: 
.false.

if .true. the program will perform a noncollinear calculation.

ecfixed 
REAL 
Default: 
0.0

See: 
q2sigma 
qcutz 
REAL 
Default: 
0.0

See: 
q2sigma 
q2sigma 
REAL 
Default: 
0.1

ecfixed, qcutz, q2sigma: parameters for modified functional to be
used in variablecell molecular dynamics (or in stress calculation).
"ecfixed" is the value (in Rydberg) of the constantcutoff;
"qcutz" and "q2sigma" are the height and the width (in Rydberg)
of the energy step for reciprocal vectors whose square modulus
is greater than "ecfixed". In the kinetic energy, G^2 is
replaced by G^2 + qcutz * (1 + erf ( (G^2  ecfixed)/q2sigma) )
See: M. Bernasconi et al, J. Phys. Chem. Solids 56, 501 (1995),
doi:10.1016/00223697(94)002282

input_dft 
CHARACTER 
Default: 
read from pseudopotential files

Exchangecorrelation functional: eg 'PBE', 'BLYP' etc
See Modules/funct.f90 for allowed values.
Overrides the value read from pseudopotential files.
Use with care and if you know what you are doing!

ace 
LOGICAL 
Default: 
true

Use Adaptively Compressed Exchange operator as in
Lin Lin, J. Chem. Theory Comput. 2016, 12, 22422249, doi:10.1021/acs.jctc.6b00092
Set to false to use standard Exchange (much slower)

exx_fraction 
REAL 
Default: 
it depends on the specified functional

Fraction of EXX for hybrid functional calculations. In the case of
input_dft='PBE0', the default value is 0.25, while for input_dft='B3LYP'
the exx_fraction default value is 0.20.

screening_parameter 
REAL 
Default: 
0.106

screening_parameter for HSE like hybrid functionals.
For more information, see:
J. Chem. Phys. 118, 8207 (2003), doi:10.1063/1.1564060
J. Chem. Phys. 124, 219906 (2006), doi:10.1063/1.2204597

exxdiv_treatment 
CHARACTER 
Default: 
'gygibaldereschi'

Specific for EXX. It selects the kind of approach to be used
for treating the Coulomb potential divergencies at small q vectors.
 'gygibaldereschi' :
appropriate for cubic and quasicubic supercells
 'vcut_spherical' :
appropriate for cubic and quasicubic supercells
 'vcut_ws' :
appropriate for strongly anisotropic supercells, see also ecutvcut.
 'none' :
sets Coulomb potential at G,q=0 to 0.0 (required for GAUPBE)

x_gamma_extrapolation 
LOGICAL 
Default: 
.true.

Specific for EXX. If .true., extrapolate the G=0 term of the
potential (see README in examples/EXX_example for more)
Set this to .false. for GAUPBE.

ecutvcut 
REAL 
Default: 
0.0 Ry

See: 
exxdiv_treatment 
Reciprocal space cutoff for correcting Coulomb potential
divergencies at small q vectors.

nqx1, nqx2, nqx3 
INTEGER 
Threedimensional mesh for q (k1k2) sampling of
the Fock operator (EXX). Can be smaller than
the number of kpoints.
Currently this defaults to the size of the kpoint mesh used.
In QE =< 5.0.2 it defaulted to nqx1=nqx2=nqx3=1.

localization_thr 
REAL 
Default: 
0.0

Overlap threshold over which the exchange integral over a pair of localized orbitals
is included in the evaluation of EXX operator. Any value greater than 0.0 triggers
the SCDM localization and the evaluation on EXX using the localized orbitals.
Very small value of the threshold should yield the same result as the default EXX
evaluation

lda_plus_u 
LOGICAL 
Default: 
.FALSE.

Status: 
DFT+U (formerly known as LDA+U) currently works only for
a few selected elements. Modify Modules/set_hubbard_l.f90 and
PW/src/tabd.f90 if you plan to use DFT+U with an element that
is not configured there.

Specify lda_plus_u = .TRUE. to enable DFT+U calculations
See: Anisimov, Zaanen, and Andersen, PRB 44, 943 (1991);
Anisimov et al., PRB 48, 16929 (1993);
Liechtenstein, Anisimov, and Zaanen, PRB 52, R5467 (1994).
You must specify, for each species with a U term, the value of
U and (optionally) alpha, J of the Hubbard model (all in eV):
see lda_plus_u_kind, Hubbard_U, Hubbard_alpha, Hubbard_J

lda_plus_u_kind 
INTEGER 
Default: 
0

Specifies the type of calculation:
0 DFT+U simplified version of Cococcioni and de Gironcoli,
PRB 71, 035105 (2005), using Hubbard_U
1 DFT+U rotationally invariant scheme of Liechtenstein et al.,
using Hubbard_U and Hubbard_J
2 DFT+U+V simplified version of Campo Jr and Cococcioni,
J. Phys.: Condens. Matter 22, 055602 (2010), using Hubbard_V

Hubbard_U(i), i=1,ntyp 
REAL 
Default: 
0.D0 for all species

Hubbard_U(i): U parameter (eV) for species i, DFT+U calculation

Hubbard_J0(i), i=1,ntype 
REAL 
Default: 
0.D0 for all species

Hubbard_J0(i): J0 parameter (eV) for species i, DFT+U+J calculation,
see PRB 84, 115108 (2011) for details.

Hubbard_V(na,nb,k), (na,nb,k) = (1,1,1) ... (natx,27*natx,4)

REAL 
Default: 
0.D0 for all elements

Hubbard_V(na,nb,k): V parameters (eV) between atoms na and nb,
used in DFT+U+V calculations (only for lda_plus_u_kind=2).
The atomic indices na and nb correspond to the atomic positions
in the ATOMIC_POSITIONS card (this is not the same as Hubbard_U
which is specified for ATOMIC_SPECIES).
Wnen na=nb, then Hubbard_V(na,na,k) is the onsite Hubbard_U
for the atom na.
natx=50 (if needed it can be changed in /Modules/parameters.f90)
The index k controls the "interaction type" (k=1 is used for the
simplest DFT+U+V calculation):
k=1  interaction between standard orbitals (both on na and nb);
k=2  interaction between standard (on na) and background (on nb) orbitals;
k=3  interaction between background orbitlas (both on na and nb);
k=4  interaction between background (on na) and standard (on nb) orbitals.
Standard orbitals correspond to the main Hubbard channel (e.g. d electrons
in transition metals) and background orbitals correspond to the secondary
Hubbard channel (e.g. p electrons in transition metals).

Hubbard_alpha(i), i=1,ntyp 
REAL 
Default: 
0.D0 for all species

Hubbard_alpha(i) is the perturbation (on atom i, in eV)
used to compute U with the linearresponse method of
Cococcioni and de Gironcoli, PRB 71, 035105 (2005)
(only for lda_plus_u_kind=0)

Hubbard_J(i,ityp), (i,ityp) = (1,1) ... (3,ntyp)

REAL 
Default: 
0.D0 for all species

Hubbard_J(i,ityp): J parameters (eV) for species ityp,
used in DFT+U calculations (only for lda_plus_u_kind=1)
For p orbitals: J = Hubbard_J(1,ityp);
For d orbitals: J = Hubbard_J(1,ityp), B = Hubbard_J(2,ityp);
For f orbitals: J = Hubbard_J(1,ityp), E2 = Hubbard_J(2,ityp),
E3= Hubbard_J(3,ityp).
If B or E2 or E3 are not specified or set to 0 they will be
calculated from J using atomic ratios.

starting_ns_eigenvalue(m,ispin,ityp), (m,ispin,ityp) = (1,1,1) ... (2*lmax+1,nspin or npol,ntyp)

REAL 
Default: 
1.d0 that means NOT SET

In the first iteration of an DFT+U run it overwrites
the mth eigenvalue of the ns occupation matrix for the
ispin component of atomic species ityp.
For the noncolin case the ispin index runs up to npol.
The value lmax is given by the maximum angular momentum
number to which the Hubbard U is applied.
Leave unchanged eigenvalues that are not set.
This is useful to suggest the desired orbital occupations
when the default choice takes another path.

U_projection_type 
CHARACTER 
Default: 
'atomic'

Only active when lda_plus_U is .true., specifies the type
of projector on localized orbital to be used in the DFT+U
scheme.
Currently available choices:
 'atomic' :
use atomic wfc's (as they are) to build the projector
 'orthoatomic' :
use Lowdin orthogonalized atomic wfc's
 'normatomic' :
Lowdin normalization of atomic wfc. Keep in mind:
atomic wfc are not orthogonalized in this case.
This is a "quick and dirty" trick to be used when
atomic wfc from the pseudopotential are not
normalized (and thus produce occupation whose
value exceeds unity). If orthogonalized wfc are
not needed always try 'atomic' first.
 'file' :
use the information from file "prefix".atwfc that must
have been generated previously, for instance by pmw.x
(see PP/src/poormanwannier.f90 for details).
 'pseudo' :
use the pseudopotential projectors. The charge density
outside the atomic core radii is excluded.
N.B.: for atoms with +U, a pseudopotential with the
allelectron atomic wavefunctions is required (i.e.,
as generated by ld1.x with lsave_wfc flag).
NB: forces and stress currently implemented only for the
'atomic' and 'pseudo' choice.

Hubbard_parameters 
CHARACTER 
Default: 
'input'

Available choices:
 'input' :
read the Hubbard_U (or Hubbard_V) parameters from
the PW input file
 'file' :
read the Hubbard_V parameters from the file "parameters.in"
which can be generated after the linearresponse calculation
(using the HP code). This option has a higher priority over
the Hubbard_V if they are specified in the input. This option
can be used only when lda_plus_u_kind = 2.

ensemble_energies 
LOGICAL 
Default: 
.false.

If ensemble_energies = .true., an ensemble of xc energies
is calculated nonselfconsistently for perturbed
exchangeenhancement factors and LDA vs. PBE correlation
ratios after each converged electronic ground state
calculation.
Ensemble energies can be analyzed with the 'bee' utility
included with libbeef.
Requires linking against libbeef.
input_dft must be set to a BEEFtype functional
(e.g. input_dft = 'BEEFvdW')

edir 
INTEGER 
The direction of the electric field or dipole correction is
parallel to the bg(:,edir) reciprocal lattice vector, so the
potential is constant in planes defined by FFT grid points;
edir = 1, 2 or 3. Used only if tefield is .TRUE.

emaxpos 
REAL 
Default: 
0.5D0

Position of the maximum of the sawlike potential along crystal
axis edir, within the unit cell (see below), 0 < emaxpos < 1
Used only if tefield is .TRUE.

eopreg 
REAL 
Default: 
0.1D0

Zone in the unit cell where the sawlike potential decreases.
( see below, 0 < eopreg < 1 ). Used only if tefield is .TRUE.

eamp 
REAL 
Default: 
0.001 a.u.

Amplitude of the electric field, in ***Hartree*** a.u.;
1 a.u. = 51.4220632*10^10 V/m. Used only if tefield==.TRUE.
The sawlike potential increases with slope eamp in the
region from (emaxpos+eopreg1) to (emaxpos), then decreases
to 0 until (emaxpos+eopreg), in units of the crystal
vector edir. Important: the change of slope of this
potential must be located in the empty region, or else
unphysical forces will result.

angle1(i), i=1,ntyp 
REAL 
The angle expressed in degrees between the initial
magnetization and the zaxis. For noncollinear calculations
only; index i runs over the atom types.

angle2(i), i=1,ntyp 
REAL 
The angle expressed in degrees between the projection
of the initial magnetization on xy plane and the xaxis.
For noncollinear calculations only.

lforcet 
LOGICAL 
When starting a non collinear calculation using an existing density
file from a collinear lsda calculation assumes previous density points in
z direction and rotates it in the direction described by angle1 and
angle2 variables for atomic type 1

constrained_magnetization 
CHARACTER 
Default: 
'none'

See: 
lambda, fixed_magnetization

Used to perform constrained calculations in magnetic systems.
Currently available choices:
 'none' :
no constraint
 'total' :
total magnetization is constrained by
adding a penalty functional to the total energy:
LAMBDA * SUM_{i} ( magnetization(i)  fixed_magnetization(i) )**2
where the sum over i runs over the three components of
the magnetization. Lambda is a real number (see below).
Noncolinear case only. Use tot_magnetization for LSDA
 'atomic' :
atomic magnetization are constrained to the defined
starting magnetization adding a penalty:
LAMBDA * SUM_{i,itype} ( magnetic_moment(i,itype)  mcons(i,itype) )**2
where i runs over the cartesian components (or just z
in the collinear case) and itype over the types (1ntype).
mcons(:,:) array is defined from starting_magnetization,
(and angle1, angle2 in the noncollinear case). lambda is
a real number
 'total direction' :
the angle theta of the total magnetization
with the z axis (theta = fixed_magnetization(3))
is constrained:
LAMBDA * ( arccos(magnetization(3)/mag_tot)  theta )**2
where mag_tot is the modulus of the total magnetization.
 'atomic direction' :
not all the components of the atomic
magnetic moment are constrained but only the cosine
of angle1, and the penalty functional is:
LAMBDA * SUM_{itype} ( mag_mom(3,itype)/mag_mom_tot  cos(angle1(ityp)) )**2
N.B.: symmetrization may prevent to reach the desired orientation
of the magnetization. Try not to start with very highly symmetric
configurations or use the nosym flag (only as a last remedy)

lambda 
REAL 
Default: 
1.d0

See: 
constrained_magnetization 
parameter used for constrained_magnetization calculations
N.B.: if the scf calculation does not converge, try to reduce lambda
to obtain convergence, then restart the run with a larger lambda

report 
INTEGER 
Default: 
1

determines when atomic magnetic moments are printed on output:
report = 0 never
report =1 at the beginning of the scf and at convergence
report = N: as 1, plus every N scf iterations

lspinorb 
LOGICAL 
if .TRUE. the noncollinear code can use a pseudopotential with
spinorbit.

assume_isolated 
CHARACTER 
Default: 
'none'

Used to perform calculation assuming the system to be
isolated (a molecule or a cluster in a 3D supercell).
Currently available choices:
 'none' :
(default): regular periodic calculation w/o any correction.
 'makovpayne', 'mp', 'mp' :
the MakovPayne correction to the
total energy is computed. An estimate of the vacuum
level is also calculated so that eigenvalues can be
properly aligned. ONLY FOR CUBIC SYSTEMS (ibrav=1,2,3).
Theory: G.Makov, and M.C.Payne,
"Periodic boundary conditions in ab initio
calculations" , PRB 51, 4014 (1995).
 'martynatuckerman', 'mt', 'mt' :
MartynaTuckerman correction
to both total energy and scf potential. Adapted from:
G.J. Martyna, and M.E. Tuckerman,
"A reciprocal space based method for treating long
range interactions in abinitio and forcefieldbased
calculation in clusters", J. Chem. Phys. 110, 2810 (1999),
doi:10.1063/1.477923.
 'esm' :
Effective Screening Medium Method.
For polarized or charged slab calculation, embeds
the simulation cell within an effective semi
infinite medium in the perpendicular direction
(along z). Embedding regions can be vacuum or
semiinfinite metal electrodes (use esm_bc to
choose boundary conditions). If between two
electrodes, an optional electric field
('esm_efield') may be applied. Method described in
M. Otani and O. Sugino, "Firstprinciples calculations
of charged surfaces and interfaces: A planewave
nonrepeated slab approach", PRB 73, 115407 (2006).
NB:
 Two dimensional (xy plane) average charge density
and electrostatic potentials are printed out to
'prefix.esm1'.
 Requires cell with a_3 lattice vector along z,
normal to the xy plane, with the slab centered
around z=0. Also requires symmetry checking to be
disabled along z, either by setting nosym = .TRUE.
or by very slight displacement (i.e., 5e4 a.u.)
of the slab along z.
 Components of the total stress; sigma_xy, sigma_yz,
sigma_zz, sigma_zy, and sigma_zx are meaningless
because ESM stress routines calculate only
components of stress; sigma_xx, sigma_xy, sigma_yx,
and sigma_yy.
 In case of calculation='vcrelax', use
cell_dofree='2Dxy' or other parameters so that
cvector along zaxis should not be moved.
See esm_bc, esm_efield, esm_w, esm_nfit.
 '2D' :
Truncation of the Coulomb interaction in the z direction
for structures periodic in the xy plane. Total energy,
forces and stresses are computed in a twodimensional framework.
Linearresponse calculations () done on top of a selfconsistent
calculation with this flag will automatically be performed in
the 2D framework as well. Please refer to:
Sohier, T., Calandra, M., & Mauri, F. (2017), Density functional
perturbation theory for gated twodimensional heterostructures:
Theoretical developments and application to flexural phonons in graphene.
Physical Review B, 96(7), 75448. https://doi.org/10.1103/PhysRevB.96.075448
NB:
 The length of the unitcell along the z direction should
be larger than twice the thickness of the 2D material
(including electrons). A reasonable estimate for a
layer's thickness could be the interlayer distance in the
corresponding layered bulk material. Otherwise,
the atomic thickness + 10 bohr should be a safe estimate.
There is also a lower limit of 20 bohr imposed by the cutoff
radius used to read pseudopotentials (see read_pseudo.f90 in Modules).
 As for ESM above, only inplane stresses make sense and one
should use cell_dofree='2Dxy' in a vcrelax calculation.

esm_bc 
CHARACTER 
Default: 
'pbc'

See: 
assume_isolated 
If assume_isolated = 'esm', determines the boundary
conditions used for either side of the slab.
Currently available choices:
 'pbc' :
(default): regular periodic calculation (no ESM).
 'bc1' :
Vacuumslabvacuum (open boundary conditions).
 'bc2' :
Metalslabmetal (dual electrode configuration).
See also esm_efield.
 'bc3' :
Vacuumslabmetal

esm_w 
REAL 
Default: 
0.d0

See: 
assume_isolated 
If assume_isolated = 'esm', determines the position offset
[in a.u.] of the start of the effective screening region,
measured relative to the cell edge. (ESM region begins at
z = +/ [L_z/2 + esm_w] ).

esm_efield 
REAL 
Default: 
0.d0

See: 
assume_isolated 
If assume_isolated = 'esm' and esm_bc = 'bc2', gives the
magnitude of the electric field [Ry/a.u.] to be applied
between semiinfinite ESM electrodes.

esm_nfit 
INTEGER 
Default: 
4

See: 
assume_isolated 
If assume_isolated = 'esm', gives the number of zgrid points
for the polynomial fit along the cell edge.

fcp_mu 
REAL 
Default: 
0.d0

See: 
lfcpopt 
If lfcpopt = .TRUE., gives the target Fermi energy [Ry]. One can start
with appropriate total charge of the system by giving 'tot_charge'.

vdw_corr 
CHARACTER 
Default: 
'none'

See: 
london_s6, london_rcut, london_c6, london_rvdw, dftd3_version, dftd3_threebody, ts_vdw_econv_thr, ts_vdw_isolated, xdm_a1, xdm_a2

Type of Van der Waals correction. Allowed values:
 'grimmed2', 'GrimmeD2', 'DFTD', 'dftd' :
Semiempirical Grimme's DFTD2. Optional variables:
london_s6, london_rcut, london_c6, london_rvdw
S. Grimme, J. Comp. Chem. 27, 1787 (2006), doi:10.1002/jcc.20495
V. Barone et al., J. Comp. Chem. 30, 934 (2009), doi:10.1002/jcc.21112
 'grimmed3', 'GrimmeD3', 'DFTD3', 'dftd3' :
Semiempirical Grimme's DFTD3. Optional variables:
dftd3_version, dftd3_threebody
S. Grimme et al, J. Chem. Phys 132, 154104 (2010), doi:10.1002/jcc.20495
 'TS', 'ts', 'tsvdw', 'tsvdW', 'tkatchenkoscheffler' :
TkatchenkoScheffler dispersion corrections with firstprinciple derived
C6 coefficients.
Optional variables: ts_vdw_econv_thr, ts_vdw_isolated
See A. Tkatchenko and M. Scheffler, PRL 102, 073005 (2009).
 'XDM', 'xdm' :
Exchangehole dipolemoment model. Optional variables: xdm_a1, xdm_a2
A. D. Becke et al., J. Chem. Phys. 127, 154108 (2007), doi:10.1063/1.2795701
A. Otero de la Roza et al., J. Chem. Phys. 136, 174109 (2012),
doi:10.1063/1.4705760
Note that nonlocal functionals (eg vdwDF) are NOT specified here but in input_dft

london 
LOGICAL 
Default: 
.FALSE.

Status: 
OBSOLESCENT, same as vdw_corr='DFTD'

london_s6 
REAL 
Default: 
0.75

global scaling parameter for DFTD. Default is good for PBE.

london_c6(i), i=1,ntyp 
REAL 
Default: 
standard GrimmeD2 values

atomic C6 coefficient of each atom type
( if not specified default values from S. Grimme, J. Comp. Chem. 27, 1787 (2006),
doi:10.1002/jcc.20495 are used; see file Modules/mm_dispersion.f90 )

london_rvdw(i), i=1,ntyp 
REAL 
Default: 
standard GrimmeD2 values

atomic vdw radii of each atom type
( if not specified default values from S. Grimme, J. Comp. Chem. 27, 1787 (2006),
doi:10.1002/jcc.20495 are used; see file Modules/mm_dispersion.f90 )

london_rcut 
REAL 
Default: 
200

cutoff radius (a.u.) for dispersion interactions

dftd3_version 
integer 
Default: 
3

Version of Grimme implementation of GrimmeD3:
 dftd3_version = 2 :
Original GrimmeD2 parametrization
 dftd3_version = 3 :
GrimmeD3 (zero damping)
 dftd3_version = 4 :
GrimmeD3 (BJ damping)
 dftd3_version = 5 :
GrimmeD3M (zero damping)
 dftd3_version = 6 :
GrimmeD3M (BJ damping)
NOTE: not all functionals are parametrized.

dftd3_threebody 
LOGICAL 
Default: 
TRUE

Turn threebody terms in GrimmeD3 on. If .false. twobody contributions
only are computed, using twobody parameters of GrimmeD3.
If dftd3_version=2, threebody contribution is always disabled.

ts_vdw_econv_thr 
REAL 
Default: 
1.D6

Optional: controls the convergence of the vdW energy (and forces). The default value
is a safe choice, likely too safe, but you do not gain much in increasing it

ts_vdw_isolated 
LOGICAL 
Default: 
.FALSE.

Optional: set it to .TRUE. when computing the TkatchenkoScheffler vdW energy
for an isolated (nonperiodic) system.

xdm 
LOGICAL 
Default: 
.FALSE.

Status: 
OBSOLESCENT, same as vdw_corr='xdm'

xdm_a1 
REAL 
Default: 
0.6836

Damping function parameter a1 (adimensional). It is NOT necessary to give
a value if the functional is one of B86bPBE, PW86PBE, PBE, BLYP. For functionals
in this list, the coefficients are given in:
http://schooner.chem.dal.ca/wiki/XDM
A. Otero de la Roza, E. R. Johnson, J. Chem. Phys. 138, 204109 (2013),
doi:10.1063/1.4705760

xdm_a2 
REAL 
Default: 
1.5045

Damping function parameter a2 (angstrom). It is NOT necessary to give
a value if the functional is one of B86bPBE, PW86PBE, PBE, BLYP. For functionals
in this list, the coefficients are given in:
http://schooner.chem.dal.ca/wiki/XDM
A. Otero de la Roza, E. R. Johnson, J. Chem. Phys. 138, 204109 (2013),
doi:10.1063/1.4705760

space_group 
INTEGER 
Default: 
0

The number of the space group of the crystal, as given
in the International Tables of Crystallography A (ITA).
This allows to give in input only the inequivalent atomic
positions. The positions of all the symmetry equivalent atoms
are calculated by the code. Used only when the atomic positions
are of type crystal_sg. See also uniqueb,
origin_choice, rhombohedral

uniqueb 
LOGICAL 
Default: 
.FALSE.

Used only for monoclinic lattices. If .TRUE. the b
unique ibrav (12 or 13) are used, and symmetry
equivalent positions are chosen assuming that the
two fold axis or the mirror normal is parallel to the
b axis. If .FALSE. it is parallel to the c axis.

origin_choice 
INTEGER 
Default: 
1

Used only for space groups that in the ITA allow
the use of two different origins. origin_choice=1,
means the first origin, while origin_choice=2 is the
second origin.

rhombohedral 
LOGICAL 
Default: 
.TRUE.

Used only for rhombohedral space groups.
When .TRUE. the coordinates of the inequivalent atoms are
given with respect to the rhombohedral axes, when .FALSE.
the coordinates of the inequivalent atoms are given with
respect to the hexagonal axes. They are converted internally
to the rhombohedral axes and ibrav=5 is used in both cases.

variables used only if gate = .TRUE.
zgate 
REAL 
Default: 
0.5

used only if gate = .TRUE.
Specifies the position of the charged plate which represents
the counter charge in doped systems (tot_charge .ne. 0).
In units of the unit cell length in z direction, zgate in ]0,1[
Details of the gate potential can be found in
T. Brumme, M. Calandra, F. Mauri; PRB 89, 245406 (2014).

relaxz 
LOGICAL 
Default: 
.FALSE.

used only if gate = .TRUE.
Allows the relaxation of the system towards the charged plate.
Use carefully and utilize either a layer of fixed atoms or a
potential barrier (block=.TRUE.) to avoid the atoms moving to
the position of the plate or the dipole of the dipole
correction (dipfield=.TRUE.).

block 
LOGICAL 
Default: 
.FALSE.

used only if gate = .TRUE.
Adds a potential barrier to the total potential seen by the
electrons to mimic a dielectric in field effect configuration
and/or to avoid electrons spilling into the vacuum region for
electron doping. Potential barrier is from block_1 to block_2 and
has a height of block_height.
If dipfield = .TRUE. then eopreg is used for a smooth increase and
decrease of the potential barrier.

block_1 
REAL 
Default: 
0.45

used only if gate = .TRUE. and block = .TRUE.
lower beginning of the potential barrier, in units of the
unit cell size along z, block_1 in ]0,1[

block_2 
REAL 
Default: 
0.55

used only if gate = .TRUE. and block = .TRUE.
upper beginning of the potential barrier, in units of the
unit cell size along z, block_2 in ]0,1[

block_height 
REAL 
Default: 
0.1

used only if gate = .TRUE. and block = .TRUE.
Height of the potential barrier in Rydberg.




Namelist: &ELECTRONS

electron_maxstep 
INTEGER 
Default: 
100

maximum number of iterations in a scf step

scf_must_converge 
LOGICAL 
Default: 
.TRUE.

If .false. do not stop molecular dynamics or ionic relaxation
when electron_maxstep is reached. Use with care.

conv_thr 
REAL 
Default: 
1.D6

Convergence threshold for selfconsistency:
estimated energy error < conv_thr
(note that conv_thr is extensive, like the total energy).
For nonselfconsistent calculations, conv_thr is used
to set the default value of the threshold (ethr) for
iterative diagonalizazion: see diago_thr_init

adaptive_thr 
LOGICAL 
Default: 
.FALSE

If .TRUE. this turns on the use of an adaptive conv_thr for
the inner scf loops when using EXX.

conv_thr_init 
REAL 
Default: 
1.D3

When adaptive_thr = .TRUE. this is the convergence threshold
used for the first scf cycle.

mixing_mode 
CHARACTER 
Default: 
'plain'

Available options are:
 'plain' :
charge density Broyden mixing
 'TF' :
as above, with simple ThomasFermi screening
(for highly homogeneous systems)
 'localTF' :
as above, with localdensitydependent TF screening
(for highly inhomogeneous systems)

mixing_beta 
REAL 
Default: 
0.7D0

mixing factor for selfconsistency

mixing_ndim 
INTEGER 
Default: 
8

number of iterations used in mixing scheme.
If you are tight with memory, you may reduce it to 4 or so.

mixing_fixed_ns 
INTEGER 
Default: 
0

For DFT+U : number of iterations with fixed ns ( ns is the
atomic density appearing in the Hubbard term ).

diagonalization 
CHARACTER 
Default: 
'david'

Available options are:
 'david' :
Davidson iterative diagonalization with overlap matrix
(default). Fast, may in some rare cases fail.
 'cg' :
Conjugategradientlike bandbyband diagonalization.
MUCH slower than 'david' but uses less memory and is
(a little bit) more robust.
 'ppcg' :
PPCG iterative diagonalization
 'paro', 'ParO' :
ParO iterative diagonalization

diago_thr_init 
REAL 
Convergence threshold (ethr) for iterative diagonalization
(the check is on eigenvalue convergence).
For scf calculations: default is 1.D2 if starting from a
superposition of atomic orbitals; 1.D5 if starting from a
charge density. During self consistency the threshold
is automatically reduced (but never below 1.D13) when
approaching convergence.
For nonscf calculations: default is (conv_thr/N elec)/10.

diago_cg_maxiter 
INTEGER 
For conjugate gradient diagonalization: max number of iterations

diago_david_ndim 
INTEGER 
Default: 
2

For Davidson diagonalization: dimension of workspace
(number of wavefunction packets, at least 2 needed).
A larger value may yield a smaller number of iterations in
the algorithm but uses more memory and more CPU time in
subspace diagonalization (cdiaghg/rdiaghg). You may try
diago_david_ndim=4 if you are not tight on memory
and if the time spent in subspace diagonalization is small
compared to the time spent in h_psi

diago_full_acc 
LOGICAL 
Default: 
.FALSE.

If .TRUE. all the empty states are diagonalized at the same level
of accuracy of the occupied ones. Otherwise the empty states are
diagonalized using a larger threshold (this should not affect
total energy, forces, and other groundstate properties).

efield 
REAL 
Default: 
0.D0

Amplitude of the finite electric field (in Ry a.u.;
1 a.u. = 36.3609*10^10 V/m). Used only if lelfield==.TRUE.
and if kpoints (K_POINTS card) are not automatic.

efield_cart(i), i=1,3 
REAL 
Default: 
(0.D0, 0.D0, 0.D0)

Finite electric field (in Ry a.u.=36.3609*10^10 V/m) in
cartesian axis. Used only if lelfield==.TRUE. and if
kpoints (K_POINTS card) are automatic.

efield_phase 
CHARACTER 
Default: 
'none'

Available options are:
 'read' :
set the zero of the electronic polarization (with lelfield==.true..)
to the result of a previous calculation
 'write' :
write on disk data on electronic polarization to be read in another
calculation
 'none' :
none of the above points

startingpot 
CHARACTER 
Available options are:
 'atomic' :
starting potential from atomic charge superposition
(default for scf, *relax, *md)
 'file' :
start from existing "chargedensity.xml" file in the
directory specified by variables prefix and outdir
For nscf and bands calculation this is the default
and the only sensible possibility.

startingwfc 
CHARACTER 
Default: 
'atomic+random'

Available options are:
 'atomic' :
Start from superposition of atomic orbitals.
If not enough atomic orbitals are available,
fill with random numbers the remaining wfcs
The scf typically starts better with this option,
but in some highsymmetry cases one can "loose"
valence states, ending up in the wrong ground state.
 'atomic+random' :
As above, plus a superimposed "randomization"
of atomic orbitals. Prevents the "loss" of states
mentioned above.
 'random' :
Start from random wfcs. Slower start of scf but safe.
It may also reduce memory usage in conjunction with
diagonalization='cg'.
 'file' :
Start from an existing wavefunction file in the
directory specified by variables prefix and outdir.

tqr 
LOGICAL 
Default: 
.FALSE.

If .true., use a realspace algorithm for augmentation
charges of ultrasoft pseudopotentials and PAWsets.
Faster but numerically less accurate than the default
Gspace algorithm. Use with care and after testing!

real_space 
LOGICAL 
Default: 
.FALSE.

If .true., exploit realspace localization to compute
matrix elements for nonlocal projectors. Faster and in
principle better scaling than the default Gspace algorithm,
but numerically less accurate, may lead to some loss of
translational invariance. Use with care and after testing!



Namelist: &IONS

REQUIRED if calculation == 'relax', 'md', 'vcrelax', or 'vcmd'
OPTIONAL for calculation == 'scf' (only ion_positions is used)
ion_positions 
CHARACTER 
Default: 
'default'

Available options are:
 'default' :
if restarting, use atomic positions read from the
restart file; in all other cases, use atomic
positions from standard input.
 'from_input' :
read atomic positions from standard input, even if restarting.

ion_velocities 
CHARACTER 
Default: 
'default'

Initial ionic velocities. Available options are:
 'default' :
start a new simulation from random thermalized
distribution of velocities if tempw is set,
with zero velocities otherwise; restart from
atomic velocities read from the restart file
 'from_input' :
start or continue the simulation with atomic
velocities read from standard input  see card
ATOMIC_VELOCITIES

ion_dynamics 
CHARACTER 
Specify the type of ionic dynamics.
For different type of calculation different possibilities are
allowed and different default values apply:
CASE ( calculation == 'relax' )
 'bfgs' :
(default) use BFGS quasinewton algorithm,
based on the trust radius procedure,
for structural relaxation
 'damp' :
use damped (quickmin Verlet)
dynamics for structural relaxation
Can be used for constrained
optimisation: see CONSTRAINTS card
CASE ( calculation == 'md' )
 'verlet' :
(default) use Verlet algorithm to integrate
Newton's equation. For constrained
dynamics, see CONSTRAINTS card
 'langevin' :
ion dynamics is overdamped Langevin
 'langevinsmc' :
overdamped Langevin with Smart Monte Carlo:
see R.J. Rossky, JCP, 69, 4628 (1978), doi:10.1063/1.436415
CASE ( calculation == 'vcrelax' )
 'bfgs' :
(default) use BFGS quasinewton algorithm;
cell_dynamics must be 'bfgs' too
 'damp' :
use damped (Beeman) dynamics for
structural relaxation
CASE ( calculation == 'vcmd' )
 'beeman' :
(default) use Beeman algorithm to integrate
Newton's equation

pot_extrapolation 
CHARACTER 
Default: 
'atomic'

Used to extrapolate the potential from preceding ionic steps.
 'none' :
no extrapolation
 'atomic' :
extrapolate the potential as if it was a sum of
atomiclike orbitals
 'first_order' :
extrapolate the potential with firstorder
formula
 'second_order' :
as above, with second order formula
Note: 'first_order' and 'secondorder' extrapolation make sense
only for molecular dynamics calculations

wfc_extrapolation 
CHARACTER 
Default: 
'none'

Used to extrapolate the wavefunctions from preceding ionic steps.
 'none' :
no extrapolation
 'first_order' :
extrapolate the wavefunctions with firstorder formula.
 'second_order' :
as above, with second order formula.
Note: 'first_order' and 'secondorder' extrapolation make sense
only for molecular dynamics calculations

remove_rigid_rot 
LOGICAL 
Default: 
.FALSE.

This keyword is useful when simulating the dynamics and/or the
thermodynamics of an isolated system. If set to true the total
torque of the internal forces is set to zero by adding new forces
that compensate the spurious interaction with the periodic
images. This allows for the use of smaller supercells.
BEWARE: since the potential energy is no longer consistent with
the forces (it still contains the spurious interaction with the
repeated images), the total energy is not conserved anymore.
However the dynamical and thermodynamical properties should be
in closer agreement with those of an isolated system.
Also the final energy of a structural relaxation will be higher,
but the relaxation itself should be faster.

variables used for molecular dynamics
ion_temperature 
CHARACTER 
Default: 
'not_controlled'

Available options are:
 'rescaling' :
control ionic temperature via velocity rescaling
(first method) see parameters tempw, tolp, and
nraise (for VCMD only). This rescaling method
is the only one currently implemented in VCMD
 'rescalev' :
control ionic temperature via velocity rescaling
(second method) see parameters tempw and nraise
 'rescaleT' :
scale temperature of the thermostat every nraise steps
by delta_t, starting from tempw.
The temperature is controlled via velocitiy rescaling.
 'reduceT' :
reduce temperature of the thermostat every nraise steps
by the (negative) value delta_t, starting from tempw.
If delta_t is positive, the target temperature is augmented.
The temperature is controlled via velocitiy rescaling.
 'berendsen' :
control ionic temperature using "soft" velocity
rescaling  see parameters tempw and nraise
 'andersen' :
control ionic temperature using Andersen thermostat
see parameters tempw and nraise
 'svr' :
control ionic temperature using stochasticvelocity rescaling
(Donadio, Bussi, Parrinello, J. Chem. Phys. 126, 014101, 2007),
with parameters tempw and nraise.
 'initial' :
initialize ion velocities to temperature tempw
and leave uncontrolled further on
 'not_controlled' :
(default) ionic temperature is not controlled

tempw 
REAL 
Default: 
300.D0

Starting temperature (Kelvin) in MD runs
target temperature for most thermostats.

tolp 
REAL 
Default: 
100.D0

Tolerance for velocity rescaling. Velocities are rescaled if
the runaveraged and target temperature differ more than tolp.

delta_t 
REAL 
Default: 
1.D0

if ion_temperature == 'rescaleT' :
at each step the instantaneous temperature is multiplied
by delta_t; this is done rescaling all the velocities.
if ion_temperature == 'reduceT' :
every 'nraise' steps the instantaneous temperature is
reduced by delta_t (i.e. delta_t < 0 is added to T)
The instantaneous temperature is calculated at the end of
every ionic move and BEFORE rescaling. This is the temperature
reported in the main output.
For delta_t < 0, the actual average rate of heating or cooling
should be roughly C*delta_t/(nraise*dt) (C=1 for an
ideal gas, C=0.5 for a harmonic solid, theorem of energy
equipartition between all quadratic degrees of freedom).

nraise 
INTEGER 
Default: 
1

if ion_temperature == 'reduceT' :
every nraise steps the instantaneous temperature is
reduced by delta_t (i.e. delta_t is added to the temperature)
if ion_temperature == 'rescalev' :
every nraise steps the average temperature, computed from
the last nraise steps, is rescaled to tempw
if ion_temperature == 'rescaling' and calculation == 'vcmd' :
every nraise steps the instantaneous temperature
is rescaled to tempw
if ion_temperature == 'berendsen' :
the "rise time" parameter is given in units of the time step:
tau = nraise*dt, so dt/tau = 1/nraise
if ion_temperature == 'andersen' :
the "collision frequency" parameter is given as nu=1/tau
defined above, so nu*dt = 1/nraise
if ion_temperature == 'svr' :
the "characteristic time" of the thermostat is set to
tau = nraise*dt

refold_pos 
LOGICAL 
Default: 
.FALSE.

This keyword applies only in the case of molecular dynamics or
damped dynamics. If true the ions are refolded at each step into
the supercell.


keywords used only in BFGS calculations
upscale 
REAL 
Default: 
100.D0

Max reduction factor for conv_thr during structural optimization
conv_thr is automatically reduced when the relaxation
approaches convergence so that forces are still accurate,
but conv_thr will not be reduced to less that conv_thr / upscale.

bfgs_ndim 
INTEGER 
Default: 
1

Number of old forces and displacements vectors used in the
PULAY mixing of the residual vectors obtained on the basis
of the inverse hessian matrix given by the BFGS algorithm.
When bfgs_ndim = 1, the standard quasiNewton BFGS method is
used.
(bfgs only)

trust_radius_max 
REAL 
Default: 
0.8D0

Maximum ionic displacement in the structural relaxation.
(bfgs only)

trust_radius_min 
REAL 
Default: 
1.D3

Minimum ionic displacement in the structural relaxation
BFGS is reset when trust_radius < trust_radius_min.
(bfgs only)

trust_radius_ini 
REAL 
Default: 
0.5D0

Initial ionic displacement in the structural relaxation.
(bfgs only)

w_1 
REAL 
Default: 
0.01D0

See: 
w_2 
w_2 
REAL 
Default: 
0.5D0

Parameters used in line search based on the Wolfe conditions.
(bfgs only)




Namelist: &CELL

input this namelist only if calculation == 'vcrelax' or 'vcmd'
cell_dynamics 
CHARACTER 
Specify the type of dynamics for the cell.
For different type of calculation different possibilities
are allowed and different default values apply:
CASE ( calculation == 'vcrelax' )
 'none' :
no dynamics
 'sd' :
steepest descent ( not implemented )
 'damppr' :
damped (Beeman) dynamics of the ParrinelloRahman extended lagrangian
 'dampw' :
damped (Beeman) dynamics of the new Wentzcovitch extended lagrangian
 'bfgs' :
BFGS quasinewton algorithm (default)
ion_dynamics must be 'bfgs' too
CASE ( calculation == 'vcmd' )
 'none' :
no dynamics
 'pr' :
(Beeman) molecular dynamics of the ParrinelloRahman extended lagrangian
 'w' :
(Beeman) molecular dynamics of the new Wentzcovitch extended lagrangian

press 
REAL 
Default: 
0.D0

Target pressure [KBar] in a variablecell md or relaxation run.

wmass 
REAL 
Default: 
0.75*Tot_Mass/pi**2 for ParrinelloRahman MD;
0.75*Tot_Mass/pi**2/Omega**(2/3) for Wentzcovitch MD

Fictitious cell mass [amu] for variablecell simulations
(both 'vcmd' and 'vcrelax')

cell_factor 
REAL 
Default: 
2.0 for variablecell calculations, 1.0 otherwise

Used in the construction of the pseudopotential tables.
It should exceed the maximum linear contraction of the
cell during a simulation.

press_conv_thr 
REAL 
Default: 
0.5D0 Kbar

Convergence threshold on the pressure for variable cell
relaxation ('vcrelax' : note that the other convergence
thresholds for ionic relaxation apply as well).

cell_dofree 
CHARACTER 
Default: 
'all'

Select which of the cell parameters should be moved:
 'all' :
all axis and angles are moved
 'ibrav' :
all axis and angles are moved, but the lattice remains consistent with the initial ibrav choice
 'x' :
only the x component of axis 1 (v1_x) is moved
 'y' :
only the y component of axis 2 (v2_y) is moved
 'z' :
only the z component of axis 3 (v3_z) is moved
 'xy' :
only v1_x and v2_y are moved
 'xz' :
only v1_x and v3_z are moved
 'yz' :
only v2_y and v3_z are moved
 'xyz' :
only v1_x, v2_y, v3_z are moved
 'shape' :
all axis and angles, keeping the volume fixed
 'volume' :
the volume changes, keeping all angles fixed (i.e. only celldm(1) changes)
 '2Dxy' :
only x and y components are allowed to change
 '2Dshape' :
as above, keeping the area in xy plane fixed
 'epitaxial_ab' :
fix axis 1 and 2 while allowing axis 3 to move
 'epitaxial_ac' :
fix axis 1 and 3 while allowing axis 2 to move
 'epitaxial_bc' :
fix axis 2 and 3 while allowing axis 1 to move
BEWARE: if axis are not orthogonal, some of these options do not
work (symmetry is broken). If you are not happy with them,
edit subroutine init_dofree in file Modules/cell_base.f90



Card: ATOMIC_SPECIES 
Syntax:
ATOMIC_SPECIES

Description of items:
X 
CHARACTER 
label of the atom. Acceptable syntax:
chemical symbol X (1 or 2 characters, caseinsensitive)
or chemical symbol plus a number or a letter, as in
"Xn" (e.g. Fe1) or "X_*" or "X*" (e.g. C1, C_h;
max total length cannot exceed 3 characters)

Mass_X 
REAL 
mass of the atomic species [amu: mass of C = 12]
Used only when performing Molecular Dynamics run
or structural optimization runs using Damped MD.
Not actually used in all other cases (but stored
in data files, so phonon calculations will use
these values unless other values are provided)

PseudoPot_X 
CHARACTER 
File containing PP for this species.
The pseudopotential file is assumed to be in the new UPF format.
If it doesn't work, the pseudopotential format is determined by
the file name:
*.vdb or *.van Vanderbilt US pseudopotential code
*.RRKJ3 Andrea Dal Corso's code (old format)
none of the above old PWscf normconserving format



Card: ATOMIC_POSITIONS { alat  bohr  angstrom  crystal  crystal_sg } 
IF calculation == 'bands' OR calculation == 'nscf' :
Specified atomic positions will be IGNORED and those from the
previous scf calculation will be used instead !!!

ELSE
Syntax:
ATOMIC_POSITIONS { alat  bohr  angstrom  crystal  crystal_sg
}



Description of items:
Card's options: 
alat  bohr  angstrom  crystal  crystal_sg

Default: 
(DEPRECATED) alat

Units for ATOMIC_POSITIONS:
 alat :
atomic positions are in cartesian coordinates, in
units of the lattice parameter (either celldm(1)
or A). If no option is specified, 'alat' is assumed;
not specifying units is DEPRECATED and will no
longer be allowed in the future
 bohr :
atomic positions are in cartesian coordinate,
in atomic units (i.e. Bohr radii)
 angstrom :
atomic positions are in cartesian coordinates, in Angstrom
 crystal :
atomic positions are in crystal coordinates, i.e.
in relative coordinates of the primitive lattice
vectors as defined either in card CELL_PARAMETERS
or via the ibrav + celldm / a,b,c... variables
 crystal_sg :
atomic positions are in crystal coordinates, i.e.
in relative coordinates of the primitive lattice.
This option differs from the previous one because
in this case only the symmetry inequivalent atoms
are given. The variable space_group must indicate
the space group number used to find the symmetry
equivalent atoms. The other variables that control
this option are uniqueb, origin_choice, and
rhombohedral.

x, y, z

REAL 
atomic positions
NOTE: each atomic coordinate can also be specified as a simple algebraic expression.
To be interpreted correctly expression must NOT contain any blank
space and must NOT start with a "+" sign. The available expressions are:
+ (plus),  (minus), / (division), * (multiplication), ^ (power)
All numerical constants included are considered as doubleprecision numbers;
i.e. 1/2 is 0.5, not zero. Other functions, such as sin, sqrt or exp are
not available, although sqrt can be replaced with ^(1/2).
Example:
C 1/3 1/2*3^(1/2) 0
is equivalent to
C 0.333333 0.288675 0.000000
Please note that this feature is NOT supported by XCrysDen (which will
display a wrong structure, or nothing at all).
When atomic positions are of type crystal_sg coordinates can be given
in the following four forms (Wyckoff positions):
C 1a
C 8g x
C 24m x y
C 48n x y z
The first form must be used when the Wyckoff letter determines uniquely
all three coordinates, forms 2,3,4 when the Wyckoff letter and 1,2,3
coordinates respectively are needed.
The forms:
C 8g x x x
C 24m x x y
are not allowed, but
C x x x
C x x y
C x y z
are correct.

if_pos(1), if_pos(2), if_pos(3)

INTEGER 
Default: 
1

component i of the force for this atom is multiplied by if_pos(i),
which must be either 0 or 1. Used to keep selected atoms and/or
selected components fixed in MD dynamics or
structural optimization run.
With crystal_sg atomic coordinates the constraints are copied in all equivalent
atoms.



Card: K_POINTS { tpiba  automatic  crystal  gamma  tpiba_b  crystal_b  tpiba_c  crystal_c } 
IF tpiba OR crystal OR tpiba_b OR crystal_b OR tpiba_c OR crystal_c :
Syntax:
K_POINTS tpiba  crystal  tpiba_b  crystal_b  tpiba_c  crystal_c

ELSEIF automatic :
Syntax:
K_POINTS automatic

ELSEIF gamma :


Description of items:
Card's options: 
tpiba  automatic  crystal  gamma  tpiba_b  crystal_b  tpiba_c  crystal_c

Default: 
tbipa

K_POINTS options are:
 tpiba :
read kpoints in cartesian coordinates,
in units of 2 pi/a (default)
 automatic :
automatically generated uniform grid of kpoints, i.e,
generates ( nk1, nk2, nk3 ) grid with ( sk1, sk2, sk3 ) offset.
nk1, nk2, nk3 as in MonkhorstPack grids
k1, k2, k3 must be 0 ( no offset ) or 1 ( grid displaced
by half a grid step in the corresponding direction )
BEWARE: only grids having the full symmetry of the crystal
work with tetrahedra. Some grids with offset may not work.
 crystal :
read kpoints in crystal coordinates, i.e. in relative
coordinates of the reciprocal lattice vectors
 gamma :
use k = 0 (no need to list kpoint specifications after card)
In this case wavefunctions can be chosen as real,
and specialized subroutines optimized for calculations
at the gamma point are used (memory and cpu requirements
are reduced by approximately one half).
 tpiba_b :
Used for bandstructure plots.
See Doc/brillouin_zones.pdf for usage of BZ labels;
otherwise, kpoints are in units of 2 pi/a.
nks points specify nks1 lines in reciprocal space.
Every couple of points identifies the initial and
final point of a line. pw.x generates N intermediate
points of the line where N is the weight of the first point.
 crystal_b :
As tpiba_b, but kpoints are in crystal coordinates.
See Doc/brillouin_zones.pdf for usage of BZ labels.
 tpiba_c :
Used for bandstructure contour plots.
kpoints are in units of 2 pi/a. nks must be 3.
3 kpoints k_0, k_1, and k_2 specify a rectangle
in reciprocal space of vertices k_0, k_1, k_2,
k_1 + k_2  k_0: k_0 + \alpha (k_1k_0)+
\beta (k_2k_0) with 0 <\alpha,\beta < 1.
The code produces a uniform mesh n1 x n2
k points in this rectangle. n1 and n2 are
the weights of k_1 and k_2. The weight of k_0
is not used.
 crystal_c :
As tpiba_c, but kpoints are in crystal coordinates.

nks 
INTEGER 
Number of supplied special kpoints.

xk_x, xk_y, xk_z, wk

REAL 
Special kpoints (xk_x/y/z) in the irreducible Brillouin Zone
(IBZ) of the lattice (with all symmetries) and weights (wk)
See the literature for lists of special points and
the corresponding weights.
If the symmetry is lower than the full symmetry
of the lattice, additional points with appropriate
weights are generated. Notice that such procedure
assumes that ONLY kpoints in the IBZ are provided in input
In a nonscf calculation, weights do not affect the results.
If you just need eigenvalues and eigenvectors (for instance,
for a bandstructure plot), weights can be set to any value
(for instance all equal to 1).

nk1, nk2, nk3 
INTEGER 
These parameters specify the kpoint grid
(nk1 x nk2 x nk3) as in MonkhorstPack grids.

sk1, sk2, sk3 
INTEGER 
The grid offsets; sk1, sk2, sk3 must be
0 ( no offset ) or 1 ( grid displaced by
half a grid step in the corresponding direction ).



Card: CELL_PARAMETERS { alat  bohr  angstrom } 
Optional card, needed only if ibrav == 0 is specified, ignored otherwise !
Syntax:
CELL_PARAMETERS { alat  bohr  angstrom
}

Description of items:
Card's options: 
alat  bohr  angstrom

Unit for lattice vectors; options are:
'bohr' / 'angstrom':
lattice vectors in bohrradii / angstrom.
In this case the lattice parameter alat = sqrt(v1*v1).
'alat' / nothing specified:
lattice vectors in units of the lattice parameter (either
celldm(1) or A). Not specifying units is DEPRECATED
and will not be allowed in the future.
If neither unit nor lattice parameter are specified,
'bohr' is assumed  DEPRECATED, will no longer be allowed

v1, v2, v3

REAL 
Crystal lattice vectors (in cartesian axis):
v1(1) v1(2) v1(3) ... 1st lattice vector
v2(1) v2(2) v2(3) ... 2nd lattice vector
v3(1) v3(2) v3(3) ... 3rd lattice vector



Card: CONSTRAINTS 
Optional card, used for constrained dynamics or constrained optimisations
(only if ion_dynamics=='damp' or 'verlet', variablecell excepted)
When this card is present the SHAKE algorithm is automatically used.
Syntax:
CONSTRAINTS

Description of items:
nconstr 
INTEGER 
Number of constraints.

constr_tol 
REAL 
Tolerance for keeping the constraints satisfied.

constr_type 
CHARACTER 
Type of constraint :
 'type_coord' :
constraint on global coordinationnumber, i.e. the
average number of atoms of type B surrounding the
atoms of type A. The coordination is defined by
using a FermiDirac.
(four indexes must be specified).
 'atom_coord' :
constraint on local coordinationnumber, i.e. the
average number of atoms of type A surrounding a
specific atom. The coordination is defined by
using a FermiDirac.
(four indexes must be specified).
 'distance' :
constraint on interatomic distance
(two atom indexes must be specified).
 'planar_angle' :
constraint on planar angle
(three atom indexes must be specified).
 'torsional_angle' :
constraint on torsional angle
(four atom indexes must be specified).
 'bennett_proj' :
constraint on the projection onto a given direction
of the vector defined by the position of one atom
minus the center of mass of the others.
G. Roma, J.P. Crocombette: J. Nucl. Mater. 403, 32 (2010),
doi:10.1016/j.jnucmat.2010.06.001

constr(1), constr(2), constr(3), constr(4)


These variables have different meanings for different constraint types:
'type_coord' :
constr(1) is the first index of the atomic type involved
constr(2) is the second index of the atomic type involved
constr(3) is the cutoff radius for estimating the coordination
constr(4) is a smoothing parameter
'atom_coord' :
constr(1) is the atom index of the atom with constrained coordination
constr(2) is the index of the atomic type involved in the coordination
constr(3) is the cutoff radius for estimating the coordination
constr(4) is a smoothing parameter
'distance' :
atoms indices object of the constraint, as they appear in
the ATOMIC_POSITIONS card
'planar_angle', 'torsional_angle' :
atoms indices object of the constraint, as they appear in the
ATOMIC_POSITIONS card (beware the order)
'bennett_proj' :
constr(1) is the index of the atom whose position is constrained.
constr(2:4) are the three coordinates of the vector that specifies
the constraint direction.

constr_target 
REAL 
Target for the constrain ( angles are specified in degrees ).
This variable is optional.



Card: OCCUPATIONS 
Optional card, used only if occupations == 'from_input', ignored otherwise !
Syntax:
OCCUPATIONS

Description of items:
f_inp1 
REAL 
Occupations of individual states (MAX 10 PER ROW).
For spinpolarized calculations, these are majority spin states.

f_inp2 
REAL 
Occupations of minority spin states (MAX 10 PER ROW)
To be specified only for spinpolarized calculations.



Card: ATOMIC_VELOCITIES { a.u } 
Optional card, reads velocities from standard input
Syntax:
ATOMIC_VELOCITIES { a.u
}

Description of items:
V 
CHARACTER 
label of the atom as specified in ATOMIC_SPECIES

vx, vy, vz

REAL 
atomic velocities along x y and z direction



Card: ATOMIC_FORCES 
Optional card used to specify external forces acting on atoms.
BEWARE: if the sum of external forces is not zero, the center of mass of
the system will move
Syntax:
ATOMIC_FORCES

Description of items:
fx, fy, fz

REAL 
external force on atom X (cartesian components, Ry/a.u. units)



