Adam's changes
[unres.git] / source / wham / src-HCD-5D / readpdb.F
index 8a85b8c..9efc6db 100644 (file)
@@ -70,7 +70,7 @@ C geometry.
           sccalc=.true.
         endif
 ! Read free energy
-        if (index(card,"FREE ENERGY").gt.0) read(card(35:),*) efree_temp
+c        if (index(card,"FREE ENERGY").gt.0) read(card(35:),*) efree_temp
 ! Fish out the ATOM cards.
         if (index(card(1:4),'ATOM').gt.0) then  
           sccalc=.false.
@@ -91,7 +91,7 @@ c          write (2,'(a)') card
 !              write (iout,*) "Calculating sidechain center iii",iii
               if (unres_pdb) then
                 do j=1,3
-                  dc(j,ires+nres)=sccor(j,iii)
+                  dc(j,ires_old)=sccor(j,iii)
                 enddo
               else
                 call sccenter(ires_old,iii,sccor)
@@ -325,7 +325,7 @@ c        write (iout,*) i,i-1,(c(j,i),j=1,3),(c(j,i-1),j=1,3),dist(i,i-1)
         if (itype(i-1).ne.ntyp1 .and. itype(i).ne.ntyp1 .and.
      &    (dist(i,i-1).lt.1.0D0 .or. dist(i,i-1).gt.6.0D0)) then
           write (iout,'(a,i4)') 'Bad Cartesians for residue',i
-          stop
+c          stop
         endif
         vbld(i)=dist(i-1,i)
         vbld_inv(i)=1.0d0/vbld(i)
@@ -804,8 +804,8 @@ C Calculate internal coordinates.
       endif
 C Calculate internal coordinates.
 c      call int_from_cart1(.false.)
-      call int_from_cart(.true.,.true.)
-      call sc_loc_geom(.true.)
+      call int_from_cart(.true.,out_template_coord)
+      call sc_loc_geom(.false.)
       do i=1,nres
         thetaref(i)=theta(i)
         phiref(i)=phi(i)