Re: [Wien] Extra vertical lines in bandstructure in spaghetti

2018-03-04 Thread Gavin Abo
Thanks Prof. Blaha.  I tried it on my test case, andthe lines only 
appear on the M, K, and GAMMA points now. So, it seems to work fine 
now.  The case.bands.agr plot does not show SIGMA like the 
case.spaghetti_ps does.  However, I can manually add the SIGMA (or other 
special labels) in xmgrace to my case.bands.agr plot, if I want them.


[ 
https://github.com/gsabo/WIEN2k-Patches/blob/master/17.1/SrPtAs_bandstructure_vlines_patched.pdf 
]


On 2/28/2018 1:52 AM, Peter Blaha wrote:
I've changed bz_lin.f  in SRC_spaghetti and it seems to solve the 
problem. Please try it.


Regards

On 02/23/2018 10:42 PM, Sergio Castillo Robles wrote:

Hi, thank you for your response,

I changed the data toler value from 1.d-07 to 1.d-05 by myself, and 
recompiled with ./siteconfig, R Compile/Recompile, S Select program, 
spaghetti


but the problem still persist.

Who should i send the files to?

Thanks for your answer and your time

Regards


2018-02-19 20:29 GMT-08:00 Gavin Abo >:


    What did you change the data toler value to?  The 1.d-07 [
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg15787.html

    ] to 1.d-05 [
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg16402.html

    ]?
___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html


Re: [Wien] Extra vertical lines in bandstructure in spaghetti

2018-02-28 Thread Peter Blaha
I've changed bz_lin.f  in SRC_spaghetti and it seems to solve the 
problem. Please try it.


Regards

On 02/23/2018 10:42 PM, Sergio Castillo Robles wrote:

Hi, thank you for your response,

I changed the data toler value from 1.d-07 to 1.d-05 by myself, and 
recompiled with ./siteconfig, R Compile/Recompile, S Select program, 
spaghetti


but the problem still persist.

Who should i send the files to?

Thanks for your answer and your time

Regards


2018-02-19 20:29 GMT-08:00 Gavin Abo >:


What did you change the data toler value to?  The 1.d-07 [
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg15787.html

] to 1.d-05 [
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg16402.html

]?


___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html



--

  P.Blaha
--
Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-1-58801-165300 FAX: +43-1-58801-165982
Email: bl...@theochem.tuwien.ac.atWIEN2k: http://www.wien2k.at
WWW:   http://www.imc.tuwien.ac.at/TC_Blaha
--
  subroutine bz_lin(v,nv,lines,nlines,x,nbreak,break)
! *
!
  IMPLICIT REAL*8 (A-H,O-Z)
!  INCLUDE 'param.inc'
!
  dimension  v(3,*)
  dimension  lines(*)
  dimension  x(*)
!
  dimension  v0(3),vdir(3),vdir1(3)
  logical  break(*)
!
  data toler  /1.d-06/
!---
!
!.INITIALIZE LINE-CHECK;  the 1. and the 2. k-point always build
! a Brillouin-Zone line
  nlines=1
  lines(1)=1
  v0(1)  =v(1,1)
  v0(2)  =v(2,1)
  v0(3)  =v(3,1)
  vdir(1)=v(1,2) - v(1,1)
  vdir(2)=v(2,2) - v(2,1)
  vdir(3)=v(3,2) - v(3,1)
  xsum=sqrt( vdir(1)**2 + vdir(2)**2 + vdir(3)**2 )
  x(1)=0.
  x(2)=xsum
  nbreak=0
  break(1)=.false.
  break(2)=.false.
  dmax=10.*xsum
  dbreak=2.d0*xsum  
! dmax indicates gap between 2 lines
  jkp=2
!
!.START SEARCH LOOP FOR ALL OTHER K-POINTS
 10   continue
  jkp=jkp+1
 if(jkp.gt.nv) goto 100
  d=sqrt( (v(1,jkp)-v(1,jkp-1))**2 + (v(2,jkp)-v(2,jkp-1))**2 &
  + (v(3,jkp)-v(3,jkp-1))**2 )
 if(d.gt.dbreak) then
!print*,'break1'
	d=dmax
	xsum=xsum + d
x(jkp)=xsum
	nbreak=nbreak+1
	break(jkp)=.true.
