Commit f3f5a1fc authored by giannozz's avatar giannozz

Added warning on band plotting problems if two consecutive k-points are equal

git-svn-id: c92efa57-630b-4861-b058-cf58834340f0
parent e4da7012
......@@ -207,7 +207,8 @@ crossings may not work in all circumstances, though). The output is written
to a file in a simple format that can be directly read and converted to
plottable format by auxiliary code
\texttt{plotband.x}. Unpredictable plots may results if k-points are not
in sequence along lines. The code \texttt{bands.x} performs as well a
in sequence along lines, or if two consecutive points are the same.
The code \texttt{bands.x} performs as well a
symmetry analysis of the band structure. For a complete input description,
see\texttt{Doc/INPUT\_bands.*}. See Example 01, Example 04 and Example 06
for simple band plots.
! Copyright (C) 2001-2007 Quantum ESPRESSO group
! Copyright (C) 2001-2012 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......@@ -7,6 +7,15 @@
PROGRAM plotband
! reads data files produced by "bands.x", produces
! * data file ready for plotting with gnuplot, xmgr or the like
! * a postscript file that can be directly printed
! Important notice:
! - k-points processed by bands.x should be along a continuous path
! - no two consecutive k-points should be equal (i.e.: a k-point,
! e.g. 0,0,0, can appear more than once but not in sequence)
! If these rules are violated, unpredictable results may follow
real, ALLOCATABLE :: e(:,:), k(:,:), e_in(:), kx(:)
......@@ -412,9 +421,9 @@ PROGRAM plotband
DO i=1,nbnd
IF (is_in_range(i)) THEN
! No interpolation:
! write (1,'(9(f8.3,1x))') ( kx(n)*xdim/kx(nks), &
! (e(i,n)-emin)*ydim/(emax-emin),n=nks,1,-1)
! write (1,'(i4," banda")' ) nks-1
! write (1,'(9(f8.3,1x))') ( kx(n)*xdim/kx(nks), &
! (e(i,n)-emin)*ydim/(emax-emin),n=nks,1,-1)
! write (1,'(i4," banda")' ) nks-1
! Spline interpolation with twice as many points:
......@@ -432,7 +441,7 @@ PROGRAM plotband
CALL spline_interpol ( kx(ni), e_in, nf-ni+1, &
k_interp, e_interp, n_interp )
WRITE (1,'(9(f8.3,1x))') ( k_interp(n)*xdim/kx(nks), &
WRITE (1,'(i4," banda")' ) n_interp-1
......@@ -518,6 +527,12 @@ SUBROUTINE splint (nspline, xspline, yspline, d2y, nfit, xfit, yfit)
INTEGER :: klo, khi, i
real :: a, b, h
if (nspline==2) THEN
print *, "n=",nspline,nfit
print *, xspline
print *, yspline
print *, d2y
end if
DO i=1,nfit
DO khi=klo+1, nspline
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