reads the number of wannier functions "num_wann" (mandatory input)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(settings_type), | intent(inout) | :: | settings | |||
| integer, | intent(inout) | :: | num_wann | |||
| type(w90_error_type), | intent(out), | allocatable | :: | error | ||
| type(w90_comm_type), | intent(in) | :: | comm |
subroutine w90_readwrite_read_num_wann(settings, num_wann, error, comm) !! reads the number of wannier functions "num_wann" (mandatory input) use w90_error, only: w90_error_type, set_error_input implicit none integer, intent(inout) :: num_wann type(w90_error_type), allocatable, intent(out) :: error type(w90_comm_type), intent(in) :: comm type(settings_type), intent(inout) :: settings logical :: found call w90_readwrite_get_keyword(settings, 'num_wann', found, error, comm, i_value=num_wann) if (allocated(error)) return if (.not. found) then call set_error_input(error, 'Error: You must specify num_wann', comm) return else if (num_wann <= 0) then call set_error_input(error, 'Error: num_wann must be greater than zero', comm) return end if end subroutine w90_readwrite_read_num_wann