Skip to content

Commit

Permalink
Merge pull request #401 from OrderN/bug-fix-choose-band-densities
Browse files Browse the repository at this point in the history
Allow specification of band numbers
  • Loading branch information
davidbowler authored Feb 17, 2025
2 parents 4a9f9cf + 0e102d1 commit 4a18ff9
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions tools/PostProcessing/read_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -232,23 +232,25 @@ subroutine read_input
E_procwf_max = fdf_double('Process.max_wf_E',E_wf_max)
! Is the range relative to Ef (T) or absolute (F)
flag_procwf_range_Ef = fdf_boolean('Process.WFRangeRelative',.true.)
if(abs(E_procwf_max-E_procwf_min)>1e-8_double) then
flag_proc_range = .true.
else
n_bands_process = fdf_integer('Process.noWF',0)
if(n_bands_process>0) then
allocate(band_proc_no(n_bands_process))
if (fdf_block('WaveFunctionsProcess')) then
if(1+block_end-block_start<n_bands_process) then
write(*,*) "Too few wf no in WaveFunctionsOut: ",1+block_end-block_start,n_bands_process
stop
end if
do i=1,n_bands_process
read(unit=input_array(block_start+i-1),fmt=*) band_proc_no(i)
end do
call fdf_endblock
n_bands_process = fdf_integer('Process.noWF',0)
if(n_bands_process>0) then
allocate(band_proc_no(n_bands_process))
if (fdf_block('WaveFunctionsProcess')) then
if(1+block_end-block_start<n_bands_process) then
write(*,*) "Too few wf no in WaveFunctionsOut: ",1+block_end-block_start,n_bands_process
stop
end if
flag_proc_range = .false.
do i=1,n_bands_process
read(unit=input_array(block_start+i-1),fmt=*) band_proc_no(i)
end do
call fdf_endblock
end if
flag_proc_range = .false.
else
if(abs(E_procwf_max-E_procwf_min)>1e-8_double) then
flag_proc_range = .true.
else
call cq_abort("Need either a range or a number of bands")
end if
end if
end if ! i_job == 3 or 4 or 5
Expand Down

0 comments on commit 4a18ff9

Please sign in to comment.