Rozgrzebany DIL
[unres.git] / source / unres / src_MD / moments.f
index 5adbf21..9388436 100644 (file)
@@ -42,7 +42,7 @@ c   calculating the center of the mass of the protein
         enddo
         M_SC=0.0d0                             
         do i=nnt,nct
-           iti=itype(i)                 
+           iti=iabs(itype(i))           
           M_SC=M_SC+msc(iti)
            inres=i+nres
            do j=1,3
@@ -66,7 +66,7 @@ c   calculating the center of the mass of the protein
         enddo                  
         
        do i=nnt,nct    
-           iti=itype(i)
+           iti=iabs(itype(i))
            inres=i+nres
            do j=1,3
              pr(j)=c(j,inres)-cm(j)        
@@ -97,7 +97,7 @@ c   calculating the center of the mass of the protein
                                
         do i=nnt,nct
          if (itype(i).ne.10) then
-           iti=itype(i)                 
+           iti=iabs(itype(i))           
            inres=i+nres
           Im(1,1)=Im(1,1)+Isc(iti)*(1-dc_norm(1,inres)*
      &   dc_norm(1,inres))*vbld(inres)*vbld(inres)
@@ -244,7 +244,7 @@ c  Calculate the angular momentum
           incr(j)=d_t(j,0)
         enddo  
         do i=nnt,nct
-         iti=itype(i)   
+         iti=iabs(itype(i))     
          inres=i+nres
          do j=1,3
            pr(j)=c(j,inres)-cm(j)          
@@ -305,7 +305,7 @@ c------------------------------------------------------------------------------
              vcm(j)=vcm(j)+mp*(vv(j)+0.5d0*d_t(j,i))
            enddo
          endif
-         amas=msc(itype(i))
+         amas=msc(iabs(itype(i)))
          summas=summas+amas                     
          if (itype(i).ne.10) then
            do j=1,3