!giving random positions to N atoms with randm numbers

module initialconfigmodule
contains
subroutine initialconfig(N,length,rx,ry,rz)

implicit none

integer, intent(IN) :: N 	!global parameters
!real, dimension(:), intent(IN) :: rdmx,rdmy,rdmz
double precision, dimension(:), intent(OUT) :: rx,ry,rz   !global parameters
double precision, intent(IN) :: length
integer i
double precision s,r,v




!!assigning initial coordinates to particles

!!! electron coordinates
s=2.5
r=3.0
v=4.5
    do i=1,6

        rx(i)=5.5*length*RAND()      !placing at centre of box
        ry(i)=5.5*length*RAND()
        rz(i)=6.0*length*RAND()

        s=s+0.4
        r=r+0.3
        v=v-0.4

    end do


!!! proton coordinates
s=2.0
r=1.5
v=3.0
    do i=7,18

        rx(i)=0.1*RAND()      !placing at centre of box
        ry(i)=0.1*RAND()
        rz(i)=0.02*RAND()

        s=s+0.04
        r=r+0.02
        v=v-0.02

    end do




end subroutine initialconfig
end module initialconfigmodule

