dyn_ss writing pdb and ihpb cleaning
[unres.git] / source / unres / src_MD / ssMD.F
index dd210e5..dc205be 100644 (file)
@@ -583,13 +583,13 @@ cmc      write(iout,*)"NEWNSS ",newnss,(newihpb(i),newjhpb(i),i=1,newnss)
       do i=1,nss
         found=.false.
         do j=1,newnss
-          if (ihpb(i).eq.newihpb(j) .and.
-     &         jhpb(i).eq.newjhpb(j)) found=.true.
+          if (idssb(i).eq.newihpb(j) .and.
+     &         jdssb(i).eq.newjhpb(j)) found=.true.
         enddo
 #ifndef CLUST
 #ifndef WHAM
         if (.not.found) write(iout,'(a15,f12.2,f8.1,2i5)')
-     &       "SSBOND_BREAK",totT,t_bath,ihpb(i),jhpb(i)
+     &       "SSBOND_BREAK",totT,t_bath,idssb(i),jdssb(i)
 #endif
 #endif
       enddo
@@ -597,8 +597,8 @@ cmc      write(iout,*)"NEWNSS ",newnss,(newihpb(i),newjhpb(i),i=1,newnss)
       do i=1,newnss
         found=.false.
         do j=1,nss
-          if (newihpb(i).eq.ihpb(j) .and.
-     &         newjhpb(i).eq.jhpb(j)) found=.true.
+          if (newihpb(i).eq.idssb(j) .and.
+     &         newjhpb(i).eq.jdssb(j)) found=.true.
         enddo
 #ifndef CLUST
 #ifndef WHAM
@@ -608,32 +608,10 @@ cmc      write(iout,*)"NEWNSS ",newnss,(newihpb(i),newjhpb(i),i=1,newnss)
 #endif
       enddo
 
-c CRC this part of code is not clean, 
-c dyn_ss will not work with contrains
-
-      if (diff.gt.0) then
-        do i=1,diff
-          ihpb(nhpb+i)=ihpb(nss+i)
-          jhpb(nhpb+i)=jhpb(nss+i)
-          forcon(nhpb+i)=forcon(nss+i)
-          dhpb(nhpb+i)=dhpb(nss+i)
-        enddo
-      else if (diff.lt.0) then
-        do i=diff,-1
-         if(nss+i.gt.0.and.nhpb+i.gt.0) then
-          ihpb(nss+i)=ihpb(nhpb+i)
-          jhpb(nss+i)=jhpb(nhpb+i)
-          forcon(nss+i)=forcon(nhpb+i)
-          dhpb(nss+i)=dhpb(nhpb+i)
-         endif
-        enddo
-      endif
-
-      nhpb=nhpb+diff
       nss=newnss
       do i=1,nss
-        ihpb(i)=newihpb(i)
-        jhpb(i)=newjhpb(i)
+        idssb(i)=newihpb(i)
+        jdssb(i)=newjhpb(i)
       enddo
 
       return