4
1
mirror of https://github.com/pfloos/quack synced 2024-11-07 14:43:58 +01:00
quack/src/QuAcK/rij.f90

25 lines
477 B
Fortran
Raw Normal View History

2019-03-19 10:13:33 +01:00
subroutine rij(nWalk,r,r12)
! Compute the interelectronic distances
implicit none
! Input variables
integer,intent(in) :: nWalk
double precision,intent(in) :: r(nWalk,1:2,1:3)
! Output variables
double precision,intent(out) :: r12(nWalk)
! Compute
r12(1:nWalk) = (r(1:nWalk,1,1)-r(1:nWalk,2,1))**2 &
+ (r(1:nWalk,1,2)-r(1:nWalk,2,2))**2 &
+ (r(1:nWalk,1,3)-r(1:nWalk,2,3))**2
r12 = sqrt(r12)
end subroutine rij