critical bugfix for rand_conf multichain
authorAdam Sieradzan <adasko@piasek4.chem.univ.gda.pl>
Thu, 11 Jul 2019 12:40:55 +0000 (14:40 +0200)
committerAdam Sieradzan <adasko@piasek4.chem.univ.gda.pl>
Thu, 11 Jul 2019 12:40:55 +0000 (14:40 +0200)
source/unres/geometry.F90

index f41bd30..4a96b0f 100644 (file)
 !       write(iout,*)'phi(4)=',rad2deg*phi(4)
         if (nstart.lt.3) theta(3)=gen_theta(iabs(itype(2,1)),pi,phi(4))
 !       write(iout,*)'theta(3)=',rad2deg*theta(3) 
-        if (it1.ne.10) then
+        if ((it1.ne.10).and.(it.ne.ntyp1)) then
           nsi=0
           fail=.true.
           do while (fail.and.nsi.le.maxsi)
           phi(i)=gen_phi(i+1,it2,it1)
 !         print *,'phi(',i,')=',phi(i)
          theta(i-1)=gen_theta(it2,phi(i-1),phi(i))
-         if (it2.ne.10) then
+         if ((it2.ne.10).and.(it2.ne.ntyp1)) then
             nsi=0
             fail=.true.
             do while (fail.and.nsi.le.maxsi)
          call locate_next_res(i-1)
        endif
        theta(i)=gen_theta(it1,phi(i),phi(i+1))
-        if (it1.ne.10) then 
+        if ((it1.ne.10).and.(it1.ne.ntyp1)) then 
         nsi=0
         fail=.true.
         do while (fail.and.nsi.le.maxsi)