plot_bvec Subroutine

private subroutine plot_bvec(kmesh_info, num_kpts, seedname, error, comm)

Uses

  • proc~~plot_bvec~~UsesGraph proc~plot_bvec plot_bvec module~w90_error w90_error proc~plot_bvec->module~w90_error module~w90_io w90_io proc~plot_bvec->module~w90_io module~w90_types w90_types proc~plot_bvec->module~w90_types module~w90_comms w90_comms module~w90_error->module~w90_comms module~w90_error_base w90_error_base module~w90_error->module~w90_error_base module~w90_constants w90_constants module~w90_io->module~w90_constants module~w90_types->module~w90_constants module~w90_comms->module~w90_constants module~w90_comms->module~w90_error_base

June 2018: RM and SP Write to file the matrix elements of bvector and their weights This is used by EPW to compute the velocity. You need "write_bvec = .true." in your wannier input

Arguments

Type IntentOptional Attributes Name
type(kmesh_info_type), intent(in) :: kmesh_info
integer, intent(in) :: num_kpts
character(len=50), intent(in) :: seedname
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

Calls

proc~~plot_bvec~~CallsGraph proc~plot_bvec plot_bvec proc~io_date io_date proc~plot_bvec->proc~io_date proc~set_error_file set_error_file proc~plot_bvec->proc~set_error_file proc~comms_sync_error comms_sync_error proc~set_error_file->proc~comms_sync_error proc~set_base_error set_base_error proc~set_error_file->proc~set_base_error

Called by

proc~~plot_bvec~~CalledByGraph proc~plot_bvec plot_bvec proc~plot_main plot_main proc~plot_main->proc~plot_bvec proc~w90_plot w90_plot proc~w90_plot->proc~plot_main program~wannier wannier program~wannier->proc~w90_plot

Source Code

  subroutine plot_bvec(kmesh_info, num_kpts, seedname, error, comm)
    !================================================!
    !! June 2018: RM and SP
    !! Write to file the matrix elements of bvector and their weights
    !! This is used by EPW to compute the velocity.
    !! You need "write_bvec = .true." in your wannier input
    !!
    !================================================!

    use w90_io, only: io_date
    use w90_types, only: kmesh_info_type
    use w90_error, only: w90_error_type, set_error_file

    implicit none

    type(kmesh_info_type), intent(in) :: kmesh_info
    type(w90_error_type), allocatable, intent(out) :: error
    type(w90_comm_type), intent(in) :: comm

    integer :: nkp, nn, file_unit
    character(len=33) :: header
    character(len=9)  :: cdate, ctime

    integer, intent(in) :: num_kpts
    character(len=50), intent(in)  :: seedname

    call io_date(cdate, ctime)
    header = 'written on '//cdate//' at '//ctime

    open (newunit=file_unit, file=trim(seedname)//'.bvec', form='formatted', status='unknown', err=101)
    write (file_unit, *) header ! Date and time
    write (file_unit, *) num_kpts, kmesh_info%nntot
    do nkp = 1, num_kpts
      do nn = 1, kmesh_info%nntot
        write (file_unit, '(4F20.14)') kmesh_info%bk(:, nn, nkp), kmesh_info%wb(nn)
      end do
    end do
    close (file_unit)

    return

101 call set_error_file(error, 'Error: plot_bvec: problem opening file '//trim(seedname)//'.bvec', comm)
    return

  end subroutine plot_bvec