[Pw_forum] Fwd: NaN in plotbands.x

Varadharajan Srinivasan varadharajan.srinivasan at gmail.com
Thu May 22 16:26:59 CEST 2014


Dear Paolo,

Thanks for the advice. I compared the bands.dat.rap files from both runs
and also looked into plotbands.f90. The plain DFT run recognizes only one
high-symmetry point (first one) in the .rap file but detects the rest in
plotband.f90 through, I suppose, through the code lines below.
But the DFT+U file sets more points in the .rap to high-symmetry (in
particular the point 0.026578 -0.015345  0.588005 (in ibrav=5) which is
next in the list to  0.000000  0.000000  0.609387 which should be Z point).
This causes two high-symmetry (HS) points to be next to each other and not
differing by a G vector. This might be causing the NaN.

An easy fix was to by hand set to F the entry for the point 0.026578
-0.015345  0.588005 in the corresponding .rap file. This seemed to make the
plotband.x work without giving NaN. The resulting plot looks quite
reasonable too.

I didn't quite get what the codelet below is supposed to do. It seems to
turn a point into a HS point if the directions on either side are not
parallel.

The .rap files are attached.

Thanks,
Vardha.

  DO n=1,nks
     IF (n==1 .OR. n==nks) THEN
        high_symmetry(n) = .true.
     ELSE
        k1(:) = k(:,n) - k(:,n-1)
        k2(:) = k(:,n+1) - k(:,n)
        ps = ( k1(1)*k2(1) + k1(2)*k2(2) + k1(3)*k2(3) ) / &
         sqrt( k1(1)*k1(1) + k1(2)*k1(2) + k1(3)*k1(3) ) / &
         sqrt( k2(1)*k2(1) + k2(2)*k2(2) + k2(3)*k2(3) )
        high_symmetry(n) = (ABS(ps-1.d0) >1.0d-4).OR.high_symmetry(n)
!
!  The gamma point is a high symmetry point
!
        IF (k(1,n)**2+k(2,n)**2+k(3,n)**2 < 1.0d-9) high_symmetry(n)=.true.
     ENDIF
  ENDDO






On Tue, May 20, 2014 at 1:39 AM, Paolo Giannozzi
<paolo.giannozzi at uniud.it>wrote:

