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