[Wien] small errors in tetra.f

2014-09-24 Thread Peter Blaha

I've found 3 problems in tetra.f, which are fixed in the attached file.

a) When you have only 1 k-point, tetra switches correctly to 
Gauss-broadening, but used a broadening parameter from case.in3 (3rd 
line) without checking if it is non-zero. Zero broadening leads to NaNs 
in the DOS.

b) The array TEXT should be allocated with (0:...)
c) format 1030 changed for correct headers in the dos files.

Regards
--

  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/staff/tc_group_e.php
--
 PROGRAM TETRA 
!   
!   D E N S I T YO FS T A T E S 
!   ACTUAL VERSION  with BLOECHL SCHEME
!   
  use reallocate
  INCLUDE 'param.inc'
  CHARACTER *7  A7 
  CHARACTER *9  A9,B9   
  CHARACTER *20 TITLE   
  CHARACTER*96,allocatable :: TEXT(:) 
  CHARACTER *70 SYSTEM  
  CHARACTER*11  FORM,STATUS 
  CHARACTER*180  FNAME,fname1,fname2
  CHARACTER*80  errfn
  character*2   fnameupdn,fnum2
  character*1   fnum1 ,abrsw
!   
  real*4,allocatable :: RNUMB(:,:), DENSTY(:,:),dsum(:)
  real*4  fermden(MG)
  COMMON /NCOUNT/ NNOC  
  real*4,pointer :: EBS(:,:), FC(:,:,:)
  CHARACTER *14  DOSTYP(MG)  
  DIMENSION IDOS(MG,2)
  real*4,allocatable :: QTL(:,:),xqtl(:,:)  
  real*4,allocatable :: ehelp(:),denbr(:,:)
  integer,allocatable :: isumdos(:,:)
  logical rxes,rxesw,enefile
  common /rxescom/ rxes,rxesw
!   
  DATA PI /3.141592654/, EEF /0.0/  
!   
!  call getarg(2,fname)
  rxes=.false.
  rxesw=.false.
  enefile=.false.
  CALL GTFNAM(fname,ERRFN)
!  if(fname.eq.'  ') call getarg(1,fname)
  OPEN(1,FILE=fname,STATUS='OLD',ERR=8000)
 8003 READ(1,*,END=8001) IUNIT,FNAME,STATUS,FORM,IRECL
  OPEN(IUNIT,FILE=FNAME,STATUS=STATUS,FORM=FORM,ERR=8002)
 if(iunit.eq.7) then
   do i=180,5,-1
 if(fname(i:i).eq.'1') then
   nnchar=i-1
   fname1(1:i-1)=fname(1:i-1)
   fnameupdn=''
   GOTO 8003
 else if(fname(i:i).eq.'p') then
   nnchar=i-3
   fname1(1:i-3)=fname(1:i-3)
   fnameupdn='up'
   GOTO 8003
 else if(fname(i:i).eq.'n') then
   nnchar=i-3
   fname1(1:i-3)=fname(1:i-3)
   fnameupdn='dn'
   GOTO 8003
 endif
   enddo
 endif
 if(iunit.eq.108) then
   enefile=.true.
   kspin=2
   if(fnameupdn.eq.'') kspin=1
 endif
 if(iunit.eq.8) then
   rxes=.true.
   read(8,'(a)')system
   write(6,'(RXES spectroscopy for,a )') system
 endif
 if(iunit.eq.9) then
   rxesw=.true.
   write(6,'(RXES spectroscopy weight file case.rxes calculated)')
 endif
  GOTO 8003
 8000 WRITE(*,*) ' ERROR IN OPENING TETRA.DEF '
  STOP 'TETRA.DEF'
 8002 WRITE(*,*) ' ERROR IN OPENING UNIT:',IUNIT
  WRITE(*,*) '   FILENAME: ',FNAME,'  STATUS: ',STATUS,'  FORM:',FORM
  STOP 'OPEN FAILED'
 8001 CONTINUE
  CLOSE (1)
!-- 
  READ(5,1) TITLE
  IAV=0
  NPRINT=1
! MI=1000   
  eef=999. 
!  EEF=0.  
! NST  number of k points   
! IAV  0 NO PLOT OTHERWISE DOS AVERAGED OVER IAV VALUES 
! NPRINT   0 NO DOS PRINTED 
!  1 DOS AND INTEGRATED DOS PRINTED 
! NYMINLOWER BAND INDEX 
! NYMAXUPPER BAND INDEX 
! 

[Wien] octave3

2014-09-24 Thread John Rundgren

Dear WIEN2k team,

Problem with octave sshift:
t1=loadstruct(GaAs.struct)
t2=makeconventional(t1)
t3=sshift(t2,1,[0.0 0.0 0.1])

sshift makes no operation and t3=t2. The full content of t2 and t3 are 
written out on the screen, so t3=t2 is easily seen.


On the screen a diagnosis appears:
octave:4 t3=sshift(t2,1,[0.0 0.0 0.1])
sh: 1: tcsh: not found
cp: cannot stat ‘tmpsave.struct_ncmsym’: No such file or directory
sh: 1: tcsh: not found
cp: cannot stat ‘tmpsave.struct_ncmsym’: No such file or directory
smultatom:  no spgroup specified, sym. op. are generated
showequivalent:  no spgroup specified, sym. op. are generated
warning: showequivalent: some elements in list of return values are 
undefined


My WIEN2k is successfully installed with .bashrc.
How can one get sshift going?
Regards,
John Rundgren

___
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] octave3

2014-09-24 Thread Peter Blaha
Apparently you have installed a csh (needed for all our *_lapw scripts), 
but not a tcsh.

In most modern systems these are anyway the same.

Solutions:
a) Install a tcsh on your system

b) fix the source code:

In $WIENROOT/SRC_structeditor/bin

search for all lines with tcsh:

 grep tcsh *.m

It gives a list where tcsh occurs:

savestruct.m:system(tcsh -c 'xncm ncmsymmetry -f tmpsave 
-nomm   error.ncmsym' );
showstruct.m:#  system(tcsh -c 'struct2dx -nomm -new -f s  
error.struct2dx', 1 , async);
showstruct.m:  system(tcsh -c 'xcrysden --wien_struct s.struct  
error.xcrysden', 1);
showstruct.m:#  system(tcsh -c 'xcrysden --wien_struct s.struct  
error.xcrysden', 1 , async);
showstruct.m:#  system(tcsh -c 'VESTA $PWD/s.struct  
error.VESTA', 1 , async);

s

You can ignore the commented lines, but need to edit

savestruct.m and showstruct.m

and replace   tcsh by csh

Please let me know if it works.
I'll probably modify the sources for the next release.

Regards

On 09/24/2014 12:15 PM, John Rundgren wrote:

Dear WIEN2k team,

Problem with octave sshift:
 t1=loadstruct(GaAs.struct)
 t2=makeconventional(t1)
 t3=sshift(t2,1,[0.0 0.0 0.1])

sshift makes no operation and t3=t2. The full content of t2 and t3 are
written out on the screen, so t3=t2 is easily seen.

On the screen a diagnosis appears:
octave:4 t3=sshift(t2,1,[0.0 0.0 0.1])
sh: 1: tcsh: not found
cp: cannot stat ‘tmpsave.struct_ncmsym’: No such file or directory
sh: 1: tcsh: not found
cp: cannot stat ‘tmpsave.struct_ncmsym’: No such file or directory
smultatom:  no spgroup specified, sym. op. are generated
showequivalent:  no spgroup specified, sym. op. are generated
warning: showequivalent: some elements in list of return values are
undefined

My WIEN2k is successfully installed with .bashrc.
How can one get sshift going?
Regards,
John Rundgren

___
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/staff/tc_group_e.php
--
___
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] wien2wannier with wien2k.14.1

2014-09-24 Thread Peter Blaha

It is a matter of taste how one wants to do it.

The UTF-8 character set has nice features with special characters, for 
instance displays z^2 really with a superscript 2.


On the other hand, when using   putty  from home, I had the same 
problem as you and unreadable characters appear as output and sometimes 
the messages are completely scrambled.


It should not affect basic functionality (except when you cannot read 
some help-instruction).


On 09/24/2014 03:32 AM, Zhu, Jianxin wrote:

All,

Sorry for disturbing you this afternoon.

After a few more times of struggling, I pinned down the root cause to be
with the setting of xterm under x11.
With the correction, the problem disappears. Of course, we still need to

setenv LANG en_US.UTF-8


on the linux cluster if the UTF-8 is not set as default, if we remotely
log onto it.

Cheers,

Jianxin




On 9/23/14 12:22 PM, Zhu, Jianxin jx...@lanl.gov wrote:


Hi Elias,

As you suggested earlier, I pulled this issue to the mailing list.

After I downloaded wien2k.14.1 integrated with wien2wannier, even before
compilation/installation, I noticed many strange characters displayed
inside the wien2wannier90 script files, for example, near the end of
init_w2w_lapw

OPTIONS:
-b  -  batch mode (do not ask questions)
-numk   -  number of k-points (default: 100; can also use â~@~\Nx Ny
Nzâ~@~])
-emin,-emax -  select bands by energy (needs â~@~Xoutput1â~@~Y file;
careful!)
-all X Y-  synonym for â~@~X-emin X -emax Yâ~@~Y
-bands I J  -  select bands directly (more robust)
-proj   -  specification of initial projections (â~@~\Amnâ~@~])
-w90-  Wannier90 options to set