nlines=nlines+1
lines(nlines)=jkp-1
nlines=nlines+1
lines(nlines)=jkp
v0(1)=v(1,jkp)
v0(2)=v(2,jkp)
v0(3)=v(3,jkp)
vdir(1)=v(1,jkp+1)-v(1,jkp)
vdir(2)=v(2,jkp+1)-v(2,jkp)
vdir(3)=v(3,jkp+1)-v(3,jkp)
dbreak=2.d0*sqrt( vdir(1)**2 + vdir(2)**2 + vdir(3)**2 )
goto 10
 else
	break(jkp)=.false.
 endif
	 xsum=xsum + d
 x(jkp)=xsum
 eps1=(v(1,jkp)-v0(1))*vdir(2) - (v(2,jkp)-v0(2))*vdir(1)
 eps2=(v(2,jkp)-v0(2))*vdir(3) - (v(3,jkp)-v0(3))*vdir(2)
 eps3=(v(1,jkp)-v0(1))*vdir(3) - (v(3,jkp)-v0(3))*vdir(1)
! print*,jkp,eps1,eps2,eps3,toler
  vdir1(1)=v(1,jkp) - v(1,jkp-1)
  vdir1(2)=v(2,jkp) - v(2,jkp-1)
  vdir1(3)=v(3,jkp) - v(3,jkp-1)
  absvdir1=sqrt(vdir1(1)**2+vdir1(2)**2+vdir1(3)**2)
  absvdir =sqrt(vdir(1)**2+vdir(2)**2+vdir(3)**2)
  vtest=(vdir(1)*vdir1(1)+vdir(2)*vdir1(2)+vdir(3)*vdir1(3))/absvdir/absvdir1 -1.d0
!print *,vtest,eps1
!print*,'vdir',vdir
!print*,'vdir1',vdir1
!if((vdir(1)-vdir1(1).gt.toler).or.(vdir(2)-vdir1(2).gt.toler).or.(vdir(3)-vdir1(3).gt.toler)) then
if(abs(vtest).gt.1.d-6) then
! if (abs(eps1).gt.toler .or. abs(eps2).gt.toler &
! .or. abs(eps3).gt.toler)  then
!print*,'break2',eps1,eps2,eps3
nlines=nlines+1
lines(nlines)=jkp-1
v0(1)=v(1,jkp-1)
v0(2)=v(2,jkp-1)
v0(3)=v(3,jkp-1)
vdir(1)=v(1,jkp)-v(1,jkp-1)
vdir(2)=v(2,jkp)-v(2,jkp-1)
vdir(3)=v(3,jkp)-v(3,jkp-1)
dbreak=2.d0*sqrt( vdir(1)**2 + vdir(2)**2 + vdir(3)**2 )
 endif
  goto 10
!
!.READY
 100  continue
  lines(nlines+1)=nv
  return
  end
___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  

Re: [Wien] Extra vertical lines in bandstructure in spaghetti

2018-02-24 Thread Gavin Abo
I quickly created a WIEN2k 17.1 test case (as shown below) and believe I 
have reproduced the issue.


The 7_SrPtAs.bands.agr that was generated shows 6 lines between the M 
and K labels with data toler /1.d-07/.  The 5_SrPtAs.bands.agr that was 
generated using data toler /1.d-05/ does not have those lines.  [ 
https://github.com/gsabo/WIEN2k-Patches/blob/master/17.1/SrPtAs_bandstructure_vlines.pdf 
]


However, the agr files are missing the SIGMA label specified in 
SRC_templates/hcp.klist and no vertical line appears at SIGMA.  The 
SIGMA label does seem to appear okay in the PostScript (ps) file created 
by "plot bandstructure" in w2web.


It may be that the vertical lines are because I just used an improper 
k-path for this structure, didn't include other special point labels, or 
perhaps, the algorithm used by the code to generate the vertical lines 
is limited or not yet designed to properly handle hexagonal lattice.  So 
I feel the issue might not be due to the data toler /1.d-07/, but 
something to do with eps1, eps2, and eps3 formulas used on lines 67-69 
in bz_lin.f.


Currently, another way I can think of to remove the vertical lines as a 
workaround, would be to plot the bandstructure (using a less automated 
method; plotting more by hand) in another program, such as Origin [ 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg15255.html 
], using case.spaghetti_ene or use the Grace GUI (xmgrace) to edit by 
hand the agr file by selecting Plot->Axis properties followed by editing 
the "Tick location - Label" fields under the Special tab.


