readpdb-mult
[unres.git] / source / unres / src-HCD-5D / readrtns_CSA.F
index da28aa3..eeaf74c 100644 (file)
@@ -1184,7 +1184,8 @@ c      write (iout,*) "After read_dist_constr nhpb",nhpb
  335        continue
             unres_pdb=.false.
             nres_temp=nres
-            call readpdb
+c            call readpdb
+            call readpdb_template(nmodel_start+1)
             close(ipdbin)
             if (nres.ge.nres_temp) then
               nmodel_start=nmodel_start+1
@@ -1297,7 +1298,7 @@ c            return
           enddo
           call bond_regular
           call chainbuild_extconf
-        else
+        else if (.not. start_from_model) then
           if(me.eq.king.or..not.out1file)
      &     write (iout,'(a)') 'Random-generated initial geometry.'
           call bond_regular
@@ -3654,6 +3655,7 @@ c
       call getenv("FRAGFILE",fragfile) 
       open(ientin,file=fragfile,status="old",err=10)
       read(ientin,*) constr_homology,nclust
+      nmodel_start=constr_homology
       l_homo = .false.
       sigma_theta=0.0
       sigma_d=0.0