32 print(
'Hello! I\'m here to help you with the input file for your Dice QMC simulation.')
36 print(
'Would you like me to write (w) or check (c) your input file?')
37 task = input(
'Your response ("w" or "c", without quotes): ')
40 while task!=
'w' and task!=
'c':
42 print(
'Error: Oops, your response is invalid, please enter "w" or "c", without quotes.')
43 task = input(
'Your response: ')
48 print(
'Alright! I shall write out a new input file for you.')
58 print(
'Your params.txt file is ready! You are all set to run the next step on Fortran :-) ')
62 print(
'Alright! I shall check the input file in this directory.')
66 f = open(
'params.txt')
67 except FileNotFoundError:
69 print(
'Error: Oops, there is no param.txt file in the current working directory.')
70 print(
' Please copy your params.txt file into this directory, and then run dice_inputs() again.')
71 print(
' Exiting the program.')
77 nml = f90nml.read(
'params.txt')
84 print(
'Your params.txt file is correct! You are all set to run the next step on Fortran :-) ')
88 if __name__ ==
"__main__":
Contains functions that check the input file params.txt for Dice QMC.
Contains functions that write the input file params.txt for Dice QMC.
def check_inputs(nml)
Major subroutine that checks the inputs of file params.txt.
def write_params(control, params)
Major subroutine that writes the input file params.txt.
def query_params()
Major function that queries the user for all the inputs required to assemble params....