Commit d2311d70 authored by giannozz's avatar giannozz

Do not override Emin and Emax provided inm input (courtesy of Henning

Glawe)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@8664 c92efa57-630b-4861-b058-cf58834340f0
parent 3a599055
......@@ -5,9 +5,7 @@ input_description -distribution {Quantum Espresso} -package PWscf -program dos.x
intro {
Purpose of dos.x:
calculates the Density of States (DOS)
(separated into up and down components for lSDA)
See the header of file PP/dos.90 for more info.
(separated into up and down components for DSDA)
Structure of the input data:
......@@ -16,6 +14,7 @@ input_description -distribution {Quantum Espresso} -package PWscf -program dos.x
&DOS
...
/
IMPORTANT: since v.5 namelist name is &dos and no longer &inputpp
}
namelist DOS {
......@@ -62,7 +61,10 @@ input_description -distribution {Quantum Espresso} -package PWscf -program dos.x
var Emax
default { band extrema }
info {
min, max energy (eV) for DOS plot
min, max energy (eV) for DOS plot. If unspecified, the
lower and/or upper band value, plus/minus 3 times the
value of the gaussian smearing if present, will be used.
}
}
......
......@@ -34,8 +34,8 @@ PROGRAM do_dos
CHARACTER(LEN=256), EXTERNAL :: trimcheck
!
CHARACTER(len=256) :: fildos, outdir
REAL(DP) :: E, DOSofE (2), DOSint, Elw, Eup, DeltaE, Emin, Emax, &
degauss1
REAL(DP) :: E, DOSofE (2), DOSint, DeltaE, Emin, Emax, &
degauss1, E_unset=1000000.d0
INTEGER :: ik, n, ndos, ngauss1, ios
NAMELIST /dos/ outdir, prefix, fildos, degauss, ngauss, &
Emin, Emax, DeltaE
......@@ -57,8 +57,8 @@ PROGRAM do_dos
IF ( trim( outdir ) == ' ' ) outdir = './'
prefix ='pwscf'
fildos =' '
Emin =-1000000.d0
Emax = 1000000.d0
Emin =-E_unset
Emax = E_unset
DeltaE = 0.01d0
ngauss = 0
degauss= 0.d0
......@@ -112,21 +112,21 @@ PROGRAM do_dos
lgauss=.true.
ENDIF
!
! find band extrema
! find min and max energy for plot (band extrema if not set)
!
Elw = et (1, 1)
Eup = et (nbnd, 1)
DO ik = 2, nks
Elw = min (Elw, et (1, ik) )
Eup = max (Eup, et (nbnd, ik) )
ENDDO
IF (degauss/=0.d0) THEN
Eup = Eup + 3.d0 * degauss
Elw = Elw - 3.d0 * degauss
ENDIF
IF ( Emin == -E_unset ) THEN
Emin = MINVAL ( et(1, 1:nks) )
IF ( degauss > 0.0_dp ) Emin = Emin - 3.0_dp * degauss
ELSE
Emin = Emin/rytoev
END IF
IF ( Emax == E_unset ) THEN
Emax = MINVAL ( et(nbnd, 1:nks) )
IF ( degauss > 0.0_dp ) Emax = Emax + 3.0_dp * degauss
ELSE
Emax = Emax/rytoev
END IF
!
Emin=max(Emin/rytoev,Elw)
Emax=min(Emax/rytoev,Eup)
DeltaE = DeltaE / rytoev
ndos = nint ( (Emax - Emin) / DeltaE+0.500001d0)
DOSint = 0.d0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment