Re: [Wien] strange(?) LOPW - Error

2024-01-29 Thread Fecher, Gerhard
Thank you

Ciao
Gerhard

DEEP THOUGHT in D. Adams; Hitchhikers Guide to the Galaxy:
"I think the problem, to be quite honest with you,
is that you have never actually known what the question is."


Dr. Gerhard H. Fecher
Institut of Physics
Johannes Gutenberg - University
55099 Mainz

Von: Wien [wien-boun...@zeus.theochem.tuwien.ac.at] im Auftrag von Peter Blaha 
[peter.bl...@tuwien.ac.at]
Gesendet: Montag, 29. Januar 2024 09:38
An: wien@zeus.theochem.tuwien.ac.at
Betreff: Re: [Wien] strange(?) LOPW - Error

I crosschecked   lopw.f again.

It has a remark about an "experimental check", that not only the Overlap
matrix elements including phase factors are orthogonal, but already the
K-vectors are not linear dependent. The latter is a much faster check,
but maybe too restrictive.
When I remove this additional check, it runs through and the eigenvalues
look reasonable (and for k-vectors which run through, the eigenvalues
are identical (although the K attachments are different).

You may want to test this version.

Regards
Peter

Am 28.01.2024 um 12:20 schrieb Fecher, Gerhard:

--
--
Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-1-58801-165300
Email: peter.bl...@tuwien.ac.atWIEN2k: http://www.wien2k.at
WWW:   http://www.imc.tuwien.ac.at
-
___
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] strange(?) LOPW - Error

2024-01-29 Thread Peter Blaha

I crosschecked   lopw.f again.

It has a remark about an "experimental check", that not only the Overlap 
matrix elements including phase factors are orthogonal, but already the 
K-vectors are not linear dependent. The latter is a much faster check, 
but maybe too restrictive.
When I remove this additional check, it runs through and the eigenvalues 
look reasonable (and for k-vectors which run through, the eigenvalues 
are identical (although the K attachments are different).


You may want to test this version.

Regards
Peter

Am 28.01.2024 um 12:20 schrieb Fecher, Gerhard:

--
--
Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-1-58801-165300
Email: peter.bl...@tuwien.ac.atWIEN2k: http://www.wien2k.at
WWW:   http://www.imc.tuwien.ac.at
-  SUBROUTINE LOPW(NAT)
!
  use matrices, only: HSROWS, KZZ, XK, YK, ZK
  use lolog, only : nlo, ilo
  use lstapw, only  : NV
  use rotmat, only: ROTIJ, ROTLOC
  use struk, only : POS, MULT, NDF
  use parallel, only: myid,abort_parallel
  IMPLICIT NONE
  INCLUDE 'param.inc'
!
!Scalar Arguments
!
  INTEGERNAT
!
! ..
!
!generates the LAPW (K+G)-vector for local orbitals
!
! ..
!
!Locals
!
  INTEGERIA1, IEQ, IIX, INDEX, J, K, KOFF, L, LM, LMDN
  INTEGERLMUP, LMX, N, NATX, NATXX, NB, NBM
  INTEGERJLO,ipass
  DOUBLE PRECISION   HL, RKGM, SX, TPI, check
  DOUBLE PRECISION   ROTV1(3), ROTV2(3), VEC(3)
  COMPLEX*16 CC
!  COMPLEX*16 HH((LOMAX+1)**2*NDF,(LOMAX+1)**2*NDF)
  COMPLEX*16 HH((2*LOMAX+1)*48,(2*LOMAX+1)*48)
  COMPLEX*16 SF(NDF), YL(0:(LOMAX+1)**2) !,nv:HSROWS)
!
!External Subroutines
!
  EXTERNAL   ROTATE, YLM
!
!Intrinsic Functions
!
  INTRINSIC  ATAN, DCMPLX, DCONJG, EXP, SQRT
!
! ** Maybe Experiment **
  DOUBLE PRECISION  VEC2(3), TMP1, TMP2
!
  TPI = 8.0D+0*ATAN(1.0D+0)
!
  check=2.0D-2
  ipass=0
 1continue
  check=check/2.d0

  KOFF = NV
  IA1 = 0
  DO 140 N = 1, NAT
 DO 130 L = 0, LOMAX
!IF (LOOR(L,N)) THEN
do jlo=1,ilo(l,n)
   LMDN = L*L + 1
   LMUP = (L+1)*(L+1)
   INDEX = 0
   NB = 0
   NBM = MULT(N)*(1+LMUP-LMDN)
   DO 120 IEQ = 1, MULT(N)
  DO 110 LM = LMDN, LMUP
 NB = NB + 1
 K = KOFF + NB
   10CONTINUE
 INDEX = INDEX + 1
 IF (INDEX .GT. NV) GOTO 900
!  WRITE (6,*) 'INDEX,K,N,L,IEQ,LM',INDEX,K,N,L,IEQ,LM
 KZZ(1,K) = KZZ(1,INDEX)
 KZZ(2,K) = KZZ(2,INDEX)
 KZZ(3,K) = KZZ(3,INDEX)
 XK(K) = XK(INDEX)
 YK(K) = YK(INDEX)
 ZK(K) = ZK(INDEX)
 RKGM = SQRT(XK(K)*XK(K)+YK(K)*YK(K)+ZK(K)*ZK(K))
 IF (NBM .NE. 1) THEN
