38 character(len=*),
optional :: units
39 character(len=10) :: aunits
43 if (
present(units))
then
50 if (trim(aunits) .eq.
'mRy')
then
51 write(*,
"(x,'V_ij to be used in calculation (mRy):',/)")
52 do i=1, setup%interaction_range
53 write(*,
'(a, I2, a, a)')
' Interchange interaction on shell: ', i, new_line(
'a')
54 write(*,
'(A)', advance=
'no')
' '
55 do j=1, setup%n_species
56 write(*,
'(A, A)', advance=
'no')
' ', setup%species_names(j)
58 write(*,
'(A)', advance=
'yes')
''
59 do j=1, setup%n_species
60 write(*,
'(A, A)', advance=
'no')
' ', setup%species_names(j)
61 do k=1, setup%n_species
62 write(*,
'(A, F8.3, A)', advance=
'no')
' ', 1000*
v_ex(k,j,i),
' '
63 if (k .eq. setup%n_species)
write(*,
'(a)')
''
65 if (j .eq. setup%n_species)
write(*,
'(a)')
''
70 else if (trim(aunits) .eq.
'meV')
then
71 write(*,
"(x,'V_ij to be used in calculation (meV):',/)")
72 do i=1, setup%interaction_range
73 write(*,
'(a, I2, a, a)')
' Interchange interaction on shell: ', i, new_line(
'a')
74 write(*,
'(A)', advance=
'no')
' '
75 do j=1, setup%n_species
76 write(*,
'(A, A)', advance=
'no')
' ', setup%species_names(j)
78 write(*,
'(A)', advance=
'yes')
''
79 do j=1, setup%n_species
80 write(*,
'(A, A)', advance=
'no')
' ', setup%species_names(j)
81 do k=1, setup%n_species
82 write(*,
'(A, F8.3, A)', advance=
'no')
' ', 1000*
ry_to_ev*
v_ex(k,j,i),
' '
83 if (k .eq. setup%n_species)
write(*,
'(a)')
''
85 if (j .eq. setup%n_species)
write(*,
'(a)')
''
110 integer(kind=array_int),
intent(in),
dimension(:,:,:,:) :: grid
111 logical,
intent(in),
optional :: show_borders
112 character(len=*),
optional :: title
114 integer,
dimension(4) :: sizes
115 integer :: ix, iy, iz
116 character(len=1) :: c
117 character(len=4),
parameter :: clrstr = char(27)//
'[2j'
121 if (
present(show_borders)) borders = show_borders
123 write(*,
'(a)') clrstr
126 if (
present(title))
then
127 write(*,
'(a)') title
130 do iz = sizes(4), 1, -1
132 write(*,
'(a, I2)')
'Layer for z = ', iz
134 if (borders)
write(*,
'(a)') repeat(
'=', sizes(2)+2)
136 do iy = sizes(3), 1, -1
137 if (borders)
write(*,
'(a)', advance=
'no')
'|'
139 if (grid(1,ix,iy,iz) .ne. 0)
then
140 write(c,
'(I1)') grid(1,ix, iy, iz)
144 write(*,
'(a)', advance=
'no') c
146 if (borders)
write(*,
'(a)', advance=
'no')
'|'
149 if (borders)
write(*,
'(a)') repeat(
'=', sizes(2)+2)
170 character(len=*),
intent(in) :: message, fill_char
171 logical,
optional :: newline
172 character(len=72) :: output_str
174 integer :: num_fill_chars
176 if (
present(newline))
then
183 num_fill_chars = (72 - len_trim(message) - 2) / 2
186 output_str = repeat(fill_char, num_fill_chars) //
" " // message //
" " // repeat(fill_char, num_fill_chars)
189 if (mod(72 - len_trim(message) - 2, 2) /= 0)
then
190 output_str = output_str // fill_char
195 write(6,
'(A,/)') output_str
197 write(6,
'(A)') output_str
real(real64), parameter, public ry_to_ev
subroutine, public pretty_print_exchange(setup, units)
Subroutine to print atom-atom effective pair interactions to the screen in a human-readable format.
subroutine, public print_centered_message(message, fill_char, newline)
Centered printing routine
subroutine, public display_grid(grid, show_borders, title)
Subroutine to print the current state of the grid to the screen, layer by layer.
real(real64), dimension(:,:,:), allocatable v_ex
Derived type for parameters specifying general simulation parameters which are common to all sampling...