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 ELSEIF (
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 ELSEIF (
PRESENT(pint_env))
THEN
555 para_env => pint_env%logger%para_env
556 ELSEIF (
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
1169 IF (itmp .LT. 0)
THEN
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) &
1334 NULLIFY (real_msg_gather)
1335 ALLOCATE (real_msg_gather(msglen))
1336 real_msg_gather(:) = pack(helium_env(1)%helium%force_avrg, .true.)
1340 "MOTION%PINT%HELIUM%FORCE%_DEFAULT_KEYWORD_", &
1341 r_vals_ptr=real_msg_gather)
1346 NULLIFY (real_msg_gather)
1352 IF (helium_env(1)%helium%rdf_present)
THEN
1355 helium_env(1)%helium%rdf_inst(:, :) = 0.0_dp
1356 DO i = 1,
SIZE(helium_env)
1357 helium_env(1)%helium%rdf_inst(:, :) = helium_env(1)%helium%rdf_inst(:, :) + &
1358 helium_env(i)%helium%rdf_accu(:, :)
1362 CALL helium_env(1)%comm%sum(helium_env(1)%helium%rdf_inst)
1363 itmp = helium_env(1)%helium%num_env
1364 invproc = 1.0_dp/real(itmp,
dp)
1365 helium_env(1)%helium%rdf_inst(:, :) = helium_env(1)%helium%rdf_inst(:, :)*invproc
1367 nsteps = helium_env(1)%helium%current_step - helium_env(1)%helium%first_step
1368 helium_env(1)%helium%rdf_inst(:, :) = helium_env(1)%helium%rdf_inst(:, :)/real(nsteps,
dp)
1369 iweight = helium_env(1)%helium%rdf_iweight
1371 helium_env(1)%helium%rdf_inst(:, :) = nsteps*helium_env(1)%helium%rdf_inst(:, :) + &
1372 iweight*helium_env(1)%helium%rdf_rstr(:, :)
1373 helium_env(1)%helium%rdf_inst(:, :) = helium_env(1)%helium%rdf_inst(:, :)/real(nsteps + iweight,
dp)
1376 msglen =
SIZE(helium_env(1)%helium%rdf_inst)
1377 ALLOCATE (real_msg(msglen))
1378 real_msg(:) = pack(helium_env(1)%helium%rdf_inst, .true.)
1380 helium_env(1)%helium%input, &
1381 "MOTION%PINT%HELIUM%AVERAGES%RDF", &
1382 r_vals_ptr=real_msg)
1390 IF (helium_env(1)%helium%rho_present)
THEN
1393 helium_env(1)%helium%rho_inst(:, :, :, :) = 0.0_dp
1394 DO i = 1,
SIZE(helium_env)
1395 helium_env(1)%helium%rho_inst(:, :, :, :) = helium_env(1)%helium%rho_inst(:, :, :, :) + &
1396 helium_env(i)%helium%rho_accu(:, :, :, :)
1400 CALL helium_env(1)%comm%sum(helium_env(1)%helium%rho_inst)
1401 itmp = helium_env(1)%helium%num_env
1402 invproc = 1.0_dp/real(itmp,
dp)
1403 helium_env(1)%helium%rho_inst(:, :, :, :) = helium_env(1)%helium%rho_inst(:, :, :, :)*invproc
1405 nsteps = helium_env(1)%helium%current_step - helium_env(1)%helium%first_step
1406 helium_env(1)%helium%rho_inst(:, :, :, :) = helium_env(1)%helium%rho_inst(:, :, :, :)/real(nsteps,
dp)
1407 iweight = helium_env(1)%helium%averages_iweight
1409 helium_env(1)%helium%rho_inst(:, :, :, :) = nsteps*helium_env(1)%helium%rho_inst(:, :, :, :) + &
1410 iweight*helium_env(1)%helium%rho_rstr(:, :, :, :)
1411 helium_env(1)%helium%rho_inst(:, :, :, :) = helium_env(1)%helium%rho_inst(:, :, :, :)/real(nsteps + iweight,
dp)
1415 msglen =
SIZE(helium_env(1)%helium%rho_inst)
1416 ALLOCATE (real_msg(msglen))
1417 real_msg(:) = pack(helium_env(1)%helium%rho_inst, .true.)
1419 helium_env(1)%helium%input, &
1420 "MOTION%PINT%HELIUM%AVERAGES%RHO", &
1421 r_vals_ptr=real_msg)
1428 CALL timestop(handle)
1430 END SUBROUTINE update_motion_helium
1441 SUBROUTINE dump_csvr_energy_info(thermostat_energy, nsize, work_section)
1443 REAL(kind=
dp),
DIMENSION(:),
POINTER :: thermostat_energy
1444 INTEGER,
INTENT(IN) :: nsize
1447 INTEGER :: ik, irk, nlist
1450 TYPE(
val_type),
POINTER :: my_val, old_val
1452 cpassert(
ASSOCIATED(work_section))
1453 cpassert(work_section%ref_count > 0)
1455 NULLIFY (my_val, old_val, section, vals)
1457 section => work_section%section
1462 CALL cp_abort(__location__,
"section "//trim(section%name)//
" does not contain keyword "// &
1463 "_DEFAULT_KEYWORD_")
1466 IF (
SIZE(work_section%values, 2) == 1)
EXIT
1470 vals => work_section%values(ik, 1)%list
1473 IF (
ASSOCIATED(vals))
THEN
1478 CALL val_create(val=my_val, r_val=thermostat_energy(irk))
1479 IF (nlist /= 0)
THEN
1483 new_pos => new_pos%rest
1485 old_val => new_pos%first_el
1487 new_pos%first_el => my_val
1494 NULLIFY (new_pos%rest)
1496 new_pos => new_pos%rest
1501 work_section%values(ik, 1)%list => vals
1503 END SUBROUTINE dump_csvr_energy_info
1515 SUBROUTINE dump_csvr_restart_info(csvr, para_env, csvr_section)
1521 CHARACTER(LEN=rng_record_length) :: rng_record
1522 INTEGER :: i, my_index
1523 INTEGER,
ALLOCATABLE,
DIMENSION(:, :) :: dwork
1524 REAL(kind=
dp) :: dum
1525 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: thermo_energy
1526 REAL(kind=
dp),
DIMENSION(:),
POINTER :: work
1531 ALLOCATE (work(csvr%glob_num_csvr))
1533 ALLOCATE (thermo_energy(csvr%loc_num_csvr))
1534 DO i = 1, csvr%loc_num_csvr
1535 thermo_energy(i) = csvr%nvt(i)%thermostat_energy
1538 csvr%glob_num_csvr, thermo_energy, &
1539 dum, para_env, array_kin=work)
1540 DEALLOCATE (thermo_energy)
1544 CALL dump_csvr_energy_info(work, csvr%glob_num_csvr, work_section)
1551 DO i = 1, csvr%loc_num_csvr
1552 my_index = csvr%map_info%index(i)
1553 CALL csvr%nvt(i)%gaussian_rng_stream%dump(rng_record)
1560 CALL para_env%sum(dwork)
1568 END SUBROUTINE dump_csvr_restart_info
1580 SUBROUTINE dump_al_restart_info(al, para_env, al_section)
1587 REAL(kind=
dp) :: dum
1588 REAL(kind=
dp),
DIMENSION(:),
POINTER :: t_array, work
1593 ALLOCATE (work(al%glob_num_al))
1594 ALLOCATE (t_array(al%loc_num_al))
1597 DO i = 1, al%loc_num_al
1598 t_array(i) = al%nvt(i)%chi
1602 al%glob_num_al, t_array, &
1603 dum, para_env, array_kin=work)
1607 CALL dump_csvr_energy_info(work, al%glob_num_al, work_section)
1610 DO i = 1, al%loc_num_al
1611 t_array(i) = al%nvt(i)%mass
1615 al%glob_num_al, t_array, &
1616 dum, para_env, array_kin=work)
1620 CALL dump_csvr_energy_info(work, al%glob_num_al, work_section)
1622 DEALLOCATE (t_array)
1625 END SUBROUTINE dump_al_restart_info
1635 SUBROUTINE dump_gle_restart_info(gle, para_env, gle_section)
1641 CHARACTER(LEN=rng_record_length) :: rng_record
1642 INTEGER :: counter, glob_num, i, iproc, j, loc_num
1643 INTEGER,
ALLOCATABLE,
DIMENSION(:, :) :: dwork
1644 INTEGER,
DIMENSION(:),
POINTER :: gle_per_proc, index
1646 REAL(
dp),
DIMENSION(:),
POINTER :: s_tmp
1647 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: thermo_energy
1648 REAL(kind=
dp),
DIMENSION(:),
POINTER :: work
1653 ALLOCATE (work(gle%glob_num_gle))
1654 ALLOCATE (thermo_energy(gle%loc_num_gle))
1655 DO i = 1, gle%loc_num_gle
1656 thermo_energy(i) = gle%nvt(i)%thermostat_energy
1659 gle%glob_num_gle, thermo_energy, &
1660 dum, para_env, array_kin=work)
1661 DEALLOCATE (thermo_energy)
1665 CALL dump_csvr_energy_info(work, gle%glob_num_gle, work_section)
1670 glob_num = gle%glob_num_gle
1671 loc_num = gle%loc_num_gle
1675 j = gle%map_info%index(i)
1676 CALL gle%nvt(i)%gaussian_rng_stream%dump(rng_record)
1683 CALL para_env%sum(dwork)
1691 ALLOCATE (gle_per_proc(para_env%num_pe))
1693 CALL para_env%allgather(gle%loc_num_gle, gle_per_proc)
1697 ALLOCATE (s_tmp((gle%ndim)*gle%glob_num_gle))
1700 NULLIFY (work, index)
1701 DO iproc = 1, para_env%num_pe
1702 CALL reallocate(work, 1, gle_per_proc(iproc)*(gle%ndim))
1703 CALL reallocate(index, 1, gle_per_proc(iproc))
1704 IF (para_env%mepos == (iproc - 1))
THEN
1708 DO j = 1, gle%loc_num_gle
1709 counter = counter + 1
1710 work(counter) = gle%nvt(j)%s(i)
1711 index(j) = gle%map_info%index(j)
1717 CALL para_env%bcast(work, iproc - 1)
1718 CALL para_env%bcast(index, iproc - 1)
1721 DO j = 1, gle_per_proc(iproc)
1722 counter = counter + 1
1723 s_tmp((index(j) - 1)*(gle%ndim) + i) = work(counter)
1728 IF (
SIZE(s_tmp) > 0)
THEN
1735 DEALLOCATE (gle_per_proc)
1739 END SUBROUTINE dump_gle_restart_info
1754 SUBROUTINE collect_nose_restart_info(nhc, para_env, eta, veta, fnhc, mnhc)
1758 REAL(kind=
dp),
DIMENSION(:),
POINTER :: eta, veta, fnhc, mnhc
1760 INTEGER :: counter, i, iproc, j, nhc_len, num_nhc, &
1761 numneed, tot_nhcneed
1762 INTEGER,
DIMENSION(:),
POINTER :: index, nhc_per_proc
1763 REAL(kind=
dp),
DIMENSION(:),
POINTER :: work
1766 nhc_len =
SIZE(nhc%nvt, 1)
1767 num_nhc = nhc%loc_num_nhc
1769 map_info => nhc%map_info
1770 ALLOCATE (nhc_per_proc(para_env%num_pe))
1773 CALL para_env%allgather(numneed, nhc_per_proc)
1774 tot_nhcneed = nhc%glob_num_nhc
1776 NULLIFY (work, index)
1781 ALLOCATE (eta(tot_nhcneed*nhc_len))
1782 DO iproc = 1, para_env%num_pe
1783 CALL reallocate(work, 1, nhc_per_proc(iproc)*nhc_len)
1784 CALL reallocate(index, 1, nhc_per_proc(iproc))
1785 IF (para_env%mepos == (iproc - 1))
THEN
1790 counter = counter + 1
1791 work(counter) = nhc%nvt(i, j)%eta
1792 index(j) = map_info%index(j)
1798 CALL para_env%bcast(work, iproc - 1)
1799 CALL para_env%bcast(index, iproc - 1)
1802 DO j = 1, nhc_per_proc(iproc)
1803 counter = counter + 1
1804 eta((index(j) - 1)*nhc_len + i) = work(counter)
1812 ALLOCATE (veta(tot_nhcneed*nhc_len))
1813 DO iproc = 1, para_env%num_pe
1814 CALL reallocate(work, 1, nhc_per_proc(iproc)*nhc_len)
1815 CALL reallocate(index, 1, nhc_per_proc(iproc))
1816 IF (para_env%mepos == (iproc - 1))
THEN
1821 counter = counter + 1
1822 work(counter) = nhc%nvt(i, j)%v
1823 index(j) = map_info%index(j)
1829 CALL para_env%bcast(work, iproc - 1)
1830 CALL para_env%bcast(index, iproc - 1)
1833 DO j = 1, nhc_per_proc(iproc)
1834 counter = counter + 1
1835 veta((index(j) - 1)*nhc_len + i) = work(counter)
1843 ALLOCATE (fnhc(tot_nhcneed*nhc_len))
1844 DO iproc = 1, para_env%num_pe
1845 CALL reallocate(work, 1, nhc_per_proc(iproc)*nhc_len)
1846 CALL reallocate(index, 1, nhc_per_proc(iproc))
1847 IF (para_env%mepos == (iproc - 1))
THEN
1852 counter = counter + 1
1853 work(counter) = nhc%nvt(i, j)%f
1854 index(j) = map_info%index(j)
1860 CALL para_env%bcast(work, iproc - 1)
1861 CALL para_env%bcast(index, iproc - 1)
1864 DO j = 1, nhc_per_proc(iproc)
1865 counter = counter + 1
1866 fnhc((index(j) - 1)*nhc_len + i) = work(counter)
1874 ALLOCATE (mnhc(tot_nhcneed*nhc_len))
1875 DO iproc = 1, para_env%num_pe
1876 CALL reallocate(work, 1, nhc_per_proc(iproc)*nhc_len)
1877 CALL reallocate(index, 1, nhc_per_proc(iproc))
1878 IF (para_env%mepos == (iproc - 1))
THEN
1883 counter = counter + 1
1884 work(counter) = nhc%nvt(i, j)%mass
1885 index(j) = map_info%index(j)
1891 CALL para_env%bcast(work, iproc - 1)
1892 CALL para_env%bcast(index, iproc - 1)
1895 DO j = 1, nhc_per_proc(iproc)
1896 counter = counter + 1
1897 mnhc((index(j) - 1)*nhc_len + i) = work(counter)
1904 DEALLOCATE (nhc_per_proc)
1906 END SUBROUTINE collect_nose_restart_info
1921 SUBROUTINE section_neb_coord_val_set(coord_section, array, narray, nsize, nfield, &
1922 particle_set, conv_factor)
1925 REAL(kind=
dp),
DIMENSION(*) :: array
1926 INTEGER,
INTENT(IN) :: narray, nsize, nfield
1928 REAL(kind=
dp) :: conv_factor
1930 INTEGER :: ik, irk, nlist
1931 REAL(kind=
dp),
DIMENSION(:),
POINTER :: my_c
1934 TYPE(
val_type),
POINTER :: my_val, old_val
1936 NULLIFY (my_val, old_val, section, vals)
1937 cpassert(
ASSOCIATED(coord_section))
1938 cpassert(coord_section%ref_count > 0)
1939 section => coord_section%section
1942 CALL cp_abort(__location__,
"section "//trim(section%name)//
" does not contain keyword "// &
1943 "_DEFAULT_KEYWORD_")
1945 IF (
SIZE(coord_section%values, 2) == 1)
EXIT
1948 vals => coord_section%values(ik, 1)%list
1950 IF (
ASSOCIATED(vals))
THEN
1953 DO irk = 1, nsize/nfield
1954 ALLOCATE (my_c(nfield))
1955 IF (nfield == 3)
THEN
1957 my_c(1:3) = my_c(1:3)*conv_factor
1959 my_c(1) = array(irk)
1963 IF (nlist /= 0)
THEN
1967 new_pos => new_pos%rest
1969 old_val => new_pos%first_el
1971 new_pos%first_el => my_val
1978 NULLIFY (new_pos%rest)
1980 new_pos => new_pos%rest
1986 coord_section%values(ik, 1)%list => vals
1988 END SUBROUTINE section_neb_coord_val_set
2001 SUBROUTINE set_template_restart(work_section, eta, veta, fnhc, mnhc)
2004 REAL(kind=
dp),
DIMENSION(:),
OPTIONAL,
POINTER :: eta, veta, fnhc, mnhc
2008 NULLIFY (coord, force, velocity, mass)
2009 IF (
PRESENT(eta))
THEN
2010 IF (
SIZE(eta) > 0)
THEN
2017 IF (
PRESENT(veta))
THEN
2018 IF (
SIZE(veta) > 0)
THEN
2025 IF (
PRESENT(fnhc))
THEN
2026 IF (
SIZE(fnhc) > 0)
THEN
2033 IF (
PRESENT(mnhc))
THEN
2034 IF (
SIZE(mnhc) > 0)
THEN
2042 END SUBROUTINE set_template_restart
2052 SUBROUTINE meta_hills_val_set_ss(ss_section, meta_env)
2057 INTEGER :: ik, irk, lsize, nlist
2058 REAL(kind=
dp),
DIMENSION(:),
POINTER :: ss_val
2061 TYPE(
val_type),
POINTER :: my_val, old_val
2063 NULLIFY (my_val, old_val, section, vals)
2064 cpassert(
ASSOCIATED(ss_section))
2065 cpassert(ss_section%ref_count > 0)
2066 section => ss_section%section
2069 CALL cp_abort(__location__,
"section "//trim(section%name)//
" does not contain keyword "// &
2070 "_DEFAULT_KEYWORD_")
2072 IF (
SIZE(ss_section%values, 2) == 1)
EXIT
2075 vals => ss_section%values(ik, 1)%list
2077 IF (
ASSOCIATED(vals))
THEN
2080 lsize =
SIZE(meta_env%hills_env%ss_history, 1)
2081 DO irk = 1, meta_env%hills_env%n_hills
2082 ALLOCATE (ss_val(lsize))
2084 ss_val = meta_env%hills_env%ss_history(:, irk)
2087 IF (irk <= nlist)
THEN
2091 new_pos => new_pos%rest
2093 old_val => new_pos%first_el
2095 new_pos%first_el => my_val
2102 NULLIFY (new_pos%rest)
2104 new_pos => new_pos%rest
2110 ss_section%values(ik, 1)%list => vals
2112 END SUBROUTINE meta_hills_val_set_ss
2122 SUBROUTINE meta_hills_val_set_ds(ds_section, meta_env)
2127 INTEGER :: ik, irk, lsize, nlist
2128 REAL(kind=
dp),
DIMENSION(:),
POINTER :: ds_val
2131 TYPE(
val_type),
POINTER :: my_val, old_val
2133 NULLIFY (my_val, old_val, section, vals)
2134 cpassert(
ASSOCIATED(ds_section))
2135 cpassert(ds_section%ref_count > 0)
2136 section => ds_section%section
2139 CALL cp_abort(__location__,
"section "//trim(section%name)//
" does not contain keyword "// &
2140 "_DEFAULT_KEYWORD_")
2142 IF (
SIZE(ds_section%values, 2) == 1)
EXIT
2145 vals => ds_section%values(ik, 1)%list
2147 IF (
ASSOCIATED(vals))
THEN
2150 lsize =
SIZE(meta_env%hills_env%delta_s_history, 1)
2151 DO irk = 1, meta_env%hills_env%n_hills
2152 ALLOCATE (ds_val(lsize))
2154 ds_val = meta_env%hills_env%delta_s_history(:, irk)
2157 IF (irk <= nlist)
THEN
2161 new_pos => new_pos%rest
2163 old_val => new_pos%first_el
2165 new_pos%first_el => my_val
2172 NULLIFY (new_pos%rest)
2174 new_pos => new_pos%rest
2180 ds_section%values(ik, 1)%list => vals
2182 END SUBROUTINE meta_hills_val_set_ds
2192 SUBROUTINE meta_hills_val_set_ww(ww_section, meta_env)
2197 INTEGER :: ik, irk, lsize, nlist
2200 TYPE(
val_type),
POINTER :: my_val, old_val
2202 NULLIFY (my_val, old_val, section, vals)
2203 cpassert(
ASSOCIATED(ww_section))
2204 cpassert(ww_section%ref_count > 0)
2205 section => ww_section%section
2208 CALL cp_abort(__location__,
"section "//trim(section%name)//
" does not contain keyword "// &
2209 "_DEFAULT_KEYWORD_")
2211 IF (
SIZE(ww_section%values, 2) == 1)
EXIT
2214 vals => ww_section%values(ik, 1)%list
2216 IF (
ASSOCIATED(vals))
THEN
2219 lsize = meta_env%hills_env%n_hills
2221 CALL val_create(my_val, r_val=meta_env%hills_env%ww_history(irk))
2223 IF (irk <= nlist)
THEN
2227 new_pos => new_pos%rest
2229 old_val => new_pos%first_el
2231 new_pos%first_el => my_val
2238 NULLIFY (new_pos%rest)
2240 new_pos => new_pos%rest
2246 ww_section%values(ik, 1)%list => vals
2248 END SUBROUTINE meta_hills_val_set_ww
2258 SUBROUTINE meta_hills_val_set_dt(invdt_section, meta_env)
2263 INTEGER :: ik, irk, lsize, nlist
2266 TYPE(
val_type),
POINTER :: my_val, old_val
2268 NULLIFY (my_val, old_val, section, vals)
2269 cpassert(
ASSOCIATED(invdt_section))
2270 cpassert(invdt_section%ref_count > 0)
2271 section => invdt_section%section
2274 CALL cp_abort(__location__,
"section "//trim(section%name)//
" does not contain keyword "// &
2275 "_DEFAULT_KEYWORD_")
2277 IF (
SIZE(invdt_section%values, 2) == 1)
EXIT
2280 vals => invdt_section%values(ik, 1)%list
2282 IF (
ASSOCIATED(vals))
THEN
2285 lsize = meta_env%hills_env%n_hills
2287 CALL val_create(my_val, r_val=meta_env%hills_env%invdt_history(irk))
2289 IF (irk <= nlist)
THEN
2293 new_pos => new_pos%rest
2295 old_val => new_pos%first_el
2297 new_pos%first_el => my_val
2304 NULLIFY (new_pos%rest)
2306 new_pos => new_pos%rest
2311 invdt_section%values(ik, 1)%list => vals
2312 END SUBROUTINE meta_hills_val_set_dt
2327 SUBROUTINE write_binary_restart(output_unit, log_unit, root_section, md_env, force_env)
2329 INTEGER,
INTENT(IN) :: output_unit, log_unit
2334 CHARACTER(LEN=*),
PARAMETER :: routinen =
'write_binary_restart'
2336 CHARACTER(LEN=default_path_length) :: binary_restart_file_name
2337 CHARACTER(LEN=default_string_length) :: section_label
2338 INTEGER :: handle, iatom, icore, ikind, imolecule, ishell, istat, n_char_size, n_dp_size, &
2339 n_int_size, natom, natomkind, ncore, nhc_size, nmolecule, nmoleculekind, nshell, &
2340 print_level, run_type
2341 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: ibuf, imol
2342 LOGICAL :: print_info, write_velocities
2343 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: rbuf
2355 CALL timeset(routinen, handle)
2357 NULLIFY (atomic_kinds)
2358 NULLIFY (core_particles)
2359 NULLIFY (molecule_kinds)
2361 NULLIFY (my_force_env)
2364 NULLIFY (shell_particles)
2366 NULLIFY (thermostat_part)
2367 NULLIFY (thermostat_shell)
2369 IF (
PRESENT(md_env))
THEN
2371 force_env=my_force_env, &
2372 thermostat_part=thermostat_part, &
2373 thermostat_shell=thermostat_shell)
2374 ELSE IF (
PRESENT(force_env))
THEN
2375 my_force_env => force_env
2378 IF (.NOT.
ASSOCIATED(my_force_env))
THEN
2379 CALL timestop(handle)
2385 IF (print_level > 1)
THEN
2388 print_info = .false.
2392 write_velocities = ((run_type ==
mol_dyn_run) .OR. &
2397 para_env=para_env, &
2400 atomic_kinds=atomic_kinds, &
2401 particles=particles, &
2403 core_particles=core_particles, &
2405 shell_particles=shell_particles, &
2407 molecule_kinds=molecule_kinds, &
2408 molecules=molecules)
2410 natomkind = atomic_kinds%n_els
2411 IF (
ASSOCIATED(molecule_kinds))
THEN
2412 nmoleculekind = molecule_kinds%n_els
2417 IF (
ASSOCIATED(molecules))
THEN
2418 nmolecule = molecules%n_els
2427 IF (output_unit > 0)
THEN
2429 IF (print_info)
THEN
2430 INQUIRE (unit=output_unit, name=binary_restart_file_name, iostat=istat)
2431 IF (istat /= 0)
THEN
2432 CALL cp_abort(__location__, &
2433 "An error occurred inquiring logical unit <"// &
2435 "> which should be linked to the binary restart file")
2437 IF (log_unit > 0)
THEN
2438 WRITE (unit=log_unit, fmt=
"(T2,A,/,/,(T3,A,T71,I10))") &
2439 "Writing binary restart file "//trim(adjustl(binary_restart_file_name)), &
2440 "Number of atomic kinds:", natomkind, &
2441 "Number of atoms:", natom, &
2442 "Number of cores (only core-shell model):", ncore, &
2443 "Number of shells (only core-shell model):", nshell, &
2444 "Number of molecule kinds:", nmoleculekind, &
2445 "Number of molecules", nmolecule
2448 n_int_size = n_int_size + 6
2451 WRITE (unit=output_unit, iostat=istat) &
2452 natomkind, natom, ncore, nshell, nmoleculekind, nmolecule
2453 IF (istat /= 0)
THEN
2454 CALL stop_write(
"natomkind,natom,ncore,nshell,nmoleculekind,nmolecule "// &
2455 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2460 DO ikind = 1, natomkind
2461 WRITE (unit=output_unit, iostat=istat) atomic_kinds%els(ikind)%name
2462 IF (istat /= 0)
CALL stop_write(
"atomic_kinds%els(ikind)%name "// &
2463 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2465 n_char_size = n_char_size + len(atomic_kinds%els(ikind)%name)
2469 ALLOCATE (ibuf(natom))
2471 ibuf(iatom) = particles%els(iatom)%atomic_kind%kind_number
2473 WRITE (unit=output_unit, iostat=istat) ibuf(1:natom)
2474 IF (istat /= 0)
CALL stop_write(
"ibuf(1:natom) -> atomic kind numbers "// &
2475 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2477 n_int_size = n_int_size + natom
2479 ALLOCATE (rbuf(3, natom))
2481 rbuf(1:3, iatom) = particles%els(iatom)%r(1:3)
2483 WRITE (unit=output_unit, iostat=istat) rbuf(1:3, 1:natom)
2484 IF (istat /= 0)
CALL stop_write(
"rbuf(1:3,1:natom) -> atomic coordinates "// &
2485 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2487 n_dp_size = n_dp_size + 3*natom
2491 IF (nmolecule > 0)
THEN
2493 DO ikind = 1, nmoleculekind
2494 WRITE (unit=output_unit, iostat=istat) molecule_kinds%els(ikind)%name
2495 IF (istat /= 0)
CALL stop_write(
"molecule_kinds%els(ikind)%name "// &
2496 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2498 n_char_size = n_char_size + len(molecule_kinds%els(ikind)%name)
2502 ALLOCATE (imol(natom))
2504 DO imolecule = 1, nmolecule
2505 ikind = molecules%els(imolecule)%molecule_kind%kind_number
2506 DO iatom = molecules%els(imolecule)%first_atom, &
2507 molecules%els(imolecule)%last_atom
2509 imol(iatom) = imolecule
2513 WRITE (unit=output_unit, iostat=istat) ibuf(1:natom)
2514 IF (istat /= 0)
CALL stop_write(
"ibuf(1:natom) -> molecule kind index numbers "// &
2515 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2517 n_int_size = n_int_size + natom
2519 WRITE (unit=output_unit, iostat=istat) imol(1:natom)
2520 IF (istat /= 0)
CALL stop_write(
"imol(1:natom) -> molecule index numbers "// &
2521 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2523 n_int_size = n_int_size + natom
2530 section_label =
"SHELL COORDINATES"
2531 WRITE (unit=output_unit, iostat=istat) section_label, nshell
2532 IF (istat /= 0)
CALL stop_write(
"section_label, nshell "// &
2533 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2535 n_char_size = n_char_size + len(section_label)
2536 n_int_size = n_int_size + 1
2537 IF (nshell > 0)
THEN
2539 ALLOCATE (rbuf(3, nshell))
2540 DO ishell = 1, nshell
2541 rbuf(1:3, ishell) = shell_particles%els(ishell)%r(1:3)
2543 WRITE (unit=output_unit, iostat=istat) rbuf(1:3, 1:nshell)
2544 IF (istat /= 0)
CALL stop_write(
"rbuf(1:3,1:nshell) -> shell coordinates "// &
2545 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2547 n_dp_size = n_dp_size + 3*nshell
2550 ALLOCATE (ibuf(nshell))
2551 DO ishell = 1, nshell
2552 ibuf(ishell) = shell_particles%els(ishell)%atom_index
2554 WRITE (unit=output_unit, iostat=istat) ibuf(1:nshell)
2555 IF (istat /= 0)
CALL stop_write(
"ibuf(1:nshell) -> atomic indices "// &
2556 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2558 n_int_size = n_int_size + nshell
2562 section_label =
"CORE COORDINATES"
2563 WRITE (unit=output_unit, iostat=istat) section_label, ncore
2564 IF (istat /= 0)
CALL stop_write(
"section_label, ncore "// &
2565 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2567 n_char_size = n_char_size + len(section_label)
2568 n_int_size = n_int_size + 1
2571 ALLOCATE (rbuf(3, ncore))
2573 rbuf(1:3, icore) = core_particles%els(icore)%r(1:3)
2575 WRITE (unit=output_unit, iostat=istat) rbuf(1:3, 1:ncore)
2576 IF (istat /= 0)
CALL stop_write(
"rbuf(1:3,1:ncore) -> core coordinates "// &
2577 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2579 n_dp_size = n_dp_size + 3*ncore
2582 ALLOCATE (ibuf(ncore))
2584 ibuf(icore) = core_particles%els(icore)%atom_index
2586 WRITE (unit=output_unit, iostat=istat) ibuf(1:ncore)
2587 IF (istat /= 0)
CALL stop_write(
"ibuf(1:ncore) -> atomic indices "// &
2588 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2590 n_int_size = n_int_size + ncore
2598 section_label =
"PARTICLE THERMOSTATS"
2599 IF (
ASSOCIATED(thermostat_part))
THEN
2602 nhc => thermostat_part%nhc
2603 CALL write_binary_thermostats_nose(nhc, output_unit, log_unit, section_label, &
2604 n_char_size, n_dp_size, n_int_size, &
2605 print_info, para_env)
2609 IF (output_unit > 0)
THEN
2610 WRITE (unit=output_unit, iostat=istat) section_label, nhc_size
2611 IF (istat /= 0)
CALL stop_write(trim(section_label)//
", nhc_size "// &
2612 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2615 n_char_size = n_char_size + len(section_label)
2616 n_int_size = n_int_size + 1
2617 IF (output_unit > 0 .AND. log_unit > 0)
THEN
2618 IF (print_info)
THEN
2619 WRITE (unit=log_unit, fmt=
"(T3,A,T71,I10)") &
2620 "NHC size ("//trim(adjustl(section_label))//
")", nhc_size
2626 section_label =
"SHELL THERMOSTATS"
2627 IF (
ASSOCIATED(thermostat_shell))
THEN
2630 nhc => thermostat_shell%nhc
2631 CALL write_binary_thermostats_nose(nhc, output_unit, log_unit, section_label, &
2632 n_char_size, n_dp_size, n_int_size, &
2633 print_info, para_env)
2637 IF (output_unit > 0)
THEN
2638 WRITE (unit=output_unit, iostat=istat) section_label, nhc_size
2639 IF (istat /= 0)
CALL stop_write(
"nhc_size "// &
2640 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2643 n_char_size = n_char_size + len(section_label)
2644 n_int_size = n_int_size + 1
2645 IF (output_unit > 0 .AND. log_unit > 0)
THEN
2646 IF (print_info)
THEN
2647 WRITE (unit=log_unit, fmt=
"(T3,A,T71,I10)") &
2648 "NHC size ("//trim(adjustl(section_label))//
")", nhc_size
2655 IF (output_unit > 0)
THEN
2657 section_label =
"VELOCITIES"
2658 IF (output_unit > 0)
THEN
2659 WRITE (unit=output_unit, iostat=istat) section_label, merge(natom, 0, write_velocities)
2660 IF (istat /= 0)
CALL stop_write(trim(section_label)//
", write_velocities "// &
2661 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2664 n_char_size = n_char_size + len(section_label)
2665 n_int_size = n_int_size + 1
2666 IF (print_info .AND. log_unit > 0)
THEN
2667 WRITE (unit=log_unit, fmt=
"(T3,A,T78,A3)") &
2668 "Write "//trim(adjustl(section_label))//
" section", merge(
"YES",
" NO", write_velocities)
2670 IF (write_velocities)
THEN
2671 ALLOCATE (rbuf(3, natom))
2674 rbuf(1:3, iatom) = particles%els(iatom)%v(1:3)
2676 WRITE (unit=output_unit, iostat=istat) rbuf(1:3, 1:natom)
2677 IF (istat /= 0)
CALL stop_write(
"rbuf(1:3,1:natom) -> atomic velocities "// &
2678 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2680 n_dp_size = n_dp_size + 3*natom
2684 section_label =
"SHELL VELOCITIES"
2685 WRITE (unit=output_unit, iostat=istat) section_label, merge(nshell, 0, write_velocities)
2686 IF (istat /= 0)
CALL stop_write(trim(section_label)//
", write_velocities "// &
2687 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2689 n_char_size = n_char_size + len(section_label)
2690 n_int_size = n_int_size + 1
2691 IF (print_info .AND. log_unit > 0)
THEN
2692 WRITE (unit=log_unit, fmt=
"(T3,A,T78,A3)") &
2693 "Write "//trim(adjustl(section_label))//
" section", merge(
"YES",
" NO", write_velocities)
2695 IF (nshell > 0)
THEN
2696 IF (write_velocities)
THEN
2697 ALLOCATE (rbuf(3, nshell))
2698 DO ishell = 1, nshell
2699 rbuf(1:3, ishell) = shell_particles%els(ishell)%v(1:3)
2701 WRITE (unit=output_unit, iostat=istat) rbuf(1:3, 1:nshell)
2702 IF (istat /= 0)
CALL stop_write(
"rbuf(1:3,1:nshell) -> shell velocities "// &
2703 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2705 n_dp_size = n_dp_size + 3*nshell
2710 section_label =
"CORE VELOCITIES"
2711 WRITE (unit=output_unit, iostat=istat) section_label, merge(ncore, 0, write_velocities)
2712 IF (istat /= 0)
CALL stop_write(trim(section_label)//
", write_velocities "// &
2713 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2715 n_char_size = n_char_size + len(section_label)
2716 n_int_size = n_int_size + 1
2717 IF (print_info .AND. log_unit > 0)
THEN
2718 WRITE (unit=log_unit, fmt=
"(T3,A,T78,A3)") &
2719 "Write "//trim(adjustl(section_label))//
" section", merge(
"YES",
" NO", write_velocities)
2722 IF (write_velocities)
THEN
2723 ALLOCATE (rbuf(3, ncore))
2725 rbuf(1:3, icore) = core_particles%els(icore)%v(1:3)
2727 WRITE (unit=output_unit, iostat=istat) rbuf(1:3, 1:ncore)
2728 IF (istat /= 0)
CALL stop_write(
"rbuf(1:3,1:ncore) -> core velocities "// &
2729 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2731 n_dp_size = n_dp_size + 3*ncore
2738 IF (output_unit > 0)
THEN
2739 IF (print_info .AND. log_unit > 0)
THEN
2740 WRITE (unit=log_unit, fmt=
"(/,(T2,I10,1X,I0,A,T68,I10,A))") &
2741 n_char_size,
int_size,
"-byte characters written", n_char_size*
int_size/1024,
" KB", &
2742 n_dp_size,
dp_size,
"-byte floating point numbers written", n_dp_size*
dp_size/1024,
" KB", &
2743 n_int_size,
int_size,
"-byte integer numbers written", n_int_size*
int_size/1024,
" KB"
2744 WRITE (unit=log_unit, fmt=
"(/,T2,A)") &
2745 "Binary restart file "//trim(adjustl(binary_restart_file_name))//
" written"
2749 CALL timestop(handle)
2751 END SUBROUTINE write_binary_restart
2770 SUBROUTINE write_binary_thermostats_nose(nhc, output_unit, log_unit, section_label, &
2771 n_char_size, n_dp_size, n_int_size, &
2772 print_info, para_env)
2775 INTEGER,
INTENT(IN) :: output_unit, log_unit
2776 CHARACTER(LEN=default_string_length),
INTENT(IN) :: section_label
2777 INTEGER,
INTENT(INOUT) :: n_char_size, n_dp_size, n_int_size
2778 LOGICAL,
INTENT(IN) :: print_info
2781 CHARACTER(LEN=*),
PARAMETER :: routinen =
'write_binary_thermostats_nose'
2783 INTEGER :: handle, istat, nhc_size
2784 REAL(kind=
dp),
DIMENSION(:),
POINTER :: eta, fnhc, mnhc, veta
2786 CALL timeset(routinen, handle)
2793 CALL collect_nose_restart_info(nhc, para_env, eta, veta, fnhc, mnhc)
2795 nhc_size =
SIZE(eta)
2797 IF (output_unit > 0)
THEN
2798 WRITE (unit=output_unit, iostat=istat) section_label, nhc_size
2799 IF (istat /= 0)
CALL stop_write(
"nhc_size "// &
2800 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2802 n_char_size = n_char_size + len(section_label)
2803 n_int_size = n_int_size + 1
2804 IF (print_info .AND. log_unit > 0)
THEN
2805 WRITE (unit=log_unit, fmt=
"(T3,A,T71,I10)") &
2806 "NHC size ("//trim(adjustl(section_label))//
")", nhc_size
2809 WRITE (unit=output_unit, iostat=istat) eta(1:nhc_size)
2810 IF (istat /= 0)
CALL stop_write(
"eta(1:nhc_size) "// &
2811 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2813 n_dp_size = n_dp_size + nhc_size
2819 IF (output_unit > 0)
THEN
2820 WRITE (unit=output_unit, iostat=istat) veta(1:nhc_size)
2821 IF (istat /= 0)
CALL stop_write(
"veta(1:nhc_size) "// &
2822 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2824 n_dp_size = n_dp_size + nhc_size
2830 IF (output_unit > 0)
THEN
2831 WRITE (unit=output_unit, iostat=istat) mnhc(1:nhc_size)
2832 IF (istat /= 0)
CALL stop_write(
"mnhc(1:nhc_size) "// &
2833 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2835 n_dp_size = n_dp_size + nhc_size
2841 IF (output_unit > 0)
THEN
2842 WRITE (unit=output_unit, iostat=istat) fnhc(1:nhc_size)
2843 IF (istat /= 0)
CALL stop_write(
"fnhc(1:nhc_size) "// &
2844 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
2846 n_dp_size = n_dp_size + nhc_size
2851 CALL timestop(handle)
2853 END SUBROUTINE write_binary_thermostats_nose
2867 SUBROUTINE stop_write(object, unit_number)
2869 CHARACTER(LEN=*),
INTENT(IN) :: object
2870 INTEGER,
INTENT(IN) :: unit_number
2872 CHARACTER(LEN=2*default_path_length) :: message
2873 CHARACTER(LEN=default_path_length) :: file_name
2874 LOGICAL :: file_exists
2876 IF (unit_number >= 0)
THEN
2877 INQUIRE (unit=unit_number, exist=file_exists)
2879 file_exists = .false.
2881 IF (file_exists)
THEN
2882 INQUIRE (unit=unit_number, name=file_name)
2883 WRITE (unit=message, fmt=
"(A)") &
2884 "An error occurred writing data object <"//trim(adjustl(object))// &
2885 "> to file <"//trim(adjustl(file_name))//
">"
2887 WRITE (unit=message, fmt=
"(A,I0,A)") &
2888 "Could not write data object <"//trim(adjustl(object))// &
2889 "> to logical unit ", unit_number,
". The I/O unit does not exist."
2894 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)
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.