â~@~XOPTIONSâ~@~Y  are only  operative  in batch  mode,  except
â~@~X-w90â~@~Y,  which
accepts as arguments  key-value pairs to be put  into â~@~Xcase.winâ~@~Y.
The
sp/so  switches  are  usually  unnecessary  (detected  automatically).
theend

exit 0



I did some file type check (with the suggestion of Matt Jones at Univ.
Buffalo) ---

/wien2k.14.1] jxzhu% file --mime init_lapw
init_lapw: text/x-shellscript; charset=us-ascii


/wien2k.14.1] jxzhu% file --mime init_w2w_lapw
init_w2w_lapw: text/x-shellscript; charset=utf-8



It looks the charset used for wien2wannier90 scripts is different than the
rest of wien2k scripts.

As such, I manually set

setenv LANG en_US.UTF-8

in the login shell script file. Then I see the following ---

OPTIONS:
-b  -  batch mode (do not ask questions)
-numk   -  number of k-points (default: 100; can also use âNx Ny Nzâ
file; careful!)
-all X Y-  synonym for â
-bands I J  -  select bands directly (more robust)
-proj   -  specification of initial projections (âAmnâ  are only
operative  in batch  mode,  except â,  which
accepts as arguments  key-value pairs to be put  into â.  The
sp/so  switches  are  usually  unnecessary  (detected  automatically).
theend

exit 0



With the manual setting of UTF-8, I still see characters like hat{a} and
the item like -w90 is missing in the display.
As such, I am not sure what I get in whatever way is correct.


I tested this issue on my Mac OSX machine, but also saw the strange
characters on my linux cluster.


Kevin, I appreciate if you can help me check this on your mac osx machine.


Cheers,

Jianxin




On 7/1/14 5:34 AM, Elias Assmann elias.assm...@gmail.com wrote:


Dear wien2wannier Users!

A new version of the package is available at
http://www.ifp.tuwien.ac.at/forschung/arbeitsgruppen/cms/software-downlo
a
d/wien2wannier/.

This is a minor update that fixes a few bugs, including one in
Œwplot2xsf¹ that caused it to crash.

--
Elias Assmann (TU Wien)

Wien2Wannier: maximally localized Wannier functions
   from linearized augmented plane waves

http://www.ifp.tuwien.ac.at/forschung/arbeitsgruppen/cms/software-downlo
a
d/wien2wannier/

___
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


___
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


___
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/staff/tc_group_e.php

Re: [Wien] wien2wannier with wien2k.14.1

2014-09-24 Thread Elias Assmann

On 09/24/2014 03:32 AM, Zhu, Jianxin wrote:

Sorry for disturbing you this afternoon.


It is for me to apologize for inflicting this problem on you (and on 
other wien2wannier users, I fear) through my choice to use UTF-8 
characters in some wien2wannier messages.  I chose to use those 
characters because they were nice for formatting the names of orbitals 
for the initial projections in `write_inwf' (like Peter's example `z²'), 
and because I thought that support for them should be pretty much 
universal on any modern system.


Of course I was aware that there might be a few people it would fail 
for, but not that it would fail so badly.  (You showed that not only are 
the Unicode characters displayed wrongly, but ASCII character between 
them are deleted: `-emin X -emax Y' [substituting apostrophes for the 
offending Unicode quote marks] becomes â!)


I will shortly provide an ASCIIized version of wien2wannier, and avoid 
non-ASCII characters in future versions.  (Of course, the Right Thing 
would be to make the programs aware of the locale settings and adjust 
the messages accordingly, as many tools do these days ...)



After a few more times of struggling, I pinned down the root cause to be
with the setting of xterm under x11.
With the correction, the problem disappears. Of course, we still need to

setenv LANG en_US.UTF-8


on the linux cluster if the UTF-8 is not set as default, if we remotely
log onto it.


On my machine, experimentation shows that it is a question of the locale 
settings in effect when the terminal is started.  I.e.,


$ unset LANG
$ xterm

gives me a terminal that displays the characters wrongly, but just 
changing it in the current shell


[old terminal] $ xterm
[new xterm]$ unset LANG

does not change the behavior.

Also, xterm showed the problem while my standard terminal application 
does not.



Elias

___
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