trial for X-Cys-Cys-X sequences
[unres.git] / source / unres / src_MD-M / ssMD.F
index 8b7f2a4..de0abb0 100644 (file)
@@ -655,38 +655,7 @@ c     &       "SSBOND_FORM",totT,t_bath,newihpb(i),newjhpb(i)
       return
       end
 
-c----------------------------------------------------------------------------
-
-#ifdef WHAM
-      subroutine read_ssHist
-      implicit none
-
-c     Includes
-      include 'DIMENSIONS'
-      include "DIMENSIONS.FREE"
-      include 'COMMON.FREE'
-
-c     Local variables
-      integer i,j
-      character*80 controlcard
-
-      do i=1,dyn_nssHist
-        call card_concat(controlcard,.true.)
-        read(controlcard,*)
-     &       dyn_ssHist(i,0),(dyn_ssHist(i,j),j=1,2*dyn_ssHist(i,0))
-      enddo
-
-      return
-      end
-#endif
 
-c----------------------------------------------------------------------------
-
-
-C-----------------------------------------------------------------------------
-C-----------------------------------------------------------------------------
-C-----------------------------------------------------------------------------
-C-----------------------------------------------------------------------------
 C-----------------------------------------------------------------------------
 C-----------------------------------------------------------------------------
 C-----------------------------------------------------------------------------
@@ -1990,6 +1959,7 @@ c      integer itypi,itypj,k,l
       double precision ssA,ssB,ssC,ssXs
       double precision ssxm,ljxm,ssm,ljm
       double precision d_ssxm(1:3),d_ljxm(1:3),d_ssm(1:3),d_ljm(1:3)
+      eij=0.0
       if (dtriss.eq.0) return
       i=resi
       j=resj
@@ -2042,11 +2012,23 @@ C The first case the ith atom is the center
 C Energy function is E=d/(a*(x-y)**2+b*(x+y)**2+c) where x is first
 C distance y is second distance the a,b,c,d are parameters derived for
 C this problem d parameter was set as a penalty currenlty set to 1.
+      if ((iabs(j-i).eq.1).or.(iabs(i-k).eq.1)) then
+      eij1=0.0d0
+      else
       eij1=dtriss/(atriss*(rij-rik)**2+btriss*(rij+rik)**2+ctriss)
+      endif
 C second case jth atom is center
+      if ((iabs(j-i).eq.1).or.(iabs(j-k).eq.1)) then
+      eij2=0.0d0
+      else
       eij2=dtriss/(atriss*(rij-rjk)**2+btriss*(rij+rjk)**2+ctriss)
+      endif
 C the third case kth atom is the center
+      if ((iabs(i-k).eq.1).or.(iabs(j-k).eq.1)) then
+      eij3=0.0d0
+      else
       eij3=dtriss/(atriss*(rik-rjk)**2+btriss*(rik+rjk)**2+ctriss)
+      endif
 C      eij2=0.0
 C      eij3=0.0
 C      eij1=0.0