41#include "./base/base_uses.f90"
47 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_binary_restarts'
70 subsys_section, binary_file_read)
76 LOGICAL,
INTENT(OUT) :: binary_file_read
78 CHARACTER(LEN=*),
PARAMETER :: routinen =
'read_binary_coordinates'
80 CHARACTER(LEN=default_path_length) :: binary_restart_file_name
81 CHARACTER(LEN=default_string_length) :: string
82 INTEGER :: binary_restart_file_unit, handle, iatom, &
83 ikind, istat, iw, natom, natomkind, &
84 ncore, nmolecule, nmoleculekind, nshell
85 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: ibuf, id_name
89 CALL timeset(routinen, handle)
92 cpassert(
ASSOCIATED(root_section))
93 cpassert(
ASSOCIATED(para_env))
94 cpassert(
ASSOCIATED(subsys_section))
97 binary_file_read = .false.
100 c_val=binary_restart_file_name)
102 IF (trim(adjustl(binary_restart_file_name)) ==
"")
THEN
103 CALL timestop(handle)
108 extension=
".subsysLog")
118 IF (para_env%is_source())
THEN
119 CALL open_file(file_name=binary_restart_file_name, &
121 file_form=
"UNFORMATTED", &
122 file_action=
"READWRITE", &
123 file_position=
"REWIND", &
124 unit_number=binary_restart_file_unit, &
126 READ (unit=binary_restart_file_unit, iostat=istat) &
127 natomkind, natom, ncore, nshell, nmoleculekind, nmolecule
129 CALL stop_read(
"natomkind,natom,ncore,nshell,nmoleculekind,nmolecule "// &
130 "(IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
131 binary_restart_file_unit)
134 WRITE (unit=iw, fmt=
"(T2,A,T71,I10)") &
135 "Number of atomic kinds:", natomkind, &
136 "Number of atoms:", natom, &
137 "Number of cores (only core-shell model):", ncore, &
138 "Number of shells (only core-shell model):", nshell, &
139 "Number of molecule kinds:", nmoleculekind, &
140 "Number of molecules", nmolecule
144 CALL para_env%bcast(natomkind)
145 CALL para_env%bcast(natom)
146 CALL para_env%bcast(ncore)
147 CALL para_env%bcast(nshell)
148 CALL para_env%bcast(nmoleculekind)
149 CALL para_env%bcast(nmolecule)
151 ALLOCATE (id_name(natomkind))
153 DO ikind = 1, natomkind
154 IF (para_env%is_source())
THEN
155 READ (unit=binary_restart_file_unit, iostat=istat) string
156 IF (istat /= 0)
CALL stop_read(
"string (IOSTAT = "// &
158 binary_restart_file_unit)
160 CALL para_env%bcast(string)
161 id_name(ikind) =
str2id(string)
166 ALLOCATE (atom_info%id_molname(natom))
167 atom_info%id_molname(:) = 0
168 ALLOCATE (atom_info%id_resname(natom))
169 atom_info%id_resname(:) = 0
170 ALLOCATE (atom_info%resid(natom))
172 ALLOCATE (atom_info%id_atmname(natom))
173 atom_info%id_atmname = 0
174 ALLOCATE (atom_info%r(3, natom))
175 atom_info%r(:, :) = 0.0_dp
176 ALLOCATE (atom_info%atm_mass(natom))
177 atom_info%atm_mass(:) = huge(0.0_dp)
178 ALLOCATE (atom_info%atm_charge(natom))
179 atom_info%atm_charge(:) = -huge(0.0_dp)
180 ALLOCATE (atom_info%occup(natom))
181 atom_info%occup(:) = 0.0_dp
182 ALLOCATE (atom_info%beta(natom))
183 atom_info%beta(:) = 0.0_dp
184 ALLOCATE (atom_info%id_element(natom))
185 atom_info%id_element(:) = 0
186 ALLOCATE (ibuf(natom))
189 IF (para_env%is_source())
THEN
190 READ (unit=binary_restart_file_unit, iostat=istat) ibuf(1:natom)
191 IF (istat /= 0)
CALL stop_read(
"ibuf (IOSTAT = "// &
193 binary_restart_file_unit)
195 CALL para_env%bcast(ibuf)
198 atom_info%id_atmname(iatom) = id_name(ikind)
199 atom_info%id_element(iatom) = id_name(ikind)
204 IF (para_env%is_source())
THEN
205 READ (unit=binary_restart_file_unit, iostat=istat) atom_info%r(1:3, 1:natom)
206 IF (istat /= 0)
CALL stop_read(
"atom_info%r(1:3,1:natom) (IOSTAT = "// &
208 binary_restart_file_unit)
210 CALL para_env%bcast(atom_info%r)
211 IF (
ASSOCIATED(
topology%cell_muc))
THEN
218 IF (nmolecule > 0)
THEN
219 ALLOCATE (id_name(nmoleculekind))
221 DO ikind = 1, nmoleculekind
222 IF (para_env%is_source())
THEN
223 READ (unit=binary_restart_file_unit, iostat=istat) string
224 IF (istat /= 0)
CALL stop_read(
"string (IOSTAT = "// &
226 binary_restart_file_unit)
228 CALL para_env%bcast(string)
229 id_name(ikind) =
str2id(string)
232 IF (para_env%is_source())
THEN
233 READ (unit=binary_restart_file_unit, iostat=istat) ibuf(1:natom)
234 IF (istat /= 0)
CALL stop_read(
"ibuf(1:natom) (IOSTAT = "// &
236 binary_restart_file_unit)
238 CALL para_env%bcast(ibuf)
241 atom_info%id_molname(iatom) = id_name(ikind)
245 IF (para_env%is_source())
THEN
246 READ (unit=binary_restart_file_unit, iostat=istat) atom_info%resid(1:natom)
247 IF (istat /= 0)
CALL stop_read(
"atom_info%resid(1:natom) (IOSTAT = "// &
249 binary_restart_file_unit)
251 CALL para_env%bcast(atom_info%resid)
260 topology%molname_generated = .false.
264 WRITE (unit=iw, fmt=
"(T2,A)") &
265 "BEGIN of COORD section data [Angstrom] read in binary format from file "// &
266 trim(binary_restart_file_name)
268 WRITE (unit=iw, fmt=
"(T2,A2,3(1X,ES25.16),2(1X,A))") &
269 trim(adjustl(
id2str(atom_info%id_atmname(iatom)))), &
271 trim(adjustl(
id2str(atom_info%id_molname(iatom)))), &
272 trim(adjustl(
id2str(atom_info%id_resname(iatom))))
274 WRITE (unit=iw, fmt=
"(T2,A)") &
275 "END of COORD section data [Angstrom] read from binary restart file "// &
276 trim(binary_restart_file_name)
281 binary_file_read = .true.
283 CALL timestop(handle)
302 subsys_section, binary_file_read, cell)
304 CHARACTER(LEN=*),
INTENT(IN) :: prefix
307 LOGICAL,
INTENT(OUT) :: binary_file_read
308 TYPE(
cell_type),
OPTIONAL,
POINTER :: cell
310 CHARACTER(LEN=*),
PARAMETER :: routinen =
'read_binary_cs_coordinates'
312 CHARACTER(LEN=default_path_length) :: binary_restart_file_name, message
313 CHARACTER(LEN=default_string_length) :: section_label, section_name
314 INTEGER :: binary_restart_file_unit, handle, &
315 iparticle, istat, iw, nbuf, nparticle
316 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: ibuf
317 LOGICAL :: exit_routine
318 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: rbuf
322 CALL timeset(routinen, handle)
325 cpassert(
ASSOCIATED(root_section))
326 cpassert(
ASSOCIATED(subsys_section))
328 para_env => logger%para_env
330 binary_file_read = .false.
332 IF (
ASSOCIATED(particle_set))
THEN
333 exit_routine = .false.
334 nparticle =
SIZE(particle_set)
336 exit_routine = .true.
341 c_val=binary_restart_file_name)
343 IF (trim(adjustl(binary_restart_file_name)) ==
"")
THEN
344 CALL timestop(handle)
349 extension=
".subsysLog")
351 section_name = prefix//
" COORDINATES"
354 IF (para_env%is_source())
THEN
355 CALL open_file(file_name=trim(binary_restart_file_name), &
357 file_form=
"UNFORMATTED", &
358 file_action=
"READWRITE", &
359 file_position=
"ASIS", &
360 unit_number=binary_restart_file_unit, &
362 READ (unit=binary_restart_file_unit, iostat=istat) section_label, nbuf
363 IF (istat /= 0)
CALL stop_read(
"section_label, nbuf -> "//trim(section_label)//
", "// &
365 " (IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
"). "// &
366 "Section "//trim(adjustl(section_name))//
" was expected.", &
367 binary_restart_file_unit)
368 IF (trim(section_label) == trim(section_name))
THEN
369 IF (nbuf /= nparticle)
THEN
371 message =
"INFO: The requested number of "//trim(section_name)//
" ("// &
372 trim(adjustl(
cp_to_string(nparticle)))//
") does not match the "// &
373 "number ("//trim(adjustl(
cp_to_string(nbuf)))//
") available from the "// &
374 "binary restart file <"//trim(binary_restart_file_name)// &
375 ">. The restart file information is ignored."
381 ALLOCATE (rbuf(3, nbuf))
382 READ (unit=binary_restart_file_unit, iostat=istat) rbuf(1:3, 1:nbuf)
383 IF (istat /= 0)
CALL stop_read(
"rbuf(1:3,1:nbuf) -> "//prefix// &
384 " coordinates (IOSTAT = "// &
386 binary_restart_file_unit)
388 ALLOCATE (ibuf(nbuf))
389 READ (unit=binary_restart_file_unit, iostat=istat) ibuf(1:nbuf)
390 IF (istat /= 0)
CALL stop_read(
"ibuf(1:nparticle) -> atomic indices of the "// &
391 trim(section_name)//
" (IOSTAT = "// &
393 binary_restart_file_unit)
396 exit_routine = .true.
399 WRITE (unit=iw, fmt=
"(T2,A,T71,I10)") &
400 "Number of "//prefix//
" particles:", nparticle
402 IF (nparticle == 0) exit_routine = .true.
405 CALL cp_abort(__location__, &
406 "Section label <"//trim(section_label)//
"> read from the "// &
407 "binary restart file <"//trim(binary_restart_file_name)// &
408 "> does not match the requested section name <"// &
409 trim(section_name)//
">.")
413 CALL para_env%bcast(exit_routine)
414 IF (exit_routine)
THEN
416 CALL timestop(handle)
420 cpassert(nparticle > 0)
422 ALLOCATE (rbuf(3, nparticle))
424 IF (para_env%is_source())
THEN
425 READ (unit=binary_restart_file_unit, iostat=istat) rbuf(1:3, 1:nparticle)
426 IF (istat /= 0)
CALL stop_read(
"rbuf(1:3,1:nparticle) -> "//prefix// &
427 " coordinates (IOSTAT = "// &
429 binary_restart_file_unit)
431 CALL para_env%bcast(rbuf)
433 DO iparticle = 1, nparticle
434 particle_set(iparticle)%r(1:3) = rbuf(1:3, iparticle)
435 IF (
PRESENT(cell))
THEN
442 ALLOCATE (ibuf(nparticle))
444 IF (para_env%is_source())
THEN
445 READ (unit=binary_restart_file_unit, iostat=istat) ibuf(1:nparticle)
446 IF (istat /= 0)
CALL stop_read(
"ibuf(1:nparticle) -> atomic indices of the "// &
447 trim(section_name)//
" (IOSTAT = "// &
449 binary_restart_file_unit)
452 CALL para_env%bcast(ibuf)
454 DO iparticle = 1, nparticle
455 particle_set(iparticle)%atom_index = ibuf(iparticle)
461 WRITE (unit=iw, fmt=
"(T2,A)") &
462 "BEGIN of "//trim(adjustl(section_name))// &
463 " section data [Angstrom] read in binary format from file "// &
464 trim(binary_restart_file_name)
465 DO iparticle = 1, nparticle
466 WRITE (unit=iw, fmt=
"(T2,A2,3(1X,ES25.16),1X,I0)") &
467 trim(adjustl(particle_set(iparticle)%atomic_kind%name)), &
468 particle_set(iparticle)%r(1:3)*
angstrom, &
469 particle_set(iparticle)%atom_index
471 WRITE (unit=iw, fmt=
"(T2,A)") &
472 "END of "//trim(adjustl(section_name))// &
473 " section data [Angstrom] read from binary restart file "// &
474 trim(binary_restart_file_name)
479 binary_file_read = .true.
481 CALL timestop(handle)
501 subsys_section, binary_file_read, cell)
503 CHARACTER(LEN=*),
INTENT(IN) :: prefix
508 LOGICAL,
INTENT(OUT) :: binary_file_read
509 TYPE(
cell_type),
OPTIONAL,
POINTER :: cell
511 CHARACTER(LEN=*),
PARAMETER :: routinen =
'read_binary_velocities'
513 CHARACTER(LEN=default_path_length) :: binary_restart_file_name, message
514 CHARACTER(LEN=default_string_length) :: section_label, section_name
515 INTEGER :: binary_restart_file_unit, handle, i, &
516 iparticle, istat, iw, nbuf, nparticle
517 LOGICAL :: have_velocities
518 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: rbuf
521 CALL timeset(routinen, handle)
524 cpassert(
ASSOCIATED(root_section))
525 cpassert(
ASSOCIATED(para_env))
526 cpassert(
ASSOCIATED(subsys_section))
529 binary_file_read = .false.
532 c_val=binary_restart_file_name)
534 IF (trim(adjustl(binary_restart_file_name)) ==
"")
THEN
535 CALL timestop(handle)
540 extension=
".subsysLog")
542 IF (len_trim(prefix) == 0)
THEN
543 section_name =
"VELOCITIES"
545 section_name = prefix//
" VELOCITIES"
548 have_velocities = .false.
550 IF (
ASSOCIATED(particle_set))
THEN
551 nparticle =
SIZE(particle_set)
558 IF (para_env%is_source())
THEN
559 CALL open_file(file_name=binary_restart_file_name, &
561 file_form=
"UNFORMATTED", &
562 file_action=
"READWRITE", &
563 file_position=
"ASIS", &
564 unit_number=binary_restart_file_unit, &
567 READ (unit=binary_restart_file_unit, iostat=istat) section_label, nbuf
568 IF (istat /= 0)
CALL stop_read(
"section_label, nbuf -> "//trim(section_label)//
", "// &
570 " (IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
"). "// &
571 "Section "//trim(adjustl(section_name))//
" was expected.", &
572 binary_restart_file_unit)
573 IF (index(section_label,
"THERMOSTAT") > 0)
THEN
576 ALLOCATE (rbuf(nbuf, 1))
579 READ (unit=binary_restart_file_unit, iostat=istat) rbuf(1:nbuf, 1)
580 IF (istat /= 0)
CALL stop_read(
"rbuf(1:nbuf,1) -> "// &
581 trim(adjustl(section_label))// &
582 " (IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
583 binary_restart_file_unit)
587 message =
"INFO: Ignoring section <"//trim(adjustl(section_label))// &
588 "> from binary restart file <"//trim(binary_restart_file_name)//
">."
593 ELSE IF (index(section_label,
"VELOCIT") == 0)
THEN
594 CALL cp_abort(__location__, &
595 "Section label <"//trim(section_label)//
"> read from the "// &
596 "binary restart file <"//trim(binary_restart_file_name)// &
597 "> does not match the requested section name <"// &
598 trim(section_name)//
">.")
600 IF (nbuf > 0) have_velocities = .true.
606 CALL para_env%bcast(nbuf)
607 CALL para_env%bcast(have_velocities)
609 IF (have_velocities)
THEN
611 ALLOCATE (rbuf(3, nbuf))
613 IF (para_env%is_source())
THEN
614 READ (unit=binary_restart_file_unit, iostat=istat) rbuf(1:3, 1:nbuf)
615 IF (istat /= 0)
CALL stop_read(
"rbuf(1:3,1:nbuf) -> "// &
616 trim(adjustl(section_name))// &
617 " (IOSTAT = "//trim(adjustl(
cp_to_string(istat)))//
")", &
618 binary_restart_file_unit)
621 IF (nbuf == nparticle)
THEN
622 CALL para_env%bcast(rbuf)
623 DO iparticle = 1, nparticle
624 particle_set(iparticle)%v(1:3) = rbuf(1:3, iparticle)
625 IF (
PRESENT(cell))
THEN
631 message =
"INFO: The requested number of "//trim(adjustl(section_name))// &
632 " ("//trim(adjustl(
cp_to_string(nparticle)))//
") does not match the "// &
633 "number ("//trim(adjustl(
cp_to_string(nbuf)))//
") available from the "// &
634 "binary restart file <"//trim(binary_restart_file_name)// &
635 ">. The restart file information is ignored."
644 IF (nbuf == nparticle)
THEN
646 WRITE (unit=iw, fmt=
"(T2,A)") &
647 "BEGIN of "//trim(adjustl(section_name))// &
648 " section data [a.u.] read in binary format from file "// &
649 trim(binary_restart_file_name)
650 IF (have_velocities)
THEN
651 DO iparticle = 1, nparticle
652 WRITE (unit=iw, fmt=
"(T2,A2,3(1X,ES25.16))") &
653 trim(adjustl(particle_set(iparticle)%atomic_kind%name)), &
654 particle_set(iparticle)%v(1:3)
657 WRITE (unit=iw, fmt=
"(A)") &
658 "# No "//trim(adjustl(section_name))//
" available"
660 WRITE (unit=iw, fmt=
"(T2,A)") &
661 "END of "//trim(adjustl(section_name))// &
662 " section data [a.u.] read from binary restart file "// &
663 trim(binary_restart_file_name)
665 binary_file_read = .true.
670 CALL timestop(handle)
690 CHARACTER(LEN=*),
INTENT(IN) :: prefix
692 CHARACTER(LEN=*),
INTENT(IN) :: binary_restart_file_name
693 LOGICAL,
INTENT(OUT) :: restart
696 CHARACTER(LEN=*),
PARAMETER :: routinen =
'read_binary_thermostats_nose'
698 CHARACTER(LEN=default_string_length) :: section_label, section_name
699 INTEGER :: binary_restart_file_unit, handle, i, &
700 idx, istat, j, nhc_size, output_unit
702 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: rbuf
705 CALL timeset(routinen, handle)
707 cpassert(
ASSOCIATED(nhc))
708 cpassert(
ASSOCIATED(para_env))
723 section_name = prefix//
" THERMOSTATS"
726 IF (para_env%is_source())
THEN
727 CALL open_file(file_name=binary_restart_file_name, &
729 file_form=
"UNFORMATTED", &
730 file_action=
"READWRITE", &
731 file_position=
"ASIS", &
732 unit_number=binary_restart_file_unit, &
734 READ (unit=binary_restart_file_unit, iostat=istat) section_label, nhc_size
735 IF (istat /= 0)
CALL stop_read(
"nhc_size (IOSTAT = "// &
737 binary_restart_file_unit)
738 IF (index(section_label,
"THERMOSTAT") == 0)
THEN
739 CALL cp_abort(__location__, &
740 "Section label <"//trim(section_label)//
"> read from the "// &
741 "binary restart file <"//trim(binary_restart_file_name)// &
742 "> does not match the requested section name <"// &
743 trim(section_name)//
">.")
745 IF (debug .AND. output_unit > 0)
THEN
746 WRITE (unit=output_unit, fmt=
"(T2,A,/,T2,A,I0)") &
747 "BEGIN of "//trim(adjustl(section_label))// &
748 " section data read in binary format from file "// &
749 trim(binary_restart_file_name), &
750 "# nhc_size = ", nhc_size
754 CALL para_env%bcast(nhc_size)
756 IF (nhc_size > 0)
THEN
758 ALLOCATE (rbuf(nhc_size))
762 IF (para_env%is_source())
THEN
763 READ (unit=binary_restart_file_unit, iostat=istat) rbuf(1:nhc_size)
764 IF (istat /= 0)
CALL stop_read(
"eta -> rbuf (IOSTAT = "// &
766 binary_restart_file_unit)
767 IF (debug .AND. output_unit > 0)
THEN
768 WRITE (unit=output_unit, fmt=
"(T2,A,/,(4(1X,ES25.16)))") &
769 "&COORD", rbuf(1:nhc_size)
772 CALL para_env%bcast(rbuf)
773 DO i = 1,
SIZE(nhc%nvt, 2)
774 idx = (nhc%map_info%index(i) - 1)*nhc%nhc_len
775 DO j = 1,
SIZE(nhc%nvt, 1)
777 nhc%nvt(j, i)%eta = rbuf(
idx)
782 IF (para_env%is_source())
THEN
783 READ (unit=binary_restart_file_unit, iostat=istat) rbuf(1:nhc_size)
784 IF (istat /= 0)
CALL stop_read(
"veta -> rbuf (IOSTAT = "// &
786 binary_restart_file_unit)
787 IF (debug .AND. output_unit > 0)
THEN
788 WRITE (unit=output_unit, fmt=
"(T2,A,/,(4(1X,ES25.16)))") &
789 "&VELOCITY", rbuf(1:nhc_size)
792 CALL para_env%bcast(rbuf)
793 DO i = 1,
SIZE(nhc%nvt, 2)
794 idx = (nhc%map_info%index(i) - 1)*nhc%nhc_len
795 DO j = 1,
SIZE(nhc%nvt, 1)
797 nhc%nvt(j, i)%v = rbuf(
idx)
802 IF (para_env%is_source())
THEN
803 READ (unit=binary_restart_file_unit, iostat=istat) rbuf(1:nhc_size)
804 IF (istat /= 0)
CALL stop_read(
"mnhc -> rbuf (IOSTAT = "// &
806 binary_restart_file_unit)
807 IF (debug .AND. output_unit > 0)
THEN
808 WRITE (unit=output_unit, fmt=
"(T2,A,/,(4(1X,ES25.16)))") &
809 "&MASS:", rbuf(1:nhc_size)
812 CALL para_env%bcast(rbuf)
813 DO i = 1,
SIZE(nhc%nvt, 2)
814 idx = (nhc%map_info%index(i) - 1)*nhc%nhc_len
815 DO j = 1,
SIZE(nhc%nvt, 1)
817 nhc%nvt(j, i)%mass = rbuf(
idx)
822 IF (para_env%is_source())
THEN
823 READ (unit=binary_restart_file_unit, iostat=istat) rbuf(1:nhc_size)
824 IF (istat /= 0)
CALL stop_read(
"fnhc -> rbuf (IOSTAT = "// &
826 binary_restart_file_unit)
827 IF (debug .AND. output_unit > 0)
THEN
828 WRITE (unit=output_unit, fmt=
"(T2,A,/,(4(1X,ES25.16)))") &
829 "&FORCE", rbuf(1:nhc_size)
832 CALL para_env%bcast(rbuf)
833 DO i = 1,
SIZE(nhc%nvt, 2)
834 idx = (nhc%map_info%index(i) - 1)*nhc%nhc_len
835 DO j = 1,
SIZE(nhc%nvt, 1)
837 nhc%nvt(j, i)%f = rbuf(
idx)
847 IF (para_env%is_source())
THEN
848 IF (debug .AND. output_unit > 0)
THEN
849 WRITE (unit=output_unit, fmt=
"(T2,A)") &
850 "END of"//trim(adjustl(section_label))// &
851 " section data read in binary format from file "// &
852 trim(binary_restart_file_name)
857 CALL timestop(handle)
873 SUBROUTINE stop_read(object, unit_number)
874 CHARACTER(LEN=*),
INTENT(IN) :: object
875 INTEGER,
INTENT(IN) :: unit_number
877 CHARACTER(LEN=2*default_path_length) :: message
878 CHARACTER(LEN=default_path_length) :: file_name
881 IF (unit_number >= 0)
THEN
887 INQUIRE (unit=unit_number, name=file_name)
888 WRITE (unit=message, fmt=
"(A)") &
889 "An error occurred reading data object <"//trim(adjustl(object))// &
890 "> from file <"//trim(adjustl(file_name))//
">"
892 WRITE (unit=message, fmt=
"(A,I0,A)") &
893 "Could not read data object <"//trim(adjustl(object))// &
894 "> from logical unit ", unit_number,
". The I/O unit does not exist."
899 END SUBROUTINE stop_read
static GRID_HOST_DEVICE int idx(const orbital a)
Return coset index of given orbital angular momentum.
Handles all functions related to the CELL.
subroutine, public cell_transform_input_cartesian(cell, vector)
Transform a Cartesian real-space vector from the user input cell frame into CP2K's canonical internal...
Utility routines to open and close files.
logical function, public file_exists(file_name)
Checks if a file exists, considering also the file discovery mechanism.
subroutine, public open_file(file_name, unit_number, file_status, file_form, file_action, file_position, file_pad, file_access, debug)
Opens a file and returns its logical unit number.
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, parameter, public debug_print_level
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, file_access)
...
Lumps all possible extended system variables into one type for easy access and passing.
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public default_path_length
Interface to the message passing library MPI.
Define the data structure for the particle information.
Definition of physical constants:
real(kind=dp), parameter, public angstrom
Perform an abnormal program termination.
subroutine, public print_message(message, output_unit, declev, before, after)
Perform a basic blocking of the text in message and print it optionally decorated with a frame of sta...
generates a unique id number for a string (str2id) that can be used two compare two strings....
character(len=default_string_length) function, public s2s(str)
converts a string in a string of default_string_length
integer function, public str2id(str)
returns a unique id for a given string, and stores the string for later retrieval using the id.
character(len=default_string_length) function, public id2str(id)
returns the string associated with a given id
Control for reading in different topologies and coordinates.
Type defining parameters related to the simulation cell.
type of a logger, at the moment it contains just a print level starting at which level it should be l...
stores all the informations relevant to an mpi environment