Skip to content

Commit

Permalink
introducing long range Jastrow + cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
saveriomoroni committed Feb 15, 2024
1 parent 1c3dac1 commit 51b3c47
Show file tree
Hide file tree
Showing 35 changed files with 1,374 additions and 5,858 deletions.
1 change: 0 additions & 1 deletion src/dmc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ file(GLOB DMC_SOURCE
acues1_reduce.f90
averages.f90
dumper.f90
gauss.f90
main.f90
mmpol_reduce.f90
nonloc_grid.f90
Expand Down
35 changes: 28 additions & 7 deletions src/dmc/prop_dmc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ subroutine prop_prt_dmc(iblk,ifinal,wgcum,wgcm2)
use contrl_file, only: ounit
use control_dmc, only: dmc_nconf,dmc_nstep
use multiple_geo, only: MFORCE
use periodic, only: gnorm, gvec, ngvec
use precision_kinds, only: dp
use properties, only: MAXPROP
use properties_mod, only: gnormf
use prp000, only: iprop,ipropprt,nprop
use prp003, only: cc_nuc,vprop_cm2,vprop_cum
use system, only: nelec
Expand All @@ -22,13 +23,13 @@ subroutine prop_prt_dmc(iblk,ifinal,wgcum,wgcm2)
integer :: i, iblk, icount, ifinal, iperr
real(dp) :: dip, diperr, dipx, dipy
real(dp) :: dipz, evalg_eff
real(dp) :: rtevalg_eff1
real(dp) :: rtevalg_eff1, norm_aux
real(dp), dimension(MFORCE) :: wgcum
real(dp), dimension(MFORCE) :: wgcm2
real(dp), dimension(MAXPROP) :: perr
real(dp), dimension(MAXPROP) :: pav
real(dp), dimension(nprop) :: perr
real(dp), dimension(nprop) :: pav

character (len=3) pnames(MAXPROP)
character (len=3) pnames(6)
data pnames /'X ','Y ','Z ','XX ','YY ','ZZ '/
data icount /1/
save icount
Expand All @@ -46,8 +47,12 @@ subroutine prop_prt_dmc(iblk,ifinal,wgcum,wgcm2)

icount=1

write(ounit,*) 'HELLO',nprop
do i=1,nprop
pav(i)=vprop_cum(i)/wgcum(1)
enddo

do i=1,nprop
pav(i)=vprop_cum(i)/wgcum(1)
if(iblk.eq.1) then
perr(i)=0
else
Expand All @@ -60,7 +65,23 @@ subroutine prop_prt_dmc(iblk,ifinal,wgcum,wgcm2)
else
evalg_eff=dmc_nconf*dmc_nstep*rn_eff(wgcum(1),wgcm2(1))
rtevalg_eff1=dsqrt(evalg_eff-1)
write(ounit,'(''property '',a3,t17,f12.7,'' +-'',f11.7,f9.5)') pnames(i),pav(i),perr(i),perr(i)*rtevalg_eff1
if(i.le.6) then
write(ounit,'(''property '',a3,t17,f12.7,'' +-'' &
,f11.7,f9.5)') pnames(i),pav(i),perr(i),perr(i)*rtevalg_eff1
elseif(i.le.(6+ngvec-1)) then
call gnormf(3,gvec(1,i-5), norm_aux)
write(ounit,'(''s(k) '',t17,f12.7,f12.7,'' +-'' &
,f12.7,f12.7,f22.7)') norm_aux,pav(i),perr(i),perr(i)*rtevalg_eff1, &
pav(i)-(pav(i+ngvec-1)**2)-(pav(i+2*(ngvec-1))**2)
elseif(i.le.(6+2*(ngvec-1))) then
call gnormf(3,gvec(1,i-5-ngvec+1), norm_aux)
write(ounit,'(''cos(kr) '',t17,f12.7,f12.7,'' +-'' &
,f12.7,f12.7)') norm_aux,pav(i),perr(i),perr(i)*rtevalg_eff1
else
call gnormf(3,gvec(1,i-5-2*(ngvec-1)), norm_aux)
write(ounit,'(''sin(kr) '',t17,f12.7,f12.7,'' +-'' &
,f12.7,f12.7)') norm_aux,pav(i),perr(i),perr(i)*rtevalg_eff1
endif
endif
enddo
!....dipole
Expand Down
7 changes: 3 additions & 4 deletions src/dmc/prop_reduce.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ subroutine prop_reduce(wgsum)
use mpi
use mpiconf, only: wid
use precision_kinds, only: dp
use properties, only: MAXPROP
use prp000, only: iprop,nprop
use prp003, only: vprop_cm2,vprop_cum,vprop_sum

implicit none

integer :: i, ierr
real(dp) :: vpnow, wgsum
real(dp), dimension(MAXPROP) :: vp2sum
real(dp), dimension(MAXPROP) :: vpcollect
real(dp), dimension(MAXPROP) :: vp2collect
real(dp), dimension(nprop) :: vp2sum
real(dp), dimension(nprop) :: vpcollect
real(dp), dimension(nprop) :: vp2collect



Expand Down
3 changes: 1 addition & 2 deletions src/module/m_allocation.f90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module allocation_mod
use m_efield, only: allocate_m_efield,deallocate_m_efield
use m_estimators, only: allocate_m_estimators
use m_estimators, only: deallocate_m_estimators
use m_ewald, only: allocate_m_ewald,deallocate_m_ewald
use m_ewald, only: deallocate_m_ewald
use m_force, only: allocate_m_force,deallocate_m_force
use m_gradhess, only: allocate_m_gradhess,deallocate_m_gradhess
use m_grdnt, only: allocate_m_grdnt,deallocate_m_grdnt
Expand Down Expand Up @@ -41,7 +41,6 @@ subroutine allocate_vmc()
call allocate_m_deriv
call allocate_m_efield
call allocate_m_estimators
call allocate_m_ewald
call allocate_m_force
call allocate_m_gradhess
call allocate_m_grdnt
Expand Down
Loading

0 comments on commit 51b3c47

Please sign in to comment.