!     THIS SUBROUTINE WRITES INITIAL INFORMATIOIN FOR THE RUN
!     MSE 6270, Leonid Zhigilei

      SUBROUTINE WriteInit(DENSM,DENSN)
      INCLUDE 'common.h'

      WRITE(17,15) NSTEP,DELTA,KFLAG,KEYBS,LIDX,LIDY,LIDZ,KBOUND,NDIM, &
        QTEM,NEWTAB,NEPRT,NWRITE,NPER,MOV,NT,RSkin
 15   FORMAT( 6X,'  -----> MD RUN:   '/ &
        'NSTEP=',I7,' (Number of steps);'/ &
        'DELTA=',F7.5,' (Integration time step in [psec]);',/, &  	
        'KFLAG=',I1,' (1-Quench, 2-Vel ....);',/, &
        'KEYBS=',I1,' (0-pair potential, 4-Stillinger Weber);',/, &
        'LIDX=',I1,' (1-periodicity in X direct.,0-free boundaries);'/ &
        'LIDY=',I1,' (1-periodicity in Y direct.,0-free boundaries);'/ &
        'LIDZ=',I1,' (1-Z PBC,0-Z free or boundary layer);'/ &
        'KBOUND=',I2,' (0-Free,1-rigid,2-...);'/ &
        'NDIM=',I2,' (3 - 3D simulation,2- 2D simulation);'/ &
        'QTEM=',F6.1,' (Temperature distributed by VEL,[K]);'/ &
        'NEWTAB=',I3,' (Step of neighbours list renewal);'/ &
        'NEPRT=',I4,' (Step of printing output information);'/ &
        'NWRITE=',I5,' (Step of writing output information);'/ &
        'NPER=',I4,' (Step of gathering molecules to the comp. cell);'/ &
        'MOV=',I4,' (1 - Write snapshots, 2 - movie file);'/ &
        'NT=',I4,' (Number of points in the energy & force tables);'/ &
        'RSkin=',F6.3,' (Skin depth in neighbour list calculation [A]);'/)

      WRITE(17,17) XL,YL,ZL,DENSM,DENSN,NAN,NTYPE
 17   FORMAT( 6X,'  -----> MATERIAL:   '/ &
        'XL=',D11.5,' (X size of the computational cell [A]);'/ &
        'YL=',D11.5,' (Y size of the computational cell [A]);'/ &
        'ZL=',D11.5,' (Z size of the computational cell [A]);'/ &
        'DENSM=',D11.5,' (Density of the material [gm/cm3]);'/ &
        'DENSN=',D11.5,' (Density of the material [molec./cm3]);'/ &
        'NAN=',I6,' (Number of particles in the computational cell);'// &
        'NTYPE=',I2,'(Number of particle types);'// &
              6X,'  -----> TYPES OF PARTICLES:   ')

      WRITE(17,18) (I,KTT(I),XMASS(I),I=1,NTYPE)
 18   FORMAT('Type ',I2,': ',I5,' particles.  XMASS =',D11.5,' [amu].'/)

      WRITE(17,16) LGOT,ExForce,ExTime
 16   FORMAT( 6X,'  -----> EXTERNAL IMPACT:   '/ &
        'LGOT=',I1,' (0-External impact is off, 1 - on);'/ &
        'ExForce=',D11.5,' (External Force [N]);'/ &
        'ExTime=',D11.5,' (External Impact Duration [psec]);'/)

!     CALL FLUSH(17)

      RETURN
      END






