40 helium_solvent_p_type, helium_solvent_type,
rho_num
58 #include "../base/base_uses.f90"
64 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
65 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'helium_io'
67 CHARACTER(len=*),
DIMENSION(6),
PARAMETER,
PRIVATE :: m_dist_name = (/ &
103 REAL(kind=
dp),
DIMENSION(:),
POINTER :: coords
104 CHARACTER(LEN=default_path_length) :: file_name
105 TYPE(mp_para_env_type),
POINTER :: para_env
107 CHARACTER(len=*),
PARAMETER :: routinen =
'helium_read_xyz'
109 CHARACTER(LEN=default_string_length) :: strtmp
110 INTEGER :: frame, handle, istat, j, natom
111 LOGICAL :: found, my_end
112 TYPE(cp_parser_type) :: parser
114 CALL timeset(routinen, handle)
117 INQUIRE (file=file_name, exist=found, iostat=istat)
119 WRITE (unit=strtmp, fmt=
"(A,I0,A)") &
120 "An error occurred inquiring the file <"// &
122 cpabort(trim(strtmp))
124 IF (.NOT. found)
THEN
125 cpabort(
"Coordinate file <"//trim(file_name)//
"> not found.")
132 parse_white_lines=.true.)
139 CALL parser_get_object(parser, natom)
142 ALLOCATE (coords(3*natom))
144 strtmp =
"Warning: more than one frame on file <"//trim(file_name)//
">"
146 strtmp =
"Warning: using the first frame only!"
154 READ (parser%input_line, *) strtmp, &
155 coords(3*(j - 1) + 1), &
156 coords(3*(j - 1) + 2), &
157 coords(3*(j - 1) + 3)
158 coords(3*(j - 1) + 1) =
cp_unit_to_cp2k(coords(3*(j - 1) + 1),
"angstrom")
159 coords(3*(j - 1) + 2) =
cp_unit_to_cp2k(coords(3*(j - 1) + 2),
"angstrom")
160 coords(3*(j - 1) + 3) =
cp_unit_to_cp2k(coords(3*(j - 1) + 3),
"angstrom")
163 my_end = my_end .OR. (len_trim(parser%input_line) == 0)
166 cpabort(
"Error in XYZ format.")
174 CALL timestop(handle)
188 TYPE(helium_solvent_type),
POINTER :: helium
190 CHARACTER(len=default_string_length) :: msg_str, my_label, stmp, stmp1, stmp2, &
192 INTEGER :: i, itmp, unit_nr
193 INTEGER(KIND=int_8) :: i8tmp
194 REAL(kind=
dp) :: rtmp, v1, v2, v3
195 REAL(kind=
dp),
DIMENSION(3) :: my_abc
196 TYPE(cp_logger_type),
POINTER :: logger
200 my_label =
"HELIUM| "
202 IF (logger%para_env%is_source())
THEN
206 WRITE (unit_nr,
'(T2,A,1X,I0)') trim(my_label)// &
207 " Number of helium environments: ", helium%num_env
209 WRITE (unit_nr,
'(T2,A,1X,I0)') trim(my_label)// &
210 " Number of solvent atoms: ", helium%atoms
211 WRITE (unit_nr,
'(T2,A,1X,I0)') trim(my_label)// &
212 " Number of solvent beads: ", helium%beads
213 WRITE (unit_nr,
'(T2,A,1X,I0)') trim(my_label)// &
214 " Total number of solvent particles: ", helium%atoms*helium%beads
216 unit_str =
"angstrom^-3"
219 WRITE (unit_nr,
'(T2,A,F12.6)') trim(my_label)//
" Density ["// &
220 trim(unit_str)//
"]:", rtmp
224 WRITE (unit_nr,
'(T2,A,F12.6)') trim(my_label)//
" He Mass ["// &
225 trim(unit_str)//
"]: ", rtmp
227 unit_str =
"angstrom"
230 WRITE (unit_nr,
'(T2,A,F12.6)') trim(my_label)//
" Cell size ["// &
231 trim(unit_str)//
"]: ", rtmp
233 IF (helium%periodic)
THEN
234 SELECT CASE (helium%cell_shape)
246 IF (helium%droplet_radius .LT. huge(1.0_dp))
THEN
247 WRITE (stmp, *) helium%droplet_radius*
angstrom
252 WRITE (unit_nr,
'(T2,A,1X,I0)') trim(my_label)// &
253 " First MC step :", helium%first_step + 1
254 WRITE (unit_nr,
'(T2,A,1X,I0)') trim(my_label)// &
255 " Last MC step :", helium%last_step
256 WRITE (unit_nr,
'(T2,A,1X,I0)') trim(my_label)// &
257 " Total number of MC steps :", helium%num_steps
258 WRITE (unit_nr,
'(T2,A,1X,I0)') trim(my_label)// &
259 " Number of outer MC trials per step :", helium%iter_rot
260 i8tmp = int(helium%iter_rot,
int_8)
262 WRITE (unit_nr,
'(T2,A,1X,I0)') trim(my_label)// &
263 " Number of inner MC trials per step :", helium%iter_norot
264 i8tmp = i8tmp*int(helium%iter_norot,
int_8)
267 WRITE (stmp, *) i8tmp
268 WRITE (unit_nr,
'(T2,A)') trim(my_label)// &
269 " Total number of MC trials per step : "//trim(adjustl(stmp))
270 i8tmp = int(helium%num_steps,
int_8)
271 i8tmp = i8tmp*int(helium%iter_rot,
int_8)
273 i8tmp = i8tmp*int(helium%iter_norot,
int_8)
276 WRITE (stmp, *) i8tmp
277 WRITE (unit_nr,
'(T2,A)') trim(my_label)// &
278 " Total number of MC trials : "//trim(adjustl(stmp))
280 SELECT CASE (helium%sampling_method)
287 WRITE (stmp, *) helium%maxcycle
289 WRITE (stmp2, *)
"Using maximum permutation cycle length: "// &
293 WRITE (stmp, *)
"Permutation cycle length distribution: "// &
294 trim(adjustl(m_dist_name(helium%m_dist_type)))
298 WRITE (stmp1, *) helium%m_ratio
300 WRITE (stmp2, *) helium%m_value
301 WRITE (stmp, *)
"Using ratio "//trim(adjustl(stmp1))// &
302 " for M = "//trim(adjustl(stmp2))
312 WRITE (stmp1, *) helium%worm_centroid_drmax
313 WRITE (stmp2, *)
"WORM| Centroid move max. displacement: "// &
318 WRITE (stmp1, *) helium%worm_staging_l
319 WRITE (stmp2, *)
"WORM| Maximal staging length: "//trim(adjustl(stmp1))
323 WRITE (stmp1, *) helium%worm_open_close_scale
324 WRITE (stmp2, *)
"WORM| Open/Close scaling: "//trim(adjustl(stmp1))
328 WRITE (stmp1, *) helium%worm_allow_open
329 WRITE (stmp2, *)
"WORM| Open worm sector: "//trim(adjustl(stmp1))
333 WRITE (stmp1, *) helium%worm_show_statistics
334 WRITE (stmp2, *)
"WORM| Print statistics: "//trim(adjustl(stmp1))
336 IF (helium%worm_max_open_cycles > 0 .AND. helium%worm_allow_open)
THEN
339 WRITE (stmp1, *) helium%worm_max_open_cycles
340 WRITE (stmp2, *)
"WORM| Max. nb of MC cycles in open sector: "//trim(adjustl(stmp1))
347 WRITE (msg_str, *) helium%sampling_method
348 msg_str =
"Sampling method ("//trim(adjustl(msg_str))//
") not supported."
354 IF (helium%solute_present)
THEN
355 WRITE (unit_nr,
'(T2,A,1X,I0)') trim(my_label)// &
356 " Number of solute atoms: ", helium%solute_atoms
357 WRITE (unit_nr,
'(T2,A,1X,I0)') trim(my_label)// &
358 " Number of solute beads: ", helium%solute_beads
359 WRITE (unit_nr,
'(T2,A,1X,I0)') trim(my_label)// &
360 " Total number of solute particles: ", helium%solute_atoms* &
364 SELECT CASE (helium%solute_interaction)
366 WRITE (stmp1, *)
"NONE"
368 WRITE (stmp1, *)
"MWATER"
370 WRITE (stmp1, *)
"NNP"
372 WRITE (stmp1, *)
"***UNKNOWN***"
374 WRITE (unit_nr,
'(T2,A,A,A)') &
376 " Solute interaction type: ", &
379 CALL get_cell(helium%solute_cell, abc=my_abc)
380 unit_str =
"angstrom"
384 WRITE (unit_nr,
'(T2,A,F12.6,1X,F12.6,1X,F12.6)') &
385 trim(my_label)//
" Solute cell size ["// &
386 trim(unit_str)//
"]: ", v1, v2, v3
388 WRITE (unit_nr,
'(T2,A)') trim(my_label)//
" Solute is NOT present"
394 IF (helium%rdf_present)
THEN
395 WRITE (stmp,
'(I6)') helium%rdf_num
398 WRITE (stmp,
'(1X,F12.6)') rtmp
401 WRITE (stmp,
'(1X,F12.6)') rtmp
403 itmp = helium%rdf_nbin
404 WRITE (stmp,
'(I6)') itmp
413 IF (helium%rho_present)
THEN
416 IF (helium%rho_property(i)%is_calculated)
THEN
417 WRITE (stmp,
'(A)')
'RHO| '//trim(helium%rho_property(i)%name)
423 WRITE (stmp,
'(1X,F12.6)') rtmp
426 WRITE (stmp,
'(1X,F12.6)') rtmp
428 itmp = helium%rho_nbin
429 WRITE (stmp,
'(I6)') itmp
448 CHARACTER(len=*),
INTENT(IN) :: line
450 CHARACTER(len=default_string_length) :: my_label
452 TYPE(cp_logger_type),
POINTER :: logger
458 IF (logger%para_env%is_source())
THEN
460 WRITE (unit_nr,
'(T2,A)') trim(my_label)//
" "//trim(line)
476 TYPE(helium_solvent_p_type),
DIMENSION(:),
POINTER :: helium_env
478 CHARACTER(len=*),
PARAMETER :: routinen =
'helium_print_energy'
480 INTEGER :: handle, iteration, k, m, unit_nr
481 LOGICAL :: cepsample, file_is_new, should_output
482 REAL(kind=
dp) :: naccptd, ntot
483 REAL(kind=
dp),
DIMENSION(:),
POINTER :: my_energy
484 TYPE(cp_logger_type),
POINTER :: logger
485 TYPE(section_vals_type),
POINTER :: print_key
487 CALL timeset(routinen, handle)
489 NULLIFY (logger, print_key)
492 IF (logger%para_env%is_source())
THEN
494 "MOTION%PINT%HELIUM%PRINT%ENERGY")
496 iteration_info=logger%iter_info, &
500 CALL helium_env(1)%comm%bcast(should_output, logger%para_env%source)
501 CALL helium_env(1)%comm%bcast(cepsample, logger%para_env%source)
503 IF (should_output)
THEN
508 DO k = 1,
SIZE(helium_env)
509 ntot = ntot + helium_env(1)%helium%iter_norot*helium_env(1)%helium%iter_rot
510 DO m = 1, helium_env(k)%helium%maxcycle
511 naccptd = naccptd + helium_env(k)%helium%num_accepted(helium_env(k)%helium%bisctlog2 + 2, m)
516 DO k = 1,
SIZE(helium_env)
517 naccptd = naccptd + helium_env(k)%helium%num_accepted(1, 1)
518 ntot = ntot + helium_env(k)%helium%num_accepted(2, 1)
521 CALL helium_env(1)%comm%sum(naccptd)
522 CALL helium_env(1)%comm%sum(ntot)
524 IF (logger%para_env%is_source())
THEN
525 my_energy => helium_env(1)%helium%energy_avrg
526 iteration = logger%iter_info%iteration(2)
531 middle_name=
"helium-energy", &
533 is_new_file=file_is_new)
535 IF (file_is_new)
THEN
536 WRITE (unit_nr,
'(A9,7(1X,A20))') &
547 WRITE (unit_nr,
"(I9,7(1X,F20.9))") &
563 CALL timestop(handle)
586 TYPE(helium_solvent_p_type),
DIMENSION(:),
POINTER :: helium_env
587 CHARACTER(len=*) :: pkey
588 REAL(kind=
dp),
DIMENSION(:),
POINTER ::
DATA
589 REAL(kind=
dp) :: uconv
590 CHARACTER(len=*),
DIMENSION(3) :: col_label
591 CHARACTER(len=*) :: cmmnt, fname
592 CHARACTER(len=*),
OPTIONAL :: fpos
593 LOGICAL,
OPTIONAL :: avg
595 CHARACTER(len=*),
PARAMETER :: routinen =
'helium_print_vector'
597 CHARACTER(len=default_string_length) :: my_fpos
598 INTEGER :: handle, i, irank, msglen, nenv, offset, &
600 LOGICAL :: is_new, my_avg, should_output
601 REAL(kind=
dp),
DIMENSION(3) :: avg_data
602 REAL(kind=
dp),
DIMENSION(:),
POINTER :: data_p
603 TYPE(cp_logger_type),
POINTER :: logger
604 TYPE(section_vals_type),
POINTER :: psection
606 CALL timeset(routinen, handle)
608 IF (
PRESENT(avg))
THEN
614 IF (
PRESENT(fpos))
THEN
620 NULLIFY (logger, psection)
625 iteration_info=logger%iter_info, &
628 IF (.NOT. should_output)
THEN
629 CALL timestop(handle)
636 msglen =
SIZE(avg_data)
637 DO i = 0,
SIZE(helium_env) - 1
638 avg_data(:) = avg_data(:) +
DATA(msglen*i + 1:msglen*(i + 1))
640 CALL helium_env(1)%comm%sum(avg_data)
641 nenv = helium_env(1)%helium%num_env
642 avg_data(:) = avg_data(:)/real(nenv,
dp)
646 DO i = 1, logger%para_env%mepos
647 offset = offset + helium_env(1)%env_all(i)
650 helium_env(1)%helium%rtmp_3_np_1d = 0.0_dp
651 msglen =
SIZE(avg_data)
652 DO i = 0,
SIZE(helium_env) - 1
653 helium_env(1)%helium%rtmp_3_np_1d(msglen*(offset + i) + 1:msglen*(offset + i + 1)) =
DATA(msglen*i + 1:msglen*(i + 1))
655 CALL helium_env(1)%comm%sum(helium_env(1)%helium%rtmp_3_np_1d)
663 file_position=my_fpos, &
666 IF (logger%para_env%is_source())
THEN
670 IF (cmmnt .NE.
"")
THEN
671 WRITE (unit_nr,
'(A)')
"# "//cmmnt
674 WRITE (unit_nr,
'(A2,A18,1X,A20,1X,A20)') &
683 WRITE (unit_nr,
'(E27.20)', advance=
'NO') uconv*avg_data(i)
685 WRITE (unit_nr,
'(1X)', advance=
'NO')
688 WRITE (unit_nr,
'(A)')
""
691 DO irank = 1, helium_env(1)%helium%num_env
693 msglen =
SIZE(avg_data)
694 offset = (irank - 1)*msglen
695 data_p => helium_env(1)%helium%rtmp_3_np_1d(offset + 1:offset + msglen)
698 WRITE (unit_nr,
'(E27.20)', advance=
'NO') uconv*data_p(i)
700 WRITE (unit_nr,
'(1X)', advance=
'NO')
703 WRITE (unit_nr,
'(A)')
""
712 CALL timestop(handle)
727 TYPE(helium_solvent_p_type),
DIMENSION(:),
POINTER :: helium_env
729 CHARACTER(len=*),
PARAMETER :: routinen =
'helium_print_accepts'
731 INTEGER :: handle, i, j, unit_nr
732 LOGICAL :: file_is_new, should_output
733 TYPE(cp_logger_type),
POINTER :: logger
734 TYPE(section_vals_type),
POINTER :: print_key
736 CALL timeset(routinen, handle)
738 NULLIFY (logger, print_key)
741 IF (logger%para_env%is_source())
THEN
743 "MOTION%PINT%HELIUM%PRINT%ACCEPTS")
745 iteration_info=logger%iter_info, &
748 IF (should_output)
THEN
752 middle_name=
"helium-accepts", &
754 is_new_file=file_is_new)
756 IF (file_is_new)
THEN
757 WRITE (unit_nr,
'(A8,1X,A15,1X,A20)', advance=
'NO') &
761 DO j = 1, helium_env(1)%helium%bisctlog2
762 WRITE (unit_nr,
'(A17,1X,I3)', advance=
'NO')
" Level", j
764 WRITE (unit_nr,
'(A)')
""
767 DO i = 1, helium_env(1)%helium%maxcycle
768 WRITE (unit_nr,
'(I3)', advance=
'NO') i
769 DO j = 1, helium_env(1)%helium%bisctlog2 + 2
770 WRITE (unit_nr,
'(1X,F20.2)', advance=
'NO') helium_env(1)%helium%num_accepted(j, i)
772 WRITE (unit_nr,
'(A)')
""
774 WRITE (unit_nr,
'(A)')
"&"
782 CALL timestop(handle)
796 TYPE(helium_solvent_p_type),
DIMENSION(:),
POINTER :: helium_env
798 CHARACTER(len=*),
PARAMETER :: routinen =
'helium_print_perm'
800 CHARACTER :: left_delim, right_delim
801 CHARACTER(len=default_string_length) :: msg_str, my_middle_name, stmp
802 INTEGER :: curat, handle, i, irank, j, lb, msglen, &
803 nused, offset, outformat, ub, unit_nr
804 INTEGER,
DIMENSION(:),
POINTER :: my_cycle, my_perm, used_indices
805 LOGICAL :: first, first_cycle, should_output
806 TYPE(cp_logger_type),
POINTER :: logger
807 TYPE(section_vals_type),
POINTER :: print_key
809 CALL timeset(routinen, handle)
811 NULLIFY (logger, print_key)
812 NULLIFY (used_indices)
817 DO i = 1, logger%para_env%mepos
818 offset = offset + helium_env(1)%env_all(i)
822 "MOTION%PINT%HELIUM%PRINT%PERM")
824 iteration_info=logger%iter_info, &
827 IF (.NOT. should_output)
THEN
828 CALL timestop(handle)
836 helium_env(1)%helium%rtmp_3_atoms_beads_np_1d = 0.0_dp
837 j =
SIZE(helium_env(1)%helium%rtmp_3_atoms_beads_1d)
838 DO i = 1,
SIZE(helium_env)
839 helium_env(1)%helium%rtmp_3_atoms_beads_np_1d(j*(offset + i - 1) + 1:j*(offset + i)) = &
840 pack(helium_env(i)%helium%pos(:, :, 1:helium_env(1)%helium%beads), .true.)
842 CALL helium_env(1)%comm%sum(helium_env(1)%helium%rtmp_3_atoms_beads_np_1d)
844 helium_env(1)%helium%ltmp_3_atoms_beads_3d(:, :, :) = .true.
848 helium_env(1)%helium%itmp_atoms_np_1d(:) = 0
849 msglen =
SIZE(helium_env(1)%helium%permutation)
850 DO i = 1,
SIZE(helium_env)
851 helium_env(1)%helium%itmp_atoms_np_1d(msglen*(offset + i - 1) + 1:msglen*(offset + i)) = helium_env(i)%helium%permutation
854 CALL helium_env(1)%comm%sum(helium_env(1)%helium%itmp_atoms_np_1d)
856 IF (logger%para_env%is_source())
THEN
859 DO irank = 1, helium_env(1)%helium%num_env
863 WRITE (stmp, *) irank
864 my_middle_name =
"helium-perm-"//trim(adjustl(stmp))
868 middle_name=trim(my_middle_name), &
872 lb = (irank - 1)*helium_env(1)%helium%atoms + 1
873 ub = irank*helium_env(1)%helium%atoms
874 my_perm => helium_env(1)%helium%itmp_atoms_np_1d(lb:ub)
876 SELECT CASE (outformat)
882 msglen =
SIZE(helium_env(1)%helium%rtmp_3_atoms_beads_1d)
883 offset = (irank - 1)*msglen
884 helium_env(1)%helium%work(:, :, 1:helium_env(1)%helium%beads) = &
885 unpack(helium_env(1)%helium%rtmp_3_atoms_beads_np_1d(offset + 1:offset + msglen), &
886 mask=helium_env(1)%helium%ltmp_3_atoms_beads_3d, field=0.0_dp)
891 DO WHILE (curat .LE. helium_env(1)%helium%atoms)
897 nused = nused +
SIZE(my_cycle)
898 CALL reallocate(used_indices, 1, nused)
899 used_indices(nused -
SIZE(my_cycle) + 1:nused) = my_cycle(1:
SIZE(my_cycle))
902 IF (
helium_is_winding(helium_env(1)%helium, curat, helium_env(1)%helium%work, my_perm))
THEN
911 IF (first_cycle)
THEN
912 first_cycle = .false.
914 WRITE (unit_nr,
'(1X)', advance=
'NO')
918 WRITE (unit_nr,
'(A1)', advance=
'NO') left_delim
920 DO i = 1,
SIZE(my_cycle)
924 WRITE (unit_nr,
'(1X)', advance=
'NO')
926 WRITE (unit_nr,
'(I0)', advance=
'NO') my_cycle(i)
928 WRITE (unit_nr,
'(A1)', advance=
'NO') right_delim
931 DEALLOCATE (my_cycle)
935 DO WHILE (any(used_indices .EQ. curat))
942 DEALLOCATE (used_indices)
943 NULLIFY (used_indices)
949 DO i = 1, helium_env(1)%helium%atoms
953 WRITE (unit_nr,
'(1X)', advance=
'NO')
955 WRITE (unit_nr,
'(I0)', advance=
'NO') my_perm(i)
957 WRITE (unit_nr,
'(A)')
""
961 msg_str =
"Format for permutation output unknown."
973 CALL timestop(handle)
989 TYPE(pint_env_type),
INTENT(IN) :: pint_env
990 TYPE(helium_solvent_p_type),
DIMENSION(:),
POINTER :: helium_env
992 CHARACTER(len=*),
PARAMETER :: routinen =
'helium_print_action'
994 CHARACTER(len=default_string_length) :: my_middle_name, stmp
995 INTEGER :: handle, i, irank, iteration, k, offset, &
997 LOGICAL :: file_is_new, should_output
998 REAL(kind=
dp),
DIMENSION(:),
POINTER :: tmp_inter_action, tmp_link_action, &
1000 TYPE(cp_logger_type),
POINTER :: logger
1001 TYPE(section_vals_type),
POINTER :: print_key
1003 CALL timeset(routinen, handle)
1005 NULLIFY (logger, print_key)
1010 DO i = 1, logger%para_env%mepos
1011 offset = offset + helium_env(1)%env_all(i)
1015 "MOTION%PINT%HELIUM%PRINT%ACTION")
1017 iteration_info=logger%iter_info, &
1020 IF (.NOT. should_output)
THEN
1021 CALL timestop(handle)
1025 DO k = 1,
SIZE(helium_env)
1031 NULLIFY (tmp_link_action)
1032 NULLIFY (tmp_pair_action)
1033 NULLIFY (tmp_inter_action)
1034 ALLOCATE (tmp_link_action(helium_env(1)%helium%num_env))
1035 ALLOCATE (tmp_pair_action(helium_env(1)%helium%num_env))
1036 ALLOCATE (tmp_inter_action(helium_env(1)%helium%num_env))
1037 tmp_link_action(:) = 0.0_dp
1038 tmp_pair_action(:) = 0.0_dp
1039 tmp_inter_action(:) = 0.0_dp
1041 DO k = 1,
SIZE(helium_env)
1042 tmp_link_action(offset + k) = helium_env(k)%helium%link_action
1043 tmp_pair_action(offset + k) = helium_env(k)%helium%pair_action
1044 tmp_inter_action(offset + k) = helium_env(k)%helium%inter_action
1046 CALL helium_env(1)%comm%sum(tmp_link_action)
1047 CALL helium_env(1)%comm%sum(tmp_pair_action)
1048 CALL helium_env(1)%comm%sum(tmp_inter_action)
1050 IF (logger%para_env%is_source())
THEN
1051 iteration = logger%iter_info%iteration(2)
1053 DO irank = 1, helium_env(1)%helium%num_env
1057 WRITE (stmp, *) irank
1058 my_middle_name =
"helium-action-"//trim(adjustl(stmp))
1062 middle_name=trim(my_middle_name), &
1064 is_new_file=file_is_new)
1066 IF (file_is_new)
THEN
1067 WRITE (unit_nr,
'(A9,3(1X,A25))') &
1069 " He_Total_Link_Action", &
1070 " He_Total_Pair_Action", &
1071 " He_Total_Interaction"
1074 WRITE (unit_nr,
"(I9,3(1X,F25.14))") &
1076 tmp_link_action(irank), &
1077 tmp_pair_action(irank), &
1078 tmp_inter_action(irank)
1086 DEALLOCATE (tmp_link_action)
1087 DEALLOCATE (tmp_pair_action)
1088 DEALLOCATE (tmp_inter_action)
1089 NULLIFY (tmp_link_action)
1090 NULLIFY (tmp_pair_action)
1091 NULLIFY (tmp_inter_action)
1093 CALL timestop(handle)
1108 TYPE(helium_solvent_p_type),
DIMENSION(:),
POINTER :: helium_env
1110 CHARACTER(len=*),
PARAMETER :: routinen =
'helium_print_coordinates'
1112 CHARACTER(3) :: resname
1113 CHARACTER(len=default_string_length) :: fmt_string, my_middle_name, stmp
1114 INTEGER :: handle, i, ia, ib, ib1, ib2, ic, icycle, &
1115 irank, j, k, msglen, offset, &
1116 outformat, tmp1, tmp2, unit_nr
1117 INTEGER,
DIMENSION(:),
POINTER :: my_perm
1118 LOGICAL :: are_connected, is_winding, ltmp, &
1120 REAL(kind=
dp) :: xtmp, ytmp, ztmp
1121 REAL(kind=
dp),
DIMENSION(3) :: r0, r1, r2
1122 TYPE(cp_logger_type),
POINTER :: logger
1123 TYPE(section_vals_type),
POINTER :: print_key
1125 CALL timeset(routinen, handle)
1127 NULLIFY (logger, print_key)
1132 DO i = 1, logger%para_env%mepos
1133 offset = offset + helium_env(1)%env_all(i)
1137 "MOTION%PINT%HELIUM%PRINT%COORDINATES")
1139 iteration_info=logger%iter_info, &
1142 IF (.NOT. should_output)
THEN
1143 CALL timestop(handle)
1148 DO k = 1,
SIZE(helium_env)
1149 r0(:) = helium_env(k)%helium%center(:)
1150 DO ia = 1, helium_env(k)%helium%atoms
1151 DO ib = 1, helium_env(k)%helium%beads
1152 r1(:) = helium_env(k)%helium%pos(:, ia, ib) - r0(:)
1153 r2(:) = helium_env(k)%helium%pos(:, ia, ib) - r0(:)
1157 IF (abs(r1(ic) - r2(ic)) .GT. 100.0_dp*epsilon(0.0_dp))
THEN
1163 helium_env(k)%helium%work(:, ia, ib) = r0(:) + r2(:)
1165 helium_env(k)%helium%work(:, ia, ib) = helium_env(k)%helium%pos(:, ia, ib)
1172 helium_env(1)%helium%rtmp_3_atoms_beads_np_1d = 0.0_dp
1173 j =
SIZE(helium_env(1)%helium%rtmp_3_atoms_beads_1d)
1174 DO i = 1,
SIZE(helium_env)
1175 helium_env(1)%helium%rtmp_3_atoms_beads_np_1d(j*(offset + i - 1) + 1:j*(offset + i)) = &
1176 pack(helium_env(i)%helium%pos(:, :, 1:helium_env(1)%helium%beads), .true.)
1178 CALL helium_env(1)%comm%sum(helium_env(1)%helium%rtmp_3_atoms_beads_np_1d)
1181 helium_env(1)%helium%itmp_atoms_np_1d(:) = 0
1182 j =
SIZE(helium_env(1)%helium%permutation)
1183 DO i = 1,
SIZE(helium_env)
1184 helium_env(1)%helium%itmp_atoms_np_1d(j*(offset + i - 1) + 1:j*(offset + i)) = helium_env(i)%helium%permutation
1187 CALL helium_env(1)%comm%sum(helium_env(1)%helium%itmp_atoms_np_1d)
1190 helium_env(1)%helium%ltmp_3_atoms_beads_3d(:, :, :) = .true.
1192 IF (logger%para_env%is_source())
THEN
1197 DO irank = 1, helium_env(1)%helium%num_env
1201 WRITE (stmp, *) irank
1202 my_middle_name =
"helium-pos-"//trim(adjustl(stmp))
1206 middle_name=trim(my_middle_name), &
1210 fmt_string =
"(A6,3F9.3,3F7.2,1X,A11,1X,I3)"
1211 xtmp = helium_env(1)%helium%cell_size
1213 SELECT CASE (helium_env(1)%helium%cell_shape)
1221 WRITE (unit_nr, fmt_string)
"CRYST1", &
1223 90.0_dp, 90.0_dp, 90.0_dp, &
1224 stmp, helium_env(1)%helium%beads
1227 msglen =
SIZE(helium_env(1)%helium%rtmp_3_atoms_beads_1d)
1228 offset = (irank - 1)*msglen
1229 helium_env(1)%helium%work(:, :, 1:helium_env(1)%helium%beads) = &
1230 unpack(helium_env(1)%helium%rtmp_3_atoms_beads_np_1d(offset + 1:offset + msglen), &
1231 mask=helium_env(1)%helium%ltmp_3_atoms_beads_3d, field=0.0_dp)
1234 msglen =
SIZE(helium_env(1)%helium%permutation)
1235 offset = (irank - 1)*msglen
1236 my_perm => helium_env(1)%helium%itmp_atoms_np_1d(offset + 1:offset + msglen)
1240 "(A6,I5,1X,A4,A1,A3,1X,A1,I4,A1,3X,3F8.3,2F6.2,10X,A2,A2)"
1241 DO ia = 1, helium_env(1)%helium%atoms
1243 is_winding =
helium_is_winding(helium_env(1)%helium, ia, helium_env(1)%helium%work, my_perm)
1244 IF (is_winding)
THEN
1249 DO ib = 1, helium_env(1)%helium%beads
1250 xtmp = helium_env(1)%helium%work(1, ia, ib)
1252 ytmp = helium_env(1)%helium%work(2, ia, ib)
1254 ztmp = helium_env(1)%helium%work(3, ia, ib)
1256 WRITE (unit_nr, fmt_string)
"ATOM ", &
1257 (ia - 1)*helium_env(1)%helium%beads + ib, &
1258 " He ",
" ", resname,
"X", &
1262 1.0_dp, 0.0_dp,
"HE",
" "
1267 DO ia = 1, helium_env(1)%helium%atoms
1275 DO ib = 1, helium_env(1)%helium%beads - 1
1277 r1(:) = helium_env(1)%helium%work(:, ia, ib) - helium_env(1)%helium%work(:, ia, ib + 1)
1280 are_connected = .true.
1282 IF (abs(r1(ic) - r2(ic)) .GT. 100.0_dp*epsilon(0.0_dp))
THEN
1285 are_connected = .false.
1289 IF (are_connected)
THEN
1290 tmp1 = (ia - 1)*helium_env(1)%helium%beads + ib
1291 tmp2 = (ia - 1)*helium_env(1)%helium%beads + ib + 1
1293 IF (tmp1 .LT. tmp2)
THEN
1300 WRITE (unit_nr,
'(A6,2I5)')
"CONECT", ib1, ib2
1306 r1(:) = helium_env(1)%helium%work(:, ia, helium_env(1)%helium%beads) - helium_env(1)%helium%work(:, my_perm(ia), 1)
1309 are_connected = .true.
1311 IF (abs(r1(ic) - r2(ic)) .GT. 100.0_dp*epsilon(0.0_dp))
THEN
1314 are_connected = .false.
1318 IF (are_connected)
THEN
1319 tmp1 = ia*helium_env(1)%helium%beads
1320 tmp2 = (my_perm(ia) - 1)*helium_env(1)%helium%beads + 1
1321 IF (tmp1 .LT. tmp2)
THEN
1328 WRITE (unit_nr,
'(A6,2I5)')
"CONECT", ib1, ib2
1331 WRITE (unit_nr,
'(A)')
"END"
1337 DO ib = 1, helium_env(1)%helium%beads
1339 WRITE (stmp, *) irank
1340 my_middle_name =
"helium-pos-"//trim(adjustl(stmp))
1342 my_middle_name = trim(my_middle_name)//
"-"//trim(adjustl(stmp))
1346 middle_name=trim(my_middle_name), &
1349 WRITE (unit_nr, *) helium_env(1)%helium%atoms
1351 WRITE (stmp, *) logger%iter_info%n_rlevel
1352 fmt_string =
"(A6,"//trim(adjustl(stmp))//
"I12)"
1353 WRITE (unit_nr, fmt_string)
"iter= ", logger%iter_info%iteration(:)
1354 fmt_string =
"(A6,3F9.3,3F7.2,1X,A11,1X,I3)"
1357 msglen =
SIZE(helium_env(1)%helium%rtmp_3_atoms_beads_1d)
1358 offset = (irank - 1)*msglen
1359 helium_env(1)%helium%work(:, :, 1:helium_env(1)%helium%beads) = &
1360 unpack(helium_env(1)%helium%rtmp_3_atoms_beads_np_1d(offset + 1:offset + msglen), &
1361 mask=helium_env(1)%helium%ltmp_3_atoms_beads_3d, field=0.0_dp)
1364 msglen =
SIZE(helium_env(1)%helium%permutation)
1365 offset = (irank - 1)*msglen
1366 my_perm => helium_env(1)%helium%itmp_atoms_np_1d(offset + 1:offset + msglen)
1369 fmt_string =
"(A2,3(1X,F20.10))"
1370 DO ia = 1, helium_env(1)%helium%atoms
1371 xtmp = helium_env(1)%helium%work(1, ia, ib)
1373 ytmp = helium_env(1)%helium%work(2, ia, ib)
1375 ztmp = helium_env(1)%helium%work(3, ia, ib)
1377 WRITE (unit_nr, fmt_string)
"He", xtmp, ytmp, ztmp
1389 CALL timestop(handle)
1404 TYPE(helium_solvent_p_type),
DIMENSION(:),
POINTER :: helium_env
1406 CHARACTER(len=*),
PARAMETER :: routinen =
'helium_print_rdf'
1408 CHARACTER(len=default_string_length) :: stmp
1409 INTEGER :: handle, ia, ic, id, itmp, iweight, k, &
1411 LOGICAL :: should_output
1412 REAL(kind=
dp) :: inv_norm, rtmp, rtmp2
1413 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: message
1414 TYPE(cp_logger_type),
POINTER :: logger
1415 TYPE(section_vals_type),
POINTER :: print_key
1417 CALL timeset(routinen, handle)
1419 NULLIFY (logger, print_key)
1422 IF (logger%para_env%is_source())
THEN
1424 "MOTION%PINT%HELIUM%PRINT%RDF")
1426 iteration_info=logger%iter_info, &
1429 CALL helium_env(1)%comm%bcast(should_output, logger%para_env%source)
1431 IF (should_output)
THEN
1434 helium_env(1)%helium%rdf_inst(:, :) = 0.0_dp
1435 DO k = 1,
SIZE(helium_env)
1436 helium_env(1)%helium%rdf_inst(:, :) = helium_env(1)%helium%rdf_inst(:, :) + &
1437 helium_env(k)%helium%rdf_accu(:, :)
1442 message => helium_env(1)%helium%rdf_inst(:, :)
1443 CALL helium_env(1)%comm%sum(message)
1444 itmp = helium_env(1)%helium%num_env
1445 inv_norm = 1.0_dp/real(itmp,
dp)
1446 helium_env(1)%helium%rdf_inst(:, :) = helium_env(1)%helium%rdf_inst(:, :)*inv_norm
1449 nsteps = helium_env(1)%helium%current_step - helium_env(1)%helium%first_step
1450 inv_norm = 1.0_dp/real(nsteps,
dp)
1451 helium_env(1)%helium%rdf_inst(:, :) = helium_env(1)%helium%rdf_inst(:, :)*inv_norm
1453 iweight = helium_env(1)%helium%rdf_iweight
1455 helium_env(1)%helium%rdf_inst(:, :) = nsteps*helium_env(1)%helium%rdf_inst(:, :) + &
1456 iweight*helium_env(1)%helium%rdf_rstr(:, :)
1457 helium_env(1)%helium%rdf_inst(:, :) = helium_env(1)%helium%rdf_inst(:, :)/real(nsteps + iweight,
dp)
1459 IF (logger%para_env%is_source())
THEN
1464 IF (.NOT. helium_env(1)%helium%periodic)
THEN
1469 IF (helium_env(1)%helium%rdf_he_he)
THEN
1473 WRITE (stmp, *)
"He-He"
1477 middle_name=
"helium-rdf-"//trim(adjustl(stmp)), &
1479 file_position=
"REWIND", &
1482 DO ic = 1, helium_env(1)%helium%rdf_nbin
1483 WRITE (unit_nr,
'(F20.10)', advance=
'NO') (real(ic,
dp) - 0.5_dp)*helium_env(1)%helium%rdf_delr*rtmp
1484 WRITE (unit_nr,
'(F20.10)', advance=
'NO') helium_env(1)%helium%rdf_inst(ia, ic)*rtmp2
1492 IF (helium_env(1)%helium%rdf_sol_he)
THEN
1495 WRITE (stmp, *)
"Solute-He"
1499 middle_name=
"helium-rdf-"//trim(adjustl(stmp)), &
1501 file_position=
"REWIND", &
1504 DO ic = 1, helium_env(1)%helium%rdf_nbin
1505 WRITE (unit_nr,
'(F20.10)', advance=
'NO') (real(ic,
dp) - 0.5_dp)*helium_env(1)%helium%rdf_delr*rtmp
1506 DO id = 1 + ia, helium_env(1)%helium%rdf_num
1507 WRITE (unit_nr,
'(F20.10)', advance=
'NO') helium_env(1)%helium%rdf_inst(id, ic)*rtmp2
1519 CALL timestop(handle)
1535 TYPE(helium_solvent_p_type),
DIMENSION(:),
POINTER :: helium_env
1537 CHARACTER(len=*),
PARAMETER :: routinen =
'helium_print_rho'
1539 CHARACTER(len=default_string_length) :: comment, fname
1540 INTEGER :: handle, ic, id, itmp, iweight, k, &
1542 LOGICAL :: should_output
1543 REAL(kind=
dp) :: inv_norm, invproc
1544 REAL(kind=
dp),
DIMENSION(3) :: center
1545 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: cubdata
1546 TYPE(cp_logger_type),
POINTER :: logger
1547 TYPE(section_vals_type),
POINTER :: print_key
1549 CALL timeset(routinen, handle)
1551 NULLIFY (logger, print_key)
1555 "MOTION%PINT%HELIUM%PRINT%RHO")
1557 iteration_info=logger%iter_info, &
1560 IF (.NOT. should_output)
THEN
1561 CALL timestop(handle)
1567 helium_env(1)%helium%rho_inst(:, :, :, :) = 0.0_dp
1568 DO k = 1,
SIZE(helium_env)
1569 helium_env(1)%helium%rho_inst(:, :, :, :) = helium_env(1)%helium%rho_inst(:, :, :, :) + &
1570 helium_env(k)%helium%rho_accu(:, :, :, :)
1574 CALL helium_env(1)%comm%sum(helium_env(1)%helium%rho_inst)
1575 itmp = helium_env(1)%helium%num_env
1576 invproc = 1.0_dp/real(itmp,
dp)
1577 helium_env(1)%helium%rho_inst(:, :, :, :) = helium_env(1)%helium%rho_inst(:, :, :, :)*invproc
1580 nsteps = helium_env(1)%helium%current_step - helium_env(1)%helium%first_step
1581 inv_norm = 1.0_dp/real(nsteps,
dp)
1582 helium_env(1)%helium%rho_inst(:, :, :, :) = helium_env(1)%helium%rho_inst(:, :, :, :)*inv_norm
1584 iweight = helium_env(1)%helium%rho_iweight
1586 helium_env(1)%helium%rho_inst(:, :, :, :) = nsteps*helium_env(1)%helium%rho_inst(:, :, :, :) + &
1587 iweight*helium_env(1)%helium%rho_rstr(:, :, :, :)
1588 helium_env(1)%helium%rho_inst(:, :, :, :) = helium_env(1)%helium%rho_inst(:, :, :, :)/real(nsteps + iweight,
dp)
1591 IF (helium_env(1)%helium%solute_present)
THEN
1593 center(:) = helium_env(1)%helium%center(:)
1598 center(:) = (/0.0_dp, 0.0_dp, 0.0_dp/)
1603 IF (.NOT. helium_env(1)%helium%rho_property(id)%is_calculated)
THEN
1608 DO ic = 1, helium_env(1)%helium%rho_property(id)%num_components
1610 WRITE (fname,
'(A)')
"helium-rho-"// &
1611 trim(adjustl(helium_env(1)%helium%rho_property(id)%filename_suffix(ic)))
1612 IF (helium_env(1)%helium%rho_property(id)%component_name(ic) .EQ.
"")
THEN
1613 WRITE (comment,
'(A)') trim(helium_env(1)%helium%rho_property(id)%name)
1615 WRITE (comment,
'(A)') trim(helium_env(1)%helium%rho_property(id)%name)// &
1617 trim(helium_env(1)%helium%rho_property(id)%component_name(ic))
1619 cubdata => helium_env(1)%helium%rho_inst(helium_env(1)%helium%rho_property(id)%component_index(ic), :, :, :)
1624 middle_name=trim(adjustl(fname)), &
1625 extension=
".cube", &
1626 file_position=
"REWIND", &
1629 IF (logger%para_env%is_source())
THEN
1633 center - 0.5_dp*(helium_env(1)%helium%rho_maxr - helium_env(1)%helium%rho_delr), &
1634 helium_env(1)%helium%rho_delr, &
1635 helium_env(1)%helium%rho_nbin, &
1645 CALL timestop(handle)
1662 INTEGER,
INTENT(IN) :: unit
1663 CHARACTER(len=default_string_length),
INTENT(IN) :: comment
1664 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: origin
1665 REAL(kind=
dp),
INTENT(IN) :: deltar
1666 INTEGER,
INTENT(IN) :: ndim
1667 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(IN), &
1670 CHARACTER(len=*),
PARAMETER :: routinen =
'helium_write_cubefile'
1672 INTEGER :: handle, ix, iy, iz, nw
1673 REAL(kind=
dp) :: delr, inva3
1674 REAL(kind=
dp),
DIMENSION(3) :: orig
1676 CALL timeset(routinen, handle)
1683 WRITE (unit,
'(A)') comment
1684 WRITE (unit,
'(A)')
"Volumetric data in cubefile format generated by CP2K"
1685 WRITE (unit,
'(I5,3(1X,F12.8))') 0, orig(1), orig(2), orig(3)
1686 WRITE (unit,
'(I5,3(1X,F12.8))') ndim, delr, 0.0_dp, 0.0_dp
1687 WRITE (unit,
'(I5,3(1X,F12.8))') ndim, 0.0_dp, delr, 0.0_dp
1688 WRITE (unit,
'(I5,3(1X,F12.8))') ndim, 0.0_dp, 0.0_dp, delr
1696 WRITE (unit,
'(1X,E13.5)', advance=
'NO') inva3*
DATA(ix, iy, iz)
1698 IF (mod(nw, 6) .EQ. 0)
THEN
1713 CALL timestop(handle)
1727 TYPE(helium_solvent_p_type),
DIMENSION(:),
POINTER :: helium_env
1729 CHARACTER(len=*),
PARAMETER :: routinen =
'helium_print_plength'
1731 INTEGER :: handle, i, unit_nr
1732 LOGICAL :: is_new, should_output
1733 TYPE(cp_logger_type),
POINTER :: logger
1734 TYPE(section_vals_type),
POINTER :: print_key
1736 CALL timeset(routinen, handle)
1738 NULLIFY (logger, print_key)
1741 IF (logger%para_env%is_source())
THEN
1743 "MOTION%PINT%HELIUM%PRINT%PLENGTH")
1745 iteration_info=logger%iter_info, &
1748 IF (should_output)
THEN
1753 middle_name=
"helium-plength", &
1757 DO i = 1, helium_env(1)%helium%atoms
1758 WRITE (unit_nr,
'(F20.10)', advance=
'NO') helium_env(1)%helium%plength_avrg(i)
1759 IF (i .LT. helium_env(1)%helium%atoms)
THEN
1760 WRITE (unit_nr,
'(1X)', advance=
'NO')
1763 WRITE (unit_nr,
'(A)')
""
1771 CALL timestop(handle)
1786 TYPE(helium_solvent_p_type),
DIMENSION(:),
POINTER :: helium_env
1788 CHARACTER(len=*),
PARAMETER :: routinen =
'helium_print_force'
1790 CHARACTER(len=default_string_length) :: msgstr
1791 INTEGER :: handle, ia, ib, ic, idim, unit_nr
1792 LOGICAL :: should_output
1793 TYPE(cp_logger_type),
POINTER :: logger
1794 TYPE(section_vals_type),
POINTER :: print_key
1796 CALL timeset(routinen, handle)
1798 NULLIFY (logger, print_key)
1802 "MOTION%PINT%HELIUM%PRINT%FORCES")
1807 IF (.NOT. should_output)
THEN
1808 CALL timestop(handle)
1813 IF (.NOT. helium_env(1)%helium%solute_present)
THEN
1814 msgstr =
"Warning: force printout requested but there is no solute!"
1816 CALL timestop(handle)
1820 IF (logger%para_env%is_source())
THEN
1825 middle_name=
"helium-force", &
1829 DO ib = 1, helium_env(1)%helium%solute_beads
1831 DO ia = 1, helium_env(1)%helium%solute_atoms
1834 WRITE (unit_nr,
'(F20.10)', advance=
'NO') helium_env(1)%helium%force_avrg(ib, idim)
1845 CALL timestop(handle)
1861 SUBROUTINE helium_print_force_inst(helium)
1863 TYPE(helium_solvent_type),
POINTER :: helium
1865 CHARACTER(len=*),
PARAMETER :: routinen =
'helium_print_force_inst', &
1866 routinep = modulen//
':'//routinen
1868 CHARACTER(len=default_string_length) :: my_middle_name, stmp
1869 INTEGER :: handle, ia, ib, ic, idim, irank, offset, &
1871 LOGICAL :: should_output
1872 TYPE(cp_logger_type),
POINTER :: logger
1873 TYPE(section_vals_type),
POINTER :: print_key
1875 CALL timeset(routinen, handle)
1877 NULLIFY (logger, print_key)
1880 "MOTION%PINT%HELIUM%PRINT%FORCES_INST")
1885 IF (should_output)
THEN
1888 IF (.NOT. helium%solute_present)
THEN
1889 stmp =
"Warning: force printout requested but there is no solute!"
1891 CALL timestop(handle)
1896 helium%rtmp_p_ndim_1d(:) = pack(helium%force_inst, .true.)
1899 helium%rtmp_p_ndim_np_1d(:) = 0.0_dp
1900 CALL logger%para_env%gather(helium%rtmp_p_ndim_1d, helium%rtmp_p_ndim_np_1d)
1902 IF (logger%para_env%is_source())
THEN
1905 DO irank = 1, helium%num_env
1909 WRITE (stmp, *) irank
1910 my_middle_name =
"helium-force-inst-"//trim(adjustl(stmp))
1914 middle_name=trim(my_middle_name), &
1918 offset = (irank - 1)*
SIZE(helium%rtmp_p_ndim_1d)
1920 DO ib = 1, helium%solute_beads
1921 DO ia = 1, helium%solute_atoms
1924 WRITE (unit_nr,
'(F20.10)', advance=
'NO') helium%rtmp_p_ndim_np_1d(offset + idim)
1938 CALL timestop(handle)
1940 END SUBROUTINE helium_print_force_inst
Handles all functions related to the CELL.
subroutine, public get_cell(cell, alpha, beta, gamma, deth, orthorhombic, abc, periodic, h, h_inv, symmetry_id, tag)
Get informations about a simulation cell.
various routines to log and control the output. The idea is that decisions about where to log should ...
recursive integer function, public cp_logger_get_default_unit_nr(logger, local, skip_not_ionode)
asks the default unit number of the given logger. try to use cp_logger_get_unit_nr
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer function, public cp_print_key_unit_nr(logger, basis_section, print_key_path, extension, middle_name, local, log_filename, ignore_should_output, file_form, file_position, file_action, file_status, do_backup, on_file, is_new_file, mpi_io, fout)
...
subroutine, public cp_print_key_finished_output(unit_nr, logger, basis_section, print_key_path, local, ignore_should_output, on_file, mpi_io)
should be called after you finish working with a unit obtained with cp_print_key_unit_nr,...
integer, parameter, public cp_p_file
integer function, public cp_print_key_should_output(iteration_info, basis_section, print_key_path, used_print_key, first_time)
returns what should be done with the given property if btest(res,cp_p_store) then the property should...
Utility routines to read data from files. Kept as close as possible to the old parser because.
subroutine, public parser_get_next_line(parser, nline, at_end)
Read the next input line and broadcast the input information. Skip (nline-1) lines and skip also all ...
Utility routines to read data from files. Kept as close as possible to the old parser because.
subroutine, public parser_release(parser)
releases the parser
subroutine, public parser_create(parser, file_name, unit_nr, para_env, end_section_label, separator_chars, comment_char, continuation_char, quote_char, section_char, parse_white_lines, initial_variables, apply_preprocessing)
Start a parser run. Initial variables allow to @SET stuff before opening the file.
real(kind=dp) function, public cp_unit_from_cp2k(value, unit_str, defaults, power)
converts from the internal cp2k units to the given unit
real(kind=dp) function, public cp_unit_to_cp2k(value, unit_str, defaults, power)
converts to the internal cp2k units to the given unit
Independent helium subroutines shared with other modules.
integer function, public helium_cycle_number(helium, atom_number, permutation)
Given the atom number and permutation state return the cycle number the atom belongs to.
subroutine, public helium_pbc(helium, r, enforce)
General PBC routine for helium.
pure integer function, dimension(:), pointer, public helium_cycle_of(element, permutation)
Given an element of a permutation return the cycle it belongs to.
pure integer function, public helium_path_length(helium, atom_number, permutation)
Given the atom number and permutation state return the length of the path this atom belongs to.
logical function, public helium_is_winding(helium, atmidx, pos, permutation)
Given the atom index and permutation state returns .TRUE. if the atom belongs to a winding path,...
Methods that handle helium-solvent and helium-helium interactions.
real(kind=dp) function, public helium_total_pair_action(helium)
Computes the total pair action of the helium.
real(kind=dp) function, public helium_total_inter_action(pint_env, helium)
Computes the total interaction of the helium with the solute.
real(kind=dp) function, public helium_total_link_action(helium)
Computes the total harmonic link action of the helium.
I/O subroutines for helium.
subroutine, public helium_print_vector(helium_env, pkey, DATA, uconv, col_label, cmmnt, fname, fpos, avg)
Print a 3D real vector according to printkey <pkey>
subroutine, public helium_print_action(pint_env, helium_env)
Print helium action file to HELIUMPRINTACTION.
subroutine, public helium_print_rdf(helium_env)
Print radial distribution functions according to HELIUMPRINTRDF.
subroutine, public helium_print_force(helium_env)
Print helium force according to HELIUMPRINTFORCE.
subroutine, public helium_print_accepts(helium_env)
Print acceptance counts according to HELIUMPRINTACCEPTS.
subroutine, public helium_print_energy(helium_env)
Print energies according to HELIUMPRINTENERGY.
subroutine, public helium_print_perm(helium_env)
Print permutation state according to HELIUMPRINTPERM.
subroutine, public helium_read_xyz(coords, file_name, para_env)
Read XYZ coordinates from file.
subroutine, public helium_print_rho(helium_env)
Print densities according to HELIUMPRINTRHO.
subroutine, public helium_print_plength(helium_env)
Print permutation length according to HELIUMPRINTPLENGTH.
subroutine, public helium_write_setup(helium)
Write helium parameters to the output unit.
subroutine, public helium_write_line(line)
Writes out a line of text to the default output unit.
subroutine, public helium_write_cubefile(unit, comment, origin, deltar, ndim, DATA)
Write volumetric data to an orthorhombic cubefile.
subroutine, public helium_print_coordinates(helium_env)
Print coordinates according to HELIUMPRINTCOORDINATES.
Data types representing superfluid helium.
integer, parameter, public e_id_potential
integer, parameter, public e_id_thermo
integer, parameter, public e_id_virial
integer, parameter, public e_id_interact
integer, parameter, public e_id_kinetic
integer, parameter, public e_id_total
Energy contributions - symbolic names for indexing energy arrays.
integer, parameter, public rho_num
number of density function identifiers
Defines the basic variable types.
integer, parameter, public int_8
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public default_path_length
Machine interface based on Fortran 2003 and POSIX.
subroutine, public m_flush(lunit)
flushes units if the &GLOBAL flag is set accordingly
Utility routines for the memory handling.
Interface to the message passing library MPI.
Definition of physical constants:
real(kind=dp), parameter, public angstrom
real(kind=dp), parameter, public massunit