Skip to content

Commit

Permalink
FIXED EFIELD_1PDM IN HEADER FILE
Browse files Browse the repository at this point in the history
fixed efield_1pdm
needs MPI and OEI-nuc gradients need testing
  • Loading branch information
etiennepalos committed Jun 21, 2024
1 parent b6ec8ac commit 1492476
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/modules/include/attrashell.fh
Original file line number Diff line number Diff line change
Expand Up @@ -285,4 +285,4 @@ subroutine attrashell(IIsh, JJsh)
#elif defined (OEI)
return
end subroutine attrashellopt
#endif
#endif
20 changes: 8 additions & 12 deletions src/modules/include/nuclearattra.fh
Original file line number Diff line number Diff line change
Expand Up @@ -1133,17 +1133,13 @@ subroutine nuclearattraopt(Ips,Jps,IIsh,JJsh,NIJ1, &

iA=quick_basis%katom(IIsh)
iB=quick_basis%katom(JJsh)
#if defined (OEPROP)
! iC=iatom
#elif defined (OEI)
#if defined (OEI)
iC=iatom
#endif

iAstart = (iA-1)*3
iBstart = (iB-1)*3
#if defined (OEPROP)
iCstart = (iC-1)*3
#elif defined (OEI)
#if defined (OEI)
iCstart = (iC-1)*3
#endif

Expand All @@ -1168,11 +1164,7 @@ subroutine nuclearattraopt(Ips,Jps,IIsh,JJsh,NIJ1, &
Cgrad2=Cgrad2+Xconstant2*attraxiaoopt(2,itemp1,itemp2,0)
Cgrad3=Cgrad3+Xconstant2*attraxiaoopt(3,itemp1,itemp2,0)

#if defined (OEPROP)
efield(1) = efield(1)- CGrad1
efield(2) = efield(2)- CGrad2
efield(3) = efield(3)- CGrad3
#elif defined (OEI)
#if defined (OEI)
itemp1new=trans(quick_basis%KLMN(1,III)+1,quick_basis%KLMN(2,III),quick_basis%KLMN(3,III))
Agrad1=Agrad1+2.0d0*Xconstant2* &
quick_basis%gcexpo(ips,quick_basis%ksumtype(IIsh))*attraxiao(itemp1new,itemp2,0)
Expand Down Expand Up @@ -1232,7 +1224,11 @@ subroutine nuclearattraopt(Ips,Jps,IIsh,JJsh,NIJ1, &
enddo
enddo

#if defined (OEI)
#if defined (OEPROP)
efield(1) = efield(1)- CGrad1
efield(2) = efield(2)- CGrad2
efield(3) = efield(3)- CGrad3
#elif defined (OEI)
quick_qm_struct%gradient(iASTART+1) = quick_qm_struct%gradient(iASTART+1)+ AGrad1
quick_qm_struct%gradient(iASTART+2) = quick_qm_struct%gradient(iASTART+2)+ AGrad2
quick_qm_struct%gradient(iASTART+3) = quick_qm_struct%gradient(iASTART+3)+ AGrad3
Expand Down
8 changes: 4 additions & 4 deletions src/modules/quick_oeproperties_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ module quick_oeproperties_module

contains

#define OEPROP
#include "./include/attrashell.fh"
#include "./include/nuclearattra.fh"
#undef OEPROP
!----------------------------------------------------------------------------!
! This is the subroutine that "computes" the Electrostatic Potential (ESP) !
! at a given point , V(r) = V_nuc(r) + V_elec(r), and prints it to file.prop !
Expand Down Expand Up @@ -376,10 +380,6 @@ subroutine print_efield(efield_nuclear, efield_electronic, nextpoint, ierr)
end do
end subroutine print_efield

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

! subroutine efield_1pdm(Ips,Jps,IIsh,JJsh,NIJ1, &
! Ax,Ay,Az,Bx,By,Bz,Cx,Cy,Cz,Px,Py,Pz,efield)
Expand Down

0 comments on commit 1492476

Please sign in to comment.