84#include "../base/base_uses.f90"
90 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_restarts'
111 coords, vels, pint_env, helium_env)
118 OPTIONAL,
POINTER :: helium_env
120 CHARACTER(LEN=*),
PARAMETER :: routinen =
'write_restart'
121 CHARACTER(LEN=30),
DIMENSION(2),
PARAMETER :: &
122 keys = [
"PRINT%RESTART_HISTORY",
"PRINT%RESTART "]
124 INTEGER :: handle, ikey, ires, log_unit, nforce_eval
125 LOGICAL :: save_mem, write_binary_restart_file
129 CALL timeset(routinen, handle)
134 NULLIFY (global_section)
139 motion_section, keys(1)),
cp_p_file) .OR. &
141 motion_section, keys(2)),
cp_p_file))
THEN
146 l_val=write_binary_restart_file)
148 IF (write_binary_restart_file)
THEN
149 CALL update_subsys_release(md_env, force_env, root_section)
150 CALL update_motion_release(motion_section)
151 DO ikey = 1,
SIZE(keys)
154 motion_section, keys(ikey)),
cp_p_file))
THEN
156 extension=
".restart.bin", &
157 file_action=
"READWRITE", &
158 file_form=
"UNFORMATTED", &
159 file_position=
"REWIND", &
160 file_status=
"UNKNOWN", &
161 do_backup=(ikey == 2))
162 CALL write_binary_restart(ires, log_unit, root_section, md_env, force_env)
169 CALL update_input(md_env, force_env, root_section, coords, vels, pint_env, helium_env, &
171 write_binary_restart_file=write_binary_restart_file)
173 DO ikey = 1,
SIZE(keys)
175 motion_section, keys(ikey)),
cp_p_file))
THEN
177 extension=
".restart", &
178 file_position=
"REWIND", &
179 do_backup=(ikey == 2))
189 CALL update_subsys_release(md_env, force_env, root_section)
190 CALL update_motion_release(motion_section)
195 CALL timestop(handle)
208 SUBROUTINE update_subsys_release(md_env, force_env, root_section)
214 CHARACTER(LEN=*),
PARAMETER :: routinen =
'update_subsys_release'
216 CHARACTER(LEN=default_string_length) :: unit_str
217 INTEGER :: handle, iforce_eval, myid, nforce_eval
218 INTEGER,
DIMENSION(:),
POINTER :: i_force_eval
219 LOGICAL :: explicit, scale, skip_vel_section
227 CALL timeset(routinen, handle)
229 NULLIFY (core_particles, my_force_env, my_force_b, particles, &
230 shell_particles, subsys, work_section)
232 IF (
PRESENT(md_env))
THEN
233 CALL get_md_env(md_env=md_env, force_env=my_force_env)
234 ELSE IF (
PRESENT(force_env))
THEN
235 my_force_env => force_env
238 IF (
ASSOCIATED(my_force_env))
THEN
239 NULLIFY (subsys_section)
241 skip_vel_section = ( &
247 CALL multiple_fe_list(force_env_sections, root_section, i_force_eval, nforce_eval)
249 DO iforce_eval = 1, nforce_eval
251 i_rep_section=i_force_eval(iforce_eval))
253 IF (.NOT. explicit) cycle
255 my_force_b => my_force_env
256 IF (iforce_eval > 1) my_force_b => my_force_env%sub_force_env(iforce_eval - 1)%force_env
260 CALL cp_subsys_get(subsys, particles=particles, shell_particles=shell_particles, &
261 core_particles=core_particles)
276 IF (.NOT. skip_vel_section)
THEN
280 IF (
ASSOCIATED(shell_particles))
THEN
294 IF (.NOT. skip_vel_section)
THEN
299 IF (
ASSOCIATED(core_particles))
THEN
313 IF (.NOT. skip_vel_section)
THEN
320 DEALLOCATE (i_force_eval)
324 CALL timestop(handle)
326 END SUBROUTINE update_subsys_release
335 SUBROUTINE update_motion_release(motion_section)
339 CHARACTER(LEN=*),
PARAMETER :: routinen =
'update_motion_release'
344 CALL timeset(routinen, handle)
346 NULLIFY (work_section)
378 CALL timestop(handle)
380 END SUBROUTINE update_motion_release
398 SUBROUTINE update_input(md_env, force_env, root_section, coords, vels, pint_env, &
399 helium_env, save_mem, write_binary_restart_file)
407 OPTIONAL,
POINTER :: helium_env
408 LOGICAL,
INTENT(IN),
OPTIONAL :: save_mem, write_binary_restart_file
410 CHARACTER(LEN=*),
PARAMETER :: routinen =
'update_input'
413 LOGICAL :: do_respa, lcond, my_save_mem, &
414 my_write_binary_restart_file
420 CALL timeset(routinen, handle)
422 NULLIFY (logger, motion_section, my_force_env)
424 IF (
PRESENT(save_mem))
THEN
425 my_save_mem = save_mem
427 my_save_mem = .false.
430 IF (
PRESENT(write_binary_restart_file))
THEN
431 my_write_binary_restart_file = write_binary_restart_file
433 my_write_binary_restart_file = .false.
439 lcond =
PRESENT(md_env) .OR.
PRESENT(force_env) .OR.
PRESENT(pint_env) .OR.
PRESENT(helium_env)
441 IF (
PRESENT(md_env))
THEN
442 CALL get_md_env(md_env=md_env, force_env=my_force_env)
443 ELSE IF (
PRESENT(force_env))
THEN
444 my_force_env => force_env
448 CALL update_motion(motion_section, &
450 force_env=my_force_env, &
455 helium_env=helium_env, &
456 save_mem=my_save_mem, &
457 write_binary_restart_file=my_write_binary_restart_file)
459 IF (
ASSOCIATED(my_force_env))
THEN
462 IF (
PRESENT(md_env))
THEN
464 IF (simpar%do_respa)
THEN
470 root_section=root_section, &
471 write_binary_restart_file=my_write_binary_restart_file, &
477 CALL timestop(handle)
479 END SUBROUTINE update_input
498 SUBROUTINE update_motion(motion_section, md_env, force_env, logger, &
499 coords, vels, pint_env, helium_env, save_mem, &
500 write_binary_restart_file)
509 OPTIONAL,
POINTER :: helium_env
510 LOGICAL,
INTENT(IN),
OPTIONAL :: save_mem, write_binary_restart_file
512 CHARACTER(LEN=*),
PARAMETER :: routinen =
'update_motion'
514 INTEGER :: counter, handle, handle2, i, irep, isec, &
515 j, nhc_len, tot_nhcneed
516 INTEGER,
DIMENSION(:),
POINTER :: walkers_status
517 INTEGER,
POINTER :: itimes
518 LOGICAL :: my_save_mem, my_write_binary_restart_file
519 REAL(kind=
dp),
DIMENSION(:),
POINTER :: buffer, eta, fnhc, mnhc, veta, wrk
520 REAL(kind=
dp),
POINTER :: constant, t
533 CALL timeset(routinen, handle)
534 NULLIFY (logger, thermostat_part, thermostat_baro, npt, para_env, nhc, &
535 work_section, thermostat_shell, t, averages, constant, &
536 walkers_status, itimes, meta_env, simpar)
539 IF (
PRESENT(md_env))
THEN
541 thermostat_part=thermostat_part, &
542 thermostat_baro=thermostat_baro, &
543 thermostat_shell=thermostat_shell, &
552 IF (
ASSOCIATED(force_env))
THEN
553 para_env => force_env%para_env
554 ELSE IF (
PRESENT(pint_env))
THEN
555 para_env => pint_env%logger%para_env
556 ELSE IF (
PRESENT(helium_env))
THEN
560 para_env => helium_env(1)%helium%logger%para_env
562 cpabort(
"No valid para_env present")
566 IF (
ASSOCIATED(force_env))
THEN
567 meta_env => force_env%meta_env
570 IF (
PRESENT(save_mem))
THEN
571 my_save_mem = save_mem
573 my_save_mem = .false.
576 IF (
PRESENT(write_binary_restart_file))
THEN
577 my_write_binary_restart_file = write_binary_restart_file
579 my_write_binary_restart_file = .false.
582 CALL timeset(routinen//
"_COUNTERS", handle2)
583 IF (
ASSOCIATED(itimes))
THEN
584 IF (itimes >= 0)
THEN
586 cpassert(
ASSOCIATED(t))
590 IF (
ASSOCIATED(constant))
THEN
593 CALL timestop(handle2)
595 CALL timeset(routinen//
"_AVERAGES", handle2)
596 IF (
ASSOCIATED(averages))
THEN
597 IF ((averages%do_averages) .AND. (averages%itimes_start /= -1))
THEN
621 IF (
ASSOCIATED(averages%virial))
THEN
623 buffer = reshape(averages%virial%pv_total, [9])
627 buffer = reshape(averages%virial%pv_virial, [9])
631 buffer = reshape(averages%virial%pv_kinetic, [9])
635 buffer = reshape(averages%virial%pv_constraint, [9])
639 buffer = reshape(averages%virial%pv_xc, [9])
643 buffer = reshape(averages%virial%pv_fock_4c, [9])
647 IF (
SIZE(averages%avecolvar) > 0)
THEN
648 ALLOCATE (buffer(
SIZE(averages%avecolvar)))
649 buffer = averages%avecolvar
652 IF (
SIZE(averages%aveMmatrix) > 0)
THEN
653 ALLOCATE (buffer(
SIZE(averages%aveMmatrix)))
654 buffer = averages%aveMmatrix
659 CALL timestop(handle2)
662 IF (
PRESENT(md_env))
THEN
663 IF (
ASSOCIATED(simpar))
THEN
664 IF (simpar%temperature_annealing .AND. abs(1._dp - simpar%f_temperature_annealing) > 1.e-10_dp)
THEN
671 CALL timeset(routinen//
"_THERMOSTAT_PARTICLES", handle2)
672 IF (
ASSOCIATED(thermostat_part))
THEN
675 IF (.NOT. my_write_binary_restart_file)
THEN
676 nhc => thermostat_part%nhc
677 CALL collect_nose_restart_info(nhc, para_env, eta, veta, fnhc, mnhc)
679 CALL set_template_restart(work_section, eta, veta, fnhc, mnhc)
681 ELSE IF (thermostat_part%type_of_thermostat ==
do_thermo_csvr)
THEN
684 CALL dump_csvr_restart_info(thermostat_part%csvr, para_env, work_section)
685 ELSE IF (thermostat_part%type_of_thermostat ==
do_thermo_al)
THEN
688 CALL dump_al_restart_info(thermostat_part%al, para_env, work_section)
689 ELSE IF (thermostat_part%type_of_thermostat ==
do_thermo_gle)
THEN
692 CALL dump_gle_restart_info(thermostat_part%gle, para_env, work_section)
695 CALL timestop(handle2)
698 CALL timeset(routinen//
"_BAROSTAT", handle2)
699 IF (
ASSOCIATED(thermostat_baro))
THEN
702 nhc => thermostat_baro%nhc
703 nhc_len =
SIZE(nhc%nvt, 1)
704 tot_nhcneed = nhc%glob_num_nhc
705 ALLOCATE (eta(tot_nhcneed*nhc_len))
706 ALLOCATE (veta(tot_nhcneed*nhc_len))
707 ALLOCATE (fnhc(tot_nhcneed*nhc_len))
708 ALLOCATE (mnhc(tot_nhcneed*nhc_len))
710 DO i = 1,
SIZE(nhc%nvt, 1)
711 DO j = 1,
SIZE(nhc%nvt, 2)
712 counter = counter + 1
713 eta(counter) = nhc%nvt(i, j)%eta
714 veta(counter) = nhc%nvt(i, j)%v
715 fnhc(counter) = nhc%nvt(i, j)%f
716 mnhc(counter) = nhc%nvt(i, j)%mass
720 CALL set_template_restart(work_section, eta, veta, fnhc, mnhc)
721 ELSE IF (thermostat_baro%type_of_thermostat ==
do_thermo_csvr)
THEN
724 CALL dump_csvr_restart_info(thermostat_baro%csvr, para_env, work_section)
727 CALL timestop(handle2)
730 CALL timeset(routinen//
"_NPT", handle2)
731 IF (
ASSOCIATED(npt))
THEN
732 ALLOCATE (veta(
SIZE(npt, 1)*
SIZE(npt, 2)))
733 ALLOCATE (mnhc(
SIZE(npt, 1)*
SIZE(npt, 2)))
735 DO i = 1,
SIZE(npt, 1)
736 DO j = 1,
SIZE(npt, 2)
737 counter = counter + 1
738 veta(counter) = npt(i, j)%v
739 mnhc(counter) = npt(i, j)%mass
743 CALL set_template_restart(work_section, veta=veta, mnhc=mnhc)
745 CALL timestop(handle2)
748 CALL timeset(routinen//
"_THERMOSTAT_SHELL", handle2)
749 IF (
ASSOCIATED(thermostat_shell))
THEN
752 IF (.NOT. my_write_binary_restart_file)
THEN
753 nhc => thermostat_shell%nhc
754 CALL collect_nose_restart_info(nhc, para_env, eta, veta, fnhc, mnhc)
756 CALL set_template_restart(work_section, eta, veta, fnhc, mnhc)
758 ELSE IF (thermostat_shell%type_of_thermostat ==
do_thermo_csvr)
THEN
761 CALL dump_csvr_restart_info(thermostat_shell%csvr, para_env, work_section)
764 CALL timestop(handle2)
766 CALL timeset(routinen//
"_META", handle2)
767 IF (
ASSOCIATED(meta_env))
THEN
769 i_val=meta_env%n_steps)
771 i_val=meta_env%hills_env%n_hills)
774 r_val=meta_env%hills_env%min_disp)
776 i_val=meta_env%hills_env%old_hill_number)
778 i_val=meta_env%hills_env%old_hill_step)
780 IF (meta_env%do_hills .AND. meta_env%hills_env%n_hills /= 0)
THEN
782 CALL meta_hills_val_set_ss(work_section, meta_env)
784 CALL meta_hills_val_set_ds(work_section, meta_env)
786 CALL meta_hills_val_set_ww(work_section, meta_env)
787 IF (meta_env%well_tempered)
THEN
789 CALL meta_hills_val_set_dt(work_section, meta_env)
792 IF (meta_env%extended_lagrange)
THEN
794 r_val=meta_env%avg_temp)
796 DO irep = 1, meta_env%n_colvar
797 CALL section_vals_val_set(work_section,
"_DEFAULT_KEYWORD_", r_val=meta_env%metavar(irep)%ss0, &
801 DO irep = 1, meta_env%n_colvar
802 CALL section_vals_val_set(work_section,
"_DEFAULT_KEYWORD_", r_val=meta_env%metavar(irep)%vvp, &
807 DO irep = 1, meta_env%n_colvar
812 DO irep = 1, meta_env%n_colvar
813 CALL section_vals_val_set(work_section,
"_DEFAULT_KEYWORD_", r_val=meta_env%metavar(irep)%ff_s, &
819 IF (meta_env%do_multiple_walkers)
THEN
820 ALLOCATE (walkers_status(meta_env%multiple_walkers%walkers_tot_nr))
821 walkers_status = meta_env%multiple_walkers%walkers_status
826 CALL timestop(handle2)
827 CALL timeset(routinen//
"_NEB", handle2)
828 IF (
PRESENT(coords) .OR. (
PRESENT(vels)))
THEN
833 IF (
PRESENT(coords))
THEN
836 IF (coords%size_wrk(2) <=
SIZE(replica_section%values, 2))
EXIT
840 DO isec = 1, coords%size_wrk(2)
843 CALL section_neb_coord_val_set(work_section, coords%xyz(:, isec),
SIZE(coords%xyz, 1), 3*
SIZE(particles%els), &
847 ALLOCATE (wrk(coords%size_wrk(1)))
848 wrk = coords%wrk(:, isec)
854 IF (
PRESENT(vels))
THEN
859 IF (vels%size_wrk(2) <=
SIZE(replica_section%values, 2))
EXIT
863 DO isec = 1, vels%size_wrk(2)
866 CALL section_neb_coord_val_set(work_section, vels%wrk(:, isec),
SIZE(vels%wrk, 1),
SIZE(vels%wrk, 1), &
867 1, particles%els, 1.0_dp)
869 CALL section_neb_coord_val_set(work_section, vels%wrk(:, isec),
SIZE(vels%wrk, 1), 3*
SIZE(particles%els), &
870 3, particles%els, 1.0_dp)
875 CALL timestop(handle2)
877 IF (
PRESENT(pint_env))
THEN
879 CALL update_motion_pint(motion_section, pint_env)
882 IF (
PRESENT(helium_env))
THEN
884 CALL update_motion_helium(helium_env)
887 CALL timestop(handle)
889 END SUBROUTINE update_motion
898 SUBROUTINE update_motion_pint(motion_section, pint_env)
903 CHARACTER(LEN=*),
PARAMETER :: routinen =
'update_motion_pint'
905 CHARACTER(LEN=rng_record_length) :: rng_record
906 INTEGER :: handle, i, iatom, ibead, inos, isp
907 INTEGER,
DIMENSION(rng_record_length, 1) :: ascii
909 REAL(kind=
dp),
DIMENSION(:),
POINTER :: r_vals
912 CALL timeset(routinen, handle)
923 IF (.NOT. explicit)
THEN
929 ALLOCATE (r_vals(pint_env%p*pint_env%ndim))
933 DO iatom = 1, pint_env%ndim
934 DO ibead = 1, pint_env%p
935 r_vals(i) = pint_env%x(ibead, iatom)
944 ALLOCATE (r_vals(pint_env%p*pint_env%ndim))
946 CALL pint_u2x(pint_env, ux=pint_env%uv, x=pint_env%v)
947 DO iatom = 1, pint_env%ndim
948 DO ibead = 1, pint_env%p
949 r_vals(i) = pint_env%v(ibead, iatom)
964 IF (.NOT. explicit)
THEN
970 ALLOCATE (r_vals(pint_env%p*pint_env%ndim*pint_env%nnos))
972 DO iatom = 1, pint_env%ndim
973 DO ibead = 1, pint_env%p
974 DO inos = 1, pint_env%nnos
975 r_vals(i) = pint_env%tx(inos, ibead, iatom)
985 ALLOCATE (r_vals(pint_env%p*pint_env%ndim*pint_env%nnos))
987 DO iatom = 1, pint_env%ndim
988 DO ibead = 1, pint_env%p
989 DO inos = 1, pint_env%nnos
990 r_vals(i) = pint_env%tv(inos, ibead, iatom)
1002 CALL dump_gle_restart_info(pint_env%gle, pint_env%replicas%para_env, tmpsec)
1007 CALL pint_env%pile_therm%gaussian_rng_stream%dump(rng_record)
1013 r_val=pint_env%e_pile)
1023 r_val=pint_env%e_qtb)
1027 CALL pint_env%piglet_therm%gaussian_rng_stream%dump(rng_record)
1033 r_val=pint_env%e_piglet)
1036 ALLOCATE (r_vals((pint_env%piglet_therm%nsp1 - 1)* &
1037 pint_env%piglet_therm%ndim* &
1038 pint_env%piglet_therm%p))
1040 DO isp = 2, pint_env%piglet_therm%nsp1
1041 DO ibead = 1, pint_env%piglet_therm%p*pint_env%piglet_therm%ndim
1042 r_vals(i) = pint_env%piglet_therm%smalls(isp, ibead)
1050 CALL timestop(handle)
1052 END SUBROUTINE update_motion_pint
1065 SUBROUTINE update_motion_helium(helium_env)
1069 CHARACTER(LEN=*),
PARAMETER :: routinen =
'update_motion_helium'
1071 CHARACTER(LEN=default_string_length) :: err_str, stmp
1072 INTEGER :: handle, i, itmp, iweight, msglen, &
1073 nsteps, off, offset, reqlen
1074 INTEGER,
DIMENSION(:),
POINTER :: int_msg_gather
1076 REAL(kind=
dp) :: bf, bu, invproc
1077 REAL(kind=
dp),
DIMENSION(3, 2) :: bg, cg, ig
1078 REAL(kind=
dp),
DIMENSION(:),
POINTER :: real_msg, real_msg_gather
1081 CALL timeset(routinen, handle)
1088 IF (
ASSOCIATED(helium_env))
THEN
1091 DO i = 1, logger%para_env%mepos
1092 offset = offset + helium_env(1)%env_all(i)
1095 IF (.NOT. helium_env(1)%helium%solute_present)
THEN
1097 itmp = logger%iter_info%iteration(2)
1099 helium_env(1)%helium%input, &
1100 "MOTION%PINT%ITERATION", &
1111 NULLIFY (real_msg_gather)
1112 msglen =
SIZE(helium_env(1)%helium%pos(:, :, 1:helium_env(1)%helium%beads))
1113 ALLOCATE (real_msg(msglen*helium_env(1)%helium%num_env))
1114 ALLOCATE (real_msg_gather(msglen*helium_env(1)%helium%num_env))
1115 real_msg(:) = 0.0_dp
1116 DO i = 1,
SIZE(helium_env)
1117 real_msg((offset+i-1)*msglen+1:(offset+i)*msglen) = pack(helium_env(i)%helium%pos(:, :, 1:helium_env(i)%helium%beads), .true.)
1121 CALL helium_env(1)%comm%sum(real_msg)
1122 real_msg_gather(:) = real_msg(:)
1127 "MOTION%PINT%HELIUM%COORD%_DEFAULT_KEYWORD_", &
1128 r_vals_ptr=real_msg_gather)
1133 NULLIFY (real_msg_gather)
1136 DEALLOCATE (real_msg)
1142 NULLIFY (int_msg_gather)
1143 msglen =
SIZE(helium_env(1)%helium%permutation)
1144 ALLOCATE (int_msg_gather(msglen*helium_env(1)%helium%num_env))
1147 int_msg_gather(:) = 0
1148 DO i = 1,
SIZE(helium_env)
1149 int_msg_gather((offset + i - 1)*msglen + 1:(offset + i)*msglen) = helium_env(i)%helium%permutation
1152 CALL helium_env(1)%comm%sum(int_msg_gather)
1156 "MOTION%PINT%HELIUM%PERM%_DEFAULT_KEYWORD_", &
1157 i_vals_ptr=int_msg_gather)
1162 NULLIFY (int_msg_gather)
1168 itmp = helium_env(1)%helium%averages_iweight
1170 itmp = helium_env(1)%helium%current_step - helium_env(1)%helium%first_step
1172 itmp = itmp + helium_env(1)%helium%current_step - helium_env(1)%helium%first_step
1174 DO i = 1,
SIZE(helium_env)
1176 "MOTION%PINT%HELIUM%AVERAGES%IWEIGHT", &
1181 NULLIFY (real_msg_gather)
1183 ALLOCATE (real_msg_gather(msglen*helium_env(1)%helium%num_env))
1185 real_msg_gather(:) = 0.0_dp
1187 DO i = 1,
SIZE(helium_env)
1188 real_msg_gather((i - 1 + offset)*msglen + 1:(i + offset)*msglen) = helium_env(i)%helium%proarea%ravr(:)
1190 CALL helium_env(1)%comm%sum(real_msg_gather)
1194 "MOTION%PINT%HELIUM%AVERAGES%PROJECTED_AREA", &
1195 r_vals_ptr=real_msg_gather)
1198 NULLIFY (real_msg_gather)
1200 ALLOCATE (real_msg_gather(msglen*helium_env(1)%helium%num_env))
1202 real_msg_gather(:) = 0.0_dp
1204 DO i = 1,
SIZE(helium_env)
1205 real_msg_gather((i - 1 + offset)*msglen + 1:(i + offset)*msglen) = helium_env(i)%helium%prarea2%ravr(:)
1207 CALL helium_env(1)%comm%sum(real_msg_gather)
1211 "MOTION%PINT%HELIUM%AVERAGES%PROJECTED_AREA_2", &
1212 r_vals_ptr=real_msg_gather)
1215 NULLIFY (real_msg_gather)
1217 ALLOCATE (real_msg_gather(msglen*helium_env(1)%helium%num_env))
1219 real_msg_gather(:) = 0.0_dp
1221 DO i = 1,
SIZE(helium_env)
1222 real_msg_gather((i - 1 + offset)*msglen + 1:(i + offset)*msglen) = helium_env(i)%helium%wnmber2%ravr(:)
1224 CALL helium_env(1)%comm%sum(real_msg_gather)
1228 "MOTION%PINT%HELIUM%AVERAGES%WINDING_NUMBER_2", &
1229 r_vals_ptr=real_msg_gather)
1232 NULLIFY (real_msg_gather)
1234 ALLOCATE (real_msg_gather(msglen*helium_env(1)%helium%num_env))
1236 real_msg_gather(:) = 0.0_dp
1238 DO i = 1,
SIZE(helium_env)
1239 real_msg_gather((i - 1 + offset)*msglen + 1:(i + offset)*msglen) = helium_env(i)%helium%mominer%ravr(:)
1241 CALL helium_env(1)%comm%sum(real_msg_gather)
1245 "MOTION%PINT%HELIUM%AVERAGES%MOMENT_OF_INERTIA", &
1246 r_vals_ptr=real_msg_gather)
1251 NULLIFY (real_msg_gather)
1260 ALLOCATE (real_msg(msglen))
1261 NULLIFY (real_msg_gather)
1262 ALLOCATE (real_msg_gather(msglen*helium_env(1)%helium%num_env))
1263 real_msg_gather(:) = 0.0_dp
1265 DO i = 1,
SIZE(helium_env)
1266 CALL helium_env(i)%helium%rng_stream_uniform%get(bg=bg, cg=cg, ig=ig, &
1267 buffer=bu, buffer_filled=lbf)
1269 real_msg(off + 1:off + 6) = pack(bg, .true.)
1270 real_msg(off + 7:off + 12) = pack(cg, .true.)
1271 real_msg(off + 13:off + 18) = pack(ig, .true.)
1277 real_msg(off + 19) = bf
1278 real_msg(off + 20) = bu
1279 CALL helium_env(i)%helium%rng_stream_gaussian%get(bg=bg, cg=cg, ig=ig, &
1280 buffer=bu, buffer_filled=lbf)
1282 real_msg(off + 1:off + 6) = pack(bg, .true.)
1283 real_msg(off + 7:off + 12) = pack(cg, .true.)
1284 real_msg(off + 13:off + 18) = pack(ig, .true.)
1290 real_msg(off + 19) = bf
1291 real_msg(off + 20) = bu
1293 real_msg_gather((offset + i - 1)*msglen + 1:(offset + i)*msglen) = real_msg(:)
1298 CALL helium_env(1)%comm%sum(real_msg_gather)
1302 "MOTION%PINT%HELIUM%RNG_STATE%_DEFAULT_KEYWORD_", &
1303 r_vals_ptr=real_msg_gather)
1308 NULLIFY (real_msg_gather)
1311 DEALLOCATE (real_msg)
1313 IF (helium_env(1)%helium%solute_present)
THEN
1318 reqlen = helium_env(1)%helium%solute_atoms*helium_env(1)%helium%solute_beads*3
1319 msglen =
SIZE(helium_env(1)%helium%force_avrg)
1320 err_str =
"Invalid size of HELIUM%FORCE: received '"
1322 WRITE (stmp, *) msglen
1323 err_str = trim(adjustl(err_str))// &
1324 trim(adjustl(stmp))//
"' but expected '"
1326 WRITE (stmp, *) reqlen
1327 err_str = trim(adjustl(err_str))// &
1328 trim(adjustl(stmp))//
"'."
1329 IF (msglen /= reqlen)
THEN
1335 NULLIFY (real_msg_gather)
1336 ALLOCATE (real_msg_gather(msglen))
1337 real_msg_gather(:) = pack(helium_env(1)%helium%force_avrg, .true.)
1341 "MOTION%PINT%HELIUM%FORCE%_DEFAULT_KEYWORD_", &
1342 r_vals_ptr=real_msg_gather)
1347 NULLIFY (real_msg_gather)
1353 IF (helium_env(1)%helium%rdf_present)
THEN
1356 helium_env(1)%helium%rdf_inst(:, :) = 0.0_dp
1357 DO i = 1,
SIZE(helium_env)
1358 helium_env(1)%helium%rdf_inst(:, :) = helium_env(1)%helium%rdf_inst(:, :) + &
1359 helium_env(i)%helium%rdf_accu(:, :)
1363 CALL helium_env(1)%comm%sum(helium_env(1)%helium%rdf_inst)
1364 itmp = helium_env(1)%helium%num_env
1365 invproc = 1.0_dp/real(itmp,
dp)
1366 helium_env(1)%helium%rdf_inst(:, :) = helium_env(1)%helium%rdf_inst(:, :)*invproc
1368 nsteps = helium_env(1)%helium%current_step - helium_env(1)%helium%first_step
1369 helium_env(1)%helium%rdf_inst(:, :) = helium_env(1)%helium%rdf_inst(:, :)/real(nsteps,
dp)
1370 iweight = helium_env(1)%helium%rdf_iweight
1372 helium_env(1)%helium%rdf_inst(:, :) = nsteps*helium_env(1)%helium%rdf_inst(:, :) + &
1373 iweight*helium_env(1)%helium%rdf_rstr(:, :)
1374 helium_env(1)%helium%rdf_inst(:, :) = helium_env(1)%helium%rdf_inst(:, :)/real(nsteps + iweight,
dp)
1377 msglen =
SIZE(helium_env(1)%helium%rdf_inst)
1378 ALLOCATE (real_msg(msglen))
1379 real_msg(:) = pack(helium_env(1)%helium%rdf_inst, .true.)
1381 helium_env(1)%helium%input, &
1382 "MOTION%PINT%HELIUM%AVERAGES%RDF", &
1383 r_vals_ptr=real_msg)
1391 IF (helium_env(1)%helium%rho_present)
THEN
1394 helium_env(1)%helium%rho_inst(:, :, :, :) = 0.0_dp
1395 DO i = 1,
SIZE(helium_env)
1396 helium_env(1)%helium%rho_inst(:, :, :, :) = helium_env(1)%helium%rho_inst(:, :, :, :) + &
1397 helium_env(i)%helium%rho_accu(:, :, :, :)
1401 CALL helium_env(1)%comm%sum(helium_env(1)%helium%rho_inst)
1402 itmp = helium_env(1)%helium%num_env
1403 invproc = 1.0_dp/real(itmp,
dp)
1404 helium_env(1)%helium%rho_inst(:, :, :, :) = helium_env(1)%helium%rho_inst(:, :, :, :)*invproc
1406 nsteps = helium_env(1)%helium%current_step - helium_env(1)%helium%first_step
1407 helium_env(1)%helium%rho_inst(:, :, :, :) = helium_env(1)%helium%rho_inst(:, :, :, :)/real(nsteps,
dp)
1408 iweight = helium_env(1)%helium%averages_iweight
1410 helium_env(1)%helium%rho_inst(:, :, :, :) = nsteps*helium_env(1)%helium%rho_inst(:, :, :, :) + &
1411 iweight*helium_env(1)%helium%rho_rstr(:, :, :, :)
1412 helium_env(1)%helium%rho_inst(:, :, :, :) = helium_env(1)%helium%rho_inst(:, :, :, :)/real(nsteps + iweight,
dp)
1416 msglen =
SIZE(helium_env(1)%helium%rho_inst)
1417 ALLOCATE (real_msg(msglen))
1418 real_msg(:) = pack(helium_env(1)%helium%rho_inst, .true.)
1420 helium_env(1)%helium%input, &
1421 "MOTION%PINT%HELIUM%AVERAGES%RHO", &
1422 r_vals_ptr=real_msg)
1429 CALL timestop(handle)
1431 END SUBROUTINE update_motion_helium
1442 SUBROUTINE dump_csvr_energy_info(thermostat_energy, nsize, work_section)
1444 REAL(kind=
dp),
DIMENSION(:),
POINTER :: thermostat_energy
1445 INTEGER,
INTENT(IN) :: nsize
1448 INTEGER :: ik, irk, nlist
1451 TYPE(
val_type),
POINTER :: my_val, old_val
1453 cpassert(
ASSOCIATED(work_section))
1454 cpassert(work_section%ref_count > 0)
1456 NULLIFY (my_val, old_val, section, vals)
1458 section => work_section%section
1463 CALL cp_abort(__location__,
"section "//trim(section%name)//
" does not contain keyword "// &
1464 "_DEFAULT_KEYWORD_")
1468 IF (
SIZE(work_section%values, 2) == 1)
EXIT
1472 vals => work_section%values(ik, 1)%list
1475 IF (
ASSOCIATED(vals))
THEN
1480 CALL val_create(val=my_val, r_val=thermostat_energy(irk))
1481 IF (nlist /= 0)
THEN
1485 new_pos => new_pos%rest
1487 old_val => new_pos%first_el
1489 new_pos%first_el => my_val
1496 NULLIFY (new_pos%rest)
1498 new_pos => new_pos%rest
1503 work_section%values(ik, 1)%list => vals
1505 END SUBROUTINE dump_csvr_energy_info
1517 SUBROUTINE dump_csvr_restart_info(csvr, para_env, csvr_section)
1523 CHARACTER(LEN=rng_record_length) :: rng_record
1524 INTEGER :: i, my_index
1525 INTEGER,
ALLOCATABLE,
DIMENSION(:, :) :: dwork
1526 REAL(kind=
dp) :: dum
1527 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: thermo_energy
1528 REAL(kind=
dp),
DIMENSION(:),
POINTER :: work
1533 ALLOCATE (work(csvr%glob_num_csvr))
1535 ALLOCATE (thermo_energy(csvr%loc_num_csvr))
1536 DO i = 1, csvr%loc_num_csvr
1537 thermo_energy(i) = csvr%nvt(i)%thermostat_energy
1540 csvr%glob_num_csvr, thermo_energy, &
1541 dum, para_env, array_kin=work)
1542 DEALLOCATE (thermo_energy)
1546 CALL dump_csvr_energy_info(work, csvr%glob_num_csvr, work_section)
1553 DO i = 1, csvr%loc_num_csvr
1554 my_index = csvr%map_info%index(i)
1555 CALL csvr%nvt(i)%gaussian_rng_stream%dump(rng_record)
1562 CALL para_env%sum(dwork)
1570 END SUBROUTINE dump_csvr_restart_info
1582 SUBROUTINE dump_al_restart_info(al, para_env, al_section)
1589 REAL(kind=
dp) :: dum
1590 REAL(kind=
dp),
DIMENSION(:),
POINTER :: t_array, work
1595 ALLOCATE (work(al%glob_num_al))
1596 ALLOCATE (t_array(al%loc_num_al))
1599 DO i = 1, al%loc_num_al
1600 t_array(i) = al%nvt(i)%chi
1604 al%glob_num_al, t_array, &
1605 dum, para_env, array_kin=work)
1609 CALL dump_csvr_energy_info(work, al%glob_num_al, work_section)
1612 DO i = 1, al%loc_num_al
1613 t_array(i) = al%nvt(i)%mass
1617 al%glob_num_al, t_array, &
1618 dum, para_env, array_kin=work)
1622 CALL dump_csvr_energy_info(work, al%glob_num_al, work_section)
1624 DEALLOCATE (t_array)
1627 END SUBROUTINE dump_al_restart_info
1637 SUBROUTINE dump_gle_restart_info(gle, para_env, gle_section)
1643 CHARACTER(LEN=rng_record_length) :: rng_record
1644 INTEGER :: counter, glob_num, i, iproc, j, loc_num
1645 INTEGER,
ALLOCATABLE,
DIMENSION(:, :) :: dwork
1646 INTEGER,
DIMENSION(:),
POINTER :: gle_per_proc, index
1648 REAL(
dp),
DIMENSION(:),
POINTER :: s_tmp
1649 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: thermo_energy
1650 REAL(kind=
dp),
DIMENSION(:),
POINTER :: work
1655 ALLOCATE (work(gle%glob_num_gle))
1656 ALLOCATE (thermo_energy(gle%loc_num_gle))
1657 DO i = 1, gle%loc_num_gle
1658 thermo_energy(i) = gle%nvt(i)%thermostat_energy
1661 gle%glob_num_gle, thermo_energy, &
1662 dum, para_env, array_kin=work)
1663 DEALLOCATE (thermo_energy)
1667 CALL dump_csvr_energy_info(work, gle%glob_num_gle, work_section)
1672 glob_num = gle%glob_num_gle
1673 loc_num = gle%loc_num_gle
1677 j = gle%map_info%index(i)
1678 CALL gle%nvt(i)%gaussian_rng_stream%dump(rng_record)
1685 CALL para_env%sum(dwork)
1693 ALLOCATE (gle_per_proc(para_env%num_pe))
1695 CALL para_env%allgather(gle%loc_num_gle, gle_per_proc)
1699 ALLOCATE (s_tmp((gle%ndim)*gle%glob_num_gle))
1702 NULLIFY (work, index)
1703 DO iproc = 1, para_env%num_pe
1704 CALL reallocate(work, 1, gle_per_proc(iproc)*(gle%ndim))
1705 CALL reallocate(index, 1, gle_per_proc(iproc))
1706 IF (para_env%mepos == (iproc - 1))
THEN
1710 DO j = 1, gle%loc_num_gle
1711 counter = counter + 1
1712 work(counter) = gle%nvt(j)%s(i)
1713 index(j) = gle%map_info%index(j)
1719 CALL para_env%bcast(work, iproc - 1)
1720 CALL para_env%bcast(index, iproc - 1)
1723 DO j = 1, gle_per_proc(iproc)
1724 counter = counter + 1
1725 s_tmp((index(j) - 1)*(gle%ndim) + i) = work(counter)
1730 IF (
SIZE(s_tmp) > 0)
THEN
1737 DEALLOCATE (gle_per_proc)
1741 END SUBROUTINE dump_gle_restart_info
1756 SUBROUTINE collect_nose_restart_info(nhc, para_env, eta, veta, fnhc, mnhc)
1760 REAL(kind=
dp),
DIMENSION(:),
POINTER :: eta, veta, fnhc, mnhc
1762 INTEGER :: counter, i, iproc, j, nhc_len, num_nhc, &
1763 numneed, tot_nhcneed
1764 INTEGER,
DIMENSION(:),
POINTER :: index, nhc_per_proc
1765 REAL(kind=
dp),
DIMENSION(:),
POINTER :: work
1768 nhc_len =
SIZE(nhc%nvt, 1)
1769 num_nhc = nhc%loc_num_nhc
1771 map_info => nhc%map_info
1772 ALLOCATE (nhc_per_proc(para_env%num_pe))
1775 CALL para_env%allgather(numneed, nhc_per_proc)
1776 tot_nhcneed = nhc%glob_num_nhc
1778 NULLIFY (work, index)
1783 ALLOCATE (eta(tot_nhcneed*nhc_len))
1784 DO iproc = 1, para_env%num_pe
1785 CALL reallocate(work, 1, nhc_per_proc(iproc)*nhc_len)
1786 CALL reallocate(index, 1, nhc_per_proc(iproc))
1787 IF (para_env%mepos == (iproc - 1))
THEN
1792 counter = counter + 1
1793 work(counter) = nhc%nvt(i, j)%eta
1794 index(j) = map_info%index(j)
1800 CALL para_env%bcast(work, iproc - 1)
1801 CALL para_env%bcast(index, iproc - 1)
1804 DO j = 1, nhc_per_proc(iproc)
1805 counter = counter + 1
1806 eta((index(j) - 1)*nhc_len + i) = work(counter)
1814 ALLOCATE (veta(tot_nhcneed*nhc_len))
1815 DO iproc = 1, para_env%num_pe
1816 CALL reallocate(work, 1, nhc_per_proc(iproc)*nhc_len)
1817 CALL reallocate(index, 1, nhc_per_proc(iproc))
1818 IF (para_env%mepos == (iproc - 1))
THEN
1823 counter = counter + 1
1824 work(counter) = nhc%nvt(i, j)%v
1825 index(j) = map_info%index(j)
1831 CALL para_env%bcast(work, iproc - 1)
1832 CALL para_env%bcast(index, iproc - 1)
1835 DO j = 1, nhc_per_proc(iproc)
1836 counter = counter + 1
1837 veta((index(j) - 1)*nhc_len + i) = work(counter)
1845 ALLOCATE (fnhc(tot_nhcneed*nhc_len))
1846 DO iproc = 1, para_env%num_pe
1847 CALL reallocate(work, 1, nhc_per_proc(iproc)*nhc_len)
1848 CALL reallocate(index, 1, nhc_per_proc(iproc))
1849 IF (para_env%mepos == (iproc - 1))
THEN
1854 counter = counter + 1
1855 work(counter) = nhc%nvt(i, j)%f
1856 index(j) = map_info%index(j)
1862 CALL para_env%bcast(work, iproc - 1)
1863 CALL para_env%bcast(index, iproc - 1)
1866 DO j = 1, nhc_per_proc(iproc)
1867 counter = counter + 1
1868 fnhc((index(j) - 1)*nhc_len + i) = work(counter)
1876 ALLOCATE (mnhc(tot_nhcneed*nhc_len))
1877 DO iproc = 1, para_env%num_pe
1878 CALL reallocate(work, 1, nhc_per_proc(iproc)*nhc_len)
1879 CALL reallocate(index, 1, nhc_per_proc(iproc))
1880 IF (para_env%mepos == (iproc - 1))
THEN
1885 counter = counter + 1
1886 work(counter) = nhc%nvt(i, j)%mass
1887 index(j) = map_info%index(j)
1893 CALL para_env%bcast(work, iproc - 1)
1894 CALL para_env%bcast(index, iproc - 1)
1897 DO j = 1, nhc_per_proc(iproc)
1898 counter = counter + 1
1899 mnhc((index(j) - 1)*nhc_len + i) = work(counter)
1906 DEALLOCATE (nhc_per_proc)
1908 END SUBROUTINE collect_nose_restart_info
1923 SUBROUTINE section_neb_coord_val_set(coord_section, array, narray, nsize, nfield, &
1924 particle_set, conv_factor)
1927 REAL(kind=
dp),
DIMENSION(*) :: array
1928 INTEGER,
INTENT(IN) :: narray, nsize, nfield
1930 REAL(kind=
dp) :: conv_factor
1932 INTEGER :: ik, irk, nlist
1933 REAL(kind=
dp),
DIMENSION(:),
POINTER :: my_c
1936 TYPE(
val_type),
POINTER :: my_val, old_val
1938 NULLIFY (my_val, old_val, section, vals)
1939 cpassert(
ASSOCIATED(coord_section))
1940 cpassert(coord_section%ref_count > 0)
1941 section => coord_section%section
1944 CALL cp_abort(__location__,
"section "//trim(section%name)//
" does not contain keyword "// &
1945 "_DEFAULT_KEYWORD_")
1948 IF (
SIZE(coord_section%values, 2) == 1)
EXIT
1951 vals => coord_section%values(ik, 1)%list
1953 IF (
ASSOCIATED(vals))
THEN
1956 DO irk = 1, nsize/nfield
1957 ALLOCATE (my_c(nfield))
1958 IF (nfield == 3)
THEN
1960 my_c(1:3) = my_c(1:3)*conv_factor
1962 my_c(1) = array(irk)
1966 IF (nlist /= 0)
THEN
1970 new_pos => new_pos%rest
1972 old_val => new_pos%first_el
1974 new_pos%first_el => my_val
1981 NULLIFY (new_pos%rest)
1983 new_pos => new_pos%rest
1989 coord_section%values(ik, 1)%list => vals
1991 END SUBROUTINE section_neb_coord_val_set
2004 SUBROUTINE set_template_restart(work_section, eta, veta, fnhc, mnhc)
2007 REAL(kind=
dp),
DIMENSION(:),
OPTIONAL,
POINTER :: eta, veta, fnhc, mnhc
2011 NULLIFY (coord, force, velocity, mass)
2012 IF (
PRESENT(eta))
THEN
2013 IF (
SIZE(eta) > 0)
THEN
2020 IF (
PRESENT(veta))
THEN
2021 IF (
SIZE(veta) > 0)
THEN
2028 IF (
PRESENT(fnhc))
THEN
2029 IF (
SIZE(fnhc) > 0)
THEN
2036 IF (
PRESENT(mnhc))
THEN
2037 IF (
SIZE(mnhc) > 0)
THEN
2045 END SUBROUTINE set_template_restart
2055 SUBROUTINE meta_hills_val_set_ss(ss_section, meta_env)
2060 INTEGER :: ik, irk, lsize, nlist
2061 REAL(kind=
dp),
DIMENSION(:),
POINTER :: ss_val
2064 TYPE(
val_type),
POINTER :: my_val, old_val
2066 NULLIFY (my_val, old_val, section, vals)
2067 cpassert(
ASSOCIATED(ss_section))
2068 cpassert(ss_section%ref_count > 0)
2069 section => ss_section%section
2072 CALL cp_abort(__location__,
"section "//trim(section%name)//
" does not contain keyword "// &
2073 "_DEFAULT_KEYWORD_")
2076 IF (
SIZE(ss_section%values, 2) == 1)
EXIT
2079 vals => ss_section%values(ik, 1)%list
2081 IF (
ASSOCIATED(vals))
THEN
2084 lsize =
SIZE(meta_env%hills_env%ss_history, 1)
2085 DO irk = 1, meta_env%hills_env%n_hills
2086 ALLOCATE (ss_val(lsize))
2088 ss_val = meta_env%hills_env%ss_history(:, irk)
2091 IF (irk <= nlist)
THEN
2095 new_pos => new_pos%rest
2097 old_val => new_pos%first_el
2099 new_pos%first_el => my_val
2106 NULLIFY (new_pos%rest)
2108 new_pos => new_pos%rest
2114 ss_section%values(ik, 1)%list => vals
2116 END SUBROUTINE meta_hills_val_set_ss
2126 SUBROUTINE meta_hills_val_set_ds(ds_section, meta_env)
2131 INTEGER :: ik, irk, lsize, nlist
2132 REAL(kind=
dp),
DIMENSION(:),
POINTER :: ds_val
2135 TYPE(
val_type),
POINTER :: my_val, old_val
2137 NULLIFY (my_val, old_val, section, vals)
2138 cpassert(
ASSOCIATED(ds_section))
2139 cpassert(ds_section%ref_count > 0)
2140 section => ds_section%section
2143 CALL cp_abort(__location__,
"section "//trim(section%name)//
" does not contain keyword "// &
2144 "_DEFAULT_KEYWORD_")
2147 IF (
SIZE(ds_section%values, 2) == 1)
EXIT
2150 vals => ds_section%values(ik, 1)%list
2152 IF (
ASSOCIATED(vals))
THEN
2155 lsize =
SIZE(meta_env%hills_env%delta_s_history, 1)
2156 DO irk = 1, meta_env%hills_env%n_hills
2157 ALLOCATE (ds_val(lsize))
2159 ds_val = meta_env%hills_env%delta_s_history(:, irk)
2162 IF (irk <= nlist)
THEN
2166 new_pos => new_pos%rest
2168 old_val => new_pos%first_el
2170 new_pos%first_el => my_val
2177 NULLIFY (new_pos%rest)
2179 new_pos => new_pos%rest
2185 ds_section%values(ik, 1)%list => vals
2187 END SUBROUTINE meta_hills_val_set_ds
2197 SUBROUTINE meta_hills_val_set_ww(ww_section, meta_env)
2202 INTEGER :: ik, irk, lsize, nlist
2205 TYPE(
val_type),
POINTER :: my_val, old_val
2207 NULLIFY (my_val, old_val, section, vals)
2208 cpassert(
ASSOCIATED(ww_section))
2209 cpassert(ww_section%ref_count > 0)
2210 section => ww_section%section
2213 CALL cp_abort(__location__,
"section "//trim(section%name)//
" does not contain keyword "// &
2214 "_DEFAULT_KEYWORD_")
2217 IF (
SIZE(ww_section%values, 2) == 1)
EXIT
2220 vals => ww_section%values(ik, 1)%list
2222 IF (
ASSOCIATED(vals))
THEN
2225 lsize = meta_env%hills_env%n_hills
2227 CALL val_create(my_val, r_val=meta_env%hills_env%ww_history(irk))
2229 IF (irk <= nlist)
THEN
2233 new_pos => new_pos%rest
2235 old_val => new_pos%first_el
2237 new_pos%first_el => my_val
2244 NULLIFY (new_pos%rest)
2246 new_pos => new_pos%rest
2252 ww_section%values(ik, 1)%list => vals
2254 END SUBROUTINE meta_hills_val_set_ww
2264 SUBROUTINE meta_hills_val_set_dt(invdt_section, meta_env)
2269 INTEGER :: ik, irk, lsize, nlist
2272 TYPE(
val_type),
POINTER :: my_val, old_val
2274 NULLIFY (my_val, old_val, section, vals)
2275 cpassert(
ASSOCIATED(invdt_section))
2276 cpassert(invdt_section%ref_count > 0)
2277 section => invdt_section%section
2280 CALL cp_abort(__location__,
"section "//trim(section%name)//
" does not contain keyword "// &
2281 "_DEFAULT_KEYWORD_")
2284 IF (
SIZE(invdt_section%values, 2) == 1)
EXIT
2287 vals => invdt_section%values(ik, 1)%list
2289 IF (
ASSOCIATED(vals))
THEN
2292 lsize = meta_env%hills_env%n_hills
2294 CALL val_create(my_val, r_val=meta_env%hills_env%invdt_history(irk))
2296 IF (irk <= nlist)
THEN
2300 new_pos => new_pos%rest
2302 old_val => new_pos%first_el
2304 new_pos%first_el => my_val
2311 NULLIFY (new_pos%rest)
2313 new_pos => new_pos%rest
2318 invdt_section%values(ik, 1)%list => vals
2319 END SUBROUTINE meta_hills_val_set_dt
2334 SUBROUTINE write_binary_restart(output_unit, log_unit, root_section, md_env, force_env)
2336 INTEGER,
INTENT(IN) :: output_unit, log_unit
2341 CHARACTER(LEN=*),
PARAMETER :: routinen =
'write_binary_restart'
2343 CHARACTER(LEN=default_path_length) :: binary_restart_file_name
2344 CHARACTER(LEN=default_string_length) :: section_label
2345 INTEGER :: handle, iatom, icore, ikind, imolecule, ishell, istat, n_char_size, n_dp_size, &
2346 n_int_size, natom, natomkind, ncore, nhc_size, nmolecule, nmoleculekind, nshell, &
2347 print_level, run_type
2348 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: ibuf, imol
2349 LOGICAL :: print_info, write_velocities
2350 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: rbuf
2362 CALL timeset(routinen, handle)
2364 NULLIFY (atomic_kinds)
2365 NULLIFY (core_particles)
2366 NULLIFY (molecule_kinds)
2368 NULLIFY (my_force_env)
2371 NULLIFY (shell_particles)
2373 NULLIFY (thermostat_part)
2374 NULLIFY (thermostat_shell)
2376 IF (
PRESENT(md_env))
THEN
2378 force_env=my_force_env, &
2379 thermostat_part=thermostat_part, &
2380 thermostat_shell=thermostat_shell)
2381 ELSE IF (
PRESENT(force_env))
THEN
2382 my_force_env => force_env
2385 IF (.NOT.
ASSOCIATED(my_force_env))
THEN
2386 CALL timestop(handle)
2392 IF (print_level > 1)
THEN
2395 print_info = .false.
2399 write_velocities = ((run_type ==
mol_dyn_run) .OR. &
2404 para_env=para_env, &
2407 atomic_kinds=atomic_kinds, &
2408 particles=particles, &
2410 core_particles=core_particles, &
2412 shell_particles=shell_particles, &
2414 molecule_kinds=molecule_kinds, &
2415 molecules=molecules)
2417 natomkind = atomic_kinds%n_els
2418 IF (
ASSOCIATED(molecule_kinds))
THEN
2419 nmoleculekind = molecule_kinds%n_els
2424 IF (
ASSOCIATED(molecules))
THEN
2425 nmolecule = molecules%n_els
2434 IF (output_unit > 0)
THEN
2436 IF (print_info)
THEN
2437 INQUIRE (unit=output_unit, name=binary_restart_file_name, iostat=istat)
2438 IF (istat /= 0)
THEN
2439 CALL cp_abort(__location__, &
2440 "An error occurred inquiring logical unit <"// &
2442 "> which should be linked to the binary restart file")
2444 IF (log_unit > 0)
THEN
2445 WRITE (unit=log_unit, fmt=
"(T2,A,/,/,(T3,A,T71,I10))") &
2446 "Writing binary restart file "//trim(adjustl(binary_restart_file_name)), &
2447 "Number of atomic kinds:", natomkind, &
2448 "Number of atoms:", natom, &
2449 "Number of cores (only core-shell model):", ncore, &
2450 "Number of shells (only core-shell model):", nshell, &
2451 "Number of molecule kinds:", nmoleculekind, &
2452 "Number of molecules", nmolecule
2455 n_int_size = n_int_size + 6
2458 WRITE (unit=output_unit, iostat=istat) &
2459 natomkind, natom, ncore, nshell, nmoleculekind, nmolecule
2460 IF (istat /= 0)
THEN
2461 CALL stop_write(
"natomkind,natom,ncore,nshell,nmoleculekind,nmolecule "// &
2462 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2467 DO ikind = 1, natomkind
2468 WRITE (unit=output_unit, iostat=istat) atomic_kinds%els(ikind)%name
2469 IF (istat /= 0)
CALL stop_write(
"atomic_kinds%els(ikind)%name "// &
2470 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2472 n_char_size = n_char_size + len(atomic_kinds%els(ikind)%name)
2476 ALLOCATE (ibuf(natom))
2478 ibuf(iatom) = particles%els(iatom)%atomic_kind%kind_number
2480 WRITE (unit=output_unit, iostat=istat) ibuf(1:natom)
2481 IF (istat /= 0)
CALL stop_write(
"ibuf(1:natom) -> atomic kind numbers "// &
2482 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2484 n_int_size = n_int_size + natom
2486 ALLOCATE (rbuf(3, natom))
2488 rbuf(1:3, iatom) = particles%els(iatom)%r(1:3)
2490 WRITE (unit=output_unit, iostat=istat) rbuf(1:3, 1:natom)
2491 IF (istat /= 0)
CALL stop_write(
"rbuf(1:3,1:natom) -> atomic coordinates "// &
2492 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2494 n_dp_size = n_dp_size + 3*natom
2498 IF (nmolecule > 0)
THEN
2500 DO ikind = 1, nmoleculekind
2501 WRITE (unit=output_unit, iostat=istat) molecule_kinds%els(ikind)%name
2502 IF (istat /= 0)
CALL stop_write(
"molecule_kinds%els(ikind)%name "// &
2503 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2505 n_char_size = n_char_size + len(molecule_kinds%els(ikind)%name)
2509 ALLOCATE (imol(natom))
2511 DO imolecule = 1, nmolecule
2512 ikind = molecules%els(imolecule)%molecule_kind%kind_number
2513 DO iatom = molecules%els(imolecule)%first_atom, &
2514 molecules%els(imolecule)%last_atom
2516 imol(iatom) = imolecule
2520 WRITE (unit=output_unit, iostat=istat) ibuf(1:natom)
2521 IF (istat /= 0)
CALL stop_write(
"ibuf(1:natom) -> molecule kind index numbers "// &
2522 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2524 n_int_size = n_int_size + natom
2526 WRITE (unit=output_unit, iostat=istat) imol(1:natom)
2527 IF (istat /= 0)
CALL stop_write(
"imol(1:natom) -> molecule index numbers "// &
2528 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2530 n_int_size = n_int_size + natom
2537 section_label =
"SHELL COORDINATES"
2538 WRITE (unit=output_unit, iostat=istat) section_label, nshell
2539 IF (istat /= 0)
CALL stop_write(
"section_label, nshell "// &
2540 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2542 n_char_size = n_char_size + len(section_label)
2543 n_int_size = n_int_size + 1
2544 IF (nshell > 0)
THEN
2546 ALLOCATE (rbuf(3, nshell))
2547 DO ishell = 1, nshell
2548 rbuf(1:3, ishell) = shell_particles%els(ishell)%r(1:3)
2550 WRITE (unit=output_unit, iostat=istat) rbuf(1:3, 1:nshell)
2551 IF (istat /= 0)
CALL stop_write(
"rbuf(1:3,1:nshell) -> shell coordinates "// &
2552 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2554 n_dp_size = n_dp_size + 3*nshell
2557 ALLOCATE (ibuf(nshell))
2558 DO ishell = 1, nshell
2559 ibuf(ishell) = shell_particles%els(ishell)%atom_index
2561 WRITE (unit=output_unit, iostat=istat) ibuf(1:nshell)
2562 IF (istat /= 0)
CALL stop_write(
"ibuf(1:nshell) -> atomic indices "// &
2563 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2565 n_int_size = n_int_size + nshell
2569 section_label =
"CORE COORDINATES"
2570 WRITE (unit=output_unit, iostat=istat) section_label, ncore
2571 IF (istat /= 0)
CALL stop_write(
"section_label, ncore "// &
2572 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2574 n_char_size = n_char_size + len(section_label)
2575 n_int_size = n_int_size + 1
2578 ALLOCATE (rbuf(3, ncore))
2580 rbuf(1:3, icore) = core_particles%els(icore)%r(1:3)
2582 WRITE (unit=output_unit, iostat=istat) rbuf(1:3, 1:ncore)
2583 IF (istat /= 0)
CALL stop_write(
"rbuf(1:3,1:ncore) -> core coordinates "// &
2584 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2586 n_dp_size = n_dp_size + 3*ncore
2589 ALLOCATE (ibuf(ncore))
2591 ibuf(icore) = core_particles%els(icore)%atom_index
2593 WRITE (unit=output_unit, iostat=istat) ibuf(1:ncore)
2594 IF (istat /= 0)
CALL stop_write(
"ibuf(1:ncore) -> atomic indices "// &
2595 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2597 n_int_size = n_int_size + ncore
2605 section_label =
"PARTICLE THERMOSTATS"
2606 IF (
ASSOCIATED(thermostat_part))
THEN
2609 nhc => thermostat_part%nhc
2610 CALL write_binary_thermostats_nose(nhc, output_unit, log_unit, section_label, &
2611 n_char_size, n_dp_size, n_int_size, &
2612 print_info, para_env)
2616 IF (output_unit > 0)
THEN
2617 WRITE (unit=output_unit, iostat=istat) section_label, nhc_size
2618 IF (istat /= 0)
CALL stop_write(trim(section_label)//
", nhc_size "// &
2619 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2622 n_char_size = n_char_size + len(section_label)
2623 n_int_size = n_int_size + 1
2624 IF (output_unit > 0 .AND. log_unit > 0)
THEN
2625 IF (print_info)
THEN
2626 WRITE (unit=log_unit, fmt=
"(T3,A,T71,I10)") &
2627 "NHC size ("//trim(adjustl(section_label))//
")", nhc_size
2633 section_label =
"SHELL THERMOSTATS"
2634 IF (
ASSOCIATED(thermostat_shell))
THEN
2637 nhc => thermostat_shell%nhc
2638 CALL write_binary_thermostats_nose(nhc, output_unit, log_unit, section_label, &
2639 n_char_size, n_dp_size, n_int_size, &
2640 print_info, para_env)
2644 IF (output_unit > 0)
THEN
2645 WRITE (unit=output_unit, iostat=istat) section_label, nhc_size
2646 IF (istat /= 0)
CALL stop_write(
"nhc_size "// &
2647 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2650 n_char_size = n_char_size + len(section_label)
2651 n_int_size = n_int_size + 1
2652 IF (output_unit > 0 .AND. log_unit > 0)
THEN
2653 IF (print_info)
THEN
2654 WRITE (unit=log_unit, fmt=
"(T3,A,T71,I10)") &
2655 "NHC size ("//trim(adjustl(section_label))//
")", nhc_size
2662 IF (output_unit > 0)
THEN
2664 section_label =
"VELOCITIES"
2665 IF (output_unit > 0)
THEN
2666 WRITE (unit=output_unit, iostat=istat) section_label, merge(natom, 0, write_velocities)
2667 IF (istat /= 0)
CALL stop_write(trim(section_label)//
", write_velocities "// &
2668 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2671 n_char_size = n_char_size + len(section_label)
2672 n_int_size = n_int_size + 1
2673 IF (print_info .AND. log_unit > 0)
THEN
2674 WRITE (unit=log_unit, fmt=
"(T3,A,T78,A3)") &
2675 "Write "//trim(adjustl(section_label))//
" section", merge(
"YES",
" NO", write_velocities)
2677 IF (write_velocities)
THEN
2678 ALLOCATE (rbuf(3, natom))
2681 rbuf(1:3, iatom) = particles%els(iatom)%v(1:3)
2683 WRITE (unit=output_unit, iostat=istat) rbuf(1:3, 1:natom)
2684 IF (istat /= 0)
CALL stop_write(
"rbuf(1:3,1:natom) -> atomic velocities "// &
2685 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2687 n_dp_size = n_dp_size + 3*natom
2691 section_label =
"SHELL VELOCITIES"
2692 WRITE (unit=output_unit, iostat=istat) section_label, merge(nshell, 0, write_velocities)
2693 IF (istat /= 0)
CALL stop_write(trim(section_label)//
", write_velocities "// &
2694 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2696 n_char_size = n_char_size + len(section_label)
2697 n_int_size = n_int_size + 1
2698 IF (print_info .AND. log_unit > 0)
THEN
2699 WRITE (unit=log_unit, fmt=
"(T3,A,T78,A3)") &
2700 "Write "//trim(adjustl(section_label))//
" section", merge(
"YES",
" NO", write_velocities)
2702 IF (nshell > 0)
THEN
2703 IF (write_velocities)
THEN
2704 ALLOCATE (rbuf(3, nshell))
2705 DO ishell = 1, nshell
2706 rbuf(1:3, ishell) = shell_particles%els(ishell)%v(1:3)
2708 WRITE (unit=output_unit, iostat=istat) rbuf(1:3, 1:nshell)
2709 IF (istat /= 0)
CALL stop_write(
"rbuf(1:3,1:nshell) -> shell velocities "// &
2710 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2712 n_dp_size = n_dp_size + 3*nshell
2717 section_label =
"CORE VELOCITIES"
2718 WRITE (unit=output_unit, iostat=istat) section_label, merge(ncore, 0, write_velocities)
2719 IF (istat /= 0)
CALL stop_write(trim(section_label)//
", write_velocities "// &
2720 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2722 n_char_size = n_char_size + len(section_label)
2723 n_int_size = n_int_size + 1
2724 IF (print_info .AND. log_unit > 0)
THEN
2725 WRITE (unit=log_unit, fmt=
"(T3,A,T78,A3)") &
2726 "Write "//trim(adjustl(section_label))//
" section", merge(
"YES",
" NO", write_velocities)
2729 IF (write_velocities)
THEN
2730 ALLOCATE (rbuf(3, ncore))
2732 rbuf(1:3, icore) = core_particles%els(icore)%v(1:3)
2734 WRITE (unit=output_unit, iostat=istat) rbuf(1:3, 1:ncore)
2735 IF (istat /= 0)
CALL stop_write(
"rbuf(1:3,1:ncore) -> core velocities "// &
2736 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2738 n_dp_size = n_dp_size + 3*ncore
2745 IF (output_unit > 0)
THEN
2746 IF (print_info .AND. log_unit > 0)
THEN
2747 WRITE (unit=log_unit, fmt=
"(/,(T2,I10,1X,I0,A,T68,I10,A))") &
2748 n_char_size,
int_size,
"-byte characters written", n_char_size*
int_size/1024,
" KB", &
2749 n_dp_size,
dp_size,
"-byte floating point numbers written", n_dp_size*
dp_size/1024,
" KB", &
2750 n_int_size,
int_size,
"-byte integer numbers written", n_int_size*
int_size/1024,
" KB"
2751 WRITE (unit=log_unit, fmt=
"(/,T2,A)") &
2752 "Binary restart file "//trim(adjustl(binary_restart_file_name))//
" written"
2756 CALL timestop(handle)
2758 END SUBROUTINE write_binary_restart
2777 SUBROUTINE write_binary_thermostats_nose(nhc, output_unit, log_unit, section_label, &
2778 n_char_size, n_dp_size, n_int_size, &
2779 print_info, para_env)
2782 INTEGER,
INTENT(IN) :: output_unit, log_unit
2783 CHARACTER(LEN=default_string_length),
INTENT(IN) :: section_label
2784 INTEGER,
INTENT(INOUT) :: n_char_size, n_dp_size, n_int_size
2785 LOGICAL,
INTENT(IN) :: print_info
2788 CHARACTER(LEN=*),
PARAMETER :: routinen =
'write_binary_thermostats_nose'
2790 INTEGER :: handle, istat, nhc_size
2791 REAL(kind=
dp),
DIMENSION(:),
POINTER :: eta, fnhc, mnhc, veta
2793 CALL timeset(routinen, handle)
2800 CALL collect_nose_restart_info(nhc, para_env, eta, veta, fnhc, mnhc)
2802 nhc_size =
SIZE(eta)
2804 IF (output_unit > 0)
THEN
2805 WRITE (unit=output_unit, iostat=istat) section_label, nhc_size
2806 IF (istat /= 0)
CALL stop_write(
"nhc_size "// &
2807 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2809 n_char_size = n_char_size + len(section_label)
2810 n_int_size = n_int_size + 1
2811 IF (print_info .AND. log_unit > 0)
THEN
2812 WRITE (unit=log_unit, fmt=
"(T3,A,T71,I10)") &
2813 "NHC size ("//trim(adjustl(section_label))//
")", nhc_size
2816 WRITE (unit=output_unit, iostat=istat) eta(1:nhc_size)
2817 IF (istat /= 0)
CALL stop_write(
"eta(1:nhc_size) "// &
2818 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2820 n_dp_size = n_dp_size + nhc_size
2826 IF (output_unit > 0)
THEN
2827 WRITE (unit=output_unit, iostat=istat) veta(1:nhc_size)
2828 IF (istat /= 0)
CALL stop_write(
"veta(1:nhc_size) "// &
2829 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2831 n_dp_size = n_dp_size + nhc_size
2837 IF (output_unit > 0)
THEN
2838 WRITE (unit=output_unit, iostat=istat) mnhc(1:nhc_size)
2839 IF (istat /= 0)
CALL stop_write(
"mnhc(1:nhc_size) "// &
2840 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2842 n_dp_size = n_dp_size + nhc_size
2848 IF (output_unit > 0)
THEN
2849 WRITE (unit=output_unit, iostat=istat) fnhc(1:nhc_size)
2850 IF (istat /= 0)
CALL stop_write(
"fnhc(1:nhc_size) "// &
2851 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2853 n_dp_size = n_dp_size + nhc_size
2858 CALL timestop(handle)
2860 END SUBROUTINE write_binary_thermostats_nose
2874 SUBROUTINE stop_write(object, unit_number)
2876 CHARACTER(LEN=*),
INTENT(IN) :: object
2877 INTEGER,
INTENT(IN) :: unit_number
2879 CHARACTER(LEN=2*default_path_length) :: message
2880 CHARACTER(LEN=default_path_length) :: file_name
2881 LOGICAL :: file_exists
2883 IF (unit_number >= 0)
THEN
2884 INQUIRE (unit=unit_number, exist=file_exists)
2886 file_exists = .false.
2888 IF (file_exists)
THEN
2889 INQUIRE (unit=unit_number, name=file_name)
2890 WRITE (unit=message, fmt=
"(A)") &
2891 "An error occurred writing data object <"//trim(adjustl(object))// &
2892 "> to file <"//trim(adjustl(file_name))//
">"
2894 WRITE (unit=message, fmt=
"(A,I0,A)") &
2895 "Could not write data object <"//trim(adjustl(object))// &
2896 "> to logical unit ", unit_number,
". The I/O unit does not exist."
2901 END SUBROUTINE stop_write
Type for the canonical sampling through velocity rescaling.
represent a simple array based list of the given type
Handles the type to compute averages during an MD.
some minimal info about CP2K, including its version and license
subroutine, public write_restart_header(iunit)
Writes the header for the restart file.
various routines to log and control the output. The idea is that decisions about where to log should ...
integer function, public cp_logger_get_default_io_unit(logger)
returns the unit nr for the ionode (-1 on all other processors) skips as well checks if the procs cal...
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...
types that represent a subsys, i.e. a part of the system
subroutine, public cp_subsys_get(subsys, ref_count, atomic_kinds, atomic_kind_set, particles, particle_set, local_particles, molecules, molecule_set, molecule_kinds, molecule_kind_set, local_molecules, para_env, colvar_p, shell_particles, core_particles, gci, multipoles, natom, nparticle, ncore, nshell, nkind, atprop, virial, results, cell, cell_ref, use_ref_cell)
returns information about various attributes of the given subsys
Type for the canonical sampling through velocity rescaling.
Lumps all possible extended system variables into one type for easy access and passing.
Interface for the force calculations.
subroutine, public multiple_fe_list(force_env_sections, root_section, i_force_eval, nforce_eval)
returns the order of the multiple force_env
recursive subroutine, public force_env_get(force_env, in_use, fist_env, qs_env, meta_env, fp_env, subsys, para_env, potential_energy, additional_potential, kinetic_energy, harmonic_shell, kinetic_shell, cell, sub_force_env, qmmm_env, qmmmx_env, eip_env, pwdft_env, globenv, input, force_env_section, method_name_id, root_section, mixed_env, nnp_env, embed_env, ipi_env)
returns various attributes about the force environment
Data types representing superfluid helium.
Defines the basic variable types.
integer, parameter, public dp_size
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public int_size
integer, parameter, public default_path_length
subroutine, public get_md_env(md_env, itimes, constant, used_time, cell, simpar, npt, force_env, para_env, reftraj, t, init, first_time, fe_env, thermostats, barostat, thermostat_coeff, thermostat_part, thermostat_shell, thermostat_baro, thermostat_fast, thermostat_slow, md_ener, averages, thermal_regions, ehrenfest_md)
get components of MD environment type
Utility routines for the memory handling.
Interface to the message passing library MPI.
represent a simple array based list of the given type
represent a simple array based list of the given type
Typo for Nudged Elastic Band Calculation.
Parallel (pseudo)random number generator (RNG) for multiple streams and substreams of random numbers.
integer, parameter, public rng_record_length
represent a simple array based list of the given type
Define the data structure for the particle information.
pure real(kind=dp) function, dimension(3), public get_particle_pos_or_vel(iatom, particle_set, vector)
Return the atomic position or velocity of atom iatom in x from a packed vector even if core-shell par...
Definition of physical constants:
real(kind=dp), parameter, public angstrom
integer, parameter, public thermostat_gle
integer, parameter, public thermostat_pile
integer, parameter, public thermostat_piglet
integer, parameter, public thermostat_nose
integer, parameter, public thermostat_qtb
Type for storing MD parameters.
Utilities for string manipulations.
subroutine, public string_to_ascii(string, nascii)
Convert a string to sequence of integer numbers.
Thermostat structure: module containing thermostat available for MD.
Utilities for thermostats.
subroutine, public communication_thermo_low2(array, number1, number2, para_env)
Handles the communication for thermostats (2D array)
subroutine, public get_kin_energies(map_info, loc_num, glob_num, thermo_energy, thermostat_kin, para_env, array_pot, array_kin)
Calculates kinetic energy and potential energy of the csvr and gle thermostats.
represent a list of objects
type of a logger, at the moment it contains just a print level starting at which level it should be l...
represents a system: atoms, molecules, their pos,vel,...
wrapper to abstract the force evaluation of the various methods
data structure for array of solvent helium environments
stores all the informations relevant to an mpi environment
represent a list of objects
represent a list of objects
represent a list of objects
environment for a path integral run
Simulation parameter type for molecular dynamics.