--- trunk/mdtools/md_code/lj_FF.F90 2002/12/19 21:59:51 215 +++ trunk/mdtools/md_code/lj_FF.F90 2003/01/02 21:45:45 222 @@ -29,13 +29,65 @@ contains real( kind = dp ), intent(in) :: sigam integer, intent(out) :: status + type (lj_atype), pointer :: this_lj_atype + type (lj_atype), pointer :: lj_atype_ptr + + integer :: alloc_error + integer :: atype_counter = 0 + status = 0 + allocate(this_lj_atype,stat=alloc_error) + if (alloc_error /= 0 ) then + status = -1 + return + end if + +! assign our new lj_atype information + this_lj_atype%name = name + this_lj_atype%mass = mass + this_lj_atype%epslon = epslon + this_lj_atype%sigma = sigma + + +! if lj_atype_list is null then we are at the top of the list. + if (.not. associated(lj_atype_list)) then + lj_atype_ptr => this_lj_atype + atype_counter = 1 + else ! we need to find the bottom of the list + lj_atype_ptr => lj_atype_list%next + find_end: do + if (.not. associated(lj_atype_ptr%next)) then + exit find_end + end if + lj_atype_ptr => lj_atype_ptr%next + end do find_end + end if + + lj_atype_ptr => this_lj_atype + end subroutine new_lj_atype + subroutine add_lj_atype() + end subroutine add_lj_atype + subroutine do_lj_ff(q,f,potE) + real ( kind = dp ), dimension(ndim,) :: q + real ( kind = dp ), dimension(ndim,nLRparticles) :: f + real ( kind = dp ) :: potE + + + + + + + + end subroutine do_lj_ff + + + end module lj_ff