From 0834d4785a0a1a1385ccc79674cad893e08bdbca Mon Sep 17 00:00:00 2001 From: Cezary Czaplewski Date: Sun, 17 May 2020 09:36:43 +0200 Subject: [PATCH] homology energy correction --- source/unres/src-HCD-5D/DIMENSIONS | 2 +- source/unres/src-HCD-5D/MREMD.F | 38 ++++++++++++++++++++++++ source/unres/src-HCD-5D/energy_p_new_barrier.F | 22 ++++++++------ 3 files changed, 52 insertions(+), 10 deletions(-) diff --git a/source/unres/src-HCD-5D/DIMENSIONS b/source/unres/src-HCD-5D/DIMENSIONS index 75287f5..599bfa2 100644 --- a/source/unres/src-HCD-5D/DIMENSIONS +++ b/source/unres/src-HCD-5D/DIMENSIONS @@ -155,7 +155,7 @@ C Maximum number of bins in SAXS restraints parameter (MaxSAXS=1000) C Maximum number of templates in homology-modeling restraints integer max_template - parameter(max_template=25) + parameter(max_template=50) c Maximum number of clusters of templates containing same fragments integer maxclust parameter(maxclust=1000) diff --git a/source/unres/src-HCD-5D/MREMD.F b/source/unres/src-HCD-5D/MREMD.F index 78a7404..38db8a8 100644 --- a/source/unres/src-HCD-5D/MREMD.F +++ b/source/unres/src-HCD-5D/MREMD.F @@ -175,6 +175,19 @@ cd write (*,*) me," After broadcast: file_exist",file_exist enddo enddo endif + stdfp=dsqrt(2*Rb*t_bath/d_time) + do i=1,ntyp + stdfsc(i)=dsqrt(2*Rb*t_bath/d_time) + enddo + if (lang.gt.0 .and. .not.surfarea) then + do i=nnt,nct-1 + stdforcp(i)=stdfp*dsqrt(gamp) + enddo + do i=nnt,nct + if (itype(i).ne.ntyp1) stdforcsc(i)=stdfsc(iabs(itype(i))) + & *dsqrt(gamsc(iabs(itype(i)))) + enddo + endif endif if(me.eq.king) then @@ -237,6 +250,20 @@ cd write (*,*) me," After broadcast: file_exist",file_exist write (iout,'(a6,i4,a1,100i4)') "ndowna",il,":", & (ndowna(i,il),i=1,ndowna(0,il)) enddo + stdfp=dsqrt(2*Rb*t_bath/d_time) + do i=1,ntyp + stdfsc(i)=dsqrt(2*Rb*t_bath/d_time) + enddo + if (lang.gt.0 .and. .not.surfarea) then + do i=nnt,nct-1 + stdforcp(i)=stdfp*dsqrt(gamp) + enddo + do i=nnt,nct + if (itype(i).ne.ntyp1) stdforcsc(i)=stdfsc(iabs(itype(i))) + & *dsqrt(gamsc(iabs(itype(i)))) + enddo + endif + ELSE IF (.not.(rest.and.file_exist)) THEN do il=1,remd_m(1) ifirst(il)=il @@ -1279,6 +1306,17 @@ co & " rescaling weights with temperature",t_bath stdfsc(i)=dsqrt(2*Rb*t_bath/d_time) enddo +c Compute the standard deviations of stochastic forces for Langevin dynamics +c if the friction coefficients do not depend on surface area + if (lang.gt.0 .and. .not.surfarea) then + do i=nnt,nct-1 + stdforcp(i)=stdfp*dsqrt(gamp) + enddo + do i=nnt,nct + if (itype(i).ne.ntyp1) stdforcsc(i)=stdfsc(iabs(itype(i))) + & *dsqrt(gamsc(iabs(itype(i)))) + enddo + endif cde write(iout,*) 'REMD after',me,t_bath time08=MPI_WTIME() if (me.eq.king .or. .not. out1file) then diff --git a/source/unres/src-HCD-5D/energy_p_new_barrier.F b/source/unres/src-HCD-5D/energy_p_new_barrier.F index 07cdebb..190574e 100644 --- a/source/unres/src-HCD-5D/energy_p_new_barrier.F +++ b/source/unres/src-HCD-5D/energy_p_new_barrier.F @@ -7694,16 +7694,20 @@ c enddo c min_odl=minval(distancek) - do kk=1,constr_homology - if(l_homo(kk,ii)) then - min_odl=distancek(kk) - exit - endif - enddo - do kk=1,constr_homology - if(l_homo(kk,ii) .and. distancek(kk).lt.min_odl) + if (nexl.gt.0) then + min_odl=0.0d0 + else + do kk=1,constr_homology + if(l_homo(kk,ii)) then + min_odl=distancek(kk) + exit + endif + enddo + do kk=1,constr_homology + if(l_homo(kk,ii) .and. distancek(kk).lt.min_odl) & min_odl=distancek(kk) - enddo + enddo + endif c write (iout,* )"min_odl",min_odl #ifdef DEBUG -- 1.7.9.5