calcDenCoeffs.f90 1.87 KB
Newer Older
1 2 3 4 5 6
!--------------------------------------------------------------------------------
! Copyright (c) 2018 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.
!--------------------------------------------------------------------------------

7 8 9 10 11 12 13
MODULE m_calcDenCoeffs

CONTAINS

SUBROUTINE calcDenCoeffs(atoms,sphhar,sym,we,noccbd,eigVecCoeffs,ispin,denCoeffs)

   USE m_juDFT
14 15
   USE m_types_setup
   USE m_types_cdnval, ONLY: t_eigVecCoeffs,t_denCoeffs
16 17 18 19 20 21 22 23 24 25 26 27 28
   USE m_rhomt
   USE m_rhonmt
   USE m_rhomtlo
   USE m_rhonmtlo

   IMPLICIT NONE

   TYPE(t_atoms),        INTENT(IN)    :: atoms
   TYPE(t_sphhar),       INTENT(IN)    :: sphhar
   TYPE(t_sym),          INTENT(IN)    :: sym
   TYPE(t_eigVecCoeffs), INTENT(IN)    :: eigVecCoeffs
   TYPE(t_denCoeffs),    INTENT(INOUT) :: denCoeffs

29
   INTEGER,              INTENT(IN)    :: noccbd
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
   REAL,                 INTENT(IN)    :: we(noccbd)

   INTEGER,              INTENT(IN)    :: ispin

   !--->          set up coefficients for the spherical and
   CALL timestart("cdnval: rhomt")
   CALL rhomt(atoms,we,noccbd,eigVecCoeffs,denCoeffs,ispin)
   CALL timestop("cdnval: rhomt")

   !--->          non-spherical m.t. density
   CALL timestart("cdnval: rhonmt")
   CALL rhonmt(atoms,sphhar,we,noccbd,sym,eigVecCoeffs,denCoeffs,ispin)
   CALL timestop("cdnval: rhonmt")

   !--->          set up coefficients of the local orbitals and the
   !--->          flapw - lo cross terms for the spherical and
   !--->          non-spherical mt density
   CALL timestart("cdnval: rho(n)mtlo")
   CALL rhomtlo(atoms,noccbd,we,eigVecCoeffs,denCoeffs,ispin)

   CALL rhonmtlo(atoms,sphhar,noccbd,we,eigVecCoeffs,denCoeffs,ispin)
   CALL timestop("cdnval: rho(n)mtlo")

END SUBROUTINE calcDenCoeffs

END MODULE m_calcDenCoeffs