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 @@
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
USE m_types
USE m_types_fleurinput
USE m_sort
USE m_inv3
USE m_juDFT
......@@ -80,7 +80,7 @@
! 0. Do initializations and set some constants
! 1. Locally replace unit cell by an auxiliary unit cell with:
! 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.]
! 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
......@@ -146,7 +146,7 @@
END DO
END DO
END DO
! 3. Construct cube mesh:
! 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.
......@@ -240,7 +240,7 @@
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
maxSqrDist = cubeLength**2
......@@ -326,7 +326,7 @@
ELSE IF (minRmts(atoms%nz(typeB)).LT.0.0) THEN
minRmts(atoms%nz(typeB)) = rmtFac * (dist - minRmts(atoms%nz(typeA)))
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
END DO
......@@ -359,7 +359,7 @@
WRITE (6,*) '----------------------------------------------------'
WRITE (6,*) 'Suggested values for input: '
WRITE (6,*)
WRITE (6,*)
dvac1 = 0.0
IF (input%film) THEN
......@@ -387,13 +387,13 @@
lmax11 = 6
ELSE IF (rmt1(n).LT.2.4) THEN
lmax11 = 8
ELSE
ELSE
lmax11 = 10
END IF
IF (l_gga) THEN
jri11 = NINT(330*rmt1(n))
jri11 = NINT(330*rmt1(n))
ELSE
jri11 = NINT(220*rmt1(n))
jri11 = NINT(220*rmt1(n))
END IF
jri11 = NINT(jri11*0.5) * 2 + 1
IF (atoms%nz(n) > 0) THEN
......
......@@ -44,13 +44,13 @@ MODULE m_checks
SUBROUTINE check_input_switches(banddos,vacuum,noco,atoms,input)
USE m_nocoInputCheck
USE m_types
USE m_types_fleurinput
type(t_banddos),INTENT(IN)::banddos
type(t_vacuum),INTENT(IN) ::vacuum
type(t_noco),INTENT(IN) ::noco
type(t_atoms),INTENT(IN) ::atoms
type(t_input),INTENT(IN) ::input
integer :: i
! Check DOS related stuff (from inped)
......@@ -89,5 +89,5 @@ MODULE m_checks
END IF
IF (noco%l_noco) CALL nocoInputCheck(atoms,input,vacuum,noco)
END SUBROUTINE check_input_switches
END MODULE m_checks
......@@ -3,9 +3,9 @@ MODULE m_fleurinput_postprocess
IMPLICIT NONE
CONTAINS
SUBROUTINE fleurinput_postprocess(Cell,Sym,Atoms,Input,Noco,Vacuum,&
Banddos,Oned,Wann,Xcpot,Kpts)
Banddos,Oned,Xcpot,Kpts)
USE m_juDFT
USE m_types
USE m_types_fleurinput
use m_make_sym
USE m_chkmt
use m_make_xcpot
......@@ -21,7 +21,6 @@ CONTAINS
TYPE(t_vacuum),INTENT(INOUT)::vacuum
TYPE(t_banddos),INTENT(IN) ::banddos
TYPE(t_oneD),INTENT(INOUT) ::oneD
TYPE(t_wann),INTENT(OUT) ::wann
CLASS(t_xcpot),ALLOCATABLE,INTENT(INOUT)::xcpot
TYPE(t_kpts),INTENT(IN)::kpts
......
......@@ -13,7 +13,7 @@ CONTAINS
! Generalization of the old apws_dim routine
!*********************************************************************
USE m_boxdim
USE m_types
USE m_types_fleurinput
USE m_types_forcetheo_extended
IMPLICIT NONE
TYPE(t_kpts),INTENT(IN) :: kpts
......@@ -75,7 +75,7 @@ CONTAINS
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
DIMENSION%nvd = 0 ; DIMENSION%nv2d = 0
DO q=1,SIZE(q_vectors,2)
qss=q_vectors(:,q)
......@@ -189,7 +189,7 @@ CONTAINS
mk2 = int(gmaxp*input%rkmax/arltv2) + 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
!---> q-vector.
IF (noco%l_ss) THEN
......
......@@ -28,16 +28,16 @@ read_inpgen_input.f90
super_check.f90
make_kpoints.f90
read_old_inp.f90
old_inp/apws_dim.f90
old_inp/dimen7.F90
old_inp/dimens.F90
old_inp/first_glance.f
old_inp/fleur_init_old.F90
old_inp/inped.F90
old_inp/inpeig_dim.f90
old_inp/inpnoco.F90
old_inp/rw_inp.f90
old_inp/setlomap.F90
old_inp/apws_dim.f90
old_inp/dimen7.F90
old_inp/dimens.F90
old_inp/first_glance.f
old_inp/fleur_init_old.F90
old_inp/inped.F90
old_inp/inpeig_dim.f90
old_inp/inpnoco.F90
old_inp/rw_inp.f90
old_inp/setlomap.F90
old_inp/setup.f90
old_inp/rw_noco.f90
old_inp/rw_symfile.f
......@@ -90,12 +90,12 @@ ${FLEUR_SRC}/types/types_dimension.f90
${FLEUR_SRC}/io/nocoInputCheck.F90
${FLEUR_SRC}/eigen/orthoglo.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}/dos/nstm3.f90
${FLEUR_SRC}/cdn/int_21.f90
${FLEUR_SRC}/cdn/int_21.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}/xc-pot/gaunt.f90
${FLEUR_SRC}/math/grule.f
......
......@@ -66,12 +66,13 @@ PROGRAM inpgen
CHARACTER(len=40):: kpts_str
LOGICAL :: l_exist
INTEGER :: idum
INTERFACE
INTERFACE
FUNCTION dropDefaultEConfig() BIND(C, name="dropDefaultEconfig")
USE iso_c_binding
INTEGER(c_int) dropDefaultEConfig
END FUNCTION dropDefaultEConfig
END INTERFACE
END INTERFACE
kpts_str=""
......@@ -96,6 +97,9 @@ PROGRAM inpgen
!not yet
call Fleurinput_read_xml(cell,sym,atoms,input,noco,vacuum,&
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.
ELSEIF(judft_was_argument("-f")) THEN
!read the input
......
......@@ -130,7 +130,7 @@ CONTAINS
sliceplot,banddos,hybrid,oneD,coreSpecInput,wann,&
xcpot,forcetheo_data,kpts,enparaXML)
call fleurinput_postprocess(Cell,Sym,Atoms,Input,Noco,Vacuum,&
Banddos,Oned,Wann,Xcpot,Kpts)
Banddos,Oned,Xcpot,Kpts)
END IF
!Distribute input to all PE
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