Restructure the command parsing loops so the mode commands only parse the mode options

This commit is contained in:
Alex Selimov 2019-12-11 09:07:59 -05:00 committed by Alex Selimov
parent c291ec65b4
commit 0dff3b2ca9
5 changed files with 49 additions and 52 deletions

View file

@ -8,8 +8,9 @@ module mode_convert
public
contains
subroutine convert
subroutine convert(arg_pos)
!This subroutine converts a single input file from one format to another
integer, intent(out) :: arg_pos
character(len=100) :: infile, outfile
real(kind = dp) :: temp_box_bd(6)
!We have to allocate the element and atom arrays with a size of 1 for the read in code to work
@ -19,10 +20,7 @@ module mode_convert
call get_in_file(infile)
call read_in(1, (/0.0_dp,0.0_dp,0.0_dp/), temp_box_bd)
call grow_box(temp_box_bd)
!Now get the outfile, writing is done after all the codes complete
call get_command_argument(3, outfile)
call get_out_file(outfile)
arg_pos = 3
end subroutine convert
end module mode_convert