105 CHARACTER(len=*),
PARAMETER :: routinen =
'read_coordinate_crd'
107 CHARACTER(LEN=default_string_length) :: string
108 INTEGER :: handle, iw, j, natom
109 LOGICAL :: my_end, setup_velocities
110 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: velocity
116 NULLIFY (logger, velocity)
119 extension=
".subsysLog")
120 CALL timeset(routinen, handle)
123 IF (iw > 0)
WRITE (iw, *)
" Reading in CRD file ", trim(
topology%coord_file_name)
126 IF (iw > 0)
WRITE (iw,
'(T2,A)')
'CRD_INFO| Parsing the TITLE section'
132 IF (iw > 0)
WRITE (iw,
'(T2,A)')
'CRD_INFO| '//trim(string)
138 IF (iw > 0)
WRITE (iw,
'(T2,A,I0)')
'CRD_INFO| Number of atoms: ', natom
139 CALL reallocate(atom_info%id_molname, 1, natom)
140 CALL reallocate(atom_info%id_resname, 1, natom)
142 CALL reallocate(atom_info%id_atmname, 1, natom)
145 CALL reallocate(atom_info%atm_charge, 1, natom)
148 CALL reallocate(atom_info%id_element, 1, natom)
155 DO j = 1, natom - mod(natom, 2), 2
157 READ (parser%input_line, *) atom_info%r(1, j), atom_info%r(2, j), atom_info%r(3, j), &
158 atom_info%r(1, j + 1), atom_info%r(2, j + 1), atom_info%r(3, j + 1)
161 atom_info%id_atmname(j) =
str2id(
s2s(
"__UNDEF__"))
162 atom_info%id_molname(j) =
str2id(
s2s(
"__UNDEF__"))
163 atom_info%id_resname(j) =
str2id(
s2s(
"__UNDEF__"))
164 atom_info%id_element(j) =
str2id(
s2s(
"__UNDEF__"))
165 atom_info%resid(j) = huge(0)
166 atom_info%atm_mass(j) = huge(0.0_dp)
167 atom_info%atm_charge(j) = -huge(0.0_dp)
172 atom_info%id_atmname(j + 1) =
str2id(
s2s(
"__UNDEF__"))
173 atom_info%id_molname(j + 1) =
str2id(
s2s(
"__UNDEF__"))
174 atom_info%id_resname(j + 1) =
str2id(
s2s(
"__UNDEF__"))
175 atom_info%id_element(j + 1) =
str2id(
s2s(
"__UNDEF__"))
176 atom_info%resid(j + 1) = huge(0)
177 atom_info%atm_mass(j + 1) = huge(0.0_dp)
178 atom_info%atm_charge(j + 1) = -huge(0.0_dp)
179 atom_info%r(1, j + 1) =
cp_unit_to_cp2k(atom_info%r(1, j + 1),
"angstrom")
180 atom_info%r(2, j + 1) =
cp_unit_to_cp2k(atom_info%r(2, j + 1),
"angstrom")
181 atom_info%r(3, j + 1) =
cp_unit_to_cp2k(atom_info%r(3, j + 1),
"angstrom")
186 IF ((my_end) .AND. (j /= natom - mod(natom, 2) + 1))
THEN
188 cpabort(
"Error while reading CRD file. Unexpected end of file.")
189 ELSE IF (mod(natom, 2) /= 0)
THEN
192 READ (parser%input_line, *) atom_info%r(1, j), atom_info%r(2, j), atom_info%r(3, j)
195 atom_info%id_atmname(j) =
str2id(
s2s(
"__UNDEF__"))
196 atom_info%id_molname(j) =
str2id(
s2s(
"__UNDEF__"))
197 atom_info%id_resname(j) =
str2id(
s2s(
"__UNDEF__"))
198 atom_info%id_element(j) =
str2id(
s2s(
"__UNDEF__"))
199 atom_info%resid(j) = huge(0)
200 atom_info%atm_mass(j) = huge(0.0_dp)
201 atom_info%atm_charge(j) = -huge(0.0_dp)
210 cpwarn_if(j /= natom,
"No VELOCITY or BOX information found in CRD file.")
214 DO j = 1, natom - mod(natom, 2), 2
216 READ (parser%input_line, *) velocity(1, j), velocity(2, j), velocity(3, j), &
217 velocity(1, j + 1), velocity(2, j + 1), velocity(3, j + 1)
222 velocity(1:3, j) = velocity(1:3, j)*amber_conv_factor
224 velocity(1, j + 1) =
cp_unit_to_cp2k(velocity(1, j + 1),
"angstrom*ps^-1")
225 velocity(2, j + 1) =
cp_unit_to_cp2k(velocity(2, j + 1),
"angstrom*ps^-1")
226 velocity(3, j + 1) =
cp_unit_to_cp2k(velocity(3, j + 1),
"angstrom*ps^-1")
227 velocity(1:3, j + 1) = velocity(1:3, j + 1)*amber_conv_factor
231 setup_velocities = .true.
232 IF ((my_end) .AND. (j /= natom - mod(natom, 2) + 1))
THEN
234 CALL cp_warn(__location__, &
235 "No VELOCITY information found in CRD file. Ignoring BOX information. "// &
236 "Please provide the BOX information directly from the main CP2K input! ")
237 setup_velocities = .false.
238 ELSE IF (mod(natom, 2) /= 0)
THEN
241 READ (parser%input_line, *) velocity(1, j), velocity(2, j), velocity(3, j)
246 velocity(1:3, j) = velocity(1:3, j)*amber_conv_factor
250 IF (setup_velocities)
THEN
255 DEALLOCATE (velocity)
258 cpwarn_if(j /= natom,
"BOX information missing in CRD file.")
261 CALL cp_warn(__location__, &
262 "BOX information found in CRD file. They will be ignored. "// &
263 "Please provide the BOX information directly from the main CP2K input!")
267 "PRINT%TOPOLOGY_INFO/CRD_INFO")
268 CALL timestop(handle)
365 do_forcefield, atom_info, conn_info, amb_info, particle_set)
367 CHARACTER(LEN=*),
INTENT(IN) :: filename
368 INTEGER,
INTENT(IN) :: output_unit
370 LOGICAL,
INTENT(IN) :: do_connectivity, do_forcefield
375 POINTER :: particle_set
377 CHARACTER(len=*),
PARAMETER :: routinen =
'rdparm_amber_8'
379 CHARACTER(LEN=default_string_length) :: input_format, section
380 CHARACTER(LEN=default_string_length), &
381 ALLOCATABLE,
DIMENSION(:) :: isymbl, labres, strtmp_a
382 INTEGER :: handle, handle2, i, ifbox, ifcap, ifpert, index_now, info(31), istart, mbona, &
383 mbper, mdper, mgper, mphia, mtheta, natom, natom_prev, natyp, nbona, nbond_prev, nbonh, &
384 nbper, ndper, ngper, nhparm, nmxrs, nnb, nparm, nphb, nphi_prev, nphia, nphih, nptra, &
385 nres, nsize, ntheta, ntheta_prev, ntheth, ntypes, numang, numbnd, numextra, &
387 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: iac, ib, ibh, icb, icbh, ico, icp, icph, &
388 ict, icth, ip, iph, ipres, it, ith, &
389 iwork, jb, jbh, jp, jph, jt, jth, kp, &
390 kph, kt, kth, lp, lph
391 INTEGER,
ALLOCATABLE,
DIMENSION(:, :) :: full_torsions
392 LOGICAL :: check, valid_format
393 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: asol, bsol, cn1, cn2, phase, pk, pn, &
397 CALL timeset(routinen, handle)
398 IF (output_unit > 0)
WRITE (output_unit,
'(/,A)')
" AMBER_INFO| Reading Amber Topology File: "// &
400 CALL parser_create(parser, filename, para_env=para_env, parse_white_lines=.true.)
401 valid_format = check_amber_8_std(parser, output_unit)
402 IF (valid_format)
THEN
403 DO WHILE (get_section_parmtop(parser, section, input_format))
404 SELECT CASE (trim(section))
409 CALL rd_amber_section(parser, section, info, 31)
445 IF (output_unit > 0)
THEN
446 WRITE (output_unit,
'(A,/)')
" AMBER_INFO| Information from AMBER topology file:"
447 WRITE (output_unit, 1000) &
448 natom, ntypes, nbonh, mbona, ntheth, mtheta, nphih, &
449 mphia, nhparm, nparm, nnb, nres, nbona, ntheta, &
450 nphia, numbnd, numang, nptra, natyp, nphb, ifbox, &
451 nmxrs, ifcap, numextra
455 IF (do_connectivity)
THEN
456 check =
PRESENT(atom_info) .AND.
PRESENT(conn_info)
459 IF (
ASSOCIATED(atom_info%id_molname)) natom_prev =
SIZE(atom_info%id_molname)
461 ALLOCATE (labres(nres))
462 ALLOCATE (ipres(nres))
464 IF (do_forcefield)
THEN
466 ALLOCATE (iac(natom))
467 ALLOCATE (ico(ntypes*ntypes))
468 ALLOCATE (rk(numbnd))
469 ALLOCATE (req(numbnd))
470 ALLOCATE (tk(numang))
471 ALLOCATE (teq(numang))
474 ALLOCATE (phase(nptra))
475 ALLOCATE (cn1(ntypes*(ntypes + 1)/2))
476 ALLOCATE (cn2(ntypes*(ntypes + 1)/2))
477 ALLOCATE (asol(ntypes*(ntypes + 1)/2))
478 ALLOCATE (bsol(ntypes*(ntypes + 1)/2))
481 ALLOCATE (ibh(nbonh))
482 ALLOCATE (jbh(nbonh))
483 ALLOCATE (icbh(nbonh))
486 ALLOCATE (icb(nbona))
487 ALLOCATE (ith(ntheth))
488 ALLOCATE (jth(ntheth))
489 ALLOCATE (kth(ntheth))
490 ALLOCATE (icth(ntheth))
491 ALLOCATE (it(ntheta))
492 ALLOCATE (jt(ntheta))
493 ALLOCATE (kt(ntheta))
494 ALLOCATE (ict(ntheta))
495 ALLOCATE (iph(nphih))
496 ALLOCATE (jph(nphih))
497 ALLOCATE (kph(nphih))
498 ALLOCATE (lph(nphih))
499 ALLOCATE (icph(nphih))
504 ALLOCATE (icp(nphia))
508 CASE (
"AMBER_ATOM_TYPE")
509 IF (.NOT. do_connectivity) cycle
510 CALL reallocate(atom_info%id_atmname, 1, natom_prev + natom)
511 ALLOCATE (strtmp_a(natom))
512 CALL rd_amber_section(parser, section, strtmp_a, natom)
514 atom_info%id_atmname(natom_prev + i) =
str2id(strtmp_a(i))
516 DEALLOCATE (strtmp_a)
518 IF (.NOT. do_connectivity) cycle
519 CALL reallocate(atom_info%atm_charge, 1, natom_prev + natom)
520 CALL rd_amber_section(parser, section, atom_info%atm_charge(natom_prev + 1:), natom)
522 atom_info%atm_charge(natom_prev + 1:) = atom_info%atm_charge(natom_prev + 1:)/amber_conv_charge
524 IF (.NOT. do_connectivity) cycle
525 CALL reallocate(atom_info%atm_mass, 1, natom_prev + natom)
526 CALL rd_amber_section(parser, section, atom_info%atm_mass(natom_prev + 1:), natom)
527 CASE (
"RESIDUE_LABEL")
528 IF (.NOT. do_connectivity) cycle
529 CALL reallocate(atom_info%id_resname, 1, natom_prev + natom)
530 CALL rd_amber_section(parser, section, labres, nres)
531 CASE (
"RESIDUE_POINTER")
532 IF (.NOT. do_connectivity) cycle
533 CALL reallocate(atom_info%resid, 1, natom_prev + natom)
534 CALL rd_amber_section(parser, section, ipres, nres)
535 CASE (
"ATOM_TYPE_INDEX")
536 IF (.NOT. do_forcefield) cycle
537 CALL rd_amber_section(parser, section, iac, natom)
538 CASE (
"NONBONDED_PARM_INDEX")
539 IF (.NOT. do_forcefield) cycle
540 CALL rd_amber_section(parser, section, ico, ntypes**2)
541 CASE (
"BOND_FORCE_CONSTANT")
542 IF (.NOT. do_forcefield) cycle
543 CALL rd_amber_section(parser, section, rk, numbnd)
544 CASE (
"BOND_EQUIL_VALUE")
545 IF (.NOT. do_forcefield) cycle
546 CALL rd_amber_section(parser, section, req, numbnd)
547 CASE (
"ANGLE_FORCE_CONSTANT")
548 IF (.NOT. do_forcefield) cycle
549 CALL rd_amber_section(parser, section, tk, numang)
550 CASE (
"ANGLE_EQUIL_VALUE")
551 IF (.NOT. do_forcefield) cycle
552 CALL rd_amber_section(parser, section, teq, numang)
553 CASE (
"DIHEDRAL_FORCE_CONSTANT")
554 IF (.NOT. do_forcefield) cycle
555 CALL rd_amber_section(parser, section, pk, nptra)
556 IF (nptra <= 0) cycle
558 IF (
ASSOCIATED(amb_info%raw_torsion_k))
DEALLOCATE (amb_info%raw_torsion_k)
559 ALLOCATE (amb_info%raw_torsion_k(nptra), source=pk)
560 CASE (
"DIHEDRAL_PERIODICITY")
561 IF (.NOT. do_forcefield) cycle
562 CALL rd_amber_section(parser, section, pn, nptra)
563 IF (nptra <= 0) cycle
565 IF (
ASSOCIATED(amb_info%raw_torsion_m))
DEALLOCATE (amb_info%raw_torsion_m)
566 ALLOCATE (amb_info%raw_torsion_m(nptra), source=pn)
567 CASE (
"DIHEDRAL_PHASE")
568 IF (.NOT. do_forcefield) cycle
569 CALL rd_amber_section(parser, section, phase, nptra)
570 IF (nptra <= 0) cycle
572 IF (
ASSOCIATED(amb_info%raw_torsion_phi0))
DEALLOCATE (amb_info%raw_torsion_phi0)
573 ALLOCATE (amb_info%raw_torsion_phi0(nptra), source=phase)
574 CASE (
"LENNARD_JONES_ACOEF")
575 IF (.NOT. do_forcefield) cycle
576 CALL rd_amber_section(parser, section, cn1, ntypes*(ntypes + 1)/2)
577 CASE (
"LENNARD_JONES_BCOEF")
578 IF (.NOT. do_forcefield) cycle
579 CALL rd_amber_section(parser, section, cn2, ntypes*(ntypes + 1)/2)
581 IF (.NOT. do_forcefield) cycle
582 CALL rd_amber_section(parser, section, asol, nphb)
584 IF (.NOT. do_forcefield) cycle
585 CALL rd_amber_section(parser, section, bsol, nphb)
586 CASE (
"BONDS_INC_HYDROGEN")
588 CALL rd_amber_section(parser, section, ibh, jbh, icbh, nbonh)
590 ibh(:) = ibh(:)/3 + 1
591 jbh(:) = jbh(:)/3 + 1
592 CASE (
"BONDS_WITHOUT_HYDROGEN")
594 CALL rd_amber_section(parser, section, ib, jb, icb, nbona)
598 CASE (
"ANGLES_INC_HYDROGEN")
600 CALL rd_amber_section(parser, section, ith, jth, kth, icth, ntheth)
602 ith(:) = ith(:)/3 + 1
603 jth(:) = jth(:)/3 + 1
604 kth(:) = kth(:)/3 + 1
605 CASE (
"ANGLES_WITHOUT_HYDROGEN")
607 CALL rd_amber_section(parser, section, it, jt, kt, ict, ntheta)
612 CASE (
"DIHEDRALS_INC_HYDROGEN")
614 CALL rd_amber_section(parser, section, iph, jph, kph, lph, icph, nphih)
616 iph(:) = iph(:)/3 + 1
617 jph(:) = jph(:)/3 + 1
618 kph(:) = abs(kph(:))/3 + 1
619 lph(:) = abs(lph(:))/3 + 1
620 CASE (
"DIHEDRALS_WITHOUT_HYDROGEN")
622 CALL rd_amber_section(parser, section, ip, jp, kp, lp, icp, nphia)
626 kp(:) = abs(kp(:))/3 + 1
627 lp(:) = abs(lp(:))/3 + 1
633 IF (do_forcefield .AND. (nphih + nphia > 0))
THEN
634 IF (
ASSOCIATED(amb_info%raw_torsion_id))
DEALLOCATE (amb_info%raw_torsion_id)
635 ALLOCATE (amb_info%raw_torsion_id(5, nphih + nphia))
637 amb_info%raw_torsion_id(1, i) = iph(i)
638 amb_info%raw_torsion_id(2, i) = jph(i)
639 amb_info%raw_torsion_id(3, i) = kph(i)
640 amb_info%raw_torsion_id(4, i) = lph(i)
641 amb_info%raw_torsion_id(5, i) = icph(i)
644 amb_info%raw_torsion_id(1, nphih + i) = ip(i)
645 amb_info%raw_torsion_id(2, nphih + i) = jp(i)
646 amb_info%raw_torsion_id(3, nphih + i) = kp(i)
647 amb_info%raw_torsion_id(4, nphih + i) = lp(i)
648 amb_info%raw_torsion_id(5, nphih + i) = icp(i)
654 IF (do_connectivity)
THEN
655 CALL timeset(trim(routinen)//
"_connectivity", handle2)
659 ALLOCATE (isymbl(natom))
660 ALLOCATE (iwork(natom))
662 DO i = 1,
SIZE(isymbl)
663 isymbl(i) =
id2str(atom_info%id_atmname(natom_prev + i))
667 CALL sort(isymbl, natom, iwork)
671 IF (trim(isymbl(i)) /= trim(isymbl(istart)))
THEN
672 CALL conform_atom_type_low(isymbl, iwork, i, istart, atom_info%atm_charge(natom_prev + 1:))
676 CALL conform_atom_type_low(isymbl, iwork, i, istart, atom_info%atm_charge(natom_prev + 1:))
680 atom_info%id_atmname(natom_prev + iwork(i)) =
str2id(
s2s(isymbl(i)))
687 atom_info%id_resname(natom_prev + ipres(i):natom_prev + ipres(i + 1)) =
str2id(
s2s(labres(i)))
688 atom_info%resid(natom_prev + ipres(i):natom_prev + ipres(i + 1)) = i
690 atom_info%id_resname(natom_prev + ipres(i):natom_prev + natom) =
str2id(
s2s(labres(i)))
691 atom_info%resid(natom_prev + ipres(i):natom_prev + natom) = i
704 IF (
ASSOCIATED(conn_info%bond_a)) nbond_prev =
SIZE(conn_info%bond_a)
706 CALL reallocate(conn_info%bond_a, 1, nbond_prev + nbonh + nbona)
707 CALL reallocate(conn_info%bond_b, 1, nbond_prev + nbonh + nbona)
709 index_now = nbond_prev + i
710 conn_info%bond_a(index_now) = natom_prev + ibh(i)
711 conn_info%bond_b(index_now) = natom_prev + jbh(i)
714 index_now = nbond_prev + i + nbonh
715 conn_info%bond_a(index_now) = natom_prev + ib(i)
716 conn_info%bond_b(index_now) = natom_prev + jb(i)
721 IF (
ASSOCIATED(conn_info%theta_a)) ntheta_prev =
SIZE(conn_info%theta_a)
723 CALL reallocate(conn_info%theta_a, 1, ntheta_prev + ntheth + ntheta)
724 CALL reallocate(conn_info%theta_b, 1, ntheta_prev + ntheth + ntheta)
725 CALL reallocate(conn_info%theta_c, 1, ntheta_prev + ntheth + ntheta)
727 index_now = ntheta_prev + i
728 conn_info%theta_a(index_now) = natom_prev + ith(i)
729 conn_info%theta_b(index_now) = natom_prev + jth(i)
730 conn_info%theta_c(index_now) = natom_prev + kth(i)
733 index_now = ntheta_prev + i + ntheth
734 conn_info%theta_a(index_now) = natom_prev + it(i)
735 conn_info%theta_b(index_now) = natom_prev + jt(i)
736 conn_info%theta_c(index_now) = natom_prev + kt(i)
743 IF (
ASSOCIATED(conn_info%phi_a)) nphi_prev =
SIZE(conn_info%phi_a)
745 CALL reallocate(conn_info%phi_a, 1, nphi_prev + nphih + nphia)
746 CALL reallocate(conn_info%phi_b, 1, nphi_prev + nphih + nphia)
747 CALL reallocate(conn_info%phi_c, 1, nphi_prev + nphih + nphia)
748 CALL reallocate(conn_info%phi_d, 1, nphi_prev + nphih + nphia)
750 IF (nphih + nphia /= 0)
THEN
751 ALLOCATE (full_torsions(4, nphih + nphia))
752 ALLOCATE (iwork(nphih + nphia))
755 full_torsions(1, i) = iph(i)
756 full_torsions(2, i) = jph(i)
757 full_torsions(3, i) = kph(i)
758 full_torsions(4, i) = lph(i)
761 full_torsions(1, nphih + i) = ip(i)
762 full_torsions(2, nphih + i) = jp(i)
763 full_torsions(3, nphih + i) = kp(i)
764 full_torsions(4, nphih + i) = lp(i)
766 CALL sort(full_torsions, 1, nphih + nphia, 1, 4, iwork)
768 unique_torsions = nphi_prev + 1
769 conn_info%phi_a(unique_torsions) = natom_prev + full_torsions(1, 1)
770 conn_info%phi_b(unique_torsions) = natom_prev + full_torsions(2, 1)
771 conn_info%phi_c(unique_torsions) = natom_prev + full_torsions(3, 1)
772 conn_info%phi_d(unique_torsions) = natom_prev + full_torsions(4, 1)
773 DO i = 2, nphih + nphia
774 IF ((full_torsions(1, i) /= full_torsions(1, i - 1)) .OR. &
775 (full_torsions(2, i) /= full_torsions(2, i - 1)) .OR. &
776 (full_torsions(3, i) /= full_torsions(3, i - 1)) .OR. &
777 (full_torsions(4, i) /= full_torsions(4, i - 1)))
THEN
778 unique_torsions = unique_torsions + 1
779 conn_info%phi_a(unique_torsions) = natom_prev + full_torsions(1, i)
780 conn_info%phi_b(unique_torsions) = natom_prev + full_torsions(2, i)
781 conn_info%phi_c(unique_torsions) = natom_prev + full_torsions(3, i)
782 conn_info%phi_d(unique_torsions) = natom_prev + full_torsions(4, i)
785 CALL reallocate(conn_info%phi_a, 1, unique_torsions)
786 CALL reallocate(conn_info%phi_b, 1, unique_torsions)
787 CALL reallocate(conn_info%phi_c, 1, unique_torsions)
788 CALL reallocate(conn_info%phi_d, 1, unique_torsions)
790 DEALLOCATE (full_torsions)
802 CALL reallocate(atom_info%id_molname, 1, natom_prev + natom)
803 atom_info%id_molname(natom_prev + 1:natom_prev + natom) =
str2id(
s2s(
"__UNDEF__"))
805 atom_info%id_molname(natom_prev + 1:natom_prev + natom))
806 CALL timestop(handle2)
810 IF (do_forcefield)
THEN
811 CALL timeset(trim(routinen)//
"_forcefield", handle2)
815 CALL reallocate(amb_info%bond_a, 1, buffer_size)
816 CALL reallocate(amb_info%bond_b, 1, buffer_size)
817 CALL reallocate(amb_info%bond_k, 1, buffer_size)
818 CALL reallocate(amb_info%bond_r0, 1, buffer_size)
821 CALL post_process_bonds_info(amb_info%bond_a, amb_info%bond_b, &
822 amb_info%bond_k, amb_info%bond_r0, particle_set, nsize, &
823 nbonh, ibh, jbh, icbh, rk, req)
825 CALL post_process_bonds_info(amb_info%bond_a, amb_info%bond_b, &
826 amb_info%bond_k, amb_info%bond_r0, particle_set, nsize, &
827 nbona, ib, jb, icb, rk, req)
837 CALL reallocate(amb_info%bend_a, 1, buffer_size)
838 CALL reallocate(amb_info%bend_b, 1, buffer_size)
839 CALL reallocate(amb_info%bend_c, 1, buffer_size)
840 CALL reallocate(amb_info%bend_k, 1, buffer_size)
841 CALL reallocate(amb_info%bend_theta0, 1, buffer_size)
844 CALL post_process_bends_info(amb_info%bend_a, amb_info%bend_b, &
845 amb_info%bend_c, amb_info%bend_k, amb_info%bend_theta0, &
846 particle_set, nsize, ntheth, ith, jth, kth, icth, tk, teq)
848 CALL post_process_bends_info(amb_info%bend_a, amb_info%bend_b, &
849 amb_info%bend_c, amb_info%bend_k, amb_info%bend_theta0, &
850 particle_set, nsize, ntheta, it, jt, kt, ict, tk, teq)
856 CALL reallocate(amb_info%bend_theta0, 1, nsize)
863 CALL reallocate(amb_info%torsion_a, 1, buffer_size)
864 CALL reallocate(amb_info%torsion_b, 1, buffer_size)
865 CALL reallocate(amb_info%torsion_c, 1, buffer_size)
866 CALL reallocate(amb_info%torsion_d, 1, buffer_size)
867 CALL reallocate(amb_info%torsion_k, 1, buffer_size)
868 CALL reallocate(amb_info%torsion_m, 1, buffer_size)
869 CALL reallocate(amb_info%torsion_phi0, 1, buffer_size)
872 CALL post_process_torsions_info(amb_info%torsion_a, amb_info%torsion_b, &
873 amb_info%torsion_c, amb_info%torsion_d, amb_info%torsion_k, &
874 amb_info%torsion_m, amb_info%torsion_phi0, particle_set, nsize, &
875 nphih, iph, jph, kph, lph, icph, pk, pn, phase)
877 CALL post_process_torsions_info(amb_info%torsion_a, amb_info%torsion_b, &
878 amb_info%torsion_c, amb_info%torsion_d, amb_info%torsion_k, &
879 amb_info%torsion_m, amb_info%torsion_phi0, particle_set, nsize, &
880 nphia, ip, jp, kp, lp, icp, pk, pn, phase)
888 CALL reallocate(amb_info%torsion_phi0, 1, nsize)
891 IF (nphih + nphia /= 0)
THEN
892 ALLOCATE (iwork(nphih + nphia))
893 CALL sort(amb_info%raw_torsion_id, 1, nphih + nphia, 1, 5, iwork)
900 CALL reallocate(amb_info%nonbond_a, 1, buffer_size)
901 CALL reallocate(amb_info%nonbond_eps, 1, buffer_size)
902 CALL reallocate(amb_info%nonbond_rmin2, 1, buffer_size)
905 CALL post_process_lj_info(amb_info%nonbond_a, amb_info%nonbond_eps, &
906 amb_info%nonbond_rmin2, particle_set, ntypes, nsize, iac, ico, &
911 CALL reallocate(amb_info%nonbond_eps, 1, nsize)
912 CALL reallocate(amb_info%nonbond_rmin2, 1, nsize)
928 CALL timestop(handle2)
956 CALL timestop(handle)
960 /
' NATOM = ', i7,
' NTYPES = ', i7,
' NBONH = ', i7,
' MBONA = ', i7, &
961 /
' NTHETH = ', i7,
' MTHETA = ', i7,
' NPHIH = ', i7,
' MPHIA = ', i7, &
962 /
' NHPARM = ', i7,
' NPARM = ', i7,
' NNB = ', i7,
' NRES = ', i7, &
963 /
' NBONA = ', i7,
' NTHETA = ', i7,
' NPHIA = ', i7,
' NUMBND = ', i7, &
964 /
' NUMANG = ', i7,
' NPTRA = ', i7,
' NATYP = ', i7,
' NPHB = ', i7, &
965 /
' IFBOX = ', i7,
' NMXRS = ', i7,
' IFCAP = ', i7,
' NEXTRA = ', i7,/)