bugfix for icont in ions
[unres4.git] / source / unres / minim.F90
index a096a62..4d3115c 100644 (file)
 
 !     Don't do glycine or ends
       i=itype(res_pick,1)
-      if (i.eq.10 .or. i.eq.ntyp1) return
+      if (i.eq.10 .or. i.eq.ntyp1 .or. molnum(res_pick).eq.5) return
 
 !     Freeze everything (later will relax only selected side-chains)
       mask_r=.true.
       nres_moved=0
       do i=2,nres-1
 !     Don't do glycine (itype(j,1)==10)
-        if (itype(i,1).ne.10) then
+        if ((itype(i,1).ne.10).and.(itype(i,1).ne.ntyp1) &
+        .and.(molnum(i).ne.5)) then
           sc_dist=dist(nres+i,nres+res_pick)
         else
           sc_dist=sc_dist_cutoff