added source code
[unres.git] / source / unres / src_MD / src / md-diff / np / sddir_precalc.f
1
2       subroutine sddir_precalc
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.LANGEVIN'
10       include 'COMMON.CHAIN'
11       include 'COMMON.DERIV'
12       include 'COMMON.GEO'
13       include 'COMMON.LOCAL'
14       include 'COMMON.INTERACT'
15       include 'COMMON.IOUNITS'
16       include 'COMMON.NAMES'
17       double precision stochforcvec(MAXRES6)
18       common /stochcalc/ stochforcvec
19 c
20 c Compute friction and stochastic forces
21 c
22       call friction_force
23       call stochastic_force(stochforcvec) 
24 c
25 c Compute the acceleration due to friction forces (d_af_work) and stochastic
26 c forces (d_as_work)
27 c
28       do i=1,dimen
29         d_af_work(i)=0.0d0
30         d_as_work(i)=0.0d0
31         do j=1,dimen
32           d_af_work(i)=d_af_work(i)+Ginv(i,j)*fric_work(j)
33           d_as_work(i)=d_as_work(i)+Ginv(i,j)*stochforcvec(j)
34         enddo
35       enddo
36       return
37       end