Skip to content

Commit

Permalink
Removed some comments in the read_wavecar module that I was using jus…
Browse files Browse the repository at this point in the history
…t for tests. Nothing else changed in the code.
  • Loading branch information
Paulo V C Medeiros committed May 16, 2014
1 parent 456bb2c commit bb78cb5
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/read_wavecar_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ subroutine read_from_wavefunc_file(i_selected_kpt, kpt_frac_coords, spin_channel
input_file_unit = available_io_unit()
nrecl=24 ! Trial record length (recl = length of each record in a file connected for direct access)
open(unit=input_file_unit,file='WAVECAR',access='direct',recl=nrecl,iostat=iost,status='old')
!open(unit=input_file_unit,file='WAVECAR',access='sequential',iostat=iost,status='old',form="binary") ! test
if (iost.ne.0) then
write(*,'(A,I0,A)')'Error opening the input wavefunction file. Is the file missing?'
write(*,'(A)')'Stopping now.'
Expand All @@ -167,7 +166,6 @@ subroutine read_from_wavefunc_file(i_selected_kpt, kpt_frac_coords, spin_channel
if(present(file_size_in_bytes)) inquire(unit=input_file_unit, size=file_size_in_bytes)
endif
read(unit=input_file_unit,rec=1) xnrecl,xnspin,xnprec
!read(unit=input_file_unit,pos=1) xnrecl,xnspin,xnprec ! test
close(unit=input_file_unit)

nrecl=nint(xnrecl) ! Correct record length
Expand All @@ -191,14 +189,12 @@ subroutine read_from_wavefunc_file(i_selected_kpt, kpt_frac_coords, spin_channel

input_file_unit = available_io_unit()
open(unit=input_file_unit,file='WAVECAR',access='direct',recl=nrecl,iostat=iost,status='old')
!open(unit=input_file_unit,file='WAVECAR',access='sequential',iostat=iost,status='old',form="binary") ! test
if (iost.ne.0) then
write(*,'(A)')'Error opening the input file. Stopping now.'
close(unit=input_file_unit)
stop
endif
read(unit=input_file_unit,rec=2) xnwk,xnband,ecut,(a1(j),j=1,3),(a2(j),j=1,3),(a3(j),j=1,3)
!read(unit=input_file_unit,pos=2) xnwk,xnband,ecut,(a1(j),j=1,3),(a2(j),j=1,3),(a3(j),j=1,3) ! test
nwk=nint(xnwk) ! Number of k-points
if(nwk==0)then
write(*,'(A)')'ERROR (read_wavecar module): no KPTS could be read from the WAVECAR file.'
Expand Down Expand Up @@ -259,7 +255,6 @@ subroutine read_from_wavefunc_file(i_selected_kpt, kpt_frac_coords, spin_channel
allocate(occ(nband)) ! Occupations
allocate(cener(nband)) ! Band energies (as a complex number)
read(unit=input_file_unit,rec=irec) xnplane,(frac_coords_selected_kpt(i),i=1,3),(cener(iband),occ(iband),iband=1,nband)
!read(unit=input_file_unit,pos=irec) xnplane,(frac_coords_selected_kpt(i),i=1,3),(cener(iband),occ(iband),iband=1,nband) ! test

nplane=nint(xnplane)
if(present(n_plane_waves))then
Expand Down Expand Up @@ -399,9 +394,7 @@ subroutine read_from_wavefunc_file(i_selected_kpt, kpt_frac_coords, spin_channel
irec=irec_before_loop+iband
temp_unit = available_io_units(iband)
open(unit=temp_unit,file='WAVECAR',access='direct',recl=nrecl,iostat=iost,status='old')
!open(unit=temp_unit,file='WAVECAR',access='sequential',iostat=iost,status='old',form="binary") ! test
read(unit=temp_unit,rec=irec) (coeff(iplane,iband), iplane=1,nplane)
!read(unit=temp_unit,pos=irec) (coeff(iplane,iband), iplane=1,nplane) ! test
close(temp_unit)
enddo
deallocate(available_io_units)
Expand Down

0 comments on commit bb78cb5

Please sign in to comment.