48 subroutine read_control(p_system, run_equil, run_restart, write_restart, restart_num, write_chains, write_log)
51 character(len=10),
intent(out) :: p_system
52 logical,
intent(out) :: run_equil, run_restart, write_restart, write_chains, write_log
53 integer(int32),
intent(out) :: restart_num
56 namelist /control/ p_system, run_equil, run_restart, write_restart, restart_num, write_chains, write_log
59 read(nml=control, iostat=
rc, unit=
fu)
61 error stop
'Error: Invalid CONTROL namelist format in file "params.txt".'
83 namelist /parameters/ qho
86 read(nml=parameters, iostat=
rc, unit=
fu)
88 error stop
'Error: Invalid PARAMETERS namelist for QHO p_system in file "params.txt".'
110 namelist /parameters/ h2plus
113 read(nml=parameters, iostat=
rc, unit=
fu)
115 error stop
'Error: Invalid PARAMETERS namelist for H2plus p_system in file "params.txt".'
134 type(
h2_type),
intent(out) :: H2
137 namelist /parameters/ h2
140 read(nml=parameters, iostat=
rc, unit=
fu)
142 error stop
'Error: Invalid PARAMETERS namelist for H2 p_system in file "params.txt".'
167 inquire(file=
'params.txt', iostat=
rc)
169 error stop
'Error: Input file "params.txt" does not exist.'
173 open(action=
'read', file=
'params.txt', iostat=
rc, newunit=
fu)
193 error stop
'Error: Invalid system definition.'
206 error stop
'Error: Invalid system definition.'
225 error stop
'Error: Invalid system definition.'
241 error stop
'Error: Invalid system definition.'
267 write(*,
"('------------- Restarted Program -------------')")
277 end module input_parser
Contains routines to read and write restart files.
subroutine read_res_nml(res)
Reads the RESTART namelist in res_nml.txt. Assigns the input data to the corresponding variables in t...
integer rc
To capture error states during file i/o.
integer fu
To store LUN of files during i/o.
Contains derived types, and global variables to store input values of simulation parameters.
integer(int32) run_steps
Number of MMC steps after burning (for MPI worksharing)
integer(int32) restart_num
Interval of MMC loops between writing restart file.
integer(int32) d_eqsteps_qho
Default total steps for each QHO equilibration MMC chain.
type(h2_type) h2
To store inputs for H2 molecule system.
type(h2plus_type) h2plus
To store inputs for H2 ion system.
integer(int32) alpha_start
Start value for alpha grid, can be >1 for restarts.
logical run_restart
Tag for restart runs.
type(restart_type) res
Instance of restart_type for reading restart files.
integer(int32) tstep
Interval of steps for thinning in non-equil runs (for MPI worksharing)
integer(int32) auto_start
Start value for automatic search of parameter c, can be >1 for restarts.
logical write_chains
Tag to write final MMC chains.
type(qho_type) qho
To store inputs for QHO system.
integer(int32) d_eqsteps_h2
Default total steps for each H2 equilibration MMC chain.
logical run_equil
Tag for equilibration runs.
integer(int32) grid_start
Start value for grid search of parameter c, can be >1 for restarts.
integer(int32) bond_start
Start value for bondlength grid, can be >1 for restarts.
character(len=10) p_system
System of interest: QHO, H2plus, H2.
logical write_log
Tag to write logfile.
logical write_restart
Tag for writing restart files.
integer(int32) d_eqsteps_h2plus
Default total steps for each H2plus equilibration MMC chain.
integer(int32) my_rank
Rank of current processor.
Derived Type for Hydrogen Molecule, including VQMC defaults.
Derived Type for Hydrogen Ion, including VQMC defaults.
Derived Type for Quantum Harmonic Oscillator, including VQMC defaults.