bug fix after Ana and cluster lipid (still in progress)
[unres.git] / source / cluster / wham / src-M / read_coords.F
index ac11ac0..2911e60 100644 (file)
@@ -283,7 +283,7 @@ c            write (iout,*) "nss",nss
               enddo
             enddo
           endif
-#define DEBUG
+C#define DEBUG
 #ifdef DEBUG
           write (iout,'(5hREAD ,i5,3f15.4,i10)') 
      &     jj+1,energy(jj+1),entfac(jj+1),
@@ -293,7 +293,7 @@ c            write (iout,*) "nss",nss
           write (iout,'(8f10.5)') ((c(j,i+nres),j=1,3),i=nnt,nct)
           call flush(iout)
 #endif
-#undef DEBUG
+C#undef DEBUG
           call add_new_cconf(jjj,jj,jj_old,icount,Next)
         enddo
   101   continue
@@ -393,7 +393,8 @@ c------------------------------------------------------------------------------
       chalen=int((nct-nnt+2)/symetr)
       call int_from_cart1(.false.)
       do j=nnt+1,nct
-        if (vbld(j).lt.2.0d0 .or. vbld(j).gt.5.0d0) then
+        if ((vbld(j).lt.2.0d0 .or. vbld(j).gt.5.0d0)
+     &      .and.(itype(j).ne.ntyp1)) then
          if (j.gt.2) then
           if (itel(j).ne.0 .and. itel(j-1).ne.0) then
           write (iout,*) "Conformation",jjj,jj+1
@@ -418,8 +419,8 @@ c------------------------------------------------------------------------------
       enddo
       do j=nnt,nct
         itj=itype(j)
-        if (itype(j).ne.10 .and. (vbld(nres+j)-dsc(iabs(itj))).gt.2.0d0)
-     &  then
+        if (itype(j).ne.10 .and. (vbld(nres+j)-dsc(iabs(itj))).gt.2.0d0
+     &  .and. itype(j).ne.ntyp1) then
           write (iout,*) "Conformation",jjj,jj+1
           write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j)
           write (iout,*) "The Cartesian geometry is:"
@@ -646,7 +647,7 @@ c------------------------------------------------------------------------------
 c
 c Read conformations off a DA scratchfile.
 c
-#define DEBUG
+C#define DEBUG
 #ifdef DEBUG
       write (iout,*) "DAREAD_COORDS"
       write (iout,*) "istart_conf",istart_conf," iend_conf",iend_conf
@@ -683,7 +684,7 @@ c     &    nss_all(ij),(ihpb_all(i,ij),jhpb_all(i,ij),i=1,nss),
      &    jhpb_all(i,ij),i=1,nss)
         call flush(iout)
 #endif
-#undef DEBUG
+C#undef DEBUG
       enddo
       write (iout,*) "just before leave"
       call flush(iout)