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.")
190 ELSE IF (mod(natom, 2) /= 0)
THEN
193 READ (parser%input_line, *) atom_info%r(1, j), atom_info%r(2, j), atom_info%r(3, j)
196 atom_info%id_atmname(j) =
str2id(
s2s(
"__UNDEF__"))
197 atom_info%id_molname(j) =
str2id(
s2s(
"__UNDEF__"))
198 atom_info%id_resname(j) =
str2id(
s2s(
"__UNDEF__"))
199 atom_info%id_element(j) =
str2id(
s2s(
"__UNDEF__"))
200 atom_info%resid(j) = huge(0)
201 atom_info%atm_mass(j) = huge(0.0_dp)
202 atom_info%atm_charge(j) = -huge(0.0_dp)
211 cpwarn_if(j /= natom,
"No VELOCITY or BOX information found in CRD file.")
215 DO j = 1, natom - mod(natom, 2), 2
217 READ (parser%input_line, *) velocity(1, j), velocity(2, j), velocity(3, j), &
218 velocity(1, j + 1), velocity(2, j + 1), velocity(3, j + 1)
223 velocity(1:3, j) = velocity(1:3, j)*amber_conv_factor
225 velocity(1, j + 1) =
cp_unit_to_cp2k(velocity(1, j + 1),
"angstrom*ps^-1")
226 velocity(2, j + 1) =
cp_unit_to_cp2k(velocity(2, j + 1),
"angstrom*ps^-1")
227 velocity(3, j + 1) =
cp_unit_to_cp2k(velocity(3, j + 1),
"angstrom*ps^-1")
228 velocity(1:3, j + 1) = velocity(1:3, j + 1)*amber_conv_factor
232 setup_velocities = .true.
233 IF ((my_end) .AND. (j /= natom - mod(natom, 2) + 1))
THEN
235 CALL cp_warn(__location__, &
236 "No VELOCITY information found in CRD file. Ignoring BOX information. "// &
237 "Please provide the BOX information directly from the main CP2K input! ")
239 setup_velocities = .false.
240 ELSE IF (mod(natom, 2) /= 0)
THEN
243 READ (parser%input_line, *) velocity(1, j), velocity(2, j), velocity(3, j)
248 velocity(1:3, j) = velocity(1:3, j)*amber_conv_factor
252 IF (setup_velocities)
THEN
257 DEALLOCATE (velocity)
260 cpwarn_if(j /= natom,
"BOX information missing in CRD file.")
263 CALL cp_warn(__location__, &
264 "BOX information found in CRD file. They will be ignored. "// &
265 "Please provide the BOX information directly from the main CP2K input!")
270 "PRINT%TOPOLOGY_INFO/CRD_INFO")
271 CALL timestop(handle)
368 do_forcefield, atom_info, conn_info, amb_info, particle_set)
370 CHARACTER(LEN=*),
INTENT(IN) :: filename
371 INTEGER,
INTENT(IN) :: output_unit
373 LOGICAL,
INTENT(IN) :: do_connectivity, do_forcefield
378 POINTER :: particle_set
380 CHARACTER(len=*),
PARAMETER :: routinen =
'rdparm_amber_8'
382 CHARACTER(LEN=default_string_length) :: input_format, section
383 CHARACTER(LEN=default_string_length), &
384 ALLOCATABLE,
DIMENSION(:) :: isymbl, labres, strtmp_a
385 INTEGER :: handle, handle2, i, ifbox, ifcap, ifpert, index_now, info(31), istart, mbona, &
386 mbper, mdper, mgper, mphia, mtheta, natom, natom_prev, natyp, nbona, nbond_prev, nbonh, &
387 nbper, ndper, ngper, nhparm, nmxrs, nnb, nparm, nphb, nphi_prev, nphia, nphih, nptra, &
388 nres, nsize, ntheta, ntheta_prev, ntheth, ntypes, numang, numbnd, numextra, &
390 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: iac, ib, ibh, icb, icbh, ico, icp, icph, &
391 ict, icth, ip, iph, ipres, it, ith, &
392 iwork, jb, jbh, jp, jph, jt, jth, kp, &
393 kph, kt, kth, lp, lph
394 INTEGER,
ALLOCATABLE,
DIMENSION(:, :) :: full_torsions
395 LOGICAL :: check, valid_format
396 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: asol, bsol, cn1, cn2, phase, pk, pn, &
400 CALL timeset(routinen, handle)
401 IF (output_unit > 0)
WRITE (output_unit,
'(/,A)')
" AMBER_INFO| Reading Amber Topology File: "// &
403 CALL parser_create(parser, filename, para_env=para_env, parse_white_lines=.true.)
404 valid_format = check_amber_8_std(parser, output_unit)
405 IF (valid_format)
THEN
406 DO WHILE (get_section_parmtop(parser, section, input_format))
407 SELECT CASE (trim(section))
412 CALL rd_amber_section(parser, section, info, 31)
448 IF (output_unit > 0)
THEN
449 WRITE (output_unit,
'(A,/)')
" AMBER_INFO| Information from AMBER topology file:"
450 WRITE (output_unit, 1000) &
451 natom, ntypes, nbonh, mbona, ntheth, mtheta, nphih, &
452 mphia, nhparm, nparm, nnb, nres, nbona, ntheta, &
453 nphia, numbnd, numang, nptra, natyp, nphb, ifbox, &
454 nmxrs, ifcap, numextra
458 IF (do_connectivity)
THEN
459 check =
PRESENT(atom_info) .AND.
PRESENT(conn_info)
462 IF (
ASSOCIATED(atom_info%id_molname)) natom_prev =
SIZE(atom_info%id_molname)
464 ALLOCATE (labres(nres))
465 ALLOCATE (ipres(nres))
467 IF (do_forcefield)
THEN
469 ALLOCATE (iac(natom))
470 ALLOCATE (ico(ntypes*ntypes))
471 ALLOCATE (rk(numbnd))
472 ALLOCATE (req(numbnd))
473 ALLOCATE (tk(numang))
474 ALLOCATE (teq(numang))
477 ALLOCATE (phase(nptra))
478 ALLOCATE (cn1(ntypes*(ntypes + 1)/2))
479 ALLOCATE (cn2(ntypes*(ntypes + 1)/2))
480 ALLOCATE (asol(ntypes*(ntypes + 1)/2))
481 ALLOCATE (bsol(ntypes*(ntypes + 1)/2))
484 ALLOCATE (ibh(nbonh))
485 ALLOCATE (jbh(nbonh))
486 ALLOCATE (icbh(nbonh))
489 ALLOCATE (icb(nbona))
490 ALLOCATE (ith(ntheth))
491 ALLOCATE (jth(ntheth))
492 ALLOCATE (kth(ntheth))
493 ALLOCATE (icth(ntheth))
494 ALLOCATE (it(ntheta))
495 ALLOCATE (jt(ntheta))
496 ALLOCATE (kt(ntheta))
497 ALLOCATE (ict(ntheta))
498 ALLOCATE (iph(nphih))
499 ALLOCATE (jph(nphih))
500 ALLOCATE (kph(nphih))
501 ALLOCATE (lph(nphih))
502 ALLOCATE (icph(nphih))
507 ALLOCATE (icp(nphia))
511 CASE (
"AMBER_ATOM_TYPE")
512 IF (.NOT. do_connectivity) cycle
513 CALL reallocate(atom_info%id_atmname, 1, natom_prev + natom)
514 ALLOCATE (strtmp_a(natom))
515 CALL rd_amber_section(parser, section, strtmp_a, natom)
517 atom_info%id_atmname(natom_prev + i) =
str2id(strtmp_a(i))
519 DEALLOCATE (strtmp_a)
521 IF (.NOT. do_connectivity) cycle
522 CALL reallocate(atom_info%atm_charge, 1, natom_prev + natom)
523 CALL rd_amber_section(parser, section, atom_info%atm_charge(natom_prev + 1:), natom)
525 atom_info%atm_charge(natom_prev + 1:) = atom_info%atm_charge(natom_prev + 1:)/amber_conv_charge
527 IF (.NOT. do_connectivity) cycle
528 CALL reallocate(atom_info%atm_mass, 1, natom_prev + natom)
529 CALL rd_amber_section(parser, section, atom_info%atm_mass(natom_prev + 1:), natom)
530 CASE (
"RESIDUE_LABEL")
531 IF (.NOT. do_connectivity) cycle
532 CALL reallocate(atom_info%id_resname, 1, natom_prev + natom)
533 CALL rd_amber_section(parser, section, labres, nres)
534 CASE (
"RESIDUE_POINTER")
535 IF (.NOT. do_connectivity) cycle
536 CALL reallocate(atom_info%resid, 1, natom_prev + natom)
537 CALL rd_amber_section(parser, section, ipres, nres)
538 CASE (
"ATOM_TYPE_INDEX")
539 IF (.NOT. do_forcefield) cycle
540 CALL rd_amber_section(parser, section, iac, natom)
541 CASE (
"NONBONDED_PARM_INDEX")
542 IF (.NOT. do_forcefield) cycle
543 CALL rd_amber_section(parser, section, ico, ntypes**2)
544 CASE (
"BOND_FORCE_CONSTANT")
545 IF (.NOT. do_forcefield) cycle
546 CALL rd_amber_section(parser, section, rk, numbnd)
547 CASE (
"BOND_EQUIL_VALUE")
548 IF (.NOT. do_forcefield) cycle
549 CALL rd_amber_section(parser, section, req, numbnd)
550 CASE (
"ANGLE_FORCE_CONSTANT")
551 IF (.NOT. do_forcefield) cycle
552 CALL rd_amber_section(parser, section, tk, numang)
553 CASE (
"ANGLE_EQUIL_VALUE")
554 IF (.NOT. do_forcefield) cycle
555 CALL rd_amber_section(parser, section, teq, numang)
556 CASE (
"DIHEDRAL_FORCE_CONSTANT")
557 IF (.NOT. do_forcefield) cycle
558 CALL rd_amber_section(parser, section, pk, nptra)
559 IF (nptra <= 0) cycle
561 IF (
ASSOCIATED(amb_info%raw_torsion_k))
DEALLOCATE (amb_info%raw_torsion_k)
562 ALLOCATE (amb_info%raw_torsion_k(nptra), source=pk)
563 CASE (
"DIHEDRAL_PERIODICITY")
564 IF (.NOT. do_forcefield) cycle
565 CALL rd_amber_section(parser, section, pn, nptra)
566 IF (nptra <= 0) cycle
568 IF (
ASSOCIATED(amb_info%raw_torsion_m))
DEALLOCATE (amb_info%raw_torsion_m)
569 ALLOCATE (amb_info%raw_torsion_m(nptra), source=pn)
570 CASE (
"DIHEDRAL_PHASE")
571 IF (.NOT. do_forcefield) cycle
572 CALL rd_amber_section(parser, section, phase, nptra)
573 IF (nptra <= 0) cycle
575 IF (
ASSOCIATED(amb_info%raw_torsion_phi0))
DEALLOCATE (amb_info%raw_torsion_phi0)
576 ALLOCATE (amb_info%raw_torsion_phi0(nptra), source=phase)
577 CASE (
"LENNARD_JONES_ACOEF")
578 IF (.NOT. do_forcefield) cycle
579 CALL rd_amber_section(parser, section, cn1, ntypes*(ntypes + 1)/2)
580 CASE (
"LENNARD_JONES_BCOEF")
581 IF (.NOT. do_forcefield) cycle
582 CALL rd_amber_section(parser, section, cn2, ntypes*(ntypes + 1)/2)
584 IF (.NOT. do_forcefield) cycle
585 CALL rd_amber_section(parser, section, asol, nphb)
587 IF (.NOT. do_forcefield) cycle
588 CALL rd_amber_section(parser, section, bsol, nphb)
589 CASE (
"BONDS_INC_HYDROGEN")
591 CALL rd_amber_section(parser, section, ibh, jbh, icbh, nbonh)
593 ibh(:) = ibh(:)/3 + 1
594 jbh(:) = jbh(:)/3 + 1
595 CASE (
"BONDS_WITHOUT_HYDROGEN")
597 CALL rd_amber_section(parser, section, ib, jb, icb, nbona)
601 CASE (
"ANGLES_INC_HYDROGEN")
603 CALL rd_amber_section(parser, section, ith, jth, kth, icth, ntheth)
605 ith(:) = ith(:)/3 + 1
606 jth(:) = jth(:)/3 + 1
607 kth(:) = kth(:)/3 + 1
608 CASE (
"ANGLES_WITHOUT_HYDROGEN")
610 CALL rd_amber_section(parser, section, it, jt, kt, ict, ntheta)
615 CASE (
"DIHEDRALS_INC_HYDROGEN")
617 CALL rd_amber_section(parser, section, iph, jph, kph, lph, icph, nphih)
619 iph(:) = iph(:)/3 + 1
620 jph(:) = jph(:)/3 + 1
621 kph(:) = abs(kph(:))/3 + 1
622 lph(:) = abs(lph(:))/3 + 1
623 CASE (
"DIHEDRALS_WITHOUT_HYDROGEN")
625 CALL rd_amber_section(parser, section, ip, jp, kp, lp, icp, nphia)
629 kp(:) = abs(kp(:))/3 + 1
630 lp(:) = abs(lp(:))/3 + 1
636 IF (do_forcefield .AND. (nphih + nphia > 0))
THEN
637 IF (
ASSOCIATED(amb_info%raw_torsion_id))
DEALLOCATE (amb_info%raw_torsion_id)
638 ALLOCATE (amb_info%raw_torsion_id(5, nphih + nphia))
640 amb_info%raw_torsion_id(1, i) = iph(i)
641 amb_info%raw_torsion_id(2, i) = jph(i)
642 amb_info%raw_torsion_id(3, i) = kph(i)
643 amb_info%raw_torsion_id(4, i) = lph(i)
644 amb_info%raw_torsion_id(5, i) = icph(i)
647 amb_info%raw_torsion_id(1, nphih + i) = ip(i)
648 amb_info%raw_torsion_id(2, nphih + i) = jp(i)
649 amb_info%raw_torsion_id(3, nphih + i) = kp(i)
650 amb_info%raw_torsion_id(4, nphih + i) = lp(i)
651 amb_info%raw_torsion_id(5, nphih + i) = icp(i)
657 IF (do_connectivity)
THEN
658 CALL timeset(trim(routinen)//
"_connectivity", handle2)
662 ALLOCATE (isymbl(natom))
663 ALLOCATE (iwork(natom))
665 DO i = 1,
SIZE(isymbl)
666 isymbl(i) =
id2str(atom_info%id_atmname(natom_prev + i))
670 CALL sort(isymbl, natom, iwork)
674 IF (trim(isymbl(i)) /= trim(isymbl(istart)))
THEN
675 CALL conform_atom_type_low(isymbl, iwork, i, istart, atom_info%atm_charge(natom_prev + 1:))
679 CALL conform_atom_type_low(isymbl, iwork, i, istart, atom_info%atm_charge(natom_prev + 1:))
683 atom_info%id_atmname(natom_prev + iwork(i)) =
str2id(
s2s(isymbl(i)))
690 atom_info%id_resname(natom_prev + ipres(i):natom_prev + ipres(i + 1)) =
str2id(
s2s(labres(i)))
691 atom_info%resid(natom_prev + ipres(i):natom_prev + ipres(i + 1)) = i
693 atom_info%id_resname(natom_prev + ipres(i):natom_prev + natom) =
str2id(
s2s(labres(i)))
694 atom_info%resid(natom_prev + ipres(i):natom_prev + natom) = i
707 IF (
ASSOCIATED(conn_info%bond_a)) nbond_prev =
SIZE(conn_info%bond_a)
709 CALL reallocate(conn_info%bond_a, 1, nbond_prev + nbonh + nbona)
710 CALL reallocate(conn_info%bond_b, 1, nbond_prev + nbonh + nbona)
712 index_now = nbond_prev + i
713 conn_info%bond_a(index_now) = natom_prev + ibh(i)
714 conn_info%bond_b(index_now) = natom_prev + jbh(i)
717 index_now = nbond_prev + i + nbonh
718 conn_info%bond_a(index_now) = natom_prev + ib(i)
719 conn_info%bond_b(index_now) = natom_prev + jb(i)
724 IF (
ASSOCIATED(conn_info%theta_a)) ntheta_prev =
SIZE(conn_info%theta_a)
726 CALL reallocate(conn_info%theta_a, 1, ntheta_prev + ntheth + ntheta)
727 CALL reallocate(conn_info%theta_b, 1, ntheta_prev + ntheth + ntheta)
728 CALL reallocate(conn_info%theta_c, 1, ntheta_prev + ntheth + ntheta)
730 index_now = ntheta_prev + i
731 conn_info%theta_a(index_now) = natom_prev + ith(i)
732 conn_info%theta_b(index_now) = natom_prev + jth(i)
733 conn_info%theta_c(index_now) = natom_prev + kth(i)
736 index_now = ntheta_prev + i + ntheth
737 conn_info%theta_a(index_now) = natom_prev + it(i)
738 conn_info%theta_b(index_now) = natom_prev + jt(i)
739 conn_info%theta_c(index_now) = natom_prev + kt(i)
746 IF (
ASSOCIATED(conn_info%phi_a)) nphi_prev =
SIZE(conn_info%phi_a)
748 CALL reallocate(conn_info%phi_a, 1, nphi_prev + nphih + nphia)
749 CALL reallocate(conn_info%phi_b, 1, nphi_prev + nphih + nphia)
750 CALL reallocate(conn_info%phi_c, 1, nphi_prev + nphih + nphia)
751 CALL reallocate(conn_info%phi_d, 1, nphi_prev + nphih + nphia)
753 IF (nphih + nphia /= 0)
THEN
754 ALLOCATE (full_torsions(4, nphih + nphia))
755 ALLOCATE (iwork(nphih + nphia))
758 full_torsions(1, i) = iph(i)
759 full_torsions(2, i) = jph(i)
760 full_torsions(3, i) = kph(i)
761 full_torsions(4, i) = lph(i)
764 full_torsions(1, nphih + i) = ip(i)
765 full_torsions(2, nphih + i) = jp(i)
766 full_torsions(3, nphih + i) = kp(i)
767 full_torsions(4, nphih + i) = lp(i)
769 CALL sort(full_torsions, 1, nphih + nphia, 1, 4, iwork)
771 unique_torsions = nphi_prev + 1
772 conn_info%phi_a(unique_torsions) = natom_prev + full_torsions(1, 1)
773 conn_info%phi_b(unique_torsions) = natom_prev + full_torsions(2, 1)
774 conn_info%phi_c(unique_torsions) = natom_prev + full_torsions(3, 1)
775 conn_info%phi_d(unique_torsions) = natom_prev + full_torsions(4, 1)
776 DO i = 2, nphih + nphia
777 IF ((full_torsions(1, i) /= full_torsions(1, i - 1)) .OR. &
778 (full_torsions(2, i) /= full_torsions(2, i - 1)) .OR. &
779 (full_torsions(3, i) /= full_torsions(3, i - 1)) .OR. &
780 (full_torsions(4, i) /= full_torsions(4, i - 1)))
THEN
781 unique_torsions = unique_torsions + 1
782 conn_info%phi_a(unique_torsions) = natom_prev + full_torsions(1, i)
783 conn_info%phi_b(unique_torsions) = natom_prev + full_torsions(2, i)
784 conn_info%phi_c(unique_torsions) = natom_prev + full_torsions(3, i)
785 conn_info%phi_d(unique_torsions) = natom_prev + full_torsions(4, i)
788 CALL reallocate(conn_info%phi_a, 1, unique_torsions)
789 CALL reallocate(conn_info%phi_b, 1, unique_torsions)
790 CALL reallocate(conn_info%phi_c, 1, unique_torsions)
791 CALL reallocate(conn_info%phi_d, 1, unique_torsions)
793 DEALLOCATE (full_torsions)
805 CALL reallocate(atom_info%id_molname, 1, natom_prev + natom)
806 atom_info%id_molname(natom_prev + 1:natom_prev + natom) =
str2id(
s2s(
"__UNDEF__"))
808 atom_info%id_molname(natom_prev + 1:natom_prev + natom))
809 CALL timestop(handle2)
813 IF (do_forcefield)
THEN
814 CALL timeset(trim(routinen)//
"_forcefield", handle2)
818 CALL reallocate(amb_info%bond_a, 1, buffer_size)
819 CALL reallocate(amb_info%bond_b, 1, buffer_size)
820 CALL reallocate(amb_info%bond_k, 1, buffer_size)
821 CALL reallocate(amb_info%bond_r0, 1, buffer_size)
824 CALL post_process_bonds_info(amb_info%bond_a, amb_info%bond_b, &
825 amb_info%bond_k, amb_info%bond_r0, particle_set, nsize, &
826 nbonh, ibh, jbh, icbh, rk, req)
828 CALL post_process_bonds_info(amb_info%bond_a, amb_info%bond_b, &
829 amb_info%bond_k, amb_info%bond_r0, particle_set, nsize, &
830 nbona, ib, jb, icb, rk, req)
840 CALL reallocate(amb_info%bend_a, 1, buffer_size)
841 CALL reallocate(amb_info%bend_b, 1, buffer_size)
842 CALL reallocate(amb_info%bend_c, 1, buffer_size)
843 CALL reallocate(amb_info%bend_k, 1, buffer_size)
844 CALL reallocate(amb_info%bend_theta0, 1, buffer_size)
847 CALL post_process_bends_info(amb_info%bend_a, amb_info%bend_b, &
848 amb_info%bend_c, amb_info%bend_k, amb_info%bend_theta0, &
849 particle_set, nsize, ntheth, ith, jth, kth, icth, tk, teq)
851 CALL post_process_bends_info(amb_info%bend_a, amb_info%bend_b, &
852 amb_info%bend_c, amb_info%bend_k, amb_info%bend_theta0, &
853 particle_set, nsize, ntheta, it, jt, kt, ict, tk, teq)
859 CALL reallocate(amb_info%bend_theta0, 1, nsize)
866 CALL reallocate(amb_info%torsion_a, 1, buffer_size)
867 CALL reallocate(amb_info%torsion_b, 1, buffer_size)
868 CALL reallocate(amb_info%torsion_c, 1, buffer_size)
869 CALL reallocate(amb_info%torsion_d, 1, buffer_size)
870 CALL reallocate(amb_info%torsion_k, 1, buffer_size)
871 CALL reallocate(amb_info%torsion_m, 1, buffer_size)
872 CALL reallocate(amb_info%torsion_phi0, 1, buffer_size)
875 CALL post_process_torsions_info(amb_info%torsion_a, amb_info%torsion_b, &
876 amb_info%torsion_c, amb_info%torsion_d, amb_info%torsion_k, &
877 amb_info%torsion_m, amb_info%torsion_phi0, particle_set, nsize, &
878 nphih, iph, jph, kph, lph, icph, pk, pn, phase)
880 CALL post_process_torsions_info(amb_info%torsion_a, amb_info%torsion_b, &
881 amb_info%torsion_c, amb_info%torsion_d, amb_info%torsion_k, &
882 amb_info%torsion_m, amb_info%torsion_phi0, particle_set, nsize, &
883 nphia, ip, jp, kp, lp, icp, pk, pn, phase)
891 CALL reallocate(amb_info%torsion_phi0, 1, nsize)
894 IF (nphih + nphia /= 0)
THEN
895 ALLOCATE (iwork(nphih + nphia))
896 CALL sort(amb_info%raw_torsion_id, 1, nphih + nphia, 1, 5, iwork)
903 CALL reallocate(amb_info%nonbond_a, 1, buffer_size)
904 CALL reallocate(amb_info%nonbond_eps, 1, buffer_size)
905 CALL reallocate(amb_info%nonbond_rmin2, 1, buffer_size)
908 CALL post_process_lj_info(amb_info%nonbond_a, amb_info%nonbond_eps, &
909 amb_info%nonbond_rmin2, particle_set, ntypes, nsize, iac, ico, &
914 CALL reallocate(amb_info%nonbond_eps, 1, nsize)
915 CALL reallocate(amb_info%nonbond_rmin2, 1, nsize)
931 CALL timestop(handle2)
959 CALL timestop(handle)
963 /
' NATOM = ', i7,
' NTYPES = ', i7,
' NBONH = ', i7,
' MBONA = ', i7, &
964 /
' NTHETH = ', i7,
' MTHETA = ', i7,
' NPHIH = ', i7,
' MPHIA = ', i7, &
965 /
' NHPARM = ', i7,
' NPARM = ', i7,
' NNB = ', i7,
' NRES = ', i7, &
966 /
' NBONA = ', i7,
' NTHETA = ', i7,
' NPHIA = ', i7,
' NUMBND = ', i7, &
967 /
' NUMANG = ', i7,
' NPTRA = ', i7,
' NATYP = ', i7,
' NPHB = ', i7, &
968 /
' IFBOX = ', i7,
' NMXRS = ', i7,
' IFCAP = ', i7,
' NEXTRA = ', i7,/)