TABLE OF CONTENTS
ABINIT/pawuj_ini [ Functions ]
NAME
pawuj_ini
FUNCTION
Initialize dtpawuj datastructure for one SCF run Relevant only for automatic determination of U in PAW+U context
COPYRIGHT
Copyright (C) 1998-2018 ABINIT group (DJA) This file is distributed under the terms of the GNU General Public License, see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt . For the initials of contributors, see ~abinit/doc/developers/contributors.txt .
INPUTS
OUTPUT
SIDE EFFECTS
dtpawuj(0:ndtpawuj) (initialization of fields vsh, occ, iuj,nnat)
PARENTS
pawuj_drive,ujdet
CHILDREN
SOURCE
31 #if defined HAVE_CONFIG_H 32 #include "config.h" 33 #endif 34 35 #include "abi_common.h" 36 37 subroutine pawuj_ini(dtpawuj,ndtset) 38 39 use defs_basis 40 use defs_abitypes 41 use defs_parameters 42 use m_profiling_abi 43 use m_errors 44 45 !This section has been created automatically by the script Abilint (TD). 46 !Do not modify the following lines by hand. 47 #undef ABI_FUNC 48 #define ABI_FUNC 'pawuj_ini' 49 !End of the abilint section 50 51 implicit none 52 53 !Arguments ------------------------------------ 54 !scalars 55 integer :: ndtset 56 type(macro_uj_type),intent(inout) :: dtpawuj(0:ndtset) 57 58 !Local variables ------------------------- 59 !Variables for partial dos calculation 60 !scalars 61 integer, parameter :: nwfchr=6 62 integer :: iuj,im1 63 ! ********************************************************************* 64 65 DBG_ENTER("COLL") 66 67 do iuj=0,ndtset 68 !write(std_out,*)'pawuj_ini iuj ',iuj 69 dtpawuj(iuj)%diemix=0.45_dp 70 dtpawuj(iuj)%iuj=0 71 dtpawuj(iuj)%nat=0 72 dtpawuj(iuj)%ndtset=1 73 dtpawuj(iuj)%nspden=1 74 dtpawuj(iuj)%macro_uj=0 75 dtpawuj(iuj)%option=1 76 dtpawuj(iuj)%pawujat=1 77 dtpawuj(iuj)%pawujga=one 78 dtpawuj(iuj)%pawprtvol=1 79 dtpawuj(iuj)%ph0phiint=one 80 dtpawuj(iuj)%dmatpuopt=3 81 dtpawuj(iuj)%pawujrad=3.0_dp 82 dtpawuj(iuj)%pawrad=20.0_dp 83 !Allocate arrays 84 !write(std_out,*)'pawuj_ini before arrays' 85 ABI_ALLOCATE(dtpawuj(iuj)%rprimd,(3,3)) 86 ABI_ALLOCATE(dtpawuj(iuj)%scdim,(3)) 87 ABI_ALLOCATE(dtpawuj(iuj)%wfchr,(nwfchr)) 88 dtpawuj(iuj)%rprimd=reshape((/ 1,0,0,0,1,0,0,0,1/),(/ 3,3 /)) 89 dtpawuj(iuj)%scdim=reshape((/ 250,0,0 /),(/3 /)) 90 dtpawuj(iuj)%wfchr=(/ (0,im1=1,nwfchr) /) 91 if (iuj>0) then 92 dtpawuj(iuj)%iuj=-1 93 end if 94 end do 95 96 DBG_EXIT("COLL") 97 98 end subroutine pawuj_ini