Commit 75a8b20f authored by Daniel Wortmann's avatar Daniel Wortmann

Refactored enpara datatype to include lodpot and io functionality

parent 3ca52c4f
......@@ -54,7 +54,6 @@ CONTAINS
USE m_rhonmtlo
USE m_mcdinit
USE m_sympsi
USE m_enpara, ONLY : w_enpara,mix_enpara
USE m_eparas ! energy parameters and partial charges
USE m_qal21 ! off-diagonal part of partial charges
USE m_abcof
......@@ -913,20 +912,12 @@ CONTAINS
qa21,den%mt)
DO ispin = jsp_start,jsp_end
WRITE (6,*) 'Energy Parameters for spin:',ispin
IF (.not.sliceplot%slice) THEN
CALL mix_enpara(&
ispin,atoms,vacuum,obsolete,input,&
enpara,&
vTot%mt(:,0,:,:),vTot%vacz(:,:,jspin),pvac(1,ispin),&
svac(1,ispin),&
ener(0,1,ispin),sqal(0,1,ispin),&
enerlo(1,1,ispin),&
sqlo(1,1,ispin))
CALL w_enpara(&
atoms,jspin,input%film,&
enpara,16)
IF (.NOT.sliceplot%slice) THEN
DO n=1,atoms%ntype
enpara%el1(0:3,n,ispin)=ener(0:3,n,ispin)/sqal(0:3,n,ispin)
enpara%ello1(:,n,ispin)=enerlo(:,n,ispin)/sqlo(:,n,ispin)
ENDDO
enpara%evac1(:,ispin)=pvac(:,ispin)/svac(:,ispin)
END IF
!---> check continuity of charge density
......@@ -968,5 +959,7 @@ CONTAINS
IF (vacuum%nstm.EQ.3) CALL juDFT_end("VACWAVE OK",mpi%irank)
END IF
END SUBROUTINE cdnval
END MODULE m_cdnval
......@@ -44,10 +44,10 @@ CONTAINS
COMPLEX, INTENT (IN) :: acof(:,0:,:)!(noccbd,0:dimension%lmd,atoms%nat)
COMPLEX, INTENT (IN) :: bcof(:,0:,:)!(noccbd,0:dimension%lmd,atoms%nat)
COMPLEX, INTENT (IN) :: m_mcd(:,:,:,:)!(dimension%nstd,(3+1)**2,3*ntypd ,2)
REAL, INTENT (OUT) :: enerlo(atoms%nlod,atoms%ntype),sqlo(atoms%nlod,atoms%ntype)
REAL, INTENT (OUT) :: ener(0:3,atoms%ntype),sqal(0:3,atoms%ntype)
REAL, INTENT (OUT) :: qal(0:,:,:)!(0:3,atoms%ntype,dimension%neigd)
REAL, INTENT (OUT) :: mcd(:,:,:)!(3*atoms%ntype,dimension%nstd,dimension%neigd)
REAL, INTENT (INOUT) :: enerlo(atoms%nlod,atoms%ntype),sqlo(atoms%nlod,atoms%ntype)
REAL, INTENT (INOUT) :: ener(0:3,atoms%ntype),sqal(0:3,atoms%ntype)
REAL, INTENT (INOUT) :: qal(0:,:,:)!(0:3,atoms%ntype,dimension%neigd)
REAL, INTENT (INOUT) :: mcd(:,:,:)!(3*atoms%ntype,dimension%nstd,dimension%neigd)
! ..
! .. Local Scalars ..
......
......@@ -46,8 +46,9 @@ inpgen/closure.f inpgen/lapw_input.f inpgen/struct_input.f inpgen/write_struct.
io/calculator.f global/ss_sym.f global/soc_sym.f math/inv3.f io/rw_symfile.f
global/sort.f init/kptgen_hybrid.f init/od_kptsgen.f init/bravais.f init/divi.f init/brzone.f
init/kptmop.f init/kpttet.f init/bandstr1.F init/ordstar.f init/fulstar.f init/kprep.f
init/tetcon.f init/kvecon.f init/boxdim.f math/ylm4.f
)
init/tetcon.f init/kvecon.f init/boxdim.f math/ylm4.f global/radsra.F math/intgr.F global/differ.f math/inwint.f
math/outint.f
)
set(inpgen_F90 ${inpgen_F90} global/constants.f90 io/xsf_io.f90
eigen/vec_for_lo.f90 eigen/orthoglo.F90 juDFT/usage_data.F90
......
......@@ -19,12 +19,10 @@ CONTAINS
!> The matrices generated and diagonalized here are of type m_mat as defined in m_types_mat.
!>@author D. Wortmann
SUBROUTINE eigen(mpi,stars,sphhar,atoms,obsolete,xcpot,&
sym,kpts,DIMENSION, vacuum, input, cell, enpara_in,enpara,banddos, noco, oneD,hybrid,&
sym,kpts,DIMENSION, vacuum, input, cell, enpara,banddos, noco, oneD,hybrid,&
it,eig_id,results,inden,v,vx)
USE m_constants, ONLY : pi_const,sfp_const
USE m_types
USE m_lodpot
USE m_apws
USE m_eigen_hssetup
USE m_pot_io
......@@ -49,7 +47,7 @@ CONTAINS
TYPE(t_dimension),INTENT(IN) :: DIMENSION
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_hybrid),INTENT(INOUT) :: hybrid
TYPE(t_enpara),INTENT(INOUT) :: enpara_in,enpara
TYPE(t_enpara),INTENT(INOUT) :: enpara
TYPE(t_obsolete),INTENT(IN) :: obsolete
TYPE(t_input),INTENT(IN) :: input
TYPE(t_vacuum),INTENT(IN) :: vacuum
......@@ -108,7 +106,10 @@ CONTAINS
!
call ud%init(atoms,DIMENSION%jspd)
ALLOCATE ( eig(DIMENSION%neigd),bkpt(3) )
PRINT *,enpara%el0(:,1,1)
PRINT *,enpara%el0(:,2,1)
!
! --> some parameters first
......@@ -124,13 +125,6 @@ CONTAINS
#endif
IF (mpi%irank.EQ.0) CALL openXMLElementFormPoly('iteration',(/'numberForCurrentRun','overallNumber '/),(/it,v%iter/),&
RESHAPE((/19,13,5,5/),(/2,2/)))
!
! set energy parameters (normally to that, what we read in)
!
CALL lodpot(mpi,atoms,sphhar,obsolete,vacuum,&
input, v%mt,v%vacz, enpara_in, enpara)
!
eig_id=open_eig(&
mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,kpts%nkpt,DIMENSION%jspd,atoms%lmaxd,&
......@@ -217,8 +211,8 @@ CONTAINS
results%te_hfex%valence = 2*results%te_hfex%valence
results%te_hfex%core = 2*results%te_hfex%core
END IF
enpara_in%epara_min = MINVAL(enpara%el0)
enpara_in%epara_min = MIN(MINVAL(enpara%ello0),enpara_in%epara_min)
enpara%epara_min = MINVAL(enpara%el0)
enpara%epara_min = MIN(MINVAL(enpara%ello0),enpara%epara_min)
END SUBROUTINE eigen
END MODULE m_eigen
......@@ -23,7 +23,6 @@ global/checkdop.F90
global/checkdopall.f90
global/chkmt.f90
global/convn.f90
global/enpara.f90
global/phasy1.f90
global/qfix.f90
global/radflo.F90
......
......@@ -16,10 +16,9 @@
!*********************************************************************
USE m_gkptwgt
USE m_constants
USE m_enpara, ONLY : r_enpara,default_enpara
USE m_types
use m_juDFT
USE m_juDFT
IMPLICIT NONE
! ..
TYPE(t_atoms),INTENT(IN) :: atoms
......@@ -42,46 +41,11 @@
!---> the energy parameters for l.ge.3 have the same value
!---> read from file 40='enpara' shz Jan.96
!
l_enpara = .FALSE.
INQUIRE (file ='enpara',exist= l_enpara)
IF (l_enpara) THEN
OPEN (40,file ='enpara',form='formatted',status='old')
DO jsp = 1,input%jspins
CALL r_enpara(&
& atoms,input,jsp,enpara)
ENDDO !dimension%jspd
CLOSE (40)
ELSE IF (.NOT.input%l_inpXML) THEN
WRITE(6,*) "No enpara file found, using default values"
enpara%el0(:,:,1)=0.0
enpara%el0(0,:,1)=-999999.0
enpara%lchange = .FALSE.
enpara%llochg = .FALSE.
enpara%lchg_v = .FALSE.
DO n = 1, atoms%ntype
l_clf = .FALSE.
WRITE(fname,"('corelevels.',i2.2)") NINT(atoms%zatom(n))
INQUIRE (file=fname, exist=l_clf)
IF(l_clf) THEN
WRITE(6,*) "corelevels file found: ", fname
WRITE(6,*) "This is incompatible to a missing enpara file."
WRITE(6,*) "Please generate an adequate enpara file by starting"
WRITE(6,*) "inpgen with the -genEnpara command line switch or"
WRITE(6,*) "use the XML input by starting FLEUR with -xmlInput or -xml."
CALL juDFT_error('corelevels file is incompatible with missing enpara file',calledby='inpeig')
END IF
enpara%skiplo(n,:) = 0
DO i = 1, atoms%nlo(n)
enpara%skiplo(n,:) = enpara%skiplo(n,1) + (2*atoms%llo(i,n)+1)
END DO
END DO
CALL default_enpara(1,atoms,enpara)
IF (input%jspins>1) THEN
enpara%el0(:,:,2)=enpara%el0(:,:,1)
enpara%ello0(:,:,2)=enpara%ello0(:,:,1)
ENDIF
IF (input%film) enpara%evac0 = eVac0Default_const
IF (.NOT.input%l_inpXML) THEN
!read enpara file if present!
CALL enpara%init(atoms,input%jspins)
CALL enpara%READ(atoms,input%jspins,input%film,.false.)
END IF
!
!---> read k-points from file 41='kpts'
......
......@@ -151,10 +151,6 @@ SUBROUTINE postprocessInput(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,&
WRITE (6,*) 'atoms%lapw_l(n) = ',atoms%lapw_l(iType)
END IF
enpara%skiplo(iType,:) = 0
DO j = 1, atoms%nlo(iType)
enpara%skiplo(iType,:) = enpara%skiplo(iType,1) + (2*atoms%llo(j,iType)+1)
END DO
END DO
! Check lda+u stuff (from inped)
......
......@@ -28,12 +28,11 @@
USE m_readrecord
USE m_setatomcore, ONLY : setatom_bystr, setcore_bystr
USE m_constants
USE m_enpara, ONLY : w_enpara,default_enpara
IMPLICIT NONE
TYPE(t_input),INTENT(INOUT) :: input
TYPE(t_enpara),INTENT(INOUT) :: enpara
TYPE(t_enpara),INTENT(OUT) :: enpara
TYPE(t_atoms),INTENT(INOUT) :: atoms
! ... Arguments ...
......@@ -373,18 +372,7 @@
IF ( ANY(atoms%bmu(:) > 0.0) ) input%jspins=2
ALLOCATE (enpara%el0(0:3,atoms%ntype,input%jspins))
ALLOCATE (enpara%evac0(2,input%jspins))
ALLOCATE (enpara%lchange(0:3,atoms%ntype,input%jspins))
ALLOCATE (enpara%lchg_v(2,input%jspins))
ALLOCATE (enpara%skiplo(atoms%ntype,input%jspins))
ALLOCATE (enpara%ello0(atoms%nlod,atoms%ntype,input%jspins))
ALLOCATE (enpara%llochg(atoms%nlod,atoms%ntype,input%jspins))
ALLOCATE (enpara%enmix(input%jspins))
enpara%el0 = -9999.9
enpara%ello0 = -9999.9
enpara%evac0 = eVac0Default_const
call enpara%init(atoms,input%jspins)
DO n = 1, atoms%ntype
CALL setcore_bystr(
......@@ -672,10 +660,6 @@ c in s and p states equal occupation of up and down states
ENDDO
DO j = 1, input%jspins
CALL default_enpara(j,atoms,enpara)
END DO
DO n = 1, atoms%ntype
! correct valence charge
DO i = 1,atoms%nlo(n)
......@@ -702,13 +686,7 @@ c in s and p states equal occupation of up and down states
IF(juDFT_was_argument("-genEnpara")) THEN
lmaxdTemp = atoms%lmaxd
atoms%lmaxd = 3
OPEN (40,file='enpara',form='formatted',status='unknown') ! write out an enpara-file
DO j = 1, input%jspins
OPEN (42)
CALL w_enpara(atoms,j,input%film,enpara,42)
CLOSE (42,status='delete')
ENDDO
CLOSE (40)
CALL enpara%write(atoms,input%jspins,input%film)
atoms%lmaxd = lmaxdTemp
END IF
......
......@@ -479,8 +479,6 @@
END IF !xml output
DEALLOCATE (noco%l_relax,noco%b_con,noco%alphInit,noco%alph,noco%beta)
DEALLOCATE (enpara%el0,enpara%evac0,enpara%lchange,enpara%lchg_v)
DEALLOCATE (enpara%skiplo,enpara%ello0,enpara%llochg,enpara%enmix)
DEALLOCATE (atoms%ulo_der)
IF (ANY(kpts%nkpt3(:).NE.0)) THEN
......
......@@ -35,8 +35,6 @@ SUBROUTINE r_inpXML(&
USE m_constants
USE m_inpeig
USE m_sort
USE m_enpara, ONLY : r_enpara
IMPLICIT NONE
TYPE(t_input),INTENT(INOUT) :: input
......@@ -673,12 +671,8 @@ SUBROUTINE r_inpXML(&
!!! End of calculationSetup section
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ALLOCATE(enpara%evac0(2,input%jspins))
ALLOCATE(enpara%lchg_v(2,input%jspins),enpara%skiplo(atoms%ntype,input%jspins))
ALLOCATE(enpara%enmix(input%jspins))
enpara%lchg_v = .FALSE.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Start of cell section
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......@@ -1271,22 +1265,16 @@ SUBROUTINE r_inpXML(&
atoms%nlod = max(atoms%nlod,2) ! for chkmt
ALLOCATE(atoms%llo(atoms%nlod,atoms%ntype))
ALLOCATE(atoms%ulo_der(atoms%nlod,atoms%ntype))
ALLOCATE(enpara%ello0(atoms%nlod,atoms%ntype,input%jspins))
ALLOCATE(enpara%llochg(atoms%nlod,atoms%ntype,input%jspins))
ALLOCATE(enpara%el0(0:atoms%lmaxd,atoms%ntype,input%jspins))
ALLOCATE(enpara%lchange(0:atoms%lmaxd,atoms%ntype,input%jspins))
ALLOCATE(atoms%l_dulo(atoms%nlod,atoms%ntype)) ! For what is this?
enpara%el0 = 0.0
enpara%ello0 = 0.0
enpara%lchange = .FALSE.
enpara%llochg = .FALSE.
dimension%nstd = 29
ALLOCATE(atoms%coreStateOccs(dimension%nstd,2,atoms%ntype))
ALLOCATE(atoms%coreStateNprnc(dimension%nstd,atoms%ntype))
ALLOCATE(atoms%coreStateKappa(dimension%nstd,atoms%ntype))
CALL enpara%init(atoms,input%jspins)
DO iSpecies = 1, numSpecies
ALLOCATE(speciesLLO(speciesNLO(iSpecies)))
ALLOCATE(speciesLOeParams(speciesNLO(iSpecies)))
......@@ -1969,11 +1957,7 @@ SUBROUTINE r_inpXML(&
l_enpara = .FALSE.
INQUIRE (file ='enpara',exist= l_enpara)
IF (l_enpara) THEN
OPEN (40,file ='enpara',form='formatted',status='old')
DO jsp = 1,input%jspins
CALL r_enpara(atoms,input,jsp,enpara)
END DO !dimension%jspd
CLOSE (40)
CALL enpara%READ(atoms,input%jspins,input%film,.FALSE.)
END IF
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......
......@@ -86,7 +86,7 @@ CONTAINS
TYPE(t_sliceplot):: sliceplot
TYPE(t_banddos) :: banddos
TYPE(t_obsolete) :: obsolete
TYPE(t_enpara) :: enpara,enpara_out
TYPE(t_enpara) :: enpara
TYPE(t_xcpot) :: xcpot
TYPE(t_results) :: results
TYPE(t_kpts) :: kpts
......@@ -271,8 +271,9 @@ CONTAINS
CALL timestart("generation of hamiltonian and diagonalization (total)")
CALL timestart("eigen")
vTemp = vTot
CALL enpara%update(mpi,atoms,vacuum,input,vToT)
CALL eigen(mpi,stars,sphhar,atoms,obsolete,xcpot,&
sym,kpts,DIMENSION,vacuum,input,cell,enpara,enpara_out,banddos,noco,oneD,hybrid,&
sym,kpts,DIMENSION,vacuum,input,cell,enpara,banddos,noco,oneD,hybrid,&
it,eig_id,results,inDenRot,vTemp,vx)
vTot%mmpMat = vTemp%mmpMat
!!$ eig_idList(pc) = eig_id
......@@ -301,7 +302,7 @@ CONTAINS
! WRITE(6,fmt='(A)') 'Starting 2nd variation ...'
IF (noco%l_soc.AND..NOT.noco%l_noco) &
CALL eigenso(eig_id,mpi,DIMENSION,stars,vacuum,atoms,sphhar,&
obsolete,sym,cell,noco,input,kpts, oneD,vTot,enpara_out)
obsolete,sym,cell,noco,input,kpts, oneD,vTot,enpara)
CALL timestop("generation of hamiltonian and diagonalization (total)")
#ifdef CPP_MPI
......@@ -378,7 +379,7 @@ CONTAINS
outDen%iter = inDen%iter
CALL cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
DIMENSION,kpts,atoms,sphhar,stars,sym,obsolete,&
enpara_out,cell,noco,vTot,results,oneD,coreSpecInput,&
enpara,cell,noco,vTot,results,oneD,coreSpecInput,&
archiveType,outDen)
IF ( noco%l_soc .AND. (.NOT. noco%l_noco) ) DIMENSION%neigd=DIMENSION%neigd/2
......@@ -432,6 +433,7 @@ CONTAINS
IF (mpi%irank.EQ.0) THEN
! ----> mix input and output densities
CALL timestart("mixing")
CALL enpara%mix(atoms,vacuum,input,vTot%mt(:,0,:,:),vtot%vacz)
CALL mix(stars,atoms,sphhar,vacuum,input,sym,cell,noco,oneD,hybrid,archiveType,inDen,outDen,results)
CALL timestop("mixing")
......
......@@ -254,22 +254,19 @@
ALLOCATE ( atoms%rmsh(atoms%jmtd,atoms%ntype),atoms%rmt(atoms%ntype),stars%sk2(stars%ng2),stars%sk3(stars%ng3) )
ALLOCATE ( stars%phi2(stars%ng2) )
ALLOCATE ( atoms%taual(3,atoms%nat),atoms%volmts(atoms%ntype),atoms%zatom(atoms%ntype) )
ALLOCATE ( enpara%el0(0:atoms%lmaxd,atoms%ntype,DIMENSION%jspd) )
ALLOCATE ( enpara%evac0(2,DIMENSION%jspd),stars%rgphs(-stars%mx1:stars%mx1,-stars%mx2:stars%mx2,-stars%mx3:stars%mx3) )
ALLOCATE ( stars%rgphs(-stars%mx1:stars%mx1,-stars%mx2:stars%mx2,-stars%mx3:stars%mx3) )
ALLOCATE ( results%force(3,atoms%ntype,DIMENSION%jspd) )
ALLOCATE ( results%force_old(3,atoms%ntype) )
ALLOCATE ( kpts%bk(3,kpts%nkpt),kpts%wtkpt(kpts%nkpt) )
ALLOCATE ( stars%pgfft(0:DIMENSION%nn3d-1),stars%pgfft2(0:DIMENSION%nn2d-1) )
ALLOCATE ( stars%ufft(0:27*stars%mx1*stars%mx2*stars%mx3-1) )
ALLOCATE ( atoms%bmu(atoms%ntype),atoms%vr0(atoms%ntype) )
ALLOCATE ( enpara%lchange(0:atoms%lmaxd,atoms%ntype,DIMENSION%jspd) )
ALLOCATE ( enpara%lchg_v(2,DIMENSION%jspd),atoms%l_geo(atoms%ntype) )
ALLOCATE ( atoms%nlo(atoms%ntype),atoms%llo(atoms%nlod,atoms%ntype),enpara%skiplo(atoms%ntype,DIMENSION%jspd) )
ALLOCATE ( enpara%ello0(atoms%nlod,atoms%ntype,DIMENSION%jspd),enpara%llochg(atoms%nlod,atoms%ntype,DIMENSION%jspd) )
ALLOCATE ( atoms%l_geo(atoms%ntype) )
ALLOCATE ( atoms%nlo(atoms%ntype),atoms%llo(atoms%nlod,atoms%ntype) )
ALLOCATE ( atoms%lo1l(0:atoms%llod,atoms%ntype),atoms%nlol(0:atoms%llod,atoms%ntype),atoms%lapw_l(atoms%ntype) )
ALLOCATE ( noco%alphInit(atoms%ntype),noco%alph(atoms%ntype),noco%beta(atoms%ntype),noco%l_relax(atoms%ntype) )
ALLOCATE ( noco%b_con(2,atoms%ntype),atoms%lda_u(atoms%ntype),atoms%l_dulo(atoms%nlod,atoms%ntype) )
ALLOCATE ( enpara%enmix(DIMENSION%jspd),sym%d_wgn(-3:3,-3:3,3,sym%nop) )
ALLOCATE ( sym%d_wgn(-3:3,-3:3,3,sym%nop) )
ALLOCATE ( atoms%ulo_der(atoms%nlod,atoms%ntype) )
ALLOCATE ( atoms%numStatesProvided(atoms%ntype))
ALLOCATE ( kpts%ntetra(4,kpts%ntet), kpts%voltet(kpts%ntet))
......
......@@ -16,7 +16,6 @@ SUBROUTINE stden(mpi,sphhar,stars,atoms,sym,DIMENSION,vacuum,&
input,cell,xcpot,obsolete,noco,oneD)
USE m_constants
USE m_enpara, ONLY : w_enpara
USE m_xcall, ONLY : vxcall
USE m_qsf
USE m_checkdopall
......@@ -73,18 +72,9 @@ SUBROUTINE stden(mpi,sphhar,stars,atoms,sym,DIMENSION,vacuum,&
ALLOCATE ( rat(DIMENSION%msh,atoms%ntype),eig(DIMENSION%nstd,DIMENSION%jspd,atoms%ntype) )
ALLOCATE ( rh(DIMENSION%msh,atoms%ntype,DIMENSION%jspd),rh1(DIMENSION%msh,atoms%ntype,DIMENSION%jspd) )
ALLOCATE ( enpara%ello0(atoms%nlod,atoms%ntype,input%jspins),vacpar(2) )
ALLOCATE ( enpara%el0(0:3,atoms%ntype,input%jspins))
ALLOCATE ( enpara%lchange(0:3,atoms%ntype,input%jspins))
ALLOCATE ( enpara%skiplo(atoms%ntype,input%jspins))
ALLOCATE ( enpara%llochg(atoms%nlod,atoms%ntype,input%jspins))
ALLOCATE ( enpara%enmix(input%jspins))
ALLOCATE ( enpara%evac0(2,dimension%jspd))
ALLOCATE ( enpara%lchg_v(2,dimension%jspd))
ALLOCATE ( vbar(2,atoms%ntype),sigm(vacuum%nmzd) )
ALLOCATE ( rhoss(DIMENSION%msh,DIMENSION%jspd) )
enpara%enmix=1.0
IF (mpi%irank == 0) THEN
! if sigma is not 0.0, then divide this charge among all atoms
......@@ -231,7 +221,8 @@ SUBROUTINE stden(mpi,sphhar,stars,atoms,sym,DIMENSION,vacuum,&
! set up parameters for enpara-file
IF ((juDFT_was_argument("-genEnpara")).AND..NOT.l_enpara) THEN
OPEN (40,file='enpara',form='formatted',status='unknown')
CALL enpara%init(atoms,input%jspins)
enpara%lchange = .TRUE.
enpara%llochg = .TRUE.
......@@ -337,17 +328,12 @@ SUBROUTINE stden(mpi,sphhar,stars,atoms,sym,DIMENSION,vacuum,&
enpara%enmix = 1.0
END IF
! write enpara-file
enpara%evac0(:,ispin)=vacpar(:SIZE(enpara%evac0,1))
CALL w_enpara(atoms,ispin,input%film,enpara,16)
END DO ! ispin
CLOSE (40) ! enpara file
CALL enpara%WRITE(atoms,input%jspins,input%film)
END IF
DEALLOCATE (rat,eig,rh,rh1)
DEALLOCATE (rhoss,vacpar,vbar,sigm)
DEALLOCATE (enpara%ello0,enpara%el0,enpara%lchange)
DEALLOCATE (enpara%skiplo,enpara%llochg,enpara%enmix,enpara%evac0)
END IF ! mpi%irank == 0
END SUBROUTINE stden
......
This diff is collapsed.
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