1
2      subroutine smd_leapf(natms,tstep,ekin,mass,fff,vvv,ccc)
3
4      implicit none
5
6      integer natms
7      double precision tstep
8      double precision ekin
9      double precision mass(natms)
10      double precision fff(3,natms)
11      double precision vvv(3,natms)
12      double precision ccc(3,natms)
13c
14      integer i,iatm
15
16      double precision  tmpvx,tmpvy,tmpvz
17
18      ekin=0.0
19
20      do i=1,natms
21       tmpvx=vvv(1,i)
22       tmpvy=vvv(2,i)
23       tmpvz=vvv(3,i)
24
25       vvv(1,i)=vvv(1,i)+fff(1,i)*tstep/mass(i)
26       vvv(2,i)=vvv(2,i)+fff(2,i)*tstep/mass(i)
27       vvv(3,i)=vvv(3,i)+fff(3,i)*tstep/mass(i)
28
29       tmpvx=0.5*(tmpvx+vvv(1,i))
30       tmpvy=0.5*(tmpvy+vvv(2,i))
31       tmpvz=0.5*(tmpvz+vvv(3,i))
32
33       ekin=ekin+mass(i)*(tmpvx**2+tmpvy**2+tmpvz**2)
34
35       ccc(1,i)=ccc(1,i)+tstep*vvv(1,i)
36       ccc(2,i)=ccc(2,i)+tstep*vvv(2,i)
37       ccc(3,i)=ccc(3,i)+tstep*vvv(3,i)
38
39      enddo
40
41      ekin=0.5*ekin
42
43      return
44
45      end
46
47c $Id$
48