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
| Type | Intent | Optional | 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 |
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