Commit 0e6ba4e0 authored by Daniel Wortmann's avatar Daniel Wortmann

Work on defaults

parent 63ded4ad
......@@ -49,11 +49,8 @@ CONTAINS
LOGICAL, INTENT(OUT):: l_opti
INTEGER, ALLOCATABLE :: atomTypeSpecies(:)
INTEGER, ALLOCATABLE :: speciesRepAtomType(:)
CHARACTER(len=3), ALLOCATABLE :: noel(:)
! .. Local Scalars ..
INTEGER :: i,n,l,m1,m2,isym,iisym,numSpecies,pc,iAtom,iType
INTEGER :: i,n,l,m1,m2,isym,iisym,pc,iAtom,iType
COMPLEX :: cdum
CHARACTER(len=4) :: namex
CHARACTER(len=12) :: relcor, tempNumberString
......@@ -218,17 +215,15 @@ CONTAINS
WRITE(*,*) 'Also the generated XML input file is not meant to be'
WRITE(*,*) 'beautiful.'
WRITE(*,*) ''
ALLOCATE(noel(atoms%ntype),atomTypeSpecies(atoms%ntype),speciesRepAtomType(atoms%ntype))
ALLOCATE(hybrid%lcutm1(atoms%ntype),hybrid%lcutwf(atoms%ntype),hybrid%select1(4,atoms%ntype))
filename = 'inpConverted.xml'
DO i = 1, atoms%nat
WRITE(atoms%label(i),'(i0)') i
END DO
ALLOCATE(atoms%speciesName(atoms%ntype))
DO iType = 1, atoms%ntype
noel(iType) = namat_const(atoms%nz(iType))
atomTypeSpecies(iType) = iType
speciesRepAtomType(iType) = iType
WRITE(tempNumberString,'(i0)') iType
atoms%speciesName(itype) = TRIM(ADJUSTL(namat_const(atoms%nz(iType)))) // '-' // TRIM(ADJUSTL(tempNumberString))
hybrid%lcutm1(iType) = 4
hybrid%lcutwf(iType) = atoms%lmax(iType) - atoms%lmax(iType) / 10
hybrid%select1(:,iType) = (/4, 0, 4, 2 /)
......@@ -239,27 +234,17 @@ CONTAINS
hybrid%lexp = 16
hybrid%bands1 = max( nint(input%zelec)*10, 60 )
numSpecies = SIZE(speciesRepAtomType)
ALLOCATE(atoms%speciesName(numSpecies))
atoms%speciesName = ''
DO i = 1, numSpecies
tempNumberString = ''
WRITE(tempNumberString,'(i0)') i
atoms%speciesName(i) = TRIM(ADJUSTL(noel(speciesRepAtomType(i)))) // '-' // TRIM(ADJUSTL(tempNumberString))
END DO
a1(:) = a1(:) / input%scaleCell
a2(:) = a2(:) / input%scaleCell
a3(:) = a3(:) / input%scaleCell
kpts%specificationType = 3
sym%symSpecType = 3
CALL w_inpXML(&
atoms,obsolete,vacuum,input,stars,sliceplot,forcetheo,banddos,&
atoms,vacuum,input,stars,sliceplot,forcetheo,banddos,&
cell,sym,xcpot,noco,oneD,hybrid,kpts,kpts%nkpt3,kpts%l_gamma,&
noel,namex,relcor,a1,a2,a3,cell%amat(3,3),input%comment,&
atomTypeSpecies,speciesRepAtomType,.FALSE.,filename,&
.TRUE.,numSpecies,enpara)
DEALLOCATE(atoms%speciesName, atoms%label)
DEALLOCATE(noel,atomTypeSpecies,speciesRepAtomType)
namex,relcor,a1,a2,a3,cell%amat(3,3),input%comment,&
.FALSE.,filename,&
.TRUE.,enpara)
CALL juDFT_end("Fleur inp to XML input conversion completed.")
END IF
END IF ! mpi%irank.eq.0
......
......@@ -71,11 +71,11 @@ PROGRAM inpgen
!All atom related parameters are set here. Note that some parameters might
!have been set in the read_input call before by adding defaults to the atompar module
CALL make_atomic_defaults(cell,atoms)
CALL make_atomic_defaults(input,vacuum,cell,oneD,atoms)
!Set all defaults that have not been specified before or can not be specified in inpgen
call make_defaults(atoms,vacuum,input,stars,sliceplot,forcetheo,banddos,&
& cell,sym,xcpot,noco,oneD,hybrid,kpts)
cell,sym,xcpot,noco,oneD,hybrid,kpts)
!
!Now the IO-section
......@@ -83,13 +83,13 @@ PROGRAM inpgen
!the inp.xml file
CALL w_inpxml(&
& atoms,vacuum,input,stars,sliceplot,forcetheo,banddos,&
& cell,sym,xcpot,noco,oneD,hybrid,kpts,&
& div,l_gamma,& !should be in kpts!?
& namex,relcor,dtild_opt,name_opt,&!?should be somewhere...
& l_outFile,"inp.xml",&
& l_explicit,enpara)
atoms,vacuum,input,stars,sliceplot,forcetheo,banddos,&
cell,sym,xcpot,noco,oneD,hybrid,kpts,&
div,l_gamma,& !should be in kpts!?
namex,relcor,dtild_opt,name_opt,&!?should be somewhere...
l_outFile,"inp.xml",&
l_explicit,enpara)
!the sym.xml file
CALL write_sym()
......
......@@ -9,49 +9,19 @@ MODULE m_make_atomic_defaults
IMPLICIT NONE
CONTAINS
SUBROUTINE make_atomic_defaults(atoms,sym)
CHARACTER(len=1) :: lotype(0:3)=(/'s','p','d','f'/)
ALLOCATE (atomTypeSpecies(atoms%ntype))
ALLOCATE (speciesRepAtomType(atoms%nat))
ALLOCATE (atoms%speciesName(atoms%nat))
elementNumSpecies = 0
numSpecies = 0
speciesRepAtomType = -1
atomTypeSpecies = -1
atoms%speciesName = ''
DO i = 1, atoms%nat
newSpecies = .TRUE.
DO j = 1, i-1
IF(atomid(i).EQ.atomid(j)) THEN
newSpecies = .FALSE.
atomTypeSpecies(natype(i)) = atomTypeSpecies(natype(j))
EXIT
END IF
END DO
IF(newSpecies) THEN
numSpecies = numSpecies + 1
speciesRepAtomType(numSpecies) = natype(i)
atomTypeSpecies(natype(i)) = numSpecies
element = nint(atoms%zatom(natype(i)))
elementNumSpecies(element) = elementNumSpecies(element) + 1
tempNumberString = ''
WRITE(tempNumberString,'(i0)') elementNumSpecies(element)
atoms%speciesName(numSpecies) = &
TRIM(ADJUSTL(namat_const(element))) // '-' // TRIM(ADJUSTL(tempNumberString))
END IF
END DO
DATA xmlCoreRefOccs /2,2,2,4,2,2,4,2,4,6,2,4,2,4,6,2,4,2,6,8,4,&
& 6,2,4,2,6,8,4,6/
xmlElectronStates = noState_const
xmlPrintCoreStates = .FALSE.
xmlCoreOccs = 0.0
SUBROUTINE make_atomic_defaults(input,vacuum,cell,oneD,atoms)
USE m_check_mt_radii
USE m_atompar
TYPE(t_atoms),INTENT(INOUT) :: atoms
TYPE(t_input),INTENT(IN) :: input
TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_oneD),INTENT(IN) :: oneD
INTEGER :: i,l
CHARACTER(len=1) :: lotype(0:3)=(/'s','p','d','f'/)
TYPE(t_atompar):: ap
atoms%nlod=9 ! This fixed dimensioning might have to be made more dynamical!
ALLOCATE(atoms%nz(atoms%ntype))
......@@ -100,7 +70,7 @@ CONTAINS
atoms%nlo(n)len_TRIM(ap%lo)/2
DO i=1,atoms%nlo
DO l = 0, 3
IF (ap%lo(2*i:2*) == lotype(l)) atoms%llo(i,n) = l
IF (ap%lo(2*i:2*i) == lotype(l)) atoms%llo(i,n) = l
ENDDO
ENDDO
atoms%ulo_der(:,n)=.FALSE.
......@@ -119,7 +89,5 @@ CONTAINS
END DO
END SUBROUTINE make_atomic_defaults
END MODULE m_make_atomic_defaults
......@@ -12,8 +12,8 @@ MODULE m_make_defaults
! help in the out-file. gb`02
!---------------------------------------------------------------------
CONTAINS
SUBROUTINE make_defaults(atoms,vacuum,input,stars,sliceplot,forcetheo,banddos,&
& cell,sym,xcpot,noco,oneD,hybrid,kpts)
SUBROUTINE make_defaults(atoms,vacuum,input,stars,&
& cell,sym,xcpot,noco,hybrid,kpts)
& title
USE m_types
......@@ -61,48 +61,21 @@ CONTAINS
! Set parameters to defaults that can not be given to inpgen
ch_rw = 'w'
sym%namgrp= 'any '
banddos%dos = .false. ; banddos%l_mcd = .false. ; banddos%unfoldband = .FALSE. ; input%secvar = .false.
input%vchk = .false. ; input%cdinf = .false.
input%l_bmt= .false. ; input%eonly = .false.
input%gauss= .false. ; input%tria = .false.
sliceplot%slice= .false. ; input%swsp = .false.
input%lflip= .false. ; banddos%vacdos= .false. ; input%integ = .false.
sliceplot%iplot= .false. ; input%score = .false. ; sliceplot%plpot = .false.
input%pallst = .false. ; obsolete%lwb = .false. ; vacuum%starcoeff = .false.
input%strho = .false. ; input%l_f = .false.
noco%l_noco = noco%l_ss ; input%jspins = 1
input%itmax = 9 ; input%maxiter = 99 ; input%imix = 7 ; input%alpha = 0.05
input%preconditioning_param = 0.0 ; input%minDistance = 1.0e-5
input%spinf = 2.0 ; obsolete%lepr = 0 ; input%coretail_lmax = 0
sliceplot%kk = 0 ; sliceplot%nnne = 0 ; vacuum%nstars = 0 ; vacuum%nstm = 0
vacuum%nstars = 0 ; vacuum%nstm = 0
nu = 5 ; vacuum%layerd = 1 ; iofile = 6
ALLOCATE(vacuum%izlay(vacuum%layerd,2))
banddos%ndir = 0 ; vacuum%layers = 0 ; vacuum%izlay(:,:) = 0
banddos%e_mcd_lo = -10.0 ; banddos%e_mcd_up = 0.0
vacuum%layers = 0 ; vacuum%izlay(:,:) = 0
input%epsdisp = 0.00001 ; input%epsforce = 0.00001 ; input%forcealpha = 1.0 ; input%forcemix=0
sliceplot%e1s = 0.0 ; sliceplot%e2s = 0.0 ; banddos%e1_dos = 0.5 ; banddos%e2_dos = -0.5 ; input%tkb = 0.001
banddos%sig_dos = 0.015 ; vacuum%tworkf = 0.0 ; input%scaleCell = 1.0 ; scpos = 1.0
input%scaleA1 = 1.0 ; input%scaleA2 = 1.0 ; input%scaleC = 1.0
vacuum%tworkf = 0.0 ; scpos = 1.0
zc = 0.0 ; vacuum%locx(:) = 0.0 ; vacuum%locy(:) = 0.0
kpts%numSpecialPoints = 0
input%ldauLinMix = .FALSE. ; input%ldauMixParam = 0.05 ; input%ldauSpinf = 1.0
input%l_wann = .FALSE.
input%gw = 0
!+odim
oneD%odd%mb = 0 ; oneD%odd%M = 0 ; oneD%odd%m_cyl = 0 ; oneD%odd%chi = 0 ; oneD%odd%rot = 0
oneD%odd%k3 = 0 ; oneD%odd%n2d= 0 ; oneD%odd%nq2 = 0 ; oneD%odd%nn2d = 0
oneD%odd%nop = 0 ; oneD%odd%kimax2 = 0 ; oneD%odd%nat = 0
oneD%odd%invs = .false. ; oneD%odd%zrfs = .false. ; oneD%odd%d1 = .false.
!-odim
input%delgau = input%tkb
DO i = 1, 10
j = (i-1) * 8 + 1
input%comment(i) = title(j:j+7)
ENDDO
input%comment = title
IF (noco%l_noco) input%jspins = 2
......@@ -127,13 +100,10 @@ CONTAINS
!HF added for HF and hybrid functionals
hybrid%gcutm1 = input%rkmax - 0.5
hybrid%tolerance1 = 1e-4
ALLOCATE(hybrid%lcutwf(atoms%ntype))
ALLOCATE(hybrid%lcutm1(atoms%ntype))
ALLOCATE(hybrid%select1(4,atoms%ntype))
hybrid%lcutwf = atoms%lmax - atoms%lmax / 10
hybrid%ewaldlambda = 3
hybrid%lexp = 16
hybrid%lcutm1 = 4
hybrid%select1(1,:) = 4
hybrid%select1(2,:) = 0
......@@ -216,9 +186,6 @@ CONTAINS
ALLOCATE(noco%alphInit(atoms%ntype),noco%alph(atoms%ntype),noco%beta(atoms%ntype))
IF (noco%l_ss) input%ctail = .FALSE.
noco%l_mperp = .FALSE.
noco%l_constr = .FALSE.
noco%mix_b = 0.0
noco%qss = merge(noco%qss,[0.0,0.0,0.0],noco%l_ss)
noco%l_relax(:) = .FALSE.
......
......@@ -98,6 +98,8 @@ CONTAINS
LOGICAL :: kptGamma, l_relcor,ldummy
INTEGER :: iAtomType
CHARACTER(len=100) :: xPosString, yPosString, zPosString
CHARACTER(len=20),ALLOCATABLE :: speciesName(:)
! REAL :: tempTaual(3,atoms%nat)
TYPE(t_econfig) :: econf
......@@ -262,12 +264,8 @@ CONTAINS
DO i = 1, LEN(TRIM(ADJUSTL(valueString)))
IF (valueString(i:i) == ACHAR(10)) valueString(i:i) = ' ' !remove line breaks
END DO
valueString = TRIM(ADJUSTL(valueString))
DO i = 1, 10
j = (i-1) * 8 + 1
input%comment(i) = valueString(j:j+7)
END DO
input%comment = TRIM(ADJUSTL(valueString))
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Start of calculationSetup section
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......@@ -1354,8 +1352,8 @@ input%preconditioning_param = evaluateFirstOnly(xmlGetAttributeValue('/fleurInpu
DO iType = 1, atoms%ntype
WRITE(xPathA,*) '/fleurInput/atomGroups/atomGroup[',iType,']/@species'
atom%speciesName(iType) = TRIM(ADJUSTL(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA)))))
IF(TRIM(ADJUSTL(speciesName(iSpecies))).EQ.TRIM(ADJUSTL(atom%speciesName(iType)))) THEN
atoms%speciesName(iType) = TRIM(ADJUSTL(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA)))))
IF(TRIM(ADJUSTL(speciesName(iSpecies))).EQ.TRIM(ADJUSTL(atoms%speciesName(iType)))) THEN
atoms%nz(iType) = atomicNumber
atoms%zatom(iType) = atoms%nz(iType)
IF (atoms%nz(iType).EQ.0) THEN
......
......@@ -11,7 +11,7 @@
SUBROUTINE rw_inp(&
& ch_rw,atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
& cell,sym,xcpot,noco,oneD,hybrid,kpts,&
& noel,namex,relcor,a1,a2,a3,dtild_opt,name_opt)
& noel,namex,relcor,a1,a2,a3,dtild_opt)!,name_opt)
!*********************************************************************
!* This subroutine reads or writes an inp - file on unit iofile *
......@@ -46,11 +46,11 @@
CHARACTER(len=4),INTENT(OUT) :: namex
CHARACTER(len=12),INTENT(OUT):: relcor
REAL,INTENT(IN),OPTIONAL :: dtild_opt
CHARACTER(len=8),INTENT(IN),OPTIONAL:: name_opt(10)
!CHARACTER(len=8),INTENT(IN),OPTIONAL:: name_opt(10)
CHARACTER(len=8) :: name(10)
CHARACTER(len=80) :: name
!+lda+u
REAL u,j
......@@ -87,7 +87,7 @@
CHARACTER (len=1) :: check
IF (PRESENT(dtild_opt)) dtild=dtild_opt
IF (PRESENT(name_opt)) name=name_opt
!IF (PRESENT(name_opt)) name=name_opt
! Initialize variables
l_hyb = .false.
......
......@@ -60,7 +60,7 @@ SUBROUTINE w_inpXML(&
INTEGER :: iSpecies, fileNum
CHARACTER(len=8) :: name(10)
INTEGER :: numSpecies
INTEGER :: speciesRepAtomType(numSpecies)
INTEGER :: speciesRepAtomType(atoms%ntype)
CHARACTER(len=20):: speciesNames(atoms%ntype)
LOGICAL :: known_species
......@@ -438,7 +438,7 @@ SUBROUTINE w_inpXML(&
speciesNames=''
numSpecies=0
DO n=1,atoms%ntype
known_species=any(trim(adjustl(atoms%speciesname(n)))==trim(adjustl(speciesNames(:numSpecies))))
known_species=ANY(atoms%speciesname(n)==speciesNames(:numSpecies))
if (.not.known_species) THEN
numSpecies=numSpecies+1
speciesNames(numSpecies)=atoms%speciesname(n)
......@@ -455,7 +455,7 @@ SUBROUTINE w_inpXML(&
! <species name="Si-1" element="Si" atomicNumber="14" coreStates="4" magMom="0.0" flipSpin="F">
300 FORMAT(' <species name="',a,'" element="',a,'" atomicNumber="',i0,'" magMom="',f0.8,'" flipSpin="',l1,'">')
speciesName = TRIM(ADJUSTL(atoms%speciesName(iSpecies)))
WRITE (fileNum,300) TRIM(ADJUSTL(speciesName)),TRIM(ADJUSTL(namat_const(nint(atoms%nz(iAtomType)+1)))),atoms%nz(iAtomType),atoms%bmu(iAtomType),atoms%nflip(iAtomType)
WRITE (fileNum,300) TRIM(ADJUSTL(speciesName)),TRIM(ADJUSTL(namat_const(atoms%nz(iAtomType)+1))),atoms%nz(iAtomType),atoms%bmu(iAtomType),atoms%nflip(iAtomType)
! <mtSphere radius="2.160000" gridPoints="521" logIncrement="0.022000"/>
310 FORMAT(' <mtSphere radius="',f0.8,'" gridPoints="',i0,'" logIncrement="',f0.8,'"/>')
......@@ -525,10 +525,9 @@ SUBROUTINE w_inpXML(&
WRITE (fileNum,'(a)') ' <atomGroups>'
na = 0
DO iAtomType=1, atoms%ntype
iSpecies = atomTypeSpecies(iAtomType)
! <atomGroup species="Si-1">
330 FORMAT(' <atomGroup species="',a,'">')
speciesName = TRIM(ADJUSTL(atoms%speciesName(iSpecies)))
speciesName = TRIM(ADJUSTL(atoms%speciesName(iAtomType)))
WRITE (fileNum,330) TRIM(ADJUSTL(speciesName))
DO ieq=1,atoms%neq(iAtomType)
......
......@@ -178,7 +178,6 @@
atoms,obsolete,vacuum,input,stars,sliceplot,banddos,DIMENSION,forcetheo,field,&
cell,sym,xcpot,noco,oneD,hybrid,kpts,enpara,coreSpecInput,wann,&
noel,namex,relcor,a1,a2,a3,dtild,&
atomTypeSpecies,speciesRepAtomType,&
l_kpts)
END IF
CALL mpi_bc_xcpot(xcpot,mpi)
......@@ -198,11 +197,11 @@
filename = ''
numSpecies = SIZE(speciesRepAtomType)
CALL w_inpXML(&
atoms,obsolete,vacuum,input,stars,sliceplot,forcetheo,banddos,&
atoms,vacuum,input,stars,sliceplot,forcetheo,banddos,&
cell,sym,xcpot,noco,oneD,hybrid,kpts,kpts%nkpt3,kpts%l_gamma,&
noel,namex,relcor,a1,a2,a3,dtild,input%comment,&
atomTypeSpecies,speciesRepAtomType,.TRUE.,filename,&
.TRUE.,numSpecies,enpara)
namex,relcor,a1,a2,a3,dtild,input%comment,&
.TRUE.,filename,&
.TRUE.,enpara)
DEALLOCATE(atomTypeSpecies,speciesRepAtomType)
DEALLOCATE(xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs)
......
set(fleur_F77 ${fleur_F77}
)
)
set(fleur_F90 ${fleur_F90}
types/types.F90
types/types_mat.F90
......@@ -28,6 +28,12 @@ types/types_gpumat.F90
types/types_econfig.F90
types/types_cell.f90
types/types_sym.f90
types/types_input.f90
types/types_sliceplot.f90
types/types_oneD.f90
types/types_hybrid.f90
types/types_noco.f90
types/types_banddos.f90
)
set(inpgen_F90 ${inpgen_F90}
......
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_types_banddos
TYPE t_banddos
LOGICAL :: dos =.false.
LOGICAL :: band =.false.
LOGICAL :: l_mcd =.false.
LOGICAL :: l_orb =.false.
LOGICAL :: vacdos =.false.
INTEGER :: ndir =0
INTEGER :: orbCompAtom=0
REAL :: e1_dos=0.5
REAL :: e2_dos=-0.5
REAL :: sig_dos=0.015
REAL :: e_mcd_lo =-10.0
REAL :: e_mcd_up= 0.0
LOGICAL :: unfoldband =.false.
INTEGER :: s_cell_x
INTEGER :: s_cell_y
INTEGER :: s_cell_z
REAL :: alpha,beta,gamma !For orbital decomp. (was orbcomprot)
END TYPE t_banddos
END MODULE m_types_banddos
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_types_hybrid
TYPE t_hybrid
LOGICAL :: l_hybrid = .false.
LOGICAL :: l_subvxc = .false.
LOGICAL :: l_calhf = .false.
LOGICAL :: l_addhf = .false.
INTEGER :: ewaldlambda =3
INTEGER :: lexp =16
INTEGER :: bands1 !Only read in
INTEGER :: nbasp
INTEGER :: maxlcutm1
INTEGER :: maxindxm1
INTEGER :: maxbasm1
INTEGER :: maxindxp1
INTEGER :: maxgptm
INTEGER :: maxgptm1
INTEGER :: maxindx
INTEGER :: maxlmindx
INTEGER :: gptmd
INTEGER, ALLOCATABLE :: nindx(:, :)
INTEGER, ALLOCATABLE :: select1(:, :)
INTEGER, ALLOCATABLE :: lcutm1(:)
INTEGER, ALLOCATABLE :: nindxm1(:, :)
INTEGER, ALLOCATABLE :: gptm(:, :)
INTEGER, ALLOCATABLE :: ngptm1(:)
INTEGER, ALLOCATABLE :: pgptm1(:, :)
INTEGER, ALLOCATABLE :: ngptm(:)
INTEGER, ALLOCATABLE :: pgptm(:, :)
INTEGER, ALLOCATABLE :: lcutwf(:)
INTEGER, ALLOCATABLE :: map(:, :)
INTEGER, ALLOCATABLE :: tvec(:, :, :)
INTEGER, ALLOCATABLE :: nbasm(:)
REAL :: gcutm1
REAL :: tolerance1 = 1e-4 !only read in
REAL, ALLOCATABLE :: basm1(:, :, :, :)
COMPLEX, ALLOCATABLE :: d_wgn2(:, :, :, :)
INTEGER, ALLOCATABLE :: ne_eig(:), nbands(:), nobd(:) !alloc in eigen_HF_init
REAL, ALLOCATABLE :: div_vv(:, :, :)
END TYPE t_hybrid
END MODULE m_types_hybrid
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_types_input
TYPE t_input
LOGICAL :: film=.false.
INTEGER:: jspins=1
LOGICAL:: total
REAL :: rkmax
REAL :: zelec
LOGICAL :: strho =.FALSE.
LOGICAL :: cdinf =.false.
LOGICAL :: vchk =.false.
LOGICAL :: l_f =.false.
LOGICAL :: eonly =.false.
LOGICAL :: ctail =.true.
INTEGER :: coretail_lmax =0
INTEGER :: itmax =9
REAL :: minDistance=1.0e-5
INTEGER :: maxiter=99
INTEGER :: imix=7
INTEGER :: gw=0
INTEGER :: gw_neigd=0
INTEGER :: qfix=0
REAL :: forcealpha =1.0 !< mixing parameter for geometry optimzer
REAL :: epsdisp =0.00001!< minimal displacement. If all displacements are < epsdisp stop
REAL :: epsforce =0.00001!< minimal force. If all forces <epsforce stop
REAL :: force_converged=0.00001
INTEGER :: forcemix=3
REAL :: delgau =0.001 !TODO = tkb?
REAL :: alpha=0.05
REAL :: preconditioning_param=0.0
REAL :: spinf=2.0
REAL :: tkb=0.001
LOGICAL :: gauss=.false.
LOGICAL :: l_bmt=.false.
!INTEGER:: scale
INTEGER:: kcrel =0
LOGICAL:: frcor =.false. !frozen core
LOGICAL:: lflip=.false.
LOGICAL:: score=.false.
LOGICAL:: swsp=.false.
LOGICAL:: tria=.false.
LOGICAL:: integ=.false.
LOGICAL:: pallst=.false.
LOGICAL:: l_coreSpec=.false.
LOGICAL:: l_wann=.false.
LOGICAL:: secvar=.false.
LOGICAL:: evonly=.false.
LOGICAL:: l_inpXML=.true.
REAL :: scaleCell=1.0
REAL :: scaleA1=1.0
REAL :: scaleA2=1.0
REAL :: scaleC=1.0
REAL :: ellow=-1.8
REAL :: elup=1.0
REAL :: fixed_moment = 0.0
CHARACTER(LEN=100) :: comment="FLEUR calculation without a title"
REAL, POINTER :: sigma !this is the difference in charge due to the electric field it points to the value stored in t_efield
LOGICAL :: l_core_confpot=.true. !Former CPP_CORE
LOGICAL :: l_useapw=.false.
LOGICAL :: ldauLinMix=.false.
REAL :: ldauMixParam=0.1
REAL :: ldauSpinf=2.0
LOGICAL :: l_rdmft=.false.
REAL :: rdmftOccEps=0.0
INTEGER :: rdmftStatesBelow=0
INTEGER :: rdmftStatesAbove=0
INTEGER :: rdmftFunctional=0
END TYPE t_input
END MODULE m_types_input
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_types_noco
TYPE t_noco
LOGICAL:: l_ss= .FALSE.
LOGICAL:: l_soc= .FALSE.
LOGICAL:: l_noco = .FALSE.
LOGICAL:: l_mperp = .FALSE.
LOGICAL:: l_constr = .FALSE.
LOGICAL:: l_mtNocoPot = .FALSE.
REAL :: qss(3)=[0.,0.,0.]
REAL :: mix_b=0.0
LOGICAL:: l_spav= .FALSE.
REAL :: theta=0.0
REAL :: phi=0.0
LOGICAL, ALLOCATABLE :: l_relax(:)
REAL, ALLOCATABLE :: alphInit(:)
REAL, ALLOCATABLE :: alph(:)
REAL, ALLOCATABLE :: beta(:)
REAL, ALLOCATABLE :: b_con(:, :)
REAL, ALLOCATABLE :: socscale(:)
END TYPE t_noco
END MODULE m_types_noco
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_types_oneD
! types for 1D calculations
TYPE od_dim
LOGICAL :: d1=.false.
INTEGER :: mb=0, M=0, k3=0, m_cyl=0
INTEGER :: chi=0, rot=0
LOGICAL :: invs=.false., zrfs=.false.
INTEGER :: n2d=0, nq2=0, nn2d=0
INTEGER :: kimax2
INTEGER :: nop=0, nat=0
END TYPE od_dim
TYPE od_inp
LOGICAL :: d1
INTEGER :: mb, M, k3, m_cyl
INTEGER :: chi, rot
LOGICAL :: invs, zrfs
INTEGER :: n2d, nq2, nn2d
INTEGER :: kimax2
INTEGER, POINTER :: ig(:, :) !(-k3:k3,-M:M)
INTEGER, POINTER :: kv(:, :) !(2,n2d)
INTEGER, POINTER :: nst2(:) !(n2d)
END TYPE od_inp
TYPE od_sym
INTEGER :: nop, nat
INTEGER, POINTER :: ngopr(:) !(nat)
REAL, POINTER :: mrot(:, :, :) !(3,3,nop)
REAL, POINTER :: tau(:, :) !(3,nop)
INTEGER, POINTER :: invtab(:) !(nop)
INTEGER, POINTER :: multab(:, :) !(nop,nop)
END TYPE od_sym
TYPE od_lda
INTEGER :: nn2d
INTEGER, POINTER :: igf(:, :) !(0:nn2d-1,2)
REAL, POINTER :: pgf(:) !(0:nn2d-1)
END TYPE od_lda
TYPE od_gga
INTEGER :: nn2d
REAL, POINTER :: pgfx(:) ! (0:nn2d-1)
REAL, POINTER :: pgfy(:)
REAL, POINTER :: pgfxx(:)
REAL, POINTER :: pgfyy(:)
REAL, POINTER :: pgfxy(:)
END TYPE od_gga
TYPE t_oneD
TYPE(od_dim) :: odd
TYPE(od_inp) :: odi
TYPE(od_sym) :: ods
TYPE(od_lda) :: odl
TYPE(od_gga) :: odg
INTEGER, POINTER :: ig1(:, :)
INTEGER, POINTER :: kv1(:, :)
INTEGER, POINTER :: nstr1(:)
INTEGER, POINTER :: ngopr1(:)
REAL, POINTER :: mrot1(:, :, :)
REAL, POINTER :: tau1(:, :)
INTEGER, POINTER :: invtab1(:)
INTEGER, POINTER :: multab1(:, :)
INTEGER, POINTER :: igfft1(:, :)
REAL, POINTER :: pgfft1(:)
REAL, POINTER :: pgft1x(:)
REAL, POINTER :: pgft1y(:)
REAL, POINTER :: pgft1xx(:)