Commit 2bfe64ec authored by Daniel Wortmann's avatar Daniel Wortmann

Small changes to enable reading of inp.xml by inpgen2

parent eee69a96
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
l_gga,noel, kmax,dtild,dvac1,lmax1,jri1,rmt1,dx1,&!optional, if l_gga and ... are present suggestions are calculated l_gga,noel, kmax,dtild,dvac1,lmax1,jri1,rmt1,dx1,&!optional, if l_gga and ... are present suggestions are calculated
overlap)!this is optional, if present and l_test the routine returns the overlaps and does not stop overlap)!this is optional, if present and l_test the routine returns the overlaps and does not stop
USE m_types USE m_types_fleurinput
USE m_sort USE m_sort
USE m_inv3 USE m_inv3
USE m_juDFT USE m_juDFT
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
! 0. Do initializations and set some constants ! 0. Do initializations and set some constants
! 1. Locally replace unit cell by an auxiliary unit cell with: ! 1. Locally replace unit cell by an auxiliary unit cell with:
! a) all atoms within the unit cell ! a) all atoms within the unit cell
! b) basis vectors obtained by lattice reduction of the original cell. ! b) basis vectors obtained by lattice reduction of the original cell.
! [not in 1st (this) version of routine. Can be implemented with the LLL algorithm when needed.] ! [not in 1st (this) version of routine. Can be implemented with the LLL algorithm when needed.]
! 2. Get minimal and maximal coordinates within auxiliary unit cell ! 2. Get minimal and maximal coordinates within auxiliary unit cell
! 3. Construct mesh of cubes covering the auxiliary unit cell and a boundary of width 2*rmtMax + rmtDelta ! 3. Construct mesh of cubes covering the auxiliary unit cell and a boundary of width 2*rmtMax + rmtDelta
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
END DO END DO
END DO END DO
END DO END DO
! 3. Construct cube mesh: ! 3. Construct cube mesh:
! In each dimension cube i covers the interval from i*cubeLength to (i+1)*cubeLength ! In each dimension cube i covers the interval from i*cubeLength to (i+1)*cubeLength
! Each cube may cover up to maxCubeAtoms atoms. This should be set to a save size. ! Each cube may cover up to maxCubeAtoms atoms. This should be set to a save size.
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
END DO END DO
END DO END DO
! 5. For each atom type in auxiliary unit cell select cube and collect shortest distances ! 5. For each atom type in auxiliary unit cell select cube and collect shortest distances
! to other atoms in neighborhood ! to other atoms in neighborhood
maxSqrDist = cubeLength**2 maxSqrDist = cubeLength**2
...@@ -326,7 +326,7 @@ ...@@ -326,7 +326,7 @@
ELSE IF (minRmts(atoms%nz(typeB)).LT.0.0) THEN ELSE IF (minRmts(atoms%nz(typeB)).LT.0.0) THEN
minRmts(atoms%nz(typeB)) = rmtFac * (dist - minRmts(atoms%nz(typeA))) minRmts(atoms%nz(typeB)) = rmtFac * (dist - minRmts(atoms%nz(typeA)))
END IF END IF
minRmts(atoms%nz(typeA)) = min(minRmts(atoms%nz(typeA)),rmtMaxDefault) ! limit already here minRmts(atoms%nz(typeA)) = min(minRmts(atoms%nz(typeA)),rmtMaxDefault) ! limit already here
minRmts(atoms%nz(typeB)) = min(minRmts(atoms%nz(typeB)),rmtMaxDefault) ! to a reasonable value minRmts(atoms%nz(typeB)) = min(minRmts(atoms%nz(typeB)),rmtMaxDefault) ! to a reasonable value
END DO END DO
...@@ -359,7 +359,7 @@ ...@@ -359,7 +359,7 @@
WRITE (6,*) '----------------------------------------------------' WRITE (6,*) '----------------------------------------------------'
WRITE (6,*) 'Suggested values for input: ' WRITE (6,*) 'Suggested values for input: '
WRITE (6,*) WRITE (6,*)
dvac1 = 0.0 dvac1 = 0.0
IF (input%film) THEN IF (input%film) THEN
...@@ -387,13 +387,13 @@ ...@@ -387,13 +387,13 @@
lmax11 = 6 lmax11 = 6
ELSE IF (rmt1(n).LT.2.4) THEN ELSE IF (rmt1(n).LT.2.4) THEN
lmax11 = 8 lmax11 = 8
ELSE ELSE
lmax11 = 10 lmax11 = 10
END IF END IF
IF (l_gga) THEN IF (l_gga) THEN
jri11 = NINT(330*rmt1(n)) jri11 = NINT(330*rmt1(n))
ELSE ELSE
jri11 = NINT(220*rmt1(n)) jri11 = NINT(220*rmt1(n))
END IF END IF
jri11 = NINT(jri11*0.5) * 2 + 1 jri11 = NINT(jri11*0.5) * 2 + 1
IF (atoms%nz(n) > 0) THEN IF (atoms%nz(n) > 0) THEN
......
...@@ -44,13 +44,13 @@ MODULE m_checks ...@@ -44,13 +44,13 @@ MODULE m_checks
SUBROUTINE check_input_switches(banddos,vacuum,noco,atoms,input) SUBROUTINE check_input_switches(banddos,vacuum,noco,atoms,input)
USE m_nocoInputCheck USE m_nocoInputCheck
USE m_types USE m_types_fleurinput
type(t_banddos),INTENT(IN)::banddos type(t_banddos),INTENT(IN)::banddos
type(t_vacuum),INTENT(IN) ::vacuum type(t_vacuum),INTENT(IN) ::vacuum
type(t_noco),INTENT(IN) ::noco type(t_noco),INTENT(IN) ::noco
type(t_atoms),INTENT(IN) ::atoms type(t_atoms),INTENT(IN) ::atoms
type(t_input),INTENT(IN) ::input type(t_input),INTENT(IN) ::input
integer :: i integer :: i
! Check DOS related stuff (from inped) ! Check DOS related stuff (from inped)
...@@ -89,5 +89,5 @@ MODULE m_checks ...@@ -89,5 +89,5 @@ MODULE m_checks
END IF END IF
IF (noco%l_noco) CALL nocoInputCheck(atoms,input,vacuum,noco) IF (noco%l_noco) CALL nocoInputCheck(atoms,input,vacuum,noco)
END SUBROUTINE check_input_switches END SUBROUTINE check_input_switches
END MODULE m_checks END MODULE m_checks
...@@ -3,9 +3,9 @@ MODULE m_fleurinput_postprocess ...@@ -3,9 +3,9 @@ MODULE m_fleurinput_postprocess
IMPLICIT NONE IMPLICIT NONE
CONTAINS CONTAINS
SUBROUTINE fleurinput_postprocess(Cell,Sym,Atoms,Input,Noco,Vacuum,& SUBROUTINE fleurinput_postprocess(Cell,Sym,Atoms,Input,Noco,Vacuum,&
Banddos,Oned,Wann,Xcpot,Kpts) Banddos,Oned,Xcpot,Kpts)
USE m_juDFT USE m_juDFT
USE m_types USE m_types_fleurinput
use m_make_sym use m_make_sym
USE m_chkmt USE m_chkmt
use m_make_xcpot use m_make_xcpot
...@@ -21,7 +21,6 @@ CONTAINS ...@@ -21,7 +21,6 @@ CONTAINS
TYPE(t_vacuum),INTENT(INOUT)::vacuum TYPE(t_vacuum),INTENT(INOUT)::vacuum
TYPE(t_banddos),INTENT(IN) ::banddos TYPE(t_banddos),INTENT(IN) ::banddos
TYPE(t_oneD),INTENT(INOUT) ::oneD TYPE(t_oneD),INTENT(INOUT) ::oneD
TYPE(t_wann),INTENT(OUT) ::wann
CLASS(t_xcpot),ALLOCATABLE,INTENT(INOUT)::xcpot CLASS(t_xcpot),ALLOCATABLE,INTENT(INOUT)::xcpot
TYPE(t_kpts),INTENT(IN)::kpts TYPE(t_kpts),INTENT(IN)::kpts
......
...@@ -13,7 +13,7 @@ CONTAINS ...@@ -13,7 +13,7 @@ CONTAINS
! Generalization of the old apws_dim routine ! Generalization of the old apws_dim routine
!********************************************************************* !*********************************************************************
USE m_boxdim USE m_boxdim
USE m_types USE m_types_fleurinput
USE m_types_forcetheo_extended USE m_types_forcetheo_extended
IMPLICIT NONE IMPLICIT NONE
TYPE(t_kpts),INTENT(IN) :: kpts TYPE(t_kpts),INTENT(IN) :: kpts
...@@ -75,7 +75,7 @@ CONTAINS ...@@ -75,7 +75,7 @@ CONTAINS
noco%qss=q_vectors(:,1) ! Usually does not do anything, but ensures that in noco%qss=q_vectors(:,1) ! Usually does not do anything, but ensures that in
!force theorem CASE noco%qss is first q-vector in list !force theorem CASE noco%qss is first q-vector in list
DIMENSION%nvd = 0 ; DIMENSION%nv2d = 0 DIMENSION%nvd = 0 ; DIMENSION%nv2d = 0
DO q=1,SIZE(q_vectors,2) DO q=1,SIZE(q_vectors,2)
qss=q_vectors(:,q) qss=q_vectors(:,q)
...@@ -189,7 +189,7 @@ CONTAINS ...@@ -189,7 +189,7 @@ CONTAINS
mk2 = int(gmaxp*input%rkmax/arltv2) + 1 mk2 = int(gmaxp*input%rkmax/arltv2) + 1
mk3 = int(gmaxp*input%rkmax/arltv3) + 1 mk3 = int(gmaxp*input%rkmax/arltv3) + 1
!---> add + 1 in spin spiral calculation, to make sure that all G's are !---> add + 1 in spin spiral calculation, to make sure that all G's are
!---> still within the FFT-box after being shifted by the spin spiral !---> still within the FFT-box after being shifted by the spin spiral
!---> q-vector. !---> q-vector.
IF (noco%l_ss) THEN IF (noco%l_ss) THEN
......
...@@ -28,16 +28,16 @@ read_inpgen_input.f90 ...@@ -28,16 +28,16 @@ read_inpgen_input.f90
super_check.f90 super_check.f90
make_kpoints.f90 make_kpoints.f90
read_old_inp.f90 read_old_inp.f90
old_inp/apws_dim.f90 old_inp/apws_dim.f90
old_inp/dimen7.F90 old_inp/dimen7.F90
old_inp/dimens.F90 old_inp/dimens.F90
old_inp/first_glance.f old_inp/first_glance.f
old_inp/fleur_init_old.F90 old_inp/fleur_init_old.F90
old_inp/inped.F90 old_inp/inped.F90
old_inp/inpeig_dim.f90 old_inp/inpeig_dim.f90
old_inp/inpnoco.F90 old_inp/inpnoco.F90
old_inp/rw_inp.f90 old_inp/rw_inp.f90
old_inp/setlomap.F90 old_inp/setlomap.F90
old_inp/setup.f90 old_inp/setup.f90
old_inp/rw_noco.f90 old_inp/rw_noco.f90
old_inp/rw_symfile.f old_inp/rw_symfile.f
...@@ -90,12 +90,12 @@ ${FLEUR_SRC}/types/types_dimension.f90 ...@@ -90,12 +90,12 @@ ${FLEUR_SRC}/types/types_dimension.f90
${FLEUR_SRC}/io/nocoInputCheck.F90 ${FLEUR_SRC}/io/nocoInputCheck.F90
${FLEUR_SRC}/eigen/orthoglo.F90 ${FLEUR_SRC}/eigen/orthoglo.F90
${FLEUR_SRC}/math/ylm4.F90 ${FLEUR_SRC}/math/ylm4.F90
${FLEUR_SRC}/cdn/slab_dim.f90 ${FLEUR_SRC}/cdn/slab_dim.f90
${FLEUR_SRC}/cdn/slabgeom.f90 ${FLEUR_SRC}/cdn/slabgeom.f90
${FLEUR_SRC}/dos/nstm3.f90 ${FLEUR_SRC}/dos/nstm3.f90
${FLEUR_SRC}/cdn/int_21.f90 ${FLEUR_SRC}/cdn/int_21.f90
${FLEUR_SRC}/cdn/int_21lo.f90 ${FLEUR_SRC}/cdn/int_21lo.f90
${FLEUR_SRC}/cdn_mt/rhomt21.f90 ${FLEUR_SRC}/cdn_mt/rhomt21.f90
${FLEUR_SRC}/cdn_mt/rhonmt21.f90 ${FLEUR_SRC}/cdn_mt/rhonmt21.f90
${FLEUR_SRC}/xc-pot/gaunt.f90 ${FLEUR_SRC}/xc-pot/gaunt.f90
${FLEUR_SRC}/math/grule.f ${FLEUR_SRC}/math/grule.f
......
...@@ -66,12 +66,13 @@ PROGRAM inpgen ...@@ -66,12 +66,13 @@ PROGRAM inpgen
CHARACTER(len=40):: kpts_str CHARACTER(len=40):: kpts_str
LOGICAL :: l_exist LOGICAL :: l_exist
INTEGER :: idum INTEGER :: idum
INTERFACE
INTERFACE
FUNCTION dropDefaultEConfig() BIND(C, name="dropDefaultEconfig") FUNCTION dropDefaultEConfig() BIND(C, name="dropDefaultEconfig")
USE iso_c_binding USE iso_c_binding
INTEGER(c_int) dropDefaultEConfig INTEGER(c_int) dropDefaultEConfig
END FUNCTION dropDefaultEConfig END FUNCTION dropDefaultEConfig
END INTERFACE END INTERFACE
kpts_str="" kpts_str=""
...@@ -96,6 +97,9 @@ PROGRAM inpgen ...@@ -96,6 +97,9 @@ PROGRAM inpgen
!not yet !not yet
call Fleurinput_read_xml(cell,sym,atoms,input,noco,vacuum,& call Fleurinput_read_xml(cell,sym,atoms,input,noco,vacuum,&
sliceplot=Sliceplot,banddos=Banddos,hybrid=Hybrid,oned=Oned,xcpot=Xcpot,kpts=Kpts) sliceplot=Sliceplot,banddos=Banddos,hybrid=Hybrid,oned=Oned,xcpot=Xcpot,kpts=Kpts)
Call Cell%Init(Dot_product(Atoms%Volmts(:),Atoms%Neq(:)))
call atoms%init(cell)
Call Sym%Init(Cell,Input%Film)
l_fullinput=.TRUE. l_fullinput=.TRUE.
ELSEIF(judft_was_argument("-f")) THEN ELSEIF(judft_was_argument("-f")) THEN
!read the input !read the input
......
...@@ -130,7 +130,7 @@ CONTAINS ...@@ -130,7 +130,7 @@ CONTAINS
sliceplot,banddos,hybrid,oneD,coreSpecInput,wann,& sliceplot,banddos,hybrid,oneD,coreSpecInput,wann,&
xcpot,forcetheo_data,kpts,enparaXML) xcpot,forcetheo_data,kpts,enparaXML)
call fleurinput_postprocess(Cell,Sym,Atoms,Input,Noco,Vacuum,& call fleurinput_postprocess(Cell,Sym,Atoms,Input,Noco,Vacuum,&
Banddos,Oned,Wann,Xcpot,Kpts) Banddos,Oned,Xcpot,Kpts)
END IF END IF
!Distribute input to all PE !Distribute input to all PE
CALL fleurinput_mpi_bc(Cell,Sym,Atoms,Input,Noco,Vacuum,Field,& CALL fleurinput_mpi_bc(Cell,Sym,Atoms,Input,Noco,Vacuum,Field,&
......
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