1 subroutine kinetic(KE_total)
2 c----------------------------------------------------------------
3 c This subroutine calculates the total kinetic energy of the chain
4 c-----------------------------------------------------------------
5 implicit real*8 (a-h,o-z)
11 include 'COMMON.LOCAL'
12 include 'COMMON.INTERACT'
14 include 'COMMON.IOUNITS'
15 double precision KE_total
18 double precision KEt_p,KEt_sc,KEr_p,KEr_sc,incr(3),
23 c write (iout,*) "ISC",(isc(itype(i)),i=1,nres)
24 c The translational part for peptide virtual bonds
29 c write (iout,*) "Kinetic trp:",i,(incr(j),j=1,3)
31 v(j)=incr(j)+0.5d0*d_t(j,i)
33 vtot(i)=v(1)*v(1)+v(2)*v(2)+v(3)*v(3)
34 KEt_p=KEt_p+(v(1)*v(1)+v(2)*v(2)+v(3)*v(3))
36 incr(j)=incr(j)+d_t(j,i)
39 c write(iout,*) 'KEt_p', KEt_p
40 c The translational part for the side chain virtual bond
41 c Only now we can initialize incr with zeros. It must be equal
42 c to the velocities of the first Calpha.
48 if (itype(i).eq.10) then
54 v(j)=incr(j)+d_t(j,nres+i)
57 c write (iout,*) "Kinetic trsc:",i,(incr(j),j=1,3)
58 c write (iout,*) "i",i," msc",msc(iti)," v",(v(j),j=1,3)
59 KEt_sc=KEt_sc+msc(iti)*(v(1)*v(1)+v(2)*v(2)+v(3)*v(3))
60 vtot(i+nres)=v(1)*v(1)+v(2)*v(2)+v(3)*v(3)
62 incr(j)=incr(j)+d_t(j,i)
66 c write(iout,*) 'KEt_sc', KEt_sc
67 c The part due to stretching and rotation of the peptide groups
70 c write (iout,*) "i",i
71 c write (iout,*) "i",i," mag1",mag1," mag2",mag2
75 c write (iout,*) "Kinetic rotp:",i,(incr(j),j=1,3)
76 KEr_p=KEr_p+(incr(1)*incr(1)+incr(2)*incr(2)
80 c write(iout,*) 'KEr_p', KEr_p
81 c The rotational part of the side chain virtual bond
85 if (itype(i).ne.10) then
89 c write (iout,*) "Kinetic rotsc:",i,(incr(j),j=1,3)
90 KEr_sc=KEr_sc+Isc(iti)*(incr(1)*incr(1)+incr(2)*incr(2)+
94 c The total kinetic energy
96 c write(iout,*) 'KEr_sc', KEr_sc
97 KE_total=0.5d0*(mp*KEt_p+KEt_sc+0.25d0*Ip*KEr_p+KEr_sc)
98 c write (iout,*) "KE_total",KE_total