plot_bvec Subroutine

private subroutine plot_bvec()

Uses

  • proc~~plot_bvec~~UsesGraph proc~plot_bvec plot_bvec module~w90_parameters w90_parameters proc~plot_bvec->module~w90_parameters module~w90_io w90_io proc~plot_bvec->module~w90_io module~w90_parameters->module~w90_io module~w90_constants w90_constants module~w90_parameters->module~w90_constants module~w90_io->module~w90_constants

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

None

Calls

proc~~plot_bvec~~CallsGraph proc~plot_bvec plot_bvec proc~io_date io_date proc~plot_bvec->proc~io_date proc~io_file_unit io_file_unit proc~plot_bvec->proc~io_file_unit

Contents

Source Code


Source Code

  subroutine plot_bvec()
    !!
    !! 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_parameters, only: wb, bk, num_kpts, nntot
    use w90_io, only: io_error, io_file_unit, seedname, io_date
    !
    implicit none
    !
    integer            :: nkp, nn, file_unit
    character(len=33) :: header
    character(len=9)  :: cdate, ctime
    !
    file_unit = io_file_unit()
    open (file_unit, file=trim(seedname)//'.bvec', form='formatted', status='unknown', err=101)
    call io_date(cdate, ctime)
    header = 'written on '//cdate//' at '//ctime
    !
    open (file_unit, file=trim(seedname)//'.bvec', form='formatted', status='unknown', err=101)
    write (file_unit, *) header ! Date and time
    write (file_unit, *) num_kpts, nntot
    do nkp = 1, num_kpts
      do nn = 1, nntot
        write (file_unit, '(4F12.6)') bk(:, nn, nkp), wb(nn)
      enddo
    enddo
    close (file_unit)
    !
    return
    !
101 call io_error('Error: plot_bvec: problem opening file '//trim(seedname)//'.bvec')

  end subroutine plot_bvec