> On Mon, 2014-05-19 at 23:30 +0530, Varadharajan Srinivasan wrote:
>
> > The error I got was during the interactive run. And I had checked the
> > "bands.dat" file and found no NaNs in there. This is why I was
> > confused. I attach below the output of the interactive run. The line
> > in bold is the one that doesn't appear in the regular DFT run :
>
> if it appears, there is a reason. Follow what the code does
> (PP/src/plotband.f90 if I remember correctly), compare
> "bands.dat" and  "bands.dat.rep" (if it exists) for the
> two cases.
>
> P.
>
> >
> > Input file > bands.dat
> > Reading  118 bands at     77 k-points
> > Range:  -79.6540   17.5030eV  Emin, Emax > 10.2125 14.2125
> > high-symmetry point:  0.0000-0.5831 0.4063   x coordinate   0.0000
> > high-symmetry point:  0.0000 0.0000 0.0000   x coordinate   0.7107
> > high-symmetry point:  0.0000 0.0000 0.6094   x coordinate   1.3201
> > high-symmetry point:  0.0266-0.0153 0.5880   x coordinate   1.3201
> > high-symmetry point:  0.5050-0.2916 0.2031   x coordinate   1.9933
> > high-symmetry point:  0.0000 0.0000 0.0000   x coordinate   2.6108
> > output file (xmgr) > bfobands.xmgr
> >  lines nrap           1           1
> >  lines nrap           2           3
> >  lines nrap           3           0
> >  lines nrap           4           1
> >  lines nrap           5           1
> > bands in xmgr format written to file bfobands.xmgr
> >
> >
> >
> >
> > output file (ps) > bfobands.ps
> > Efermi > 12.2125
> > deltaE, reference E (for tics) 1 12.2125
> >  n=           2           3
> >    1.320062       1.320062
> >    10.37700       10.37000
> >             NaN            NaN
> >  n=           2           3
> >    1.320062       1.320062
> >    10.37700       10.37100
> >             NaN            NaN
> >  n=           2           3
> >    1.320062       1.320062
> >    10.80900       10.79800
> >             NaN            NaN
> >  n=           2           3
> >    1.320062       1.320062
> >    10.80900       10.80400
> >             NaN            NaN
> >  n=           2           3
> >    1.320062       1.320062
> >    10.94000       10.92600
> >             NaN            NaN
> >  n=           2           3
> >    1.320062       1.320062
> >    10.94000       10.93100
> >             NaN            NaN
> >  n=           2           3
> >    1.320062       1.320062
> >    10.94300       10.95200
> >             NaN            NaN
> >  n=           2           3
> >    1.320062       1.320062
> >    10.94400       10.95300
> >             NaN            NaN
> >  n=           2           3
> >    1.320062       1.320062
> >    12.72700       12.73000
> >             NaN            NaN
> >  n=           2           3
> >    1.320062       1.320062
> >    12.72800       12.73300
> >             NaN            NaN
> >
> >
> >
> >
> > On Mon, May 19, 2014 at 6:08 PM, Lorenzo Paulatto
> > <lorenzo.paulatto at impmc.upmc.fr> wrote:
> >         Did you try to run plotbands interactively?
> >
> >         i.e., just run plotbands.x and then answer the questions it
> >         prints on screen?
> >
> >         You can also try to open the output file of bands.x
> >         (bands.dat) with a text editor and check if the NaN are there
> >         already (it is a very simple file).
> >
> >         Please let us know as it gos for more accurate help.
> >
> >
> >
> >
> >         On 05/19/2014 02:19 PM, Varadharajan Srinivasan wrote:
> >
> >         >
> >         >
> >         > ---------- Forwarded message ----------
> >         > From: Varadharajan Srinivasan
> >         > <varadharajan.srinivasan at gmail.com>
> >         > Date: Mon, May 19, 2014 at 2:28 PM
> >         > Subject: NaN in plotbands.x
> >         > To: PWSCF Forum <pw_forum at pwscf.org>
> >         >
> >         >
> >         > Dear all,
> >         >
> >         >
> >         > I am trying to calculate bands for an oxide using
> >         > plotbands.x after scf and bands calculation. I am doing this
> >         > for regular DFT, DFT+U and a non-collinear calculation with
> >         > regular DFT and with U and J. For the regular DFT cases the
> >         > plotbands.x works just fine giving me a ps file. But for the
> >         > DFT+U and DFT+U+J cases I keep getting NaNs in the output
> >         > for the same k-paths. I've read that repeating k values
> >         > twice can cause this but I've checked my input and this
> >         > doesn't seem to be the case. However, plotbands for some
> >         > reason adds an extra high-symmetry point at the same
> >         > x-coordinate :
> >         >
> >         >
> >         > Just DFT :
> >         >
> >         >
> >         > high-symmetry point:  0.0000 0.0000 0.0000   x coordinate
> >         > 0.7107
> >         > high-symmetry point:  0.0000 0.0000 0.6094   x coordinate
> >         > 1.3201
> >         > high-symmetry point:  0.5050-0.2916 0.2031   x coordinate
> >         > 2.0307
> >         > high-symmetry point:  0.0000 0.0000 0.0000   x coordinate
> >         > 2.6482
> >         >
> >         >
> >         > DFT+U(+J) :
> >         > high-symmetry point:  0.0000 0.0000 0.0000   x coordinate
> >         > 0.7107
> >         > high-symmetry point:  0.0000 0.0000 0.6094   x coordinate
> >         > 1.3201
> >         > high-symmetry point:  0.0266-0.0153 0.5880   x coordinate
> >         > 1.3201
> >         > high-symmetry point:  0.5050-0.2916 0.2031   x coordinate
> >         > 1.9933
> >         >
> >         >
> >         > I am attaching below my nscf, postprocessing and plotbands
> >         > input files. Hope you can help.
> >         >
> >         >
> >         > Thanks,
> >         > Vardha.
> >         >
> >         >
> >         >
> >         >
> >         >
> >         >
> >         > Dept. of Chemistry
> >         > IISER Bhopal,
> >         > India.
> >         >
> >         >
> >         >
> >         >
> >         >
> >         >
> >         >
> >         >
> >         >
> >         > _______________________________________________
> >         > Pw_forum mailing list
> >         > Pw_forum at pwscf.org
> >         > http://pwscf.org/mailman/listinfo/pw_forum
> >
> >         --
> >         Dr. Lorenzo Paulatto
> >         IdR @ IMPMC -- CNRS & Université Paris 6
> >         +33 (0)1 44 275 084 / skype: paulatz
> >         http://www-int.impmc.upmc.fr/~paulatto/
> >         23-24/4é16 Boîte courrier 115, 4 place Jussieu 75252 Paris Cédex
> 05
> >
> >         _______________________________________________
> >         Pw_forum mailing list
> >         Pw_forum at pwscf.org
> >         http://pwscf.org/mailman/listinfo/pw_forum
> >
> >
> > _______________________________________________
> > Pw_forum mailing list
> > Pw_forum at pwscf.org
> > http://pwscf.org/mailman/listinfo/pw_forum
>
>
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://pwscf.org/mailman/listinfo/pw_forum
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20140522/8106e429/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bands.dat.rap_DFT
Type: application/octet-stream
Size: 77195 bytes
Desc: not available
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20140522/8106e429/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bands.dat.rap_DFT+U
Type: application/octet-stream
Size: 40389 bytes
Desc: not available
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20140522/8106e429/attachment-0001.obj>


More information about the users mailing list