Commit 83d57793 authored by Henning Janssen's avatar Henning Janssen

Removed redundant parameters from types_atoms

parent ebae25c6
......@@ -13,23 +13,6 @@ MODULE m_types_atoms
IMPLICIT NONE
PRIVATE
TYPE t_gfelementtype
SEQUENCE
!defines the l and atomType elements for given greens function element (used for mapping index in types_greensf)
INTEGER :: l=-1
INTEGER :: lp=-1
INTEGER :: atomType=0
INTEGER :: atomTypep=0
END TYPE t_gfelementtype
TYPE t_j0calctype
INTEGER :: atomType=0 !atom Type for which to calculate J0
INTEGER :: l_min=-1 !Minimum l considered
INTEGER :: l_max=-1 !Maximum l considered
LOGICAL :: l_avgexc=.FALSE. !Determines wether we average over the exchange splittings for all l
LOGICAL :: l_eDependence=.FALSE. !Switch to output J0 with variating fermi energy (only with contourDOS)
END TYPE t_j0calctype
TYPE t_utype
SEQUENCE
REAL :: u=0.0, j=0.0 ! the actual U and J parameters
......@@ -53,10 +36,6 @@ MODULE m_types_atoms
INTEGER ::n_u=0
! no of lda+hubbard1s
INTEGER :: n_hia=0
! no of j0 calculations
INTEGER :: n_j0=0
! no of greens function calculations (in total)
INTEGER :: n_gf=0
! dimensions
INTEGER :: jmtd=-1
INTEGER :: msh=0 !core state mesh was in dimension
......@@ -115,11 +94,6 @@ MODULE m_types_atoms
!lda+hubbard1 information is attached behind lda+u
!so the dimension actually used is atoms%n_u+atoms%n_hia
TYPE(t_utype), ALLOCATABLE::lda_u(:)
!greens function information(4*ntype)
TYPE(t_gfelementtype), ALLOCATABLE::gfelem(:)
!j0 calc information(4*ntype)
TYPE(t_j0calctype), ALLOCATABLE::j0(:)
INTEGER, ALLOCATABLE :: relax(:, :) !<(3,ntype)
!flipSpinTheta and flipSpinPhi are the angles which are given
!in the input to rotate the charge den by these polar angles.
......@@ -133,7 +107,6 @@ CONTAINS
PROCEDURE :: init=>init_atoms
PROCEDURE :: nsp => calc_nsp_atom
PROCEDURE :: same_species
PROCEDURE :: add_gfjob
PROCEDURE :: read_xml => read_xml_atoms
PROCEDURE :: mpi_bc=>mpi_bc_atoms
END TYPE t_atoms
......@@ -280,8 +253,6 @@ SUBROUTINE read_xml_atoms(this,xml)
ALLOCATE(this%label(this%nat))
ALLOCATE(this%pos(3,this%nat))
ALLOCATE(this%rmt(this%ntype))
ALLOCATE(this%j0(this%ntype))
ALLOCATE(this%gfelem(4*This%ntype))
ALLOCATE(this%econf(this%ntype))
ALLOCATE(this%ncv(this%ntype)) ! For what is this?
ALLOCATE(this%lapw_l(this%ntype)) ! Where do I put this?
......@@ -579,47 +550,4 @@ SUBROUTINE init_atoms(this,cell)
WHERE (ABS(this%pos(3,:)-this%taual(3,:))>0.5) this%taual(3,:) = this%taual(3,:) / cell%amat(3,3)
this%pos(:,:) = MATMUL(cell%amat,this%taual(:,:))
END SUBROUTINE init_atoms
SUBROUTINE add_gfjob(this,nType,lmin,lmax,l_off,l_inter,l_nn)
USE m_juDFT
CLASS(t_atoms), INTENT(INOUT) :: this
INTEGER, INTENT(IN) :: nType
INTEGER, INTENT(IN) :: lmin
INTEGER, INTENT(IN) :: lmax
LOGICAL, INTENT(IN) :: l_off !l!=lp
LOGICAL, INTENT(IN) :: l_inter
LOGICAL, INTENT(IN) :: l_nn
INTEGER l,lp,i_gf
LOGICAL l_found
IF(l_inter) CALL juDFT_error("Intersite greens function not yet implemented",calledby="add_gfjob")
!TODO: add the nearest neighbours jobs
DO l = lmin, lmax
DO lp = MERGE(lmin,l,l_off), MERGE(lmax,l,l_off)
!Check if this job has already been added
l_found = .FALSE.
DO i_gf = 1, this%n_gf
IF(this%gfelem(i_gf)%l.NE.l) CYCLE
IF(this%gfelem(i_gf)%lp.NE.lp) CYCLE
IF(this%gfelem(i_gf)%atomType.NE.nType) CYCLE
IF(this%gfelem(i_gf)%atomTypep.NE.nType) CYCLE
l_found = .TRUE.
ENDDO
IF(l_found) CYCLE !This job is already in the array
this%n_gf = this%n_gf + 1
this%gfelem(this%n_gf)%l = l
this%gfelem(this%n_gf)%atomType = nType
this%gfelem(this%n_gf)%lp = lp
this%gfelem(this%n_gf)%atomTypep = nType !For now
ENDDO
ENDDO
END SUBROUTINE add_gfjob
END MODULE m_types_atoms
......@@ -3,7 +3,7 @@ MODULE m_fleurinput_postprocess
IMPLICIT NONE
CONTAINS
SUBROUTINE fleurinput_postprocess(Cell,Sym,Atoms,Input,Noco,Vacuum,&
Banddos,Oned,Xcpot,Kpts)
Banddos,Oned,Xcpot,Kpts,gfinp)
USE m_juDFT
USE m_types_fleurinput
use m_make_sym
......@@ -22,14 +22,15 @@ CONTAINS
TYPE(t_banddos),INTENT(IN) ::banddos
TYPE(t_oneD),INTENT(INOUT) ::oneD
CLASS(t_xcpot),ALLOCATABLE,INTENT(INOUT)::xcpot
TYPE(t_kpts),INTENT(IN)::kpts
TYPE(t_kpts),INTENT(IN) ::kpts
TYPE(t_gfinp),INTENT(IN) ::gfinp
call cell%init(DOT_PRODUCT(atoms%volmts(:),atoms%neq(:)))
call atoms%init(cell)
CALL sym%init(cell,input%film)
call vacuum%init(sym)
CALL make_sym(sym,cell,atoms,noco,oneD,input)
CALL make_sym(sym,cell,atoms,noco,oneD,input,gfinp)
call make_xcpot(xcpot,atoms,input)
call oneD%init(atoms)
......@@ -37,7 +38,7 @@ CONTAINS
! Check muffin tin radii, only checking, dont use new parameters
CALL chkmt(atoms,input,vacuum,cell,oneD,.TRUE.)
!adjust positions by displacements
CALL apply_displacements(cell,input,vacuum,oneD,sym,noco,atoms)
CALL apply_displacements(cell,input,vacuum,oneD,sym,noco,atoms,gfinp)
END SUBROUTINE fleurinput_postprocess
......
......@@ -9,7 +9,7 @@ MODULE m_make_sym
PRIVATE
PUBLIC make_sym
CONTAINS
SUBROUTINE make_sym(sym,cell,atoms,noco,oneD,input)
SUBROUTINE make_sym(sym,cell,atoms,noco,oneD,input,gfinp)
!Generates missing symmetry info.
!tau,mrot and nop have to be specified alread
USE m_dwigner
......@@ -22,12 +22,14 @@ CONTAINS
USE m_types_noco
USE m_types_oneD
use m_types_input
USE m_types_gfinp
TYPE(t_sym),INTENT(INOUT) :: sym
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_oneD),INTENT(INOUT):: oneD
TYPE(t_input),INTENT(IN) :: input
TYPE(t_gfinp),INTENT(IN) :: gfinp
integer :: nsymt
integer,allocatable::nrot(:),locops(:,:)
......@@ -44,7 +46,7 @@ CONTAINS
!Generated wigner symbols for LDA+U (includes DFT+HubbardI)
IF (ALLOCATED(sym%d_wgn)) DEALLOCATE(sym%d_wgn)
ALLOCATE(sym%d_wgn(-3:3,-3:3,3,sym%nop))
IF (atoms%n_u+atoms%n_hia.GT.0) THEN
IF (atoms%n_u+gfinp%n.GT.0) THEN
CALL d_wigner(sym%nop,sym%mrot,cell%bmat,3,sym%d_wgn)
END IF
......@@ -57,12 +59,12 @@ CONTAINS
IF (.NOT.oneD%odd%d1) THEN
CALL mapatom(sym,atoms,cell,input,noco)
CALL mapatom(sym,atoms,cell,input,noco,gfinp)
allocate(oneD%ngopr1(atoms%nat))
oneD%ngopr1 = sym%ngopr
ELSE
CALL juDFT_error("The oneD version is broken here. Compare call to mapatom with old version")
CALL mapatom(sym,atoms,cell,input,noco)
CALL mapatom(sym,atoms,cell,input,noco,gfinp)
!CALL od_mapatom(oneD,atoms,sym,cell)
END IF
......
......@@ -5,7 +5,7 @@
! atom into its equivalent atoms c.l.fu
!*******************************************************************
CONTAINS
SUBROUTINE mapatom(sym,atoms,cell,input,noco)
SUBROUTINE mapatom(sym,atoms,cell,input,noco,gfinp)
!
! if (l_f) setup multab,invtab,invarop,invarind for force_a12 & 21
!***********************************************************************
......@@ -34,6 +34,7 @@
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_input),INTENT(IN) :: input
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_gfinp),INTENT(IN) :: gfinp
! .. Local Scalars ..
REAL s3,norm
......@@ -120,7 +121,7 @@
!
! search for operations which leave taual invariant
!
IF (input%l_f.OR.(atoms%n_u+atoms%n_gf.GT.0)) THEN
IF (input%l_f.OR.(atoms%n_u+gfinp%n.GT.0)) THEN
DO j3 = -2,2
sr(3) = gaminv(3) + real(j3)
DO j2 = -2,2
......@@ -159,7 +160,7 @@
!------------------------- FORCE PART -------------------------------
!+gu this is the remainder of spgset necessary for force calculations
!
IF (input%l_f.OR.(atoms%n_u.GT.0).OR.(atoms%n_gf.GT.0)) THEN
IF (input%l_f.OR.(atoms%n_u+gfinp%n.GT.0)) THEN
WRITE (6,FMT=&
& '(//,"list of operations which leave taual invariant",/)')
......
......@@ -372,8 +372,6 @@
WRITE (6,9060)
atoms%n_u = 0
atoms%n_hia = 0
atoms%n_gf = 0
atoms%n_j0 = 0
DO n=1,atoms%ntype
!
READ (UNIT=5,FMT=7140,END=99,ERR=99) noel(n),atoms%nz(n),&
......
......@@ -127,7 +127,7 @@ CONTAINS
END DO
END SUBROUTINE read_displacements
SUBROUTINE apply_displacements(cell,input,vacuum,oneD,sym,noco,atoms)
SUBROUTINE apply_displacements(cell,input,vacuum,oneD,sym,noco,atoms,gfinp)
USE m_types
USE m_chkmt
USE m_constants
......@@ -138,6 +138,7 @@ CONTAINS
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_sym),INTENT(INOUT) :: sym
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_gfinp),INTENT(IN) :: gfinp
TYPE(t_atoms),INTENT(INOUT):: atoms
......@@ -174,7 +175,7 @@ CONTAINS
END IF
END DO
CALL mapatom(sym,atoms,cell,input,noco)
CALL mapatom(sym,atoms,cell,input,noco,gfinp)
WRITE(6,*) "Atomic positions including displacements:"
DO n=1,atoms%nat
......
......@@ -131,7 +131,7 @@ CONTAINS
sliceplot,banddos,mpinp,hybinp,oneD,coreSpecInput,&
wann,xcpot,forcetheo_data,kpts,enparaXML,gfinp,hub1inp)
call fleurinput_postprocess(Cell,Sym,Atoms,Input,Noco,Vacuum,&
Banddos,Oned,Xcpot,Kpts)
Banddos,Oned,Xcpot,Kpts,gfinp)
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