Commit 31c2a140 authored by Daniel Wortmann's avatar Daniel Wortmann

Fix for the determination of LOs. Zn was given a "2-d" LO, which created an infinite loop.

Changed the defaults in atom_input.f and added some timers&stops to prevent this in future.
parent f90923dd
......@@ -83,6 +83,7 @@ CONTAINS
ENDDO
node = nqn - (l+1)
IF (node<0) CALL judft_error("Error in setup of energy-parameters",hint="This could e.g. happen if you try to use 1p-states")
e = 0.0
! determine upper edge
nodeu = -1 ; start = .TRUE.
......@@ -91,9 +92,11 @@ CONTAINS
atoms%dx(n),atoms%jri(n),c, us,dus,nodeu,f(:,1),f(:,2))
IF ( ( nodeu > node ) .AND. start ) THEN
e = e - 1.0
IF (e<-1E10) CALL judft_error("Determination of energy parameters did not converge",hint="Perhaps your potential is broken?")
nodeu = -1
ELSE
e = e + 0.01
IF (e>1E10) CALL judft_error("Determination of energy parameters did not converge",hint="Perhaps your potential is broken?")
start = .FALSE.
ENDIF
ENDDO
......@@ -106,6 +109,7 @@ CONTAINS
CALL radsra(e,l,vr(:),atoms%rmsh(1,n),&
atoms%dx(n),atoms%jri(n),c, us,dus,nodeu,f(:,1),f(:,2))
e = e - 0.01
IF (e<-1E10) CALL judft_error("Determination of energy parameters did not converge",hint="Perhaps your potential is broken?")
ENDDO
e_lo = e
ELSE
......@@ -196,6 +200,7 @@ CONTAINS
ENDDO
! search for branches
node = ABS(nqn) - (l+1)
IF (node<0) CALL judft_error("Error in setup of energy-parameters",hint="This could e.g. happen if you try to use 1p-states")
e = 0.0 ! The initial value of e is arbitrary.
large_e_step = 5.0 ! 5.0 Htr steps for coarse energy searches
......
......@@ -928,14 +928,14 @@ c in s and p states equal occupation of up and down states
!Defaults
ncst1 =(/0,0, 0, ! Va,H,He
+ 01, 01, 1, 1, 1, 1, 1, 1, ! Li - Ne
+ 304,304, 4, 4, 4, 4, 4, 4, ! Na - Ar
+ 307,307,307,307,307,307,307,307,207,207, 7,409,409,409,409,409,
+ 01, 01, 1, 1, 1, 1, 1, 1, ! Li - Ne
+ 304,304, 4, 4, 4, 4, 4, 4, ! Na - Ar
+ 307,307,307,307,307,307,307,307,207,207, 7, 7,409,409,409,409,
+ 409, 9, ! K - Kr
+ 312,312,312,312,312,312,312,212,212,212,312,414,414,414,414,414,
+ 312,312,312,312,312,312,312,212,212,212,312,212,414,414,414,414,
+ 414,414, ! Rb - Xe
+ 317,317,217,217,217,217,217,217,217,217,217,17, 17,17,17,17,17, ! Cs - Lu
+ 1119,1119,319,319,219,219,219,219,619,421,421,421,421,421,421, ! Hf - Rn
+ 1119,1119,319,319,219,219,219,219,219,421,421,421,421,421,421, ! Hf - Rn
+ 324,324,224,224,224,24,24,24,24,24,24,24, 24,24,24,24,24/) ! Fr - Lw
if (judft_was_argument("-fast_defaults"))
......
......@@ -243,7 +243,9 @@ CONTAINS
CALL timestart("generation of hamiltonian and diagonalization (total)")
CALL timestart("eigen")
vTemp = vTot
CALL timestart("Updating energy parameters")
CALL enpara%update(mpi,atoms,vacuum,input,vToT)
CALL timestop("Updating energy parameters")
CALL eigen(mpi,stars,sphhar,atoms,obsolete,xcpot,sym,kpts,DIMENSION,vacuum,input,&
cell,enpara,banddos,noco,oneD,hybrid,iter,eig_id,results,inDen,vTemp,vx)
vTot%mmpMat = vTemp%mmpMat
......
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