Skip to content

Commit

Permalink
Merge pull request #65 from OrderN/hotfix-1.0.4pre
Browse files Browse the repository at this point in the history
Hot fix for XC bug with LibXC
  • Loading branch information
davidbowler authored Jul 14, 2020
2 parents 8dc94a8 + 255d35a commit 40cf290
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/BasisGeneration/radial_xc_LibXC_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,11 @@ subroutine get_vxc(n_tot,rr,rho,vxc,exc)
real(double), dimension(:), allocatable :: drho_dr, sigma, vrho, vsigma, loc_rho, d2term

flag_energy = .false.
! Necessary for LibXC
allocate(exc_array(n_tot))
exc_array = zero
if(PRESENT(exc)) then
flag_energy = .true.
allocate(exc_array(n_tot))
exc_array = zero
exc = zero
end if
vxc = zero
Expand Down Expand Up @@ -273,6 +274,7 @@ subroutine get_vxc(n_tot,rr,rho,vxc,exc)
! Potentially also find Exc correction
end if
end if
deallocate(exc_array)
end subroutine get_vxc

subroutine vxc_pz_ca(n_tot,rr,rho,vxc,exc)
Expand Down

0 comments on commit 40cf290

Please sign in to comment.