working martini
[unres4.git] / source / unres / MD.F90
index b0a54b7..bf993eb 100644 (file)
       call inertia_tensor  
 !  Getting the potential energy and forces and velocities and accelerations
       call vcm_vel(vcm)
-!      write (iout,*) "velocity of the center of the mass:"
-!      write (iout,*) (vcm(j),j=1,3)
+      write (iout,*) "velocity of the center of the mass:"
+      write (iout,*) (vcm(j),j=1,3)
       do j=1,3
         d_t(j,0)=d_t(j,0)-vcm(j)
       enddo
        summas=0.0d0
        do i=nnt,nct
          mnum=molnum(i)
-         if ((mnum.ge.5).or.(mnum.eq.3))&
+         if ((mnum.gt.5).or.(mnum.eq.3))&
          mp(mnum)=msc(itype(i,mnum),mnum)
          if (i.lt.nct) then
            summas=summas+mp(mnum)
              vcm(j)=vcm(j)+mp(mnum)*(vv(j)+0.5d0*d_t(j,i))
            enddo
          endif
-         if (mnum.ne.4) then
+!         if (mnum.ne.4) then
          amas=msc(iabs(itype(i,mnum)),mnum)
-         else
-         amas=0.0d0
-         endif
+!         else
+!         amas=0.0d0
+!         endif
 !         amas=msc(iabs(itype(i)))
          summas=summas+amas             
 !         if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
            vv(j)=vv(j)+d_t(j,i)
          enddo
        enddo
-!c       write (iout,*) "vcm",(vcm(j),j=1,3)," summas",summas
+       write (iout,*) "vcm",(vcm(j),j=1,3)," summas",summas
        do j=1,3
          vcm(j)=vcm(j)/summas
        enddo
            vv(j)=vv(j)+d_t(j,i)
          enddo
        enddo 
-!       write (iout,*) "vcm",(vcm(j),j=1,3)," summas",summas
+       write (iout,*) "vcm",(vcm(j),j=1,3)," summas",summas
        do j=1,3
          vcm(j)=vcm(j)/summas
        enddo