subroutine readpc implicit none include 'pimc.par' integer l,js,step,is,il,n,m,nj,ik,is1,js1,ismin,i integer mover(mmovers) real*4 etime,tim(2) real*8 phonon3,coulomb,phonon4,act2,yself real*8 cewald,epactlr external phonon3,coulomb include 'pimc.cm' c do one block of MC dynamics do step=1,nstep read(31) (((x(l,nj,js),l=1,ndim),nj=1,np),js=1,nslices) c write (*,'(i5,3g20.10)') (js,(x(l,js),l=1,ndim),js=1,nslices) c compute the action of this path cpot=0.d0 do n=1,np c intramolecular contribution do js=1,nslices js1=iwrap(js-1) spring(n,js)=0.d0 do l=1,ndim spring(n,js) = spring(n,js)+(pbc(x(l,n,js),x(l,n,js1),l))**2 enddo spring(n,js)=spring(n,js)*cke enddo c intermolecular contribution do m=1,n-1 do js=1,nslices js1=iwrap(js-1) cpot=cpot+coulomb(x(1,n,js),x(1,m,js), & x(1,n,js1),x(1,m,js1),ndim) enddo enddo enddo if(bond.ne.0.d0) cpot=cpot+charge/bond action=cpot+epact+epact1+ep12 c write(*,'(i3,4g15.6)') step,action,epact,ep12,cpot c computing averages tt=etime(tim) call anal(level,step) ttanal=ttanal+etime(tim)-tt enddo ! over steps return end