adding the homology
[unres4.git] / source / unres / io_config.F90
index c2f62bb..44ec36c 100644 (file)
       return
       end subroutine write_stat_thread
 !-----------------------------------------------------------------------------
+#endif
       subroutine readpdb_template(k)
 ! Read the PDB file for read_constr_homology with read2sigma
 ! and convert the peptide geometry into virtual-chain geometry.
           ires_old=ires+2
           itype(ires_old-1,1)=ntyp1 
           iterter(ires_old-1)=1
+#if defined(WHAM_RUN) || defined(CLUSTER)
+          if (ires_old.lt.nres) then
+#endif         
           itype(ires_old,1)=ntyp1
           iterter(ires_old)=1
+#if defined(WHAM_RUN) || defined(CLUSTER)
+          endif
+#endif
           ibeg=2
 !          write (iout,*) "Chain ended",ires,ishift,ires_old
           if (unres_pdb) then
 ! Calculate dummy residue coordinates inside the "chain" of a multichain
 ! system
       nres=ires
+      write(2,*) "tutaj",ires,nres
       do i=2,nres-1
 !        write (iout,*) i,itype(i),itype(i+1)
         if (itype(i,1).eq.ntyp1.and.iterter(i).eq.1) then
       return
       end subroutine readpdb_template
 !-----------------------------------------------------------------------------
-#endif
+!#endif
 !-----------------------------------------------------------------------------
       end module io_config