username@computername:~/wiendata/SrPtAs$ ls SrPtAs.struct
SrPtAs.struct
username@computername:~/wiendata/SrPtAs$ init_lapw -b
...
  init_lapw finished ok
username@computername:~/wiendata/SrPtAs$ run_lapw
...
in cycle 9    ETEST: .00017542   CTEST: .008216
hup: Command not found.
 LAPW0 END
 LAPW1 END
 LAPW2 END
 CORE  END
 MIXER END
ec cc and fc_conv 1 1 1

>   stop
username@computername:~/wiendata/SrPtAs$ cp 
$WIENROOT/SRC_templates/hcp.klist SrPtAs.klist_band

username@computername:~/wiendata/SrPtAs$ x lapw1 -band
 LAPW1 END
114.3u 2.9s 1:57.54 99.7% 0+0k 0+79704io 0pf+0w
username@computername:~/wiendata/SrPtAs$ x lapw2 -band -qtl
 LAPW2 END
16.5u 0.4s 0:17.00 99.7% 0+0k 8+51528io 1pf+0w
username@computername:~/wiendata/SrPtAs$ grepline_lapw :FER *.scf 1
in  1 files:
SrPtAs.scf::FER  : F E R M I - ENERGY(TETRAH.M.)=   0.5715462774
username@computername:~/wiendata/SrPtAs$ sed -n 9p SrPtAs.insp
1  0.  # Fermi switch,  Fermi-level (in Ry 
units)

username@computername:~/wiendata/SrPtAs$ gedit SrPtAs.insp
username@computername:~/wiendata/SrPtAs$ sed -n 9p SrPtAs.insp
1  0.5715462774  # Fermi switch, Fermi-level (in 
Ry units)

username@computername:~/wiendata/SrPtAs$ x spaghetti
 SPAGH: Read band energy from case.output1
 number of k-points read in case.vector=  61
SPAGH END
0.1u 0.0s 0:00.22 86.3% 0+0k 8+2000io 0pf+0w
username@computername:~/wiendata/SrPtAs$ cp SrPtAs.bands.agr 
7_SrPtAs.bands.agr

username@computername:~/wiendata/SrPtAs$ xmgrace 7_SrPtAs.bands.agr

