get_lattice_points_cutoff Subroutine

private subroutine get_lattice_points_cutoff(periodic, lat, rthr, trans)

Create lattice points within a given cutoff

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: periodic(:)

Periodic dimensions

real(kind=wp), intent(in) :: lat(:,:)

Lattice parameters

real(kind=wp), intent(in) :: rthr

Real space cutoff

real(kind=wp), intent(out), allocatable :: trans(:,:)

Generated lattice points


Source Code

subroutine get_lattice_points_cutoff(periodic, lat, rthr, trans)
   !DEC$ ATTRIBUTES DLLEXPORT :: get_lattice_points_cutoff

   !> Periodic dimensions
   logical, intent(in) :: periodic(:)

   !> Real space cutoff
   real(wp), intent(in) :: rthr

   !> Lattice parameters
   real(wp), intent(in) :: lat(:, :)

   !> Generated lattice points
   real(wp), allocatable, intent(out) :: trans(:, :)

   integer :: rep(3)

   if (.not.any(periodic)) then
      allocate(trans(3, 1))
      trans(:, :) = 0.0_wp
   else
      call get_translations(lat, rthr, rep)
      call get_lattice_points(lat, rep, .true., trans)
   end if

end subroutine get_lattice_points_cutoff