added source code
[unres.git] / source / unres / src_MD / md-diff / md / verlet1.f
1 c-----------------------------------------------------------------
2       subroutine verlet1
3 c Applying velocity Verlet algorithm - step 1 to coordinates
4       implicit real*8 (a-h,o-z)
5       include 'DIMENSIONS'
6       include 'COMMON.CONTROL'
7       include 'COMMON.VAR'
8       include 'COMMON.MD'
9       include 'COMMON.CHAIN'
10       include 'COMMON.DERIV'
11       include 'COMMON.GEO'
12       include 'COMMON.LOCAL'
13       include 'COMMON.INTERACT'
14       include 'COMMON.IOUNITS'
15       include 'COMMON.NAMES'
16       double precision adt,adt2
17         
18       do j=1,3
19         adt=d_a_old(j,0)*d_time
20         adt2=0.5d0*adt
21         dc(j,0)=dc_old(j,0)+(d_t_old(j,0)+adt2)*d_time
22         d_t_new(j,0)=d_t_old(j,0)+adt2
23         d_t(j,0)=d_t_old(j,0)+adt
24       enddo
25       do i=nnt,nct-1    
26         do j=1,3    
27           adt=d_a_old(j,i)*d_time
28           adt2=0.5d0*adt
29           dc(j,i)=dc_old(j,i)+(d_t_old(j,i)+adt2)*d_time
30           d_t_new(j,i)=d_t_old(j,i)+adt2
31           d_t(j,i)=d_t_old(j,i)+adt
32         enddo
33       enddo
34       do i=nnt,nct
35         if (itype(i).ne.10) then
36           inres=i+nres
37           do j=1,3    
38             adt=d_a_old(j,inres)*d_time
39             adt2=0.5d0*adt
40             dc(j,inres)=dc_old(j,inres)+(d_t_old(j,inres)+adt2)*d_time
41             d_t_new(j,inres)=d_t_old(j,inres)+adt2
42             d_t(j,inres)=d_t_old(j,inres)+adt
43           enddo
44         endif      
45       enddo 
46       return
47       end