[Pw_forum] modified Hartree exchange potential

Helen helen at fh.huji.ac.il
Thu Jul 5 14:17:31 CEST 2007


Hi,
I want to modifiy the Hartree exchange potential to take into account a screened coulomb potential. Which files need to be altered? I noticed that a subroutine hartree(..) is called but couldn't find it.
Also I wanted to change the exchange functional for a new functional.
I changed Modules/functionals.f90 to call a new functional, iexch=8,

  ELSEIF (iexch == 8) THEN         !  'bnl'
     CALL slater_bnl(rs, ex, vx)

 and then added the new functional in flib/functionals.f90 as a new subroutine under the slater one. 

!!-----------------------------------------------------------------------
subroutine slater_bnl (rs, ex, vx)
  !-----------------------------------------------------------------------
  !        bnl
  !
  USE kinds
  implicit none
  real(DP) :: rs, ex, vx, kf, q
  real(DP), parameter  :: f= -0.687247939924714d0, alpha = 2.0d0/3.0d0, &
            pi34 = 0.6203504908994d0, pie=3.141592653589793d0 ,gam=0.5d0 
  ! pi34=(3/4pi)^(1/3)
  ! f = -9/8*(3/2pi)^(2/3)
  !
   kf=3d0*pie**2*pi34/rs
   q=gam/kf
  
   ex=(kf/(2d0*pie))*(q**2*(((2d0*dsqrt(pie)/q)*derf(1d0/q))-1d0+ &
    ((q**2-2d0)*(1d0-dexp(-1d0/q**2))))-1.5d0)
  
   vx=(-gam/(6d0*pie))*((-4d0*dexp(-1d0/q**2)/q)   &
   +2d0*q**2*(1d0-dexp(-1d0/q**2)) & 
   -2d0*(dexp(-1d0/q**2)*(q**2-2d0)/q)-2d0*dsqrt(pie)*derf(1d0/q)  & 
   -2d0*q+2d0*q*(q**2-2d0)*(1d0-dexp(-1d0/q**2))+4d0*dsqrt(pie)*derf(1d0/q)) &
   +(2d0*gam/(3d0*pie*q))*(q**2*(((2d0*dsqrt(pie)/q)*derf(1d0/q))-1d0+ &
    ((q**2-2d0)*(1d0-dexp(-1d0/q**2))))-1.5d0)
  
  !
  return
end subroutine slater_bnl

Is this sufficient, or are there any other routines I need to change?

Thanks for your help,
Helen Eisenberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20070705/a23c4caf/attachment.html>


More information about the users mailing list