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