From c2ba52845289a1454efea7f2edf767314365b1d5 Mon Sep 17 00:00:00 2001 From: vijay gopal chilkuri Date: Mon, 8 Mar 2021 22:49:30 +0100 Subject: [PATCH] Moved j index to position 1. --- el_nuc_el.irp.f | 26 +++++++++++++------------- el_nuc_el_blas.irp.f | 26 +++++++++++++------------- rescale.irp.f | 38 +++++++++++++++++++------------------- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/el_nuc_el.irp.f b/el_nuc_el.irp.f index 393ef20..d3aaea0 100644 --- a/el_nuc_el.irp.f +++ b/el_nuc_el.irp.f @@ -95,24 +95,24 @@ BEGIN_PROVIDER [ double precision, factor_een_deriv_e, (4, nelec) ] rescale_een_e(i,j,k) * & rescale_een_n(i,a,m+l) daccu(1:4) = daccu(1:4) + & - rescale_een_e_deriv_e_t(1:4,i,j,k) * & + rescale_een_e_deriv_e_t(i,1:4,j,k) * & rescale_een_n(i,a,m) daccu2(1:4) = daccu2(1:4) + & - rescale_een_e_deriv_e_t(1:4,i,j,k) * & + rescale_een_e_deriv_e_t(i,1:4,j,k) * & rescale_een_n(i,a,m+l) enddo factor_een_deriv_e(1:4,j) = factor_een_deriv_e(1:4,j) + & - (accu * rescale_een_n_deriv_e(1:4,j,a,m+l) + daccu(1:4) * rescale_een_n(j,a,m+l) +& - daccu2(1:4)* rescale_een_n(j,a,m) + accu2*rescale_een_n_deriv_e(1:4,j,a,m)) * cn + (accu * rescale_een_n_deriv_e(j,1:4,a,m+l) + daccu(1:4) * rescale_een_n(j,a,m+l) +& + daccu2(1:4)* rescale_een_n(j,a,m) + accu2*rescale_een_n_deriv_e(j,1:4,a,m)) * cn factor_een_deriv_e(4,j) = factor_een_deriv_e(4,j) + 2.d0*( & - daccu (1) * rescale_een_n_deriv_e(1,j,a,m+l) + & - daccu (2) * rescale_een_n_deriv_e(2,j,a,m+l) + & - daccu (3) * rescale_een_n_deriv_e(3,j,a,m+l) + & - daccu2(1) * rescale_een_n_deriv_e(1,j,a,m ) + & - daccu2(2) * rescale_een_n_deriv_e(2,j,a,m ) + & - daccu2(3) * rescale_een_n_deriv_e(3,j,a,m ) )*cn + daccu (1) * rescale_een_n_deriv_e(j,1,a,m+l) + & + daccu (2) * rescale_een_n_deriv_e(j,2,a,m+l) + & + daccu (3) * rescale_een_n_deriv_e(j,3,a,m+l) + & + daccu2(1) * rescale_een_n_deriv_e(j,1,a,m ) + & + daccu2(2) * rescale_een_n_deriv_e(j,2,a,m ) + & + daccu2(3) * rescale_een_n_deriv_e(j,3,a,m ) )*cn enddo enddo enddo @@ -152,8 +152,8 @@ BEGIN_PROVIDER [ double precision, factor_een_deriv_e_ref, (4, nelec) ] rjam_cn = rescale_een_n(j, a, m) * cn do ii = 1, 4 - drjal(ii) = rescale_een_n_deriv_e(ii, j, a, l) - drjam_cn(ii) = rescale_een_n_deriv_e(ii, j, a, m) * cn + drjal(ii) = rescale_een_n_deriv_e(j, ii, a, l) + drjam_cn(ii) = rescale_een_n_deriv_e(j, ii, a, m) * cn enddo do i = 1, nelec @@ -162,7 +162,7 @@ BEGIN_PROVIDER [ double precision, factor_een_deriv_e_ref, (4, nelec) ] rijk = rescale_een_e(i, j, k) do ii = 1, 4 - drijk(ii) = rescale_een_e_deriv_e(ii, j, i, k) + drijk(ii) = rescale_een_e_deriv_e(j, ii, i, k) enddo v1 = rijk * rial ! v(x) diff --git a/el_nuc_el_blas.irp.f b/el_nuc_el_blas.irp.f index e11b006..8be048c 100644 --- a/el_nuc_el_blas.irp.f +++ b/el_nuc_el_blas.irp.f @@ -1,5 +1,5 @@ BEGIN_PROVIDER [ double precision, tmp_c, (nelec,nnuc,0:ncord,0:ncord-1) ] -&BEGIN_PROVIDER [ double precision, dtmp_c, (4, nelec,nnuc,0:ncord,0:ncord-1) ] +&BEGIN_PROVIDER [ double precision, dtmp_c, (nelec,4,nnuc,0:ncord,0:ncord-1) ] implicit none BEGIN_DOC ! Calculate the intermediate buffers @@ -22,9 +22,9 @@ ! dr_{ij}^k . R_{ja}^l -> dtmp_c_{ia}^{kl} do k=0,ncord-1 call dgemm('N','N', 4*nelec, nnuc*(ncord+1), nelec, 1.d0, & - rescale_een_e_deriv_e(1,1,1,k), 4*size(rescale_een_e_deriv_e,2),& + rescale_een_e_deriv_e(1,1,1,k), 4*size(rescale_een_e_deriv_e,1),& rescale_een_n(1,1,0), size(rescale_een_n,1), 0.d0, & - dtmp_c(1,1,1,0,k), 4*size(dtmp_c,2)) + dtmp_c(1,1,1,0,k), 4*size(dtmp_c,1)) enddo @@ -67,19 +67,19 @@ END_PROVIDER accu = accu + rescale_een_n(j,a,m) * tmp_c(j,a,m+l,k) factor_een_deriv_e_blas(1:4,j) = factor_een_deriv_e_blas(1:4,j) + (& - tmp_c(j,a,m,k) * rescale_een_n_deriv_e(1:4,j,a,m+l) + & - dtmp_c(1:4,j,a,m,k) * rescale_een_n(j,a,m+l) + & - dtmp_c(1:4,j,a,m+l,k) * rescale_een_n(j,a,m) + & - tmp_c(j,a,m+l,k)*rescale_een_n_deriv_e(1:4,j,a,m) & + tmp_c(j,a,m,k) * rescale_een_n_deriv_e(j,1:4,a,m+l) + & + dtmp_c(j,1:4,a,m,k) * rescale_een_n(j,a,m+l) + & + dtmp_c(j,1:4,a,m+l,k) * rescale_een_n(j,a,m) + & + tmp_c(j,a,m+l,k)*rescale_een_n_deriv_e(j,1:4,a,m) & ) * cn(a) factor_een_deriv_e_blas(4,j) = factor_een_deriv_e_blas(4,j) + (& - dtmp_c(1,j,a,m ,k) * rescale_een_n_deriv_e(1,j,a,m+l) + & - dtmp_c(2,j,a,m ,k) * rescale_een_n_deriv_e(2,j,a,m+l) + & - dtmp_c(3,j,a,m ,k) * rescale_een_n_deriv_e(3,j,a,m+l) + & - dtmp_c(1,j,a,m+l,k) * rescale_een_n_deriv_e(1,j,a,m ) + & - dtmp_c(2,j,a,m+l,k) * rescale_een_n_deriv_e(2,j,a,m ) + & - dtmp_c(3,j,a,m+l,k) * rescale_een_n_deriv_e(3,j,a,m ) & + dtmp_c(j,1,a,m ,k) * rescale_een_n_deriv_e(j,1,a,m+l) + & + dtmp_c(j,2,a,m ,k) * rescale_een_n_deriv_e(j,2,a,m+l) + & + dtmp_c(j,3,a,m ,k) * rescale_een_n_deriv_e(j,3,a,m+l) + & + dtmp_c(j,1,a,m+l,k) * rescale_een_n_deriv_e(j,1,a,m ) + & + dtmp_c(j,2,a,m+l,k) * rescale_een_n_deriv_e(j,2,a,m ) + & + dtmp_c(j,3,a,m+l,k) * rescale_een_n_deriv_e(j,3,a,m ) & )*cn(a)*2.d0 enddo diff --git a/rescale.irp.f b/rescale.irp.f index 73bc04e..2bd89ac 100644 --- a/rescale.irp.f +++ b/rescale.irp.f @@ -186,7 +186,7 @@ BEGIN_PROVIDER [double precision, rescale_een_n, (nelec, nnuc, 0:ncord)] END_PROVIDER -BEGIN_PROVIDER [double precision, rescale_een_n_deriv_e, (4, nelec, nnuc, 0:ncord)] +BEGIN_PROVIDER [double precision, rescale_een_n_deriv_e, (nelec, 4, nnuc, 0:ncord)] implicit none BEGIN_DOC ! Derivative of the scaled distance J_{een} wrt R_{ia} @@ -198,23 +198,23 @@ BEGIN_PROVIDER [double precision, rescale_een_n_deriv_e, (4, nelec, nnuc, 0:ncor kappa_l = - dble(l) * kappa do a = 1, nnuc do i = 1, nelec - ! r'(x) \lor r''(x) do ii = 1, 4 - rescale_een_n_deriv_e(ii, i, a, l) = & + ! r'(x) \lor r''(x) + rescale_een_n_deriv_e(i, ii, a, l) = & kappa_l * elnuc_dist_deriv_e(ii, i, a) !print *, "pp", ii, i, a, elnuc_dist_deriv_e(ii, i, a) enddo ! \left(r''(x)+r'(x)^2\right) - rescale_een_n_deriv_e(4, i, a, l) = rescale_een_n_deriv_e(4, i, a, l) + & - rescale_een_n_deriv_e(1, i, a, l) * rescale_een_n_deriv_e(1, i, a, l) + & - rescale_een_n_deriv_e(2, i, a, l) * rescale_een_n_deriv_e(2, i, a, l) + & - rescale_een_n_deriv_e(3, i, a, l) * rescale_een_n_deriv_e(3, i, a, l) + rescale_een_n_deriv_e(i, 4, a, l) = rescale_een_n_deriv_e(i, 4, a, l) + & + rescale_een_n_deriv_e(i, 1, a, l) * rescale_een_n_deriv_e(i, 1, a, l) + & + rescale_een_n_deriv_e(i, 2, a, l) * rescale_een_n_deriv_e(i, 2, a, l) + & + rescale_een_n_deriv_e(i, 3, a, l) * rescale_een_n_deriv_e(i, 3, a, l) ! \times e^{r(x)} do ii = 1, 4 - rescale_een_n_deriv_e(ii, i, a, l) = & - rescale_een_n_deriv_e(ii, i, a, l) * rescale_een_n(i, a, l) + rescale_een_n_deriv_e(i, ii, a, l) = & + rescale_een_n_deriv_e(i, ii, a, l) * rescale_een_n(i, a, l) enddo enddo enddo @@ -243,7 +243,7 @@ BEGIN_PROVIDER [double precision, elnuc_dist_deriv_e, (4, nelec, nnuc)] end do END_PROVIDER -BEGIN_PROVIDER [double precision, rescale_een_e_deriv_e, (4, nelec, nelec, 0:ncord)] +BEGIN_PROVIDER [double precision, rescale_een_e_deriv_e, (nelec, 4, nelec, 0:ncord)] BEGIN_DOC ! Derivative of the scaled distance J_{een} wrt R_{ia} END_DOC @@ -259,27 +259,27 @@ BEGIN_PROVIDER [double precision, rescale_een_e_deriv_e, (4, nelec, nelec, 0:nco do i = 1, nelec ! r'(x) \lor r''(x) do ii = 1, 4 - rescale_een_e_deriv_e(ii, i, j, l) = & + rescale_een_e_deriv_e(i, ii, j, l) = & kappa_l * elec_dist_deriv_e(ii, i, j) enddo ! \left(r''(x)+r'(x)^2\right) - rescale_een_e_deriv_e(4, i, j, l) = rescale_een_e_deriv_e(4, i, j, l) + & - rescale_een_e_deriv_e(1, i, j, l) * rescale_een_e_deriv_e(1, i, j, l) + & - rescale_een_e_deriv_e(2, i, j, l) * rescale_een_e_deriv_e(2, i, j, l) + & - rescale_een_e_deriv_e(3, i, j, l) * rescale_een_e_deriv_e(3, i, j, l) + rescale_een_e_deriv_e(i, 4, j, l) = rescale_een_e_deriv_e(i, 4, j, l) + & + rescale_een_e_deriv_e(i, 1, j, l) * rescale_een_e_deriv_e(i, 1, j, l) + & + rescale_een_e_deriv_e(i, 2, j, l) * rescale_een_e_deriv_e(i, 2, j, l) + & + rescale_een_e_deriv_e(i, 3, j, l) * rescale_een_e_deriv_e(i, 3, j, l) ! \times e^{r(x)} do ii = 1, 4 - rescale_een_e_deriv_e(ii, i, j, l) = & - rescale_een_e_deriv_e(ii, i, j, l) * rescale_een_e(i, j, l) + rescale_een_e_deriv_e(i, ii, j, l) = & + rescale_een_e_deriv_e(i, ii, j, l) * rescale_een_e(i, j, l) enddo enddo enddo enddo END_PROVIDER -BEGIN_PROVIDER [double precision, rescale_een_e_deriv_e_t, (4, nelec, nelec, 0:ncord)] +BEGIN_PROVIDER [double precision, rescale_een_e_deriv_e_t, (nelec, 4, nelec, 0:ncord)] implicit none BEGIN_DOC ! Transposed rescale_een_e_deriv_e @@ -288,7 +288,7 @@ BEGIN_PROVIDER [double precision, rescale_een_e_deriv_e_t, (4, nelec, nelec, 0:n do l=0,ncord do j=1,nelec do i=1,nelec - rescale_een_e_deriv_e_t(1:4,j,i,l) = rescale_een_e_deriv_e(1:4,i,j,l) + rescale_een_e_deriv_e_t(j,1:4,i,l) = rescale_een_e_deriv_e(i,1:4,j,l) enddo enddo enddo