Skip to content

Commit

Permalink
file.efield now prints XYZ, minor change to ifdef OEPROP is now OEPRO…
Browse files Browse the repository at this point in the history
…PESP
  • Loading branch information
etiennepalos committed Jun 18, 2024
1 parent 5cb732a commit e65c5b7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
12 changes: 6 additions & 6 deletions src/modules/include/attrashell.fh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
! First, calculates 〈 phi_mu | phi_nu 〉 for all mu and nu !
! Then, P_{mu nu} * 〈 phi_mu | 1/|r-C| | phi_nu 〉 !
!-----------------------------------------------------------------------------------------!
#if defined (OEPROP)
#if defined (OEPROPESP)
subroutine esp_shell_pair(IIsh, JJsh, esp_electronic)
#elif defined (OEI)
subroutine attrashell(IIsh, JJsh)
Expand Down Expand Up @@ -36,7 +36,7 @@ subroutine attrashell(IIsh, JJsh)
common /xiaoattra/attra,aux,AA,BB,CC,PP,g
double precision RA(3),RB(3),RP(3),inv_g,g_table(200), valopf

#if defined (OEPROP)
#if defined (OEPROPESP)
integer :: igridpoint
double precision, dimension(:), intent(inout) :: esp_electronic
#elif defined (OEI)
Expand Down Expand Up @@ -77,7 +77,7 @@ subroutine attrashell(IIsh, JJsh)
constanttemp=dexp(-((a*b*((Ax - Bx)**2.d0 + (Ay - By)**2.d0 + (Az - Bz)**2.d0))*inv_g))
const = overlap_core(a,b,0,0,0,0,0,0,Ax,Ay,Az,Bx,By,Bz,Px,Py,Pz,g_table) * 2.d0 * sqrt(g/Pi)*constanttemp

#if defined (OEPROP)
#if defined (OEPROPESP)
! Loops over external grid points/MM atoms
do igridpoint=1,quick_molspec%nextpoint
Cx=quick_molspec%extxyz(1,igridpoint)
Expand Down Expand Up @@ -107,7 +107,7 @@ subroutine attrashell(IIsh, JJsh)
call FmT(Maxm,U,aux)
! Calculate all the auxilary integrals and store in attraxiao array
do L = 0,maxm
#if defined (OEPROP)
#if defined (OEPROPESP)
! sign (-1.0d0) is used to ensure the auxilary integrals are negative
aux(L) = -1.0d0*aux(L)*const
#elif defined (OEI)
Expand All @@ -117,7 +117,7 @@ subroutine attrashell(IIsh, JJsh)
enddo

NIJ1=10*NII2+NJJ2
#if defined (OEPROP)
#if defined (OEPROPESP)
! Call and get P_{mu nu} V_{mu nu} into esp_electronic( )
call esp_1pdm(ips,jps,IIsh,JJsh,NIJ1,Ax,Ay,Az,Bx,By,Bz, &
Cx,Cy,Cz,Px,Py,Pz, esp_electronic(igridpoint))
Expand All @@ -130,7 +130,7 @@ subroutine attrashell(IIsh, JJsh)
endif
enddo
enddo
#if defined (OEPROP)
#if defined (OEPROPESP)
end subroutine esp_shell_pair
#elif defined (OEI)
end subroutine attrashell
Expand Down
10 changes: 5 additions & 5 deletions src/modules/include/nuclearattra.fh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if defined (OEPROP)
#if defined (OEPROPESP)
subroutine esp_1pdm(Ips,Jps,IIsh,JJsh,NIJ1,Ax,Ay,Az,Bx,By,Bz,Cx,Cy,Cz,Px,Py,Pz,esp)
#elif defined (OEI)
subroutine nuclearattra(Ips,Jps,IIsh,JJsh,NIJ1,Ax,Ay,Az,Bx,By,Bz,Cx,Cy,Cz,Px,Py,Pz)
Expand All @@ -8,7 +8,7 @@
use quick_basis_module, only: attraxiao,quick_basis
use quick_files_module, only: ioutfile

#if defined (OEPROP)
#if defined (OEPROPESP)
use quick_method_module, only: quick_method
#endif

Expand All @@ -23,7 +23,7 @@
double precision Ax,Ay,Az,Bx,By,Bz,Cx,Cy,Cz,Px,Py,Pz,g
double precision AA(3),BB(3),CC(3),PP(3)

#if defined (OEPROP)
#if defined (OEPROPESP)
double precision, intent(inout) :: esp
#endif

Expand Down Expand Up @@ -230,7 +230,7 @@
do JJJ=max(III,JJJ1),JJJ2
itemp2=trans(quick_basis%KLMN(1,JJJ),quick_basis%KLMN(2,JJJ),quick_basis%KLMN(3,JJJ))

#if defined (OEPROP)
#if defined (OEPROPESP)
dense_sym_factor = 1.0d0
if (III /= JJJ) dense_sym_factor = 2.0d0

Expand All @@ -251,7 +251,7 @@
enddo
201 return

#if defined (OEPROP)
#if defined (OEPROPESP)
End subroutine esp_1pdm
#elif defined (OEI)
End subroutine nuclearattra
Expand Down
15 changes: 7 additions & 8 deletions src/modules/quick_oeproperties_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -365,21 +365,21 @@ subroutine print_efield(efield_nuclear, efield_electronic, nextpoint, ierr)
Cz = quick_molspec%extxyz(3, igridpoint)
endif

! Sum nuclear and electric components of EField and print.
! Sum nuclear and electric components of EFIELD and print.
if (quick_method%efield_grid) then
write(iEFIELDFile, '(3x,ES14.6,3x,ES14.6,3x,ES14.6)') &
efield_nuclear(1,igridpoint)+efield_electronic(1,igridpoint), &
efield_nuclear(2,igridpoint)+efield_electronic(2,igridpoint), &
efield_nuclear(3,igridpoint)+efield_electronic(3,igridpoint)
write(iEFIELDFile, '(2x,3(F14.10, 1x), 3x,ES14.6,3x,ES14.6,3x,ES14.6)') Cx, Cy, Cz, &
(efield_nuclear(1,igridpoint)+efield_electronic(1,igridpoint)), &
(efield_nuclear(2,igridpoint)+efield_electronic(2,igridpoint)), &
(efield_nuclear(3,igridpoint)+efield_electronic(3,igridpoint))
endif

end do
end subroutine print_efield

#define OEPROP
#define OEPROPESP
#include "./include/attrashell.fh"
#include "./include/nuclearattra.fh"
#undef OEPROP
#undef OEPROPESP

subroutine efield_1pdm(Ips,Jps,IIsh,JJsh,NIJ1, &
Ax,Ay,Az,Bx,By,Bz,Cx,Cy,Cz,Px,Py,Pz,efield)
Expand Down Expand Up @@ -408,7 +408,6 @@ subroutine efield_1pdm(Ips,Jps,IIsh,JJsh,NIJ1, &
PP(2)=Py
PP(3)=Pz


select case (NIJ1+11)

case(0)
Expand Down

0 comments on commit e65c5b7

Please sign in to comment.