81 CHARACTER(LEN=*),
INTENT(IN) :: filename
85 INTEGER,
INTENT(IN) :: psf_type
87 CHARACTER(len=*),
PARAMETER :: routinen =
'read_topology_psf'
89 CHARACTER(LEN=2*default_string_length) :: psf_format
90 CHARACTER(LEN=3) :: c_int
91 CHARACTER(LEN=default_string_length) :: dummy_field, field, label, strtmp1, &
93 INTEGER :: handle, i, iatom, ibond, idum, index_now, iphi, itheta, iw, natom, natom_prev, &
94 nbond, nbond_prev, nphi, nphi_prev, ntheta, ntheta_prev, output_unit
105 extension=
".subsysLog")
106 CALL timeset(routinen, handle)
112 IF (
ASSOCIATED(atom_info%id_molname)) natom_prev =
SIZE(atom_info%id_molname)
116 IF (.NOT. found)
THEN
117 CALL cp_abort(__location__, &
118 "Missing PSF specification line in <"//trim(filename)//
">")
122 SELECT CASE (field(1:3))
126 psf_format =
'(I8,1X,A4,I5,1X,A4,1X,A4,1X,A4,1X,2G14.6,I8)'
131 psf_format =
'(I10,T12,A7,T21,I8,T30,A7,T39,A6,T47,A6,T53,F10.6,T69,F8.3,T88,I1)'
134 cpabort(
"PSF_INFO| "//field(1:3)//
" :: not available for UPSF format!")
137 cpabort(
"PSF_INFO| "//field(1:3)//
" :: Unimplemented keyword in CP2K PSF/UPSF format!")
140 IF (iw > 0)
WRITE (iw,
'(T2,A)')
'PSF_INFO| Parsing the NATOM section'
146 IF (.NOT. found)
THEN
147 IF (iw > 0)
WRITE (iw,
'(T2,A)')
'PSF_INFO| No NATOM section '
151 IF (natom_prev + natom >
topology%natoms)
THEN
152 CALL cp_abort(__location__, &
153 "Number of atoms in connectivity control is larger than the "// &
154 "number of atoms in coordinate control. check coordinates and "// &
157 IF (iw > 0)
WRITE (iw,
'(T2,A,'//trim(c_int)//
')')
'PSF_INFO| NATOM = ', natom
159 CALL reallocate(atom_info%id_molname, 1, natom_prev + natom)
160 CALL reallocate(atom_info%resid, 1, natom_prev + natom)
161 CALL reallocate(atom_info%id_resname, 1, natom_prev + natom)
162 CALL reallocate(atom_info%id_atmname, 1, natom_prev + natom)
163 CALL reallocate(atom_info%atm_charge, 1, natom_prev + natom)
164 CALL reallocate(atom_info%atm_mass, 1, natom_prev + natom)
168 index_now = iatom + natom_prev
170 READ (parser%input_line, fmt=*, err=9) i, &
172 atom_info%resid(index_now), &
176 atom_info%atm_charge(index_now), &
177 atom_info%atm_mass(index_now)
178 atom_info%id_molname(index_now) =
str2id(
s2s(strtmp1))
179 atom_info%id_resname(index_now) =
str2id(
s2s(strtmp2))
180 atom_info%id_atmname(index_now) =
str2id(
s2s(strtmp3))
184 index_now = iatom + natom_prev
186 READ (parser%input_line, fmt=psf_format) &
189 atom_info%resid(index_now), &
193 atom_info%atm_charge(index_now), &
194 atom_info%atm_mass(index_now), &
196 atom_info%id_molname(index_now) =
str2id(
s2s(strtmp1))
197 atom_info%id_resname(index_now) =
str2id(
s2s(strtmp2))
198 atom_info%id_atmname(index_now) =
str2id(
s2s(adjustl(strtmp3)))
207 IF (
ASSOCIATED(conn_info%bond_a)) nbond_prev =
SIZE(conn_info%bond_a)
209 IF (iw > 0)
WRITE (iw,
'(T2,A)')
'PSF_INFO| Parsing the NBOND section'
210 IF (iw > 0)
WRITE (iw,
'(T2,A,I8)')
'PSF_INFO| Previous number of allocated BOND: ', nbond_prev
213 IF (.NOT. found)
THEN
214 IF (iw > 0)
WRITE (iw,
'(T2,A)')
'PSF_INFO| No NBOND section '
218 IF (iw > 0)
WRITE (iw,
'(T2,A,'//trim(c_int)//
')')
'PSF_INFO| NBOND = ', nbond
220 CALL reallocate(conn_info%bond_a, 1, nbond_prev + nbond)
221 CALL reallocate(conn_info%bond_b, 1, nbond_prev + nbond)
224 DO ibond = 1, nbond, 4
226 index_now = nbond_prev + ibond - 1
227 READ (parser%input_line, fmt=*, err=9) (conn_info%bond_a(index_now + i), &
228 conn_info%bond_b(index_now + i), &
229 i=1, min(4, (nbond - ibond + 1)))
232 DO ibond = 1, nbond, 4
234 index_now = nbond_prev + ibond - 1
235 READ (parser%input_line, fmt=
'(8'//trim(c_int)//
')') &
236 (conn_info%bond_a(index_now + i), &
237 conn_info%bond_b(index_now + i), &
238 i=1, min(4, (nbond - ibond + 1)))
241 IF (any(conn_info%bond_a(nbond_prev + 1:) <= 0) .OR. &
242 any(conn_info%bond_a(nbond_prev + 1:) > natom) .OR. &
243 any(conn_info%bond_b(nbond_prev + 1:) <= 0) .OR. &
244 any(conn_info%bond_b(nbond_prev + 1:) > natom))
THEN
245 cpabort(
"topology_read, invalid bond")
247 conn_info%bond_a(nbond_prev + 1:) = conn_info%bond_a(nbond_prev + 1:) + natom_prev
248 conn_info%bond_b(nbond_prev + 1:) = conn_info%bond_b(nbond_prev + 1:) + natom_prev
254 IF (
ASSOCIATED(conn_info%theta_a)) ntheta_prev =
SIZE(conn_info%theta_a)
256 IF (iw > 0)
WRITE (iw,
'(T2,A)')
'PSF_INFO| Parsing the NTHETA section'
257 IF (iw > 0)
WRITE (iw,
'(T2,A,I8)')
'PSF_INFO| Previous number of allocated THETA: ', ntheta_prev
260 IF (.NOT. found)
THEN
261 IF (iw > 0)
WRITE (iw,
'(T2,A)')
'PSF_INFO| No NTHETA section '
265 IF (iw > 0)
WRITE (iw,
'(T2,A,'//trim(c_int)//
')')
'PSF_INFO| NTHETA = ', ntheta
267 CALL reallocate(conn_info%theta_a, 1, ntheta_prev + ntheta)
268 CALL reallocate(conn_info%theta_b, 1, ntheta_prev + ntheta)
269 CALL reallocate(conn_info%theta_c, 1, ntheta_prev + ntheta)
272 DO itheta = 1, ntheta, 3
274 index_now = ntheta_prev + itheta - 1
275 READ (parser%input_line, fmt=*, err=9) (conn_info%theta_a(index_now + i), &
276 conn_info%theta_b(index_now + i), &
277 conn_info%theta_c(index_now + i), &
278 i=1, min(3, (ntheta - itheta + 1)))
281 DO itheta = 1, ntheta, 3
283 index_now = ntheta_prev + itheta - 1
284 READ (parser%input_line, fmt=
'(9'//trim(c_int)//
')') &
285 (conn_info%theta_a(index_now + i), &
286 conn_info%theta_b(index_now + i), &
287 conn_info%theta_c(index_now + i), &
288 i=1, min(3, (ntheta - itheta + 1)))
291 conn_info%theta_a(ntheta_prev + 1:) = conn_info%theta_a(ntheta_prev + 1:) + natom_prev
292 conn_info%theta_b(ntheta_prev + 1:) = conn_info%theta_b(ntheta_prev + 1:) + natom_prev
293 conn_info%theta_c(ntheta_prev + 1:) = conn_info%theta_c(ntheta_prev + 1:) + natom_prev
299 IF (
ASSOCIATED(conn_info%phi_a)) nphi_prev =
SIZE(conn_info%phi_a)
301 IF (iw > 0)
WRITE (iw,
'(T2,A)')
'PSF_INFO| Parsing the NPHI section'
302 IF (iw > 0)
WRITE (iw,
'(T2,A,I8)')
'PSF_INFO| Previous number of allocated PHI: ', nphi_prev
305 IF (.NOT. found)
THEN
306 IF (iw > 0)
WRITE (iw,
'(T2,A)')
'PSF_INFO| No NPHI section '
310 IF (iw > 0)
WRITE (iw,
'(T2,A,'//trim(c_int)//
')')
'PSF_INFO| NPHI = ', nphi
312 CALL reallocate(conn_info%phi_a, 1, nphi_prev + nphi)
313 CALL reallocate(conn_info%phi_b, 1, nphi_prev + nphi)
314 CALL reallocate(conn_info%phi_c, 1, nphi_prev + nphi)
315 CALL reallocate(conn_info%phi_d, 1, nphi_prev + nphi)
320 index_now = nphi_prev + iphi - 1
321 READ (parser%input_line, fmt=*, err=9) (conn_info%phi_a(index_now + i), &
322 conn_info%phi_b(index_now + i), &
323 conn_info%phi_c(index_now + i), &
324 conn_info%phi_d(index_now + i), &
325 i=1, min(2, (nphi - iphi + 1)))
330 index_now = nphi_prev + iphi - 1
331 READ (parser%input_line, fmt=
'(8'//trim(c_int)//
')') &
332 (conn_info%phi_a(index_now + i), &
333 conn_info%phi_b(index_now + i), &
334 conn_info%phi_c(index_now + i), &
335 conn_info%phi_d(index_now + i), &
336 i=1, min(2, (nphi - iphi + 1)))
339 conn_info%phi_a(nphi_prev + 1:) = conn_info%phi_a(nphi_prev + 1:) + natom_prev
340 conn_info%phi_b(nphi_prev + 1:) = conn_info%phi_b(nphi_prev + 1:) + natom_prev
341 conn_info%phi_c(nphi_prev + 1:) = conn_info%phi_c(nphi_prev + 1:) + natom_prev
342 conn_info%phi_d(nphi_prev + 1:) = conn_info%phi_d(nphi_prev + 1:) + natom_prev
348 IF (
ASSOCIATED(conn_info%impr_a)) nphi_prev =
SIZE(conn_info%impr_a)
350 IF (iw > 0)
WRITE (iw,
'(T2,A)')
'PSF_INFO| Parsing the NIMPHI section'
351 IF (iw > 0)
WRITE (iw,
'(T2,A,I8)')
'PSF_INFO| Previous number of allocated IMPHI: ', nphi_prev
354 IF (.NOT. found)
THEN
355 IF (iw > 0)
WRITE (iw,
'(T2,A)')
'PSF_INFO| No NIMPHI section '
359 IF (iw > 0)
WRITE (iw,
'(T2,A,'//trim(c_int)//
')')
'PSF_INFO| NIMPR = ', nphi
361 CALL reallocate(conn_info%impr_a, 1, nphi_prev + nphi)
362 CALL reallocate(conn_info%impr_b, 1, nphi_prev + nphi)
363 CALL reallocate(conn_info%impr_c, 1, nphi_prev + nphi)
364 CALL reallocate(conn_info%impr_d, 1, nphi_prev + nphi)
369 index_now = nphi_prev + iphi - 1
370 READ (parser%input_line, fmt=*, err=9) (conn_info%impr_a(index_now + i), &
371 conn_info%impr_b(index_now + i), &
372 conn_info%impr_c(index_now + i), &
373 conn_info%impr_d(index_now + i), &
374 i=1, min(2, (nphi - iphi + 1)))
379 index_now = nphi_prev + iphi - 1
380 READ (parser%input_line, fmt=
'(8'//trim(c_int)//
')') &
381 (conn_info%impr_a(index_now + i), &
382 conn_info%impr_b(index_now + i), &
383 conn_info%impr_c(index_now + i), &
384 conn_info%impr_d(index_now + i), &
385 i=1, min(2, (nphi - iphi + 1)))
388 conn_info%impr_a(nphi_prev + 1:) = conn_info%impr_a(nphi_prev + 1:) + natom_prev
389 conn_info%impr_b(nphi_prev + 1:) = conn_info%impr_b(nphi_prev + 1:) + natom_prev
390 conn_info%impr_c(nphi_prev + 1:) = conn_info%impr_c(nphi_prev + 1:) + natom_prev
391 conn_info%impr_d(nphi_prev + 1:) = conn_info%impr_d(nphi_prev + 1:) + natom_prev
395 CALL timestop(handle)
397 "PRINT%TOPOLOGY_INFO/PSF_INFO")
401 IF (output_unit > 0)
THEN
402 WRITE (output_unit,
'(T2,A)') &
403 "PSF_INFO| Error while reading PSF using the unformatted PSF reading option!", &
404 "PSF_INFO| Try using PSF instead of UPSF."
407 cpabort(
"Error while reading PSF data!")
420 CHARACTER(len=*),
PARAMETER :: routinen =
'psf_post_process'
422 INTEGER :: handle, i, iatom, ibond, ionfo, iw, &
423 jatom, n, natom, nbond, nonfo, nphi, &
433 extension=
".subsysLog")
434 CALL timeset(routinen, handle)
443 IF (
ASSOCIATED(atom_info%id_molname)) natom =
SIZE(atom_info%id_molname)
444 IF (
ASSOCIATED(conn_info%bond_a)) nbond =
SIZE(conn_info%bond_a)
445 IF (
ASSOCIATED(conn_info%c_bond_a)) i =
SIZE(conn_info%c_bond_a)
447 iatom = conn_info%bond_a(ibond)
448 jatom = conn_info%bond_b(ibond)
450 IF ((atom_info%id_molname(iatom) /= atom_info%id_molname(jatom)) .OR. &
451 (atom_info%resid(iatom) /= atom_info%resid(jatom)) .OR. &
452 (atom_info%id_resname(iatom) /= atom_info%id_resname(jatom)))
THEN
453 IF (iw > 0)
WRITE (iw,
'(T2,A,2I6)')
"PSF_INFO| PARA_RES, bond between molecules atom ", &
458 conn_info%c_bond_a(i) = iatom
459 conn_info%c_bond_b(i) = jatom
462 cpassert(atom_info%id_molname(iatom) == atom_info%id_molname(jatom))
469 IF (
ASSOCIATED(conn_info%theta_a)) ntheta =
SIZE(conn_info%theta_a)
473 conn_info%ub_a(:) = conn_info%theta_a(:)
474 conn_info%ub_b(:) = conn_info%theta_b(:)
475 conn_info%ub_c(:) = conn_info%theta_c(:)
481 IF (
ASSOCIATED(conn_info%phi_a)) nphi =
SIZE(conn_info%phi_a)
484 conn_info%onfo_a(1:) = conn_info%phi_a(1:)
485 conn_info%onfo_b(1:) = conn_info%phi_d(1:)
487 ALLOCATE (ex_bond_list(natom))
489 ALLOCATE (ex_bond_list(i)%array1(0))
492 IF (
ASSOCIATED(conn_info%bond_a)) n =
SIZE(conn_info%bond_a)
495 ALLOCATE (ex_bend_list(natom))
497 ALLOCATE (ex_bend_list(i)%array1(0))
500 IF (
ASSOCIATED(conn_info%theta_a)) n =
SIZE(conn_info%theta_a)
504 IF (any(ex_bond_list(conn_info%onfo_a(ionfo))%array1 == conn_info%onfo_b(ionfo)) .OR. &
505 any(ex_bend_list(conn_info%onfo_a(ionfo))%array1 == conn_info%onfo_b(ionfo))) cycle
507 conn_info%onfo_a(nonfo) = conn_info%onfo_a(ionfo)
508 conn_info%onfo_b(nonfo) = conn_info%onfo_b(ionfo)
512 DEALLOCATE (ex_bend_list(i)%array1)
514 DEALLOCATE (ex_bend_list)
517 DEALLOCATE (ex_bond_list(i)%array1)
519 DEALLOCATE (ex_bond_list)
521 ALLOCATE (ex_bond_list(natom))
523 ALLOCATE (ex_bond_list(i)%array1(0))
526 IF (
ASSOCIATED(conn_info%onfo_a)) n = nonfo
530 DO ionfo = 1,
SIZE(ex_bond_list(i)%array1)
531 IF (count(ex_bond_list(i)%array1 == ex_bond_list(i)%array1(ionfo)) /= 1)
THEN
532 ex_bond_list(i)%array1(ionfo) = 0
534 IF (ex_bond_list(i)%array1(ionfo) <= i) cycle
536 conn_info%onfo_a(nonfo) = i
537 conn_info%onfo_b(nonfo) = ex_bond_list(i)%array1(ionfo)
542 DEALLOCATE (ex_bond_list(i)%array1)
544 DEALLOCATE (ex_bond_list)
548 CALL timestop(handle)
550 "PRINT%TOPOLOGY_INFO/PSF_INFO")
560 SUBROUTINE idm_psf(topology, section, subsys_section)
564 CHARACTER(len=*),
PARAMETER :: routinen =
'idm_psf'
566 INTEGER :: handle, i, iend, iend1, istart, istart1, &
567 item, iw, j, mol_id, n_rep, natom, &
568 nbond, nimpr, noe, nphi, ntheta
569 INTEGER,
DIMENSION(:),
POINTER :: tag_mols, tmp, wrk
580 extension=
".subsysLog")
581 CALL timeset(routinen, handle)
587 IF (
ASSOCIATED(atom_info%id_molname)) natom =
SIZE(atom_info%id_molname)
589 IF (
ASSOCIATED(conn_info%bond_a)) nbond =
SIZE(conn_info%bond_a)
591 IF (
ASSOCIATED(conn_info%theta_a)) ntheta =
SIZE(conn_info%theta_a)
593 IF (
ASSOCIATED(conn_info%phi_a)) nphi =
SIZE(conn_info%phi_a)
595 IF (
ASSOCIATED(conn_info%impr_a)) nimpr =
SIZE(conn_info%impr_a)
601 CALL reallocate(conn_info%bond_a, 1, n_rep + nbond)
602 CALL reallocate(conn_info%bond_b, 1, n_rep + nbond)
605 conn_info%bond_a(nbond + i) = tmp(1)
606 conn_info%bond_b(nbond + i) = tmp(2)
609 ALLOCATE (ex_bond_list(natom))
610 ALLOCATE (tag_mols(natom))
611 ALLOCATE (wrk(natom))
613 ALLOCATE (ex_bond_list(j)%array1(0))
615 CALL reorder_structure(ex_bond_list, conn_info%bond_a, conn_info%bond_b, nbond + n_rep)
620 IF (tag_mols(i) /= -1) cycle
625 IF (iw > 0)
WRITE (iw,
'(T2,A,I8)')
'PSF_INFO| Number of molecules detected after merging: ', mol_id
627 CALL sort(tag_mols, natom, wrk)
631 IF (tag_mols(i) == item) cycle
633 noe = iend - istart + 1
634 istart1 = minval(wrk(istart:iend))
635 iend1 = maxval(wrk(istart:iend))
636 cpassert(iend1 - istart1 + 1 == noe)
642 noe = iend - istart + 1
643 istart1 = minval(wrk(istart:iend))
644 iend1 = maxval(wrk(istart:iend))
645 cpassert(iend1 - istart1 + 1 == noe)
649 DEALLOCATE (ex_bond_list(i)%array1)
651 DEALLOCATE (ex_bond_list)
652 DEALLOCATE (tag_mols)
660 CALL reallocate(conn_info%theta_a, 1, n_rep + ntheta)
661 CALL reallocate(conn_info%theta_b, 1, n_rep + ntheta)
662 CALL reallocate(conn_info%theta_c, 1, n_rep + ntheta)
665 conn_info%theta_a(ntheta + i) = tmp(1)
666 conn_info%theta_b(ntheta + i) = tmp(2)
667 conn_info%theta_c(ntheta + i) = tmp(3)
675 CALL reallocate(conn_info%phi_a, 1, n_rep + nphi)
676 CALL reallocate(conn_info%phi_b, 1, n_rep + nphi)
677 CALL reallocate(conn_info%phi_c, 1, n_rep + nphi)
678 CALL reallocate(conn_info%phi_d, 1, n_rep + nphi)
681 conn_info%phi_a(nphi + i) = tmp(1)
682 conn_info%phi_b(nphi + i) = tmp(2)
683 conn_info%phi_c(nphi + i) = tmp(3)
684 conn_info%phi_d(nphi + i) = tmp(4)
692 CALL reallocate(conn_info%impr_a, 1, n_rep + nimpr)
693 CALL reallocate(conn_info%impr_b, 1, n_rep + nimpr)
694 CALL reallocate(conn_info%impr_c, 1, n_rep + nimpr)
695 CALL reallocate(conn_info%impr_d, 1, n_rep + nimpr)
698 conn_info%impr_a(nimpr + i) = tmp(1)
699 conn_info%impr_b(nimpr + i) = tmp(2)
700 conn_info%impr_c(nimpr + i) = tmp(3)
701 conn_info%impr_d(nimpr + i) = tmp(4)
705 CALL timestop(handle)
707 "PRINT%TOPOLOGY_INFO/PSF_INFO")
720 INTEGER,
INTENT(IN) :: file_unit
724 CHARACTER(len=*),
PARAMETER :: routinen =
'write_topology_psf'
726 CHARACTER(LEN=2*default_string_length) :: psf_format
727 CHARACTER(LEN=default_path_length) :: record
728 CHARACTER(LEN=default_string_length) :: c_int, my_tag1, my_tag2, my_tag3
729 CHARACTER(LEN=default_string_length), &
730 DIMENSION(:),
POINTER :: charge_atm
731 INTEGER :: handle, i, iw, j, my_index, nchg
732 LOGICAL :: explicit, ldum
733 REAL(kind=
dp),
DIMENSION(:),
POINTER :: charge_inp, charges
743 extension=
".subsysLog")
744 CALL timeset(routinen, handle)
751 charges = atom_info%atm_charge
753 NULLIFY (tmp_section)
757 ALLOCATE (charge_atm(nchg))
758 ALLOCATE (charge_inp(nchg))
761 record =
id2str(atom_info%id_atmname(j))
765 IF (record == charge_atm(i))
THEN
766 charges(j) = charge_inp(i)
771 DEALLOCATE (charge_atm)
772 DEALLOCATE (charge_inp)
776 IF (charges(j) == -huge(0.0_dp)) charges(j) = -99.0_dp
779 extension=
".psf", my_local=.false.)
782 psf_format =
'(I10,T12,A,T21,I0,T30,A,T39,A,T47,A,T53,F10.6,T69,F8.3,T88,I1)'
783 IF (iw > 0)
WRITE (iw,
'(T2,A)') &
784 "PSF_WRITE| Writing out PSF file with CHARMM31 EXTErnal format: ", trim(record)
786 WRITE (file_unit, fmt=
'(A)')
"PSF EXT"
787 WRITE (file_unit, fmt=
'(A)')
""
788 WRITE (file_unit, fmt=
'('//trim(c_int)//
',A)') 1,
" !NTITLE"
789 WRITE (file_unit, fmt=
'(A)')
" CP2K generated DUMP of connectivity"
790 WRITE (file_unit, fmt=
'(A)')
""
792 WRITE (file_unit, fmt=
'('//trim(c_int)//
',A)')
topology%natoms,
" !NATOM"
795 my_tag1 =
id2str(atom_info%id_molname(i))
796 my_tag2 =
id2str(atom_info%id_resname(i))
797 my_tag3 =
id2str(atom_info%id_atmname(i))
801 WRITE (file_unit, fmt=psf_format) &
809 atom_info%atm_mass(i), &
812 IF ((atom_info%map_mol_num(i) /= atom_info%map_mol_num(i - 1)) .OR. &
813 (atom_info%map_mol_res(i) /= atom_info%map_mol_res(i - 1))) my_index = my_index + 1
814 my_tag1 =
id2str(atom_info%id_molname(i))
815 my_tag2 =
id2str(atom_info%id_resname(i))
816 my_tag3 =
id2str(atom_info%id_atmname(i))
820 WRITE (file_unit, fmt=psf_format) &
828 atom_info%atm_mass(i), &
831 WRITE (file_unit, fmt=
'(/)')
834 WRITE (file_unit, fmt=
'('//trim(c_int)//
',A)')
SIZE(conn_info%bond_a),
" !NBOND"
835 DO i = 1,
SIZE(conn_info%bond_a), 4
837 DO WHILE ((j < 4) .AND. ((i + j) <=
SIZE(conn_info%bond_a)))
838 WRITE (file_unit, fmt=
'(2('//trim(c_int)//
'))', advance=
"NO") &
839 conn_info%bond_a(i + j), conn_info%bond_b(i + j)
842 WRITE (file_unit, fmt=
'(/)', advance=
"NO")
844 WRITE (file_unit, fmt=
'(/)')
846 WRITE (file_unit, fmt=
'('//trim(c_int)//
',A)')
SIZE(conn_info%theta_a),
" !NTHETA"
847 DO i = 1,
SIZE(conn_info%theta_a), 3
849 DO WHILE ((j < 3) .AND. ((i + j) <=
SIZE(conn_info%theta_a)))
850 WRITE (file_unit, fmt=
'(3('//trim(c_int)//
'))', advance=
"NO") &
851 conn_info%theta_a(i + j), conn_info%theta_b(i + j), &
852 conn_info%theta_c(i + j)
855 WRITE (file_unit, fmt=
'(/)', advance=
"NO")
857 WRITE (file_unit, fmt=
'(/)')
859 WRITE (file_unit, fmt=
'('//trim(c_int)//
',A)')
SIZE(conn_info%phi_a),
" !NPHI"
860 DO i = 1,
SIZE(conn_info%phi_a), 2
862 DO WHILE ((j < 2) .AND. ((i + j) <=
SIZE(conn_info%phi_a)))
863 WRITE (file_unit, fmt=
'(4('//trim(c_int)//
'))', advance=
"NO") &
864 conn_info%phi_a(i + j), conn_info%phi_b(i + j), &
865 conn_info%phi_c(i + j), conn_info%phi_d(i + j)
868 WRITE (file_unit, fmt=
'(/)', advance=
"NO")
870 WRITE (file_unit, fmt=
'(/)')
872 WRITE (file_unit, fmt=
'('//trim(c_int)//
',A)')
SIZE(conn_info%impr_a),
" !NIMPHI"
873 DO i = 1,
SIZE(conn_info%impr_a), 2
875 DO WHILE ((j < 2) .AND. ((i + j) <=
SIZE(conn_info%impr_a)))
876 WRITE (file_unit, fmt=
'(4('//trim(c_int)//
'))', advance=
"NO") &
877 conn_info%impr_a(i + j), conn_info%impr_b(i + j), &
878 conn_info%impr_c(i + j), conn_info%impr_d(i + j)
881 WRITE (file_unit, fmt=
'(/)', advance=
"NO")
883 WRITE (file_unit, fmt=
'(/)')
885 WRITE (file_unit, fmt=
'('//trim(c_int)//
',A)') 0,
" !NDON"
886 WRITE (file_unit, fmt=
'(/)')
887 WRITE (file_unit, fmt=
'('//trim(c_int)//
',A)') 0,
" !NACC"
888 WRITE (file_unit, fmt=
'(/)')
889 WRITE (file_unit, fmt=
'('//trim(c_int)//
',A)') 0,
" !NNB"
890 WRITE (file_unit, fmt=
'(/)')
893 "PRINT%TOPOLOGY_INFO/PSF_INFO")
894 CALL timestop(handle)