*Change data toler  /1.d-07/ to /1.d-05/*

username@computername:~/WIEN2k/SRC_spaghetti$ wget 
https://raw.githubusercontent.com/gsabo/WIEN2k-Patches/master/17.1/bz_lin.patch

...
username@computername:~/WIEN2k/SRC_spaghetti$ patch -b bz_lin.f 
bz_lin.patch

patching file bz_lin.f
username@computername:~/WIEN2k/SRC_spaghetti$ make
username@computername:~/WIEN2k/SRC_spaghetti$ cp spaghetti ..
username@computername:~/WIEN2k/SRC_spaghetti$ cd ~/wiendata/SrPtAs/
username@computername:~/wiendata/SrPtAs$ x spaghetti
 SPAGH: Read band energy from case.output1
 number of k-points read in case.vector=  61
SPAGH END
0.1u 0.0s 0:00.19 100.0% 0+0k 0+2000io 0pf+0w
username@computername:~/wiendata/SrPtAs$ cp SrPtAs.bands.agr 
5_SrPtAs.bands.agr username@computername:~/wiendata/SrPtAs$ xmgrace 
5_SrPtAs.bands.agr


*Restore data toler back to /1.d-07/*

username@computername:~/WIEN2k/SRC_spaghetti$ mv bz_lin.f.orig bz_lin.f
username@computername:~/WIEN2k/SRC_spaghetti$ make clean
...
username@computername:~/WIEN2k/SRC_spaghetti$ make
...
username@computername:~/WIEN2k/SRC_spaghetti$ cp spaghetti ..
SrPtAs 
H   LATTICE,NONEQUIV.ATOMS:  3 194_P63/mmc 
MODE OF CALC=RELA unit=ang 
  8.121290  8.121290 17.174594 90.00 90.00120.00   
ATOM  -1: X=0. Y=0. Z=0.
  MULT= 2  ISPLIT= 4
  -1: X=0. Y=0. Z=0.5000
Sr NPT=  781  R0=0.1000 RMT=2.   Z: 38.000 
LOCAL ROT MATRIX:1.000 0.000 0.000
 0.000 1.000 0.000
 0.000 0.000 1.000
ATOM  -2: X=0. Y=0.6667 Z=0.2500
   

Re: [Wien] Extra vertical lines in bandstructure in spaghetti

2018-02-23 Thread Sergio Castillo Robles
Hi, thank you for your response,

I changed the data toler value from 1.d-07 to 1.d-05 by myself, and
recompiled with ./siteconfig, R Compile/Recompile, S Select program,
spaghetti

but the problem still persist.

Who should i send the files to?

Thanks for your answer and your time

Regards


2018-02-19 20:29 GMT-08:00 Gavin Abo :

> What did you change the data toler value to?  The 1.d-07 [
> https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg15787.html
> ] to 1.d-05 [ https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at
> /msg16402.html ]?
>
> You used bz_lin.patch [ https://github.com/gsabo/WIEN2
> k-Patches/tree/master/17.1 ] or changed bz_lin.f yourself (by hand)?
>
> How did you recompile?  make clean, make, cp spaghetti .. or ./siteconfig,
> R Compile/Recompile, S Select program, spaghetti?
>
> It may be that nobody can help further without having a case.struct and
> case.klist_band to reproduce the bandstructure like last time [
> https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg15781.html
> ].
>
>
> On 2/19/2018 3:23 PM, Sergio Castillo Robles wrote:
>
>> Hi dear Wien users,
>>
>> I would appreciate any help you could give me to solve this problem:
>>
>> I am running the latest version of wien2k, 17.1 in a computer with
>> Processor (CPU):   Intel(R) Core(TM)2 Extreme CPU Q6850 @ 3.00GHz
>> Speed:  1,998.00 MHz
>> Cores:  4 RAM: 2.0 GiB
>> OS:  Linux 2.6.31.14-0.8-default x86_64
>> System:  openSUSE 11.2 (x86_64)
>> KDE:  4.3.5 (KDE 4.3.5) "release 0"
>> SUSE Linux 4.4.1 gcc-4_4-branch revision 150839
>>
>> The problem occurs when i plot the bandstructure in wien2k following
>> the steps as the UG suggests, in the graph there are a bunch of
>> vertical lines between the M and K points, and the same lines appears
>> when i select the k-path with xcrysden. I have tried changing the value
>> in the bz_lin.f file as someone suggests but the issue continues.
>>
>> What is generating this extra lines?
>>
>> Thanks for your time. Best regards.
>>
> ___
> Wien mailing list
> Wien@zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> SEARCH the MAILING-LIST at:  http://www.mail-archive.com/wi
> e...@zeus.theochem.tuwien.ac.at/index.html
>
___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html


Re: [Wien] Extra vertical lines in bandstructure in spaghetti

2018-02-19 Thread Gavin Abo
What did you change the data toler value to?  The 1.d-07 [ 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg15787.html 
] to 1.d-05 [ 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg16402.html 
]?


You used bz_lin.patch [ 
https://github.com/gsabo/WIEN2k-Patches/tree/master/17.1 ] or changed 
bz_lin.f yourself (by hand)?


How did you recompile?  make clean, make, cp spaghetti .. or 
./siteconfig, R Compile/Recompile, S Select program, spaghetti?


It may be that nobody can help further without having a case.struct and 
case.klist_band to reproduce the bandstructure like last time [ 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg15781.html 
].


On 2/19/2018 3:23 PM, Sergio Castillo Robles wrote:

Hi dear Wien users,

I would appreciate any help you could give me to solve this problem:

I am running the latest version of wien2k, 17.1 in a computer with
Processor (CPU):   Intel(R) Core(TM)2 Extreme CPU Q6850 @ 3.00GHz
Speed:  1,998.00 MHz
Cores:  4 RAM: 2.0 GiB
OS:  Linux 2.6.31.14-0.8-default x86_64
System:  openSUSE 11.2 (x86_64)
KDE:  4.3.5 (KDE 4.3.5) "release 0"
SUSE Linux 4.4.1 gcc-4_4-branch revision 150839

The problem occurs when i plot the bandstructure in wien2k following
the steps as the UG suggests, in the graph there are a bunch of
vertical lines between the M and K points, and the same lines appears
when i select the k-path with xcrysden. I have tried changing the 
value in the bz_lin.f file as someone suggests but the issue continues.


What is generating this extra lines?

Thanks for your time. Best regards.

___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html