WHAM for Lorentzian like constrains fixed - DEBUG OFF
authorAdam Sieradzan <adasko@piasek4.chem.univ.gda.pl>
Tue, 21 Jul 2015 05:57:41 +0000 (07:57 +0200)
committerAdam Sieradzan <adasko@piasek4.chem.univ.gda.pl>
Tue, 21 Jul 2015 05:57:41 +0000 (07:57 +0200)
source/unres/src_MD-M/energy_p_new_barrier.F
source/wham/src-M/energy_p_new.F
source/wham/src-M/parmread.F
source/wham/src-M/read_dist_constr.F

index 745f7d5..131e817 100644 (file)
@@ -4090,6 +4090,7 @@ C
       do i=1,3
        ggg(i)=0.0d0
       enddo
+C      write (iout,*) ,"link_end",link_end,constr_dist
 cd      write(iout,*)'edis: nhpb=',nhpb,' fbr=',fbr
 cd      write(iout,*)'link_start=',link_start,' link_end=',link_end
       if (link_end.eq.0) return
@@ -4129,6 +4130,8 @@ c Restraints from contact prediction
      &          *rlornmr1(dd,dhpb(i),dhpb1(i),forcon(i))
             fac=fordepth(i)**4.0d0
      &          *rlornmr1prim(dd,dhpb(i),dhpb1(i),forcon(i))/dd
+          if (energy_dec) write (iout,'(a6,2i5,3f8.3)') "edisl",ii,jj,
+     &    ehpb,fordepth(i),dd
            else
           if (dhpb1(i).gt.0.0d0) then
             ehpb=ehpb+2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i))
@@ -4169,6 +4172,8 @@ C target distance.
      &           *rlornmr1(dd,dhpb(i),dhpb1(i),forcon(i))
             fac=fordepth(i)**4.0d0
      &           *rlornmr1prim(dd,dhpb(i),dhpb1(i),forcon(i))/dd
+          if (energy_dec) write (iout,'(a6,2i5,3f8.3)') "edisl",ii,jj,
+     &    ehpb,fordepth(i),dd
            else   
           if (dhpb1(i).gt.0.0d0) then
             ehpb=ehpb+2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i))
index f184eed..8cf29b2 100644 (file)
@@ -2953,7 +2953,7 @@ C
       ehpb=0.0D0
 cd    print *,'edis: nhpb=',nhpb,' fbr=',fbr
 cd    print *,'link_start=',link_start,' link_end=',link_end
-      write(iout,*) link_end, "link_end"
+C      write(iout,*) link_end, "link_end"
       if (link_end.eq.0) return
       do i=link_start,link_end
 C If ihpb(i) and jhpb(i) > NRES, this is a SC-SC distance, otherwise a
@@ -2972,7 +2972,7 @@ C 24/11/03 AL: SS bridges handled separately because of introducing a specific
 C    distance and angle dependent SS bond potential.
 C        if (ii.gt.nres .and. iabs(itype(iii)).eq.1 .and. 
 C     & iabs(itype(jjj)).eq.1) then
-       write(iout,*) constr_dist,"const"
+C       write(iout,*) constr_dist,"const"
        if (.not.dyn_ss .and. i.le.nss) then
          if (ii.gt.nres .and. iabs(itype(iii)).eq.1 .and.
      & iabs(itype(jjj)).eq.1) then
@@ -2989,7 +2989,9 @@ C     &          *rlornmr1(dd,dhpb(i),dhpb1(i),forcon(i))
      &          *rlornmr1(dd,dhpb(i),dhpb1(i),forcon(i))
             fac=fordepth(i)**4.0d0
      &          *rlornmr1prim(dd,dhpb(i),dhpb1(i),forcon(i))/dd
-            write(iout,*) ehpb,"atu?"
+C          write (iout,'(a6,2i5,3f8.3)') "edisl",ii,jj,
+C     &    ehpb,fordepth(i),dd
+C            write(iout,*) ehpb,"atu?"
 C            ehpb,"tu?"
 C            fac=fordepth(i)**4.0d0
 C     &          *rlornmr1prim(dd,dhpb(i),dhpb1(i),forcon(i))/dd
@@ -3025,9 +3027,9 @@ C
             ghpbc(k,iii)=ghpbc(k,iii)-ggg(k)
           enddo
         else !ii.gt.nres
-          write(iout,*) "before"
+C          write(iout,*) "before"
           dd=dist(ii,jj)
-          write(iout,*) "after",dd
+C          write(iout,*) "after",dd
           if (constr_dist.eq.11) then
             ehpb=ehpb+fordepth(i)**4.0d0
      &          *rlornmr1(dd,dhpb(i),dhpb1(i),forcon(i))
@@ -3036,7 +3038,10 @@ C
 C            ehpb=ehpb+fordepth(i)**4*rlornmr1(dd,dhpb(i),dhpb1(i))
 C            fac=fordepth(i)**4*rlornmr1prim(dd,dhpb(i),dhpb1(i))/dd
 C            print *,ehpb,"tu?"
-            write(iout,*) ehpb,"btu?",dd,dhpb(i),dhpb1(i),fordepth(i)
+C            write(iout,*) ehpb,"btu?",
+C     & dd,dhpb(i),dhpb1(i),fordepth(i),forcon(i)
+C          write (iout,'(a6,2i5,3f8.3)') "edisl",ii,jj,
+C     &    ehpb,fordepth(i),dd
            else   
           if (dhpb1(i).gt.0.0d0) then
             ehpb=ehpb+2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i))
index 819e46c..4f5ae04 100644 (file)
@@ -141,6 +141,7 @@ c
       wbond=ww(18)
       wsccor=ww(19)
       whpb=ww(15)
+      wstrain=ww(15)
       endif
 
       call card_concat(controlcard,.false.)
index a97f797..27fe63a 100644 (file)
@@ -110,7 +110,13 @@ C     &     nhpb,ihpb(nhpb),jhpb(nhpb),dhpb(nhpb),forcon(nhpb)
         endif
         if (forcon(nhpb+1).gt.0.0d0) then
           nhpb=nhpb+1
-          dhpb(nhpb)=dist(ihpb(nhpb),jhpb(nhpb))
+          if (ibecarb(i).gt.0) then
+            ihpb(i)=ihpb(i)+nres
+            jhpb(i)=jhpb(i)+nres
+          endif
+          if (dhpb(nhpb).eq.0.0d0)
+     &       dhpb(nhpb)=dist(ihpb(nhpb),jhpb(nhpb))
+C          dhpb(nhpb)=dist(ihpb(nhpb),jhpb(nhpb))
           write (iout,'(a,3i5,f8.2,f10.1)') "+dist.constr ",
      &     nhpb,ihpb(nhpb),jhpb(nhpb),dhpb(nhpb),forcon(nhpb)
         endif