36 character(len=*),
intent(in) :: filename
37 integer :: step_number
41 inquire(file=filename, exist=exist)
43 open(7, file=filename, status=
"old", position=
"append", action=
"write")
45 open(7, file=filename, status=
"new", action=
"write")
46 write(7, *)
'# step_number E'
49 write(7,
"(I13,x,f20.10,x)") step_number, energy
68 character(len=*),
intent(in) :: filename
69 integer :: step_number, i, j, k
70 integer,
dimension(3) :: asro_size
71 real(
real64),
dimension(:,:,:) :: asro
74 asro_size = shape(asro)
76 inquire(file=filename, exist=exist)
78 open(7, file=filename, status=
"old", position=
"append", action=
"write")
80 open(7, file=filename, status=
"new", action=
"write")
81 write(7, *)
'# step_number ASRO'
84 write(7,
"(I13,x,f20.10,x)", advance=
'no') step_number
89 write(7,
"(f8.5,x)", advance=
'no') asro(i,j,k)
94 write(7,
"(x)", advance=
'yes')
116 character(len=*),
intent(in) :: filename
118 real(
real64),
allocatable,
dimension(:),
intent(in) :: &
119 temps, energies, c, acceptance
121 integer :: i, n_steps
123 n_steps =
size(energies)
125 open(unit=7, file=filename)
127 write(7, *)
'# T E C acceptance_rate'
130 write(7,
'(F8.1,2X,F24.15,2X,F24.15,2X,F6.4)') temps(i), energies(i), c(i), acceptance(i)
integer, parameter real64
Longer "double" (64 bit, approx -1.8e308 to 1.8e308 and covering values down to about 2e-308 magnitud...
subroutine, public diagnostics_writer(filename, temps, energies, c, acceptance)
Subroutine to write outputs of a Metropolis simulation to plain text file.
subroutine, public energy_trajectory_writer(filename, step_number, energy)
Subroutine to write energy of a Metropolis simulation trajectory to a plain text file.
subroutine, public asro_trajectory_writer(filename, step_number, asro)
Subroutine to write ASRO of a Metropolis simulation trajectory to a plain text file.