DO 20 NATX = 1, MULT(N)
   NATXX = IA1 + NATX
   SX = KZZ(1,K)*POS(1,NATXX) + &
KZZ(2,K)*POS(2,NATXX) + &
KZZ(3,K)*POS(3,NATXX)
!  SF(NATX) = EXP(DCMPLX(0.0D+0,TPI*SX))
   SF(NATX) = DCMPLX(DCOS(TPI*SX),DSIN(TPI*SX))
   20   CONTINUE
IIX = 0
DO 50 NATX = 1, MULT(N)
   IF (RKGM .LE. 1.0D-5) THEN
  DO 30 LMX = LMDN, LMUP
!YL(LMX-1,K) = (0.0D+0,0.0D+0)
 YL(LMX-1) = 0.0D0
   30 CONTINUE
! YL(0,K) = (1.0D+0,0.0D+0)
  YL(0) = 1.D0 
   ELSE
  VEC(1) = XK(K)
  VEC(2) = YK(K)
  VEC(3) = ZK(K)
  CALL ROTATE(VEC,ROTIJ(1,1,IA1+NATX),ROTV1)
  CALL ROTATE(ROTV1,ROTLOC(1,1,N),ROTV2)
  CALL YLM(ROTV2,LOMAX,YL(0)) !,K))
   ENDIF
   DO 40 LMX = LMDN, LMUP
  IIX = IIX + 1
  HH(IIX,NB) = SF(NATX)*YL(LMX-1) !,K)
   40  CONTINUE
   50   CONTINUE
IF (NB .NE. 1) THEN
   DO 80 J = 1, NB - 1
  CC = 

Re: [Wien] strange(?) LOPW - Error

2024-01-29 Thread Peter Blaha

Dear Gerhard,

This is (at least for me) a well known behavior.

We attach to each local orbital a fictitious plane wave with a k-vector 
K. In addition we require that LOs are orthogonal to each other and this 
requirement becomes a problem if you have many equivalent atoms (8 Ga in 
your case) and high l=2 (makes 5 d-LOs per atom) and a small RKmax, 
because then we run out of K vectors.
Maybe we are doing the orthogonality check too stupid and could reduce 
the requirements when running over equivalent atoms, but I've never 
tested this in details.


In your case, a quick test seems to run through when RKmax = 7.5 or bigger.
Alternatively, you may want to split the 8 Ga in 4+4 , but in such a way 
that more symmetry survives and not just in P1.


Peter

Am 28.01.2024 um 12:20 schrieb Fecher, Gerhard:

Hallo Peter,
I observed some unexpected (maybe strange) behaviour of lapw1 (Wien2k Version 
23.2 compiled with OneAPI 23.1)
I wanted to test if there is a ferro- or antiferromagnetic coupling in MnGa4

1) I started with the regular structure (just spin polarized) I m-3m  1 Mn atom 
4 Ga atoms (MnGa4_aexp.struct)
this one was running without problems (a small (ferro) magnetic moment of 0.6 
seems to exist, I did not check energy and higher precesions),

2) then I made the antiferromagnetic structure P m-3m  with 2 Mn atoms and 8 Ga 
atoms  (MnGa4_afm-failes.struct) and named the Mn by 1 and two
here the  LOPW - Error (at the Ga atom, see below),

3) I splitted the Ga atoms in two groups P 4mm with 2 Mn and 2x4 Ga atoms 
(MnGa4_afm-2.struct) and named both Mn and Ga toms to distinguish same.
this one was running without problems, too (an antiferromagnetic mpoment of 
+-1.2 muB seems to exist).
(indeed, this splitting doesn't make much sense, from symmetry point of view)

In all three cases the structure in reduced P1 symmetry has the same lattice 
parameters and positions (2 Mn and 8 Ga)
all calculations were simply initialized with precision 1, the parameters in 
case.in1 are principally always the same, changing the precesion or other 
parameters in case 2) did not help.
The error appeared independet on the magnetic setting in case.inst (ferro, 
antiferro, with and without magnetic moment at Ga).
(the same LOPW error appears when I replace Ga Z=31 by Ge Z=32 (not with Al or 
Au))

I wonder why this LOPW error appears in the P m-3m structure but not in the 
others.

(as the P 4mm structure has only 8 symmetry operations it would be faster to 
run the P m-3m structure (48 symmetry operations))

some detail of the error (note: running lapw1 -dn by hand has the same result 
as lapw1 -up):
the message at the end of case.scf1up (or output1up) is
:INFO  : LOPW-exhausted for atom3 PASS 1  had to reduce check 0.01
:INFO  : LOPW-exhausted for atom3 PASS 2  had to reduce check 0.005000
:INFO  : LOPW-exhausted for atom3 PASS 3  had to reduce check 0.002500
:INFO  : LOPW-exhausted for atom3 PASS 4  had to reduce check 0.001250
:INFO  : LOPW-exhausted for atom3 PASS 5  had to reduce check 0.000625

Ciao
  I don't expect an answer today, better have a nice weekend,
Gerhard


___
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


--
--
Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-1-58801-165300
Email: peter.bl...@tuwien.ac.atWIEN2k: http://www.wien2k.at
WWW:   http://www.imc.tuwien.ac.at
-
___
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