Writes the .nnkp file instructing a DFT code what projections and overlaps to construct
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(lib_common_type), | intent(inout) | :: | common_data | |||
| integer, | intent(in) | :: | istdout | |||
| integer, | intent(in) | :: | istderr | |||
| integer, | intent(out) | :: | ierr |
subroutine write_kmesh(common_data, istdout, istderr, ierr) !! Writes the .nnkp file instructing a DFT code what projections and overlaps to construct use w90_comms, only: mpirank, comms_sync_error use w90_error_base, only: w90_error_type use w90_error, only: set_error_fatal use w90_kmesh, only: kmesh_write implicit none ! arguments integer, intent(in) :: istdout, istderr integer, intent(out) :: ierr type(lib_common_type), intent(inout) :: common_data ! local variables type(w90_error_type), allocatable :: error ierr = 0 if (.not. allocated(common_data%kmesh_info%nnlist)) then ! should be called by all ranks call w90_create_kmesh(common_data, istdout, istderr, ierr) if (ierr /= 0) then call set_error_fatal(error, 'Error in setting up k-mesh!', common_data%comm) end if end if if (allocated(error)) then call prterr(error, ierr, istdout, istderr, common_data%comm) return end if if (mpirank(common_data%comm) == 0) then ! root only; no error condition call kmesh_write(common_data%exclude_bands, common_data%kmesh_info, & common_data%select_proj%auto_projections, common_data%proj_input, & common_data%print_output, common_data%kpt_latt, common_data%real_lattice, & common_data%num_kpts, common_data%num_proj, common_data%calc_only_A, & common_data%w90_system%spinors, common_data%seedname, common_data%timer) end if end subroutine write_kmesh