1      PROGRAM moldyn
2
3      implicit none
4
5      include 'p_input.inc'
6      include 'p_array.inc'
7
8      integer iseed,istep
9      integer ntype,nprnt,nstep,nequl
10      integer ncons,ntcons,consatm
11      integer nbond,ntbond,bondatm
12      integer nshel,ntshel,shelatm
13
14      real*8 ekin,ecoul,eshrt,ebond,eshel,ewald1
15      real*8 tstep,ivv,etime1,etime2
16
17      logical lveloc,lupdate
18
19      dimension ivv(mxatms,3)
20      dimension consatm(mxcons,2),bondatm(mxbond,2),shelatm(mxshel,2)
21
22      etime1=0.0
23      etime2=0.0
24      call cpu_time(etime1)
25
26      open(unit=output,file='OUTPUT')
27
28      call md_inpt(iseed,tstep,nstep,nequl,nprnt,ntype,ncons,consatm,
29     $    nbond,bondatm,nshel,shelatm,lveloc)
30
31      call md_init(iseed,ntype,ncons,ntcons,consatm,nbond,ntbond,
32     $    bondatm,nshel,ntshel,shelatm,lveloc,ewald1)
33
34      call cpu_time(etime2)
35      write(output,'(/,a,f20.3)')'Set-up CPU time : ',(etime2-etime1)
36
37      call write_velo(70)
38      do istep=1,nstep
39
40       call verlt_test(tstep,ivv,lupdate)
41
42       if(lupdate)call list_verlt()
43
44       call md_frce(ntype,ecoul,eshrt,ebond,ntbond,eshel,ntshel,ewald1)
45
46       if(ntcons.eq.0)call inte_leapf(tstep,ekin)
47       if(ntcons.gt.0)call inte_shake(tstep,ntcons,ekin)
48
49c       if(istep.le.nequl)call md_scle(ntshel)
50
51       call print_output(istep,nprnt,ekin,ecoul,eshrt,ebond,eshel)
52
53      enddo
54
55      call print_final()
56
57      call cpu_time(etime2)
58      write(output,'(/,a,f20.3)')'Total CPU time : ',(etime2-etime1)
59
60      END
61c $Id$
62