1 subroutine thermo_length
2 c Integrating |PMF| to claculate thermodynamic length
4 include 'DIMENSIONS.PMF'
5 include 'COMMON.IOUNITS'
8 double precision aL(0:maxHdim,maxT_h)
9 double precision aLdelta,qdelta,qtemp,
10 integer nT,tmin,tmax,i,j,t,tlow,tup,nW
11 qdelta=(qmax-qmin)/(nW-1)
16 dH=hfin(tmin+1,j)-hfin(tmin,j)
17 print *,"tmin",tmin,hfin(tmin+1,j),hfin(tmin,j)," dH",dH
19 hfin(t,j)=hfin(t+1,j)-dH
21 aL(0,j)=0.5d0*(dabs(hfin(0,j))+dabs(hfin(1,j)))
23 aL(t,j)=aL(t-1,j)+0.5d0*(dabs(hfin(t,j))+dabs(hfin(t+1,j)))
25 aL(tmax,j)=aL(tmax-1,j)
27 aL(t,j)=(aL(t,j)-0.5d0*(dabs(hfin(0,j))+dabs(hfin(1,j))))*delta
29 write (*,*) "T=",1.0d0/(1.987D-3*beta_h(j))," PMF and L"
31 write (*,'(f5.2,2f10.5)') t*delta,hfin(t,j),aL(t,j)
33 c Determining window centers
34 tlow=(qmin+1.0d-4)/delta
35 tup=(qmax+1.0d-4)/delta
36 aLspan=aL(tup,j)-aL(tlow,j)
38 print *,"tlow",tlow," tup",tup," aLspan",aLspan,
44 print *,"i",i," aLw",aLw
46 if (aLw.ge.aL(t,j).and.aLw.le.aL(t+1,j)) then
47 print *,"i",i," t",t," aLw",aLw,aL(t,j),aL(t+1,j)
48 q0(i,j)=t*delta+delta*(aLw-aL(t,j))/(aL(t+1,j)-aL(t,j))
54 write (*,'(20f10.5)') (q0(i,j),i=1,nW)
59 Wprim=(hfin(t+1,j)-hfin(t-1,j))/(2*delta)
60 Wbis=(hfin(t+1,j)+hfin(t-1,j)-2*hfin(t,j))/delta**2
61 keff=0.5d0*Wprim**2+dabs(Wbis)
62 & +dsqrt((0.5d0*Wprim**2+dabs(Wbis))**2-Wbis**2)
63 write (*,'(f5.2,3f10.1)') t*delta,Wprim,Wbis,keff