Debug part 10
[unres.git] / source / wham / src / store_parm.F
index 6b7769c..acac0c3 100644 (file)
@@ -107,10 +107,17 @@ c Store bond angle parameters
             do l=1,ntheterm3
               do m=1,ndouble
                 do mm=1,ndouble
-                 ffthet_all(mm,m,l,i,j,k,iblock,iparm)=
-     &           ffthet(mm,m,l,i,j,k,iblock)
-                 ggthet_all(mm,m,l,i,j,k,iblock,iparm)=
-     &           ggthet(mm,m,l,i,j,k,iblock)
+                if (iblock.eq.1) then
+                 ffthet_all1(mm,m,l,i,j,k,iparm)=
+     &   ffthet(mm,m,l,i,j,k,iblock)
+                 ggthet_all1(mm,m,l,i,j,k,iparm)=
+     &ggthet(mm,m,l,i,j,k,iblock)
+                  else
+                 ffthet_all2(mm,m,l,i,j,k,iparm)=
+     &   ffthet(mm,m,l,i,j,k,iblock)
+                 ggthet_all2(mm,m,l,i,j,k,iparm)=
+     &ggthet(mm,m,l,i,j,k,iblock)
+                  endif
                 enddo
               enddo
             enddo
@@ -371,8 +378,17 @@ c Restore bond angle parameters
             do l=1,ntheterm3
               do m=1,ndouble
                 do mm=1,ndouble
-                 ffthet(mm,m,l,i,j,k)=ffthet_all(mm,m,l,i,j,k,iparm)
-                 ggthet(mm,m,l,i,j,k)=ggthet_all(mm,m,l,i,j,k,iparm)
+                 if (iblock.eq.1) then
+                 ffthet(mm,m,l,i,j,k,iblock)=
+     &ffthet_all1(mm,m,l,i,j,k,iparm)
+                 ggthet(mm,m,l,i,j,k,iblock)=
+     &ggthet_all1(mm,m,l,i,j,k,iparm)
+                else
+                 ffthet(mm,m,l,i,j,k,iblock)=
+     &ffthet_all2(mm,m,l,i,j,k,iparm)
+                 ggthet(mm,m,l,i,j,k,iblock)=
+     &ggthet_all2(mm,m,l,i,j,k,iparm)
+                endif
                 enddo
               enddo
             enddo