emomo correction
[unres4.git] / source / unres / io.F90
index ffce3d7..86b40ef 100644 (file)
                fail=.true.
                ii=0
                do while (fail .and. ii .le. maxsi)
-                 call gen_side(itype(i,1),theta(i+1),alph(i),omeg(i),fail)
+                 call gen_side(itype(i,1),theta(i+1),alph(i),omeg(i),fail,molnum(i))
                  ii = ii+1
                enddo
              endif
             nsi=0
             fail=.true.
             do while (fail.and.nsi.le.maxsi)
-              call gen_side(iti,theta(i+1),alph(i),omeg(i),fail)
+              call gen_side(iti,theta(i+1),alph(i),omeg(i),fail,molnum(i))
               nsi=nsi+1
             enddo
             if(fail) write(iout,*)'Adding sidechain failed for res ',&
         do i=1,nres_molec(molec)
           itmp=itmp+1
           istype(itmp)=sugarcode(sequence(i,molec)(1:1),i)
-          itype(itmp,molec)=rescode(i,sequence(i,molec)(1:2),iscode,molec)
+          sequence(i,molec)=sequence(i,molec)(1:2)
+          itype(itmp,molec)=rescode(i,sequence(i,molec),iscode,molec)
         enddo
        endif