32 ewald_environment_type
65 atom_type, bend_type, bond_type, colvar_constraint_type, g3x3_constraint_type, &
66 g4x6_constraint_type,
get_molecule_kind, impr_type, molecule_kind_type, opbend_type, &
75 #include "./base/base_uses.f90"
79 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'force_fields_util'
108 molecule_set, ewald_env, fist_nonbond_env, ff_type, root_section, qmmm, &
109 qmmm_env, mm_section, subsys_section, shell_particle_set, core_particle_set, &
112 TYPE(particle_type),
DIMENSION(:),
POINTER :: particle_set
113 TYPE(atomic_kind_type),
DIMENSION(:),
POINTER :: atomic_kind_set
114 TYPE(molecule_kind_type),
DIMENSION(:),
POINTER :: molecule_kind_set
115 TYPE(molecule_type),
DIMENSION(:),
POINTER :: molecule_set
116 TYPE(ewald_environment_type),
POINTER :: ewald_env
117 TYPE(fist_nonbond_env_type),
POINTER :: fist_nonbond_env
118 TYPE(force_field_type),
INTENT(INOUT) :: ff_type
119 TYPE(section_vals_type),
POINTER :: root_section
120 LOGICAL,
INTENT(IN),
OPTIONAL :: qmmm
121 TYPE(qmmm_env_mm_type),
OPTIONAL,
POINTER :: qmmm_env
122 TYPE(section_vals_type),
POINTER :: mm_section, subsys_section
123 TYPE(particle_type),
DIMENSION(:),
POINTER :: shell_particle_set, core_particle_set
124 TYPE(cell_type),
POINTER :: cell
126 CHARACTER(len=*),
PARAMETER :: routinen =
'force_field_pack'
128 CHARACTER(LEN=default_string_length), &
129 DIMENSION(:),
POINTER :: ainfo
130 INTEGER :: handle, iw, iw2, iw3, iw4, output_unit
131 LOGICAL :: do_zbl, explicit, fatal, ignore_fatal, &
133 REAL(kind=
dp) :: ewald_rcut, verlet_skin
134 REAL(kind=
dp),
DIMENSION(:),
POINTER :: charges
135 TYPE(amber_info_type),
POINTER :: amb_info
136 TYPE(charmm_info_type),
POINTER :: chm_info
137 TYPE(cp_logger_type),
POINTER :: logger
138 TYPE(gromos_info_type),
POINTER :: gro_info
139 TYPE(input_info_type),
POINTER :: inp_info
140 TYPE(pair_potential_pp_type),
POINTER :: potparm_nonbond, potparm_nonbond14
141 TYPE(section_vals_type),
POINTER :: charges_section
143 CALL timeset(routinen, handle)
145 ignore_fatal = ff_type%ignore_missing_critical
146 NULLIFY (logger, ainfo, charges_section, charges)
159 NULLIFY (potparm_nonbond14, potparm_nonbond)
161 IF (
PRESENT(qmmm) .AND.
PRESENT(qmmm_env)) my_qmmm = qmmm
162 inp_info => ff_type%inp_info
163 chm_info => ff_type%chm_info
164 gro_info => ff_type%gro_info
165 amb_info => ff_type%amb_info
206 fatal, ainfo, chm_info, inp_info, gro_info, amb_info)
212 fatal, ainfo, chm_info, inp_info, gro_info, amb_info)
214 CALL release_ff_missing_par(fatal, ignore_fatal, ainfo, output_unit, iw)
220 ainfo, chm_info, inp_info, iw)
226 ainfo, chm_info, inp_info, gro_info, amb_info, iw)
232 ainfo, chm_info, inp_info, gro_info)
241 CALL release_ff_missing_par(fatal, ignore_fatal, ainfo, output_unit, iw)
245 IF (.NOT. explicit)
THEN
252 ainfo, my_qmmm, inp_info)
254 CALL release_ff_missing_par(fatal, ignore_fatal, ainfo, output_unit, iw)
262 qmmm_env, inp_info, iw4)
283 molecule_kind_set, molecule_set, root_section, subsys_section, &
284 shell_particle_set, core_particle_set, cell, iw, inp_info)
285 IF (ff_type%do_nonbonded)
THEN
292 chm_info, inp_info, gro_info, amb_info, potparm_nonbond14, ewald_env)
294 CALL release_ff_missing_par(fatal, ignore_fatal, ainfo, output_unit, iw)
298 potparm_nonbond14, do_zbl, nonbonded_type=
"NONBONDED14")
305 fatal, iw, ainfo, chm_info, inp_info, gro_info, amb_info, &
306 potparm_nonbond, ewald_env)
308 CALL release_ff_missing_par(fatal, ignore_fatal, ainfo, output_unit, iw)
312 potparm_nonbond, do_zbl, nonbonded_type=
"NONBONDED")
321 ALLOCATE (fist_nonbond_env)
323 potparm_nonbond14, potparm_nonbond, ff_type%do_nonbonded, &
324 ff_type%do_electrostatics, verlet_skin, ewald_rcut, ff_type%ei_scale14, &
325 ff_type%vdw_scale14, ff_type%shift_cutoff)
335 CALL timestop(handle)
347 SUBROUTINE release_ff_missing_par(fatal, ignore_fatal, array, output_unit, iw)
348 LOGICAL,
INTENT(INOUT) :: fatal, ignore_fatal
349 CHARACTER(LEN=default_string_length), &
350 DIMENSION(:),
POINTER :: array
351 INTEGER,
INTENT(IN) :: output_unit, iw
355 IF (
ASSOCIATED(array))
THEN
356 IF (output_unit > 0)
THEN
357 WRITE (output_unit, *)
358 WRITE (output_unit,
'(T2,"FORCEFIELD|",A)') &
359 " WARNING: A non Critical ForceField parameter is missing! CP2K GOES!", &
360 " Non critical parameters are:Urey-Bradley,Torsions,Impropers, Opbends and 1-4", &
361 " All missing parameters will not contribute to the potential energy!"
362 IF (fatal .OR. iw > 0)
THEN
363 WRITE (output_unit, *)
364 DO i = 1,
SIZE(array)
365 WRITE (output_unit,
'(A)') array(i)
368 IF (.NOT. fatal .AND. iw < 0)
THEN
369 WRITE (output_unit,
'(T2,"FORCEFIELD|",A)') &
370 " Activate the print key FF_INFO to have a list of missing parameters"
371 WRITE (output_unit, *)
377 IF (ignore_fatal)
THEN
378 IF (output_unit > 0)
THEN
379 WRITE (output_unit, *)
380 WRITE (output_unit,
'(T2,"FORCEFIELD|",A)') &
381 " WARNING: Ignoring missing critical FF parameters! CP2K GOES!", &
382 " Critical parameters are: Bonds, Bends and Charges", &
383 " All missing parameters will not contribute to the potential energy!"
386 cpabort(
"Missing critical ForceField parameters!")
389 END SUBROUTINE release_ff_missing_par
400 molecule_set, mm_section, charges)
402 TYPE(particle_type),
DIMENSION(:),
POINTER :: particle_set
403 TYPE(molecule_kind_type),
DIMENSION(:),
POINTER :: molecule_kind_set
404 TYPE(molecule_type),
DIMENSION(:),
POINTER :: molecule_set
405 TYPE(section_vals_type),
POINTER :: mm_section
406 REAL(kind=
dp),
DIMENSION(:),
POINTER :: charges
408 CHARACTER(len=*),
PARAMETER :: routinen =
'force_field_qeff_output'
410 CHARACTER(LEN=default_string_length) :: atmname, molname
411 INTEGER :: first, handle, iatom, imol, iw, j, jatom
412 LOGICAL :: shell_active
413 REAL(kind=
dp) :: mass, mass_mol, mass_sum, qeff, &
415 TYPE(atom_type),
DIMENSION(:),
POINTER :: atom_list
416 TYPE(atomic_kind_type),
POINTER :: atomic_kind
417 TYPE(cp_logger_type),
POINTER :: logger
418 TYPE(molecule_kind_type),
POINTER :: molecule_kind
419 TYPE(molecule_type),
POINTER :: molecule
420 TYPE(shell_kind_type),
POINTER :: shell
422 CALL timeset(routinen, handle)
437 DO imol = 1,
SIZE(molecule_kind_set)
440 molecule_kind => molecule_kind_set(imol)
442 j = molecule_kind_set(imol)%molecule_list(1)
443 molecule => molecule_set(j)
447 name=molname, atom_list=atom_list)
448 DO iatom = 1,
SIZE(atom_list)
449 atomic_kind => atom_list(iatom)%atomic_kind
451 name=atmname, qeff=qeff, mass=mass, shell_active=shell_active, shell=shell)
452 IF (shell_active) qeff = shell%charge_core + shell%charge_shell
453 IF (
ASSOCIATED(charges))
THEN
454 jatom = first - 1 + iatom
455 qeff = charges(jatom)
457 IF (iw > 0)
WRITE (iw, *)
" atom ", iatom,
" ", trim(atmname),
" charge = ", qeff
458 qeff_mol = qeff_mol + qeff
459 mass_mol = mass_mol + mass
461 CALL set_molecule_kind(molecule_kind=molecule_kind, charge=qeff_mol, mass=mass_mol)
462 IF (iw > 0)
WRITE (iw, *)
" Mol Kind ", trim(molname),
" charge = ", qeff_mol
469 DO iatom = 1,
SIZE(particle_set)
470 atomic_kind => particle_set(iatom)%atomic_kind
472 name=atmname, qeff=qeff, mass=mass, shell_active=shell_active, shell=shell)
473 IF (shell_active) qeff = shell%charge_core + shell%charge_shell
474 IF (
ASSOCIATED(charges))
THEN
475 qeff = charges(iatom)
477 IF (iw > 0)
WRITE (iw, *)
" atom ", iatom,
" ", trim(atmname), &
479 qeff_sum = qeff_sum + qeff
480 mass_sum = mass_sum + mass
482 IF (iw > 0)
WRITE (iw,
'(A,F20.10)')
" Total system charge = ", qeff_sum
483 IF (iw > 0)
WRITE (iw,
'(A,F20.10)')
" Total system mass = ", mass_sum
487 CALL timestop(handle)
497 TYPE(molecule_kind_type),
DIMENSION(:),
POINTER :: molecule_kind_set
498 TYPE(section_vals_type),
POINTER :: mm_section
500 CHARACTER(len=*),
PARAMETER :: routinen =
'clean_intra_force_kind'
502 INTEGER :: atm2_a, atm2_b, atm2_c, atm_a, atm_b, atm_c, atm_d, counter, handle, i, ibend, &
503 ibond, icolv, ig3x3, ig4x6, iimpr, ikind, iopbend, itorsion, iub, iw, j, k, nbend, nbond, &
504 newkind, ng3x3, ng4x6, nimpr, nopbend, ntorsion, nub
505 INTEGER,
POINTER :: bad1(:), bad2(:)
506 LOGICAL :: unsetme, valid_kind
507 TYPE(bend_kind_type),
DIMENSION(:),
POINTER :: bend_kind_set, new_bend_kind_set
508 TYPE(bend_type),
DIMENSION(:),
POINTER :: bend_list, new_bend_list
509 TYPE(bond_kind_type),
DIMENSION(:),
POINTER :: bond_kind_set, new_bond_kind_set
510 TYPE(bond_type),
DIMENSION(:),
POINTER :: bond_list, new_bond_list
511 TYPE(colvar_constraint_type),
DIMENSION(:), &
513 TYPE(cp_logger_type),
POINTER :: logger
514 TYPE(g3x3_constraint_type),
DIMENSION(:),
POINTER :: g3x3_list
515 TYPE(g4x6_constraint_type),
DIMENSION(:),
POINTER :: g4x6_list
516 TYPE(impr_kind_type),
DIMENSION(:),
POINTER :: impr_kind_set, new_impr_kind_set
517 TYPE(impr_type),
DIMENSION(:),
POINTER :: impr_list, new_impr_list
518 TYPE(molecule_kind_type),
POINTER :: molecule_kind
519 TYPE(opbend_kind_type),
DIMENSION(:),
POINTER :: new_opbend_kind_set, opbend_kind_set
520 TYPE(opbend_type),
DIMENSION(:),
POINTER :: new_opbend_list, opbend_list
521 TYPE(torsion_kind_type),
DIMENSION(:),
POINTER :: new_torsion_kind_set, torsion_kind_set
522 TYPE(torsion_type),
DIMENSION(:),
POINTER :: new_torsion_list, torsion_list
523 TYPE(ub_kind_type),
DIMENSION(:),
POINTER :: new_ub_kind_set, ub_kind_set
524 TYPE(ub_type),
DIMENSION(:),
POINTER :: new_ub_list, ub_list
526 CALL timeset(routinen, handle)
535 DO ikind = 1,
SIZE(molecule_kind_set)
536 molecule_kind => molecule_kind_set(ikind)
538 colv_list=colv_list, &
541 IF (
ASSOCIATED(colv_list))
THEN
542 DO icolv = 1,
SIZE(colv_list)
544 ((.NOT. colv_list(icolv)%use_points) .OR. (
SIZE(colv_list(icolv)%i_atoms) == 2)))
THEN
545 atm_a = colv_list(icolv)%i_atoms(1)
546 atm_b = colv_list(icolv)%i_atoms(2)
549 atm2_a = bond_list(ibond)%a
550 atm2_b = bond_list(ibond)%b
551 IF (atm2_a == atm_a .AND. atm2_b == atm_b) unsetme = .true.
552 IF (atm2_a == atm_b .AND. atm2_b == atm_a) unsetme = .true.
553 IF (unsetme) bond_list(ibond)%id_type =
do_ff_undef
563 DO ikind = 1,
SIZE(molecule_kind_set)
564 molecule_kind => molecule_kind_set(ikind)
566 colv_list=colv_list, &
569 IF (
ASSOCIATED(colv_list))
THEN
572 atm_a = bend_list(ibend)%a
573 atm_b = bend_list(ibend)%b
574 atm_c = bend_list(ibend)%c
575 DO icolv = 1,
SIZE(colv_list)
577 ((.NOT. colv_list(icolv)%use_points) .OR. (
SIZE(colv_list(icolv)%i_atoms) == 2)))
THEN
578 atm2_a = colv_list(icolv)%i_atoms(1)
579 atm2_b = colv_list(icolv)%i_atoms(2)
582 IF (((atm2_a == atm_a) .AND. (atm2_b == atm_c)) .OR. &
583 ((atm2_a == atm_c) .AND. (atm2_b == atm_a)))
THEN
589 IF (unsetme) bend_list(ibend)%id_type =
do_ff_undef
597 DO ikind = 1,
SIZE(molecule_kind_set)
598 molecule_kind => molecule_kind_set(ikind)
601 g3x3_list=g3x3_list, &
605 atm_a = g3x3_list(ig3x3)%a
606 atm_b = g3x3_list(ig3x3)%b
607 atm_c = g3x3_list(ig3x3)%c
610 atm2_a = bond_list(ibond)%a
611 atm2_b = bond_list(ibond)%b
612 IF (atm2_a == atm_a .AND. atm2_b == atm_b) unsetme = .true.
613 IF (atm2_a == atm_a .AND. atm2_b == atm_c) unsetme = .true.
614 IF (atm2_a == atm_c .AND. atm2_b == atm_c) unsetme = .true.
615 IF (unsetme) bond_list(ibond)%id_type =
do_ff_undef
623 DO ikind = 1,
SIZE(molecule_kind_set)
624 molecule_kind => molecule_kind_set(ikind)
627 g3x3_list=g3x3_list, &
631 atm_a = g3x3_list(ig3x3)%a
632 atm_b = g3x3_list(ig3x3)%b
633 atm_c = g3x3_list(ig3x3)%c
636 atm2_a = bend_list(ibend)%a
637 atm2_b = bend_list(ibend)%b
638 atm2_c = bend_list(ibend)%c
639 IF (atm2_a == atm_a .AND. atm2_b == atm_b .AND. atm2_c == atm_c) unsetme = .true.
640 IF (atm2_a == atm_a .AND. atm2_b == atm_c .AND. atm2_c == atm_b) unsetme = .true.
641 IF (atm2_a == atm_b .AND. atm2_b == atm_a .AND. atm2_c == atm_c) unsetme = .true.
642 IF (atm2_a == atm_b .AND. atm2_b == atm_c .AND. atm2_c == atm_a) unsetme = .true.
643 IF (unsetme) bend_list(ibend)%id_type =
do_ff_undef
651 DO ikind = 1,
SIZE(molecule_kind_set)
652 molecule_kind => molecule_kind_set(ikind)
655 g4x6_list=g4x6_list, &
659 atm_a = g4x6_list(ig4x6)%a
660 atm_b = g4x6_list(ig4x6)%b
661 atm_c = g4x6_list(ig4x6)%c
662 atm_d = g4x6_list(ig4x6)%d
665 atm2_a = bond_list(ibond)%a
666 atm2_b = bond_list(ibond)%b
667 IF (atm2_a == atm_a .AND. atm2_b == atm_b) unsetme = .true.
668 IF (atm2_a == atm_a .AND. atm2_b == atm_c) unsetme = .true.
669 IF (atm2_a == atm_a .AND. atm2_b == atm_d) unsetme = .true.
670 IF (unsetme) bond_list(ibond)%id_type =
do_ff_undef
678 DO ikind = 1,
SIZE(molecule_kind_set)
679 molecule_kind => molecule_kind_set(ikind)
682 g4x6_list=g4x6_list, &
686 atm_a = g4x6_list(ig4x6)%a
687 atm_b = g4x6_list(ig4x6)%b
688 atm_c = g4x6_list(ig4x6)%c
689 atm_d = g4x6_list(ig4x6)%d
692 atm2_a = bend_list(ibend)%a
693 atm2_b = bend_list(ibend)%b
694 atm2_c = bend_list(ibend)%c
695 IF (atm2_a == atm_b .AND. atm2_b == atm_a .AND. atm2_c == atm_c) unsetme = .true.
696 IF (atm2_a == atm_b .AND. atm2_b == atm_a .AND. atm2_c == atm_d) unsetme = .true.
697 IF (atm2_a == atm_c .AND. atm2_b == atm_a .AND. atm2_c == atm_d) unsetme = .true.
698 IF (unsetme) bend_list(ibend)%id_type =
do_ff_undef
706 DO ikind = 1,
SIZE(molecule_kind_set)
707 molecule_kind => molecule_kind_set(ikind)
710 bond_kind_set=bond_kind_set, &
713 IF (iw > 0)
WRITE (iw, *)
" Mol(", ikind,
") Old BOND Count: ", &
714 SIZE(bond_list),
SIZE(bond_kind_set)
715 IF (iw > 0)
WRITE (iw,
'(2I6)') (bond_list(ibond)%a, bond_list(ibond)%b, ibond=1,
SIZE(bond_list))
717 ALLOCATE (bad1(
SIZE(bond_kind_set)))
719 DO ibond = 1,
SIZE(bond_kind_set)
721 IF (bond_kind_set(ibond)%id_type ==
do_ff_undef) unsetme = .true.
723 DO i = 1,
SIZE(bond_list)
725 bond_list(i)%bond_kind%kind_number == ibond)
THEN
730 IF (.NOT. valid_kind) unsetme = .true.
731 IF (unsetme) bad1(ibond) = 1
733 IF (sum(bad1) /= 0)
THEN
734 counter =
SIZE(bond_kind_set) - sum(bad1)
737 DO ibond = 1,
SIZE(bond_kind_set)
738 IF (bad1(ibond) == 0)
THEN
739 counter = counter + 1
740 new_bond_kind_set(counter) = bond_kind_set(ibond)
744 ALLOCATE (bad2(
SIZE(bond_list)))
746 DO ibond = 1,
SIZE(bond_list)
748 IF (bond_list(ibond)%bond_kind%id_type ==
do_ff_undef) unsetme = .true.
749 IF (bond_list(ibond)%id_type ==
do_ff_undef) unsetme = .true.
750 IF (unsetme) bad2(ibond) = 1
752 IF (sum(bad2) /= 0)
THEN
753 counter =
SIZE(bond_list) - sum(bad2)
754 ALLOCATE (new_bond_list(counter))
756 DO ibond = 1,
SIZE(bond_list)
757 IF (bad2(ibond) == 0)
THEN
758 counter = counter + 1
759 new_bond_list(counter) = bond_list(ibond)
760 newkind = bond_list(ibond)%bond_kind%kind_number
761 newkind = newkind - sum(bad1(1:newkind))
762 new_bond_list(counter)%bond_kind => new_bond_kind_set(newkind)
766 nbond=
SIZE(new_bond_list), &
767 bond_kind_set=new_bond_kind_set, &
768 bond_list=new_bond_list)
769 DO ibond = 1,
SIZE(new_bond_kind_set)
770 new_bond_kind_set(ibond)%kind_number = ibond
775 DEALLOCATE (bond_list)
776 IF (iw > 0)
WRITE (iw, *)
" Mol(", ikind,
") New BOND Count: ", &
777 SIZE(new_bond_list),
SIZE(new_bond_kind_set)
778 IF (iw > 0)
WRITE (iw,
'(2I6)') (new_bond_list(ibond)%a, new_bond_list(ibond)%b, &
779 ibond=1,
SIZE(new_bond_list))
788 DO ikind = 1,
SIZE(molecule_kind_set)
789 molecule_kind => molecule_kind_set(ikind)
792 bend_kind_set=bend_kind_set, &
795 IF (iw > 0)
WRITE (iw, *)
" Mol(", ikind,
") Old BEND Count: ", &
796 SIZE(bend_list),
SIZE(bend_kind_set)
797 IF (iw > 0)
WRITE (iw,
'(3I6)') (bend_list(ibend)%a, bend_list(ibend)%b, &
798 bend_list(ibend)%c, ibend=1,
SIZE(bend_list))
800 ALLOCATE (bad1(
SIZE(bend_kind_set)))
802 DO ibend = 1,
SIZE(bend_kind_set)
804 IF (bend_kind_set(ibend)%id_type ==
do_ff_undef) unsetme = .true.
806 DO i = 1,
SIZE(bend_list)
808 bend_list(i)%bend_kind%kind_number == ibend)
THEN
813 IF (.NOT. valid_kind) unsetme = .true.
814 IF (unsetme) bad1(ibend) = 1
816 IF (sum(bad1) /= 0)
THEN
817 counter =
SIZE(bend_kind_set) - sum(bad1)
820 DO ibend = 1,
SIZE(bend_kind_set)
821 IF (bad1(ibend) == 0)
THEN
822 counter = counter + 1
823 new_bend_kind_set(counter) = bend_kind_set(ibend)
827 ALLOCATE (bad2(
SIZE(bend_list)))
829 DO ibend = 1,
SIZE(bend_list)
831 IF (bend_list(ibend)%bend_kind%id_type ==
do_ff_undef) unsetme = .true.
832 IF (bend_list(ibend)%id_type ==
do_ff_undef) unsetme = .true.
833 IF (unsetme) bad2(ibend) = 1
835 IF (sum(bad2) /= 0)
THEN
836 counter =
SIZE(bend_list) - sum(bad2)
837 ALLOCATE (new_bend_list(counter))
839 DO ibend = 1,
SIZE(bend_list)
840 IF (bad2(ibend) == 0)
THEN
841 counter = counter + 1
842 new_bend_list(counter) = bend_list(ibend)
843 newkind = bend_list(ibend)%bend_kind%kind_number
844 newkind = newkind - sum(bad1(1:newkind))
845 new_bend_list(counter)%bend_kind => new_bend_kind_set(newkind)
849 nbend=
SIZE(new_bend_list), &
850 bend_kind_set=new_bend_kind_set, &
851 bend_list=new_bend_list)
852 DO ibend = 1,
SIZE(new_bend_kind_set)
853 new_bend_kind_set(ibend)%kind_number = ibend
858 DEALLOCATE (bend_list)
859 IF (iw > 0)
WRITE (iw, *)
" Mol(", ikind,
") New BEND Count: ", &
860 SIZE(new_bend_list),
SIZE(new_bend_kind_set)
861 IF (iw > 0)
WRITE (iw,
'(3I6)') (new_bend_list(ibend)%a, new_bend_list(ibend)%b, &
862 new_bend_list(ibend)%c, ibend=1,
SIZE(new_bend_list))
872 DO ikind = 1,
SIZE(molecule_kind_set)
873 molecule_kind => molecule_kind_set(ikind)
876 ub_kind_set=ub_kind_set, &
879 IF (iw > 0)
WRITE (iw, *)
" Mol(", ikind,
") Old UB Count: ", &
880 SIZE(ub_list),
SIZE(ub_kind_set)
881 IF (iw > 0)
WRITE (iw,
'(3I6)') (ub_list(iub)%a, ub_list(iub)%b, &
882 ub_list(iub)%c, iub=1,
SIZE(ub_list))
884 ALLOCATE (bad1(
SIZE(ub_kind_set)))
886 DO iub = 1,
SIZE(ub_kind_set)
888 IF (ub_kind_set(iub)%id_type ==
do_ff_undef) unsetme = .true.
890 DO i = 1,
SIZE(ub_list)
892 ub_list(i)%ub_kind%kind_number == iub)
THEN
897 IF (.NOT. valid_kind) unsetme = .true.
898 IF (unsetme) bad1(iub) = 1
900 IF (sum(bad1) /= 0)
THEN
901 counter =
SIZE(ub_kind_set) - sum(bad1)
904 DO iub = 1,
SIZE(ub_kind_set)
905 IF (bad1(iub) == 0)
THEN
906 counter = counter + 1
907 new_ub_kind_set(counter) = ub_kind_set(iub)
911 ALLOCATE (bad2(
SIZE(ub_list)))
913 DO iub = 1,
SIZE(ub_list)
915 IF (ub_list(iub)%ub_kind%id_type ==
do_ff_undef) unsetme = .true.
916 IF (ub_list(iub)%id_type ==
do_ff_undef) unsetme = .true.
917 IF (unsetme) bad2(iub) = 1
919 IF (sum(bad2) /= 0)
THEN
920 counter =
SIZE(ub_list) - sum(bad2)
921 ALLOCATE (new_ub_list(counter))
923 DO iub = 1,
SIZE(ub_list)
924 IF (bad2(iub) == 0)
THEN
925 counter = counter + 1
926 new_ub_list(counter) = ub_list(iub)
927 newkind = ub_list(iub)%ub_kind%kind_number
928 newkind = newkind - sum(bad1(1:newkind))
929 new_ub_list(counter)%ub_kind => new_ub_kind_set(newkind)
933 nub=
SIZE(new_ub_list), &
934 ub_kind_set=new_ub_kind_set, &
936 DO iub = 1,
SIZE(new_ub_kind_set)
937 new_ub_kind_set(iub)%kind_number = iub
943 IF (iw > 0)
WRITE (iw, *)
" Mol(", ikind,
") New UB Count: ", &
944 SIZE(new_ub_list),
SIZE(new_ub_kind_set)
945 IF (iw > 0)
WRITE (iw,
'(3I6)') (new_ub_list(iub)%a, new_ub_list(iub)%b, &
946 new_ub_list(iub)%c, iub=1,
SIZE(new_ub_list))
956 DO ikind = 1,
SIZE(molecule_kind_set)
957 molecule_kind => molecule_kind_set(ikind)
960 torsion_kind_set=torsion_kind_set, &
961 torsion_list=torsion_list)
962 IF (ntorsion > 0)
THEN
963 IF (iw > 0)
WRITE (iw, *)
" Mol(", ikind,
") Old TORSION Count: ", &
964 SIZE(torsion_list),
SIZE(torsion_kind_set)
965 IF (iw > 0)
WRITE (iw,
'(4I6)') (torsion_list(itorsion)%a, torsion_list(itorsion)%b, &
966 torsion_list(itorsion)%c, torsion_list(itorsion)%d, itorsion=1,
SIZE(torsion_list))
968 ALLOCATE (bad1(
SIZE(torsion_kind_set)))
970 DO itorsion = 1,
SIZE(torsion_kind_set)
972 IF (torsion_kind_set(itorsion)%id_type ==
do_ff_undef) unsetme = .true.
974 DO i = 1,
SIZE(torsion_list)
976 torsion_list(i)%torsion_kind%kind_number == itorsion)
THEN
981 IF (.NOT. valid_kind) unsetme = .true.
982 IF (unsetme) bad1(itorsion) = 1
984 IF (sum(bad1) /= 0)
THEN
985 counter =
SIZE(torsion_kind_set) - sum(bad1)
988 DO itorsion = 1,
SIZE(torsion_kind_set)
989 IF (bad1(itorsion) == 0)
THEN
990 counter = counter + 1
991 new_torsion_kind_set(counter) = torsion_kind_set(itorsion)
992 i =
SIZE(torsion_kind_set(itorsion)%m)
993 j =
SIZE(torsion_kind_set(itorsion)%k)
994 k =
SIZE(torsion_kind_set(itorsion)%phi0)
995 ALLOCATE (new_torsion_kind_set(counter)%m(i))
996 ALLOCATE (new_torsion_kind_set(counter)%k(i))
997 ALLOCATE (new_torsion_kind_set(counter)%phi0(i))
998 new_torsion_kind_set(counter)%m = torsion_kind_set(itorsion)%m
999 new_torsion_kind_set(counter)%k = torsion_kind_set(itorsion)%k
1000 new_torsion_kind_set(counter)%phi0 = torsion_kind_set(itorsion)%phi0
1004 ALLOCATE (bad2(
SIZE(torsion_list)))
1006 DO itorsion = 1,
SIZE(torsion_list)
1008 IF (torsion_list(itorsion)%torsion_kind%id_type ==
do_ff_undef) unsetme = .true.
1009 IF (torsion_list(itorsion)%id_type ==
do_ff_undef) unsetme = .true.
1010 IF (unsetme) bad2(itorsion) = 1
1012 IF (sum(bad2) /= 0)
THEN
1013 counter =
SIZE(torsion_list) - sum(bad2)
1014 ALLOCATE (new_torsion_list(counter))
1016 DO itorsion = 1,
SIZE(torsion_list)
1017 IF (bad2(itorsion) == 0)
THEN
1018 counter = counter + 1
1019 new_torsion_list(counter) = torsion_list(itorsion)
1020 newkind = torsion_list(itorsion)%torsion_kind%kind_number
1021 newkind = newkind - sum(bad1(1:newkind))
1022 new_torsion_list(counter)%torsion_kind => new_torsion_kind_set(newkind)
1026 ntorsion=
SIZE(new_torsion_list), &
1027 torsion_kind_set=new_torsion_kind_set, &
1028 torsion_list=new_torsion_list)
1029 DO itorsion = 1,
SIZE(new_torsion_kind_set)
1030 new_torsion_kind_set(itorsion)%kind_number = itorsion
1034 DO itorsion = 1,
SIZE(torsion_kind_set)
1037 DEALLOCATE (torsion_kind_set)
1038 DEALLOCATE (torsion_list)
1039 IF (iw > 0)
WRITE (iw, *)
" Mol(", ikind,
") New TORSION Count: ", &
1040 SIZE(new_torsion_list),
SIZE(new_torsion_kind_set)
1041 IF (iw > 0)
WRITE (iw,
'(4I6)') (new_torsion_list(itorsion)%a, new_torsion_list(itorsion)%b, &
1042 new_torsion_list(itorsion)%c, new_torsion_list(itorsion)%d, itorsion=1, &
1043 SIZE(new_torsion_list))
1053 DO ikind = 1,
SIZE(molecule_kind_set)
1054 molecule_kind => molecule_kind_set(ikind)
1057 impr_kind_set=impr_kind_set, &
1058 impr_list=impr_list)
1060 IF (iw > 0)
WRITE (iw, *)
" Mol(", ikind,
") Old IMPROPER Count: ", &
1061 SIZE(impr_list),
SIZE(impr_kind_set)
1062 NULLIFY (bad1, bad2)
1063 ALLOCATE (bad1(
SIZE(impr_kind_set)))
1065 DO iimpr = 1,
SIZE(impr_kind_set)
1067 IF (impr_kind_set(iimpr)%id_type ==
do_ff_undef) unsetme = .true.
1068 valid_kind = .false.
1069 DO i = 1,
SIZE(impr_list)
1071 impr_list(i)%impr_kind%kind_number == iimpr)
THEN
1076 IF (.NOT. valid_kind) unsetme = .true.
1077 IF (unsetme) bad1(iimpr) = 1
1079 IF (sum(bad1) /= 0)
THEN
1080 counter =
SIZE(impr_kind_set) - sum(bad1)
1083 DO iimpr = 1,
SIZE(impr_kind_set)
1084 IF (bad1(iimpr) == 0)
THEN
1085 counter = counter + 1
1086 new_impr_kind_set(counter) = impr_kind_set(iimpr)
1090 ALLOCATE (bad2(
SIZE(impr_list)))
1092 DO iimpr = 1,
SIZE(impr_list)
1094 IF (impr_list(iimpr)%impr_kind%id_type ==
do_ff_undef) unsetme = .true.
1095 IF (impr_list(iimpr)%id_type ==
do_ff_undef) unsetme = .true.
1096 IF (unsetme) bad2(iimpr) = 1
1098 IF (sum(bad2) /= 0)
THEN
1099 counter =
SIZE(impr_list) - sum(bad2)
1100 ALLOCATE (new_impr_list(counter))
1102 DO iimpr = 1,
SIZE(impr_list)
1103 IF (bad2(iimpr) == 0)
THEN
1104 counter = counter + 1
1105 new_impr_list(counter) = impr_list(iimpr)
1106 newkind = impr_list(iimpr)%impr_kind%kind_number
1107 newkind = newkind - sum(bad1(1:newkind))
1108 new_impr_list(counter)%impr_kind => new_impr_kind_set(newkind)
1112 nimpr=
SIZE(new_impr_list), &
1113 impr_kind_set=new_impr_kind_set, &
1114 impr_list=new_impr_list)
1115 DO iimpr = 1,
SIZE(new_impr_kind_set)
1116 new_impr_kind_set(iimpr)%kind_number = iimpr
1120 DO iimpr = 1,
SIZE(impr_kind_set)
1123 DEALLOCATE (impr_kind_set)
1124 DEALLOCATE (impr_list)
1125 IF (iw > 0)
WRITE (iw, *)
" Mol(", ikind,
") New IMPROPER Count: ", &
1126 SIZE(new_impr_list),
SIZE(new_impr_kind_set)
1136 DO ikind = 1,
SIZE(molecule_kind_set)
1137 molecule_kind => molecule_kind_set(ikind)
1140 opbend_kind_set=opbend_kind_set, &
1141 opbend_list=opbend_list)
1142 IF (nopbend > 0)
THEN
1143 IF (iw > 0)
WRITE (iw, *)
" Mol(", ikind,
") Old OPBEND Count: ", &
1144 SIZE(opbend_list),
SIZE(opbend_kind_set)
1145 NULLIFY (bad1, bad2)
1146 ALLOCATE (bad1(
SIZE(opbend_kind_set)))
1148 DO iopbend = 1,
SIZE(opbend_kind_set)
1150 IF (opbend_kind_set(iopbend)%id_type ==
do_ff_undef) unsetme = .true.
1151 valid_kind = .false.
1152 DO i = 1,
SIZE(opbend_list)
1154 opbend_list(i)%opbend_kind%kind_number == iopbend)
THEN
1159 IF (.NOT. valid_kind) unsetme = .true.
1160 IF (unsetme) bad1(iopbend) = 1
1162 IF (sum(bad1) /= 0)
THEN
1163 counter =
SIZE(opbend_kind_set) - sum(bad1)
1166 DO iopbend = 1,
SIZE(opbend_kind_set)
1167 IF (bad1(iopbend) == 0)
THEN
1168 counter = counter + 1
1169 new_opbend_kind_set(counter) = opbend_kind_set(iopbend)
1173 ALLOCATE (bad2(
SIZE(opbend_list)))
1175 DO iopbend = 1,
SIZE(opbend_list)
1177 IF (opbend_list(iopbend)%opbend_kind%id_type ==
do_ff_undef) unsetme = .true.
1178 IF (opbend_list(iopbend)%id_type ==
do_ff_undef) unsetme = .true.
1179 IF (unsetme) bad2(iopbend) = 1
1181 IF (sum(bad2) /= 0)
THEN
1182 counter =
SIZE(opbend_list) - sum(bad2)
1183 ALLOCATE (new_opbend_list(counter))
1185 DO iopbend = 1,
SIZE(opbend_list)
1186 IF (bad2(iopbend) == 0)
THEN
1187 counter = counter + 1
1188 new_opbend_list(counter) = opbend_list(iopbend)
1189 newkind = opbend_list(iopbend)%opbend_kind%kind_number
1190 newkind = newkind - sum(bad1(1:newkind))
1191 new_opbend_list(counter)%opbend_kind => new_opbend_kind_set(newkind)
1195 nopbend=
SIZE(new_opbend_list), &
1196 opbend_kind_set=new_opbend_kind_set, &
1197 opbend_list=new_opbend_list)
1198 DO iopbend = 1,
SIZE(new_opbend_kind_set)
1199 new_opbend_kind_set(iopbend)%kind_number = iopbend
1203 DEALLOCATE (opbend_kind_set)
1204 DEALLOCATE (opbend_list)
1205 IF (iw > 0)
WRITE (iw, *)
" Mol(", ikind,
") New OPBEND Count: ", &
1206 SIZE(new_opbend_list),
SIZE(new_opbend_kind_set)
1219 CALL timestop(handle)
1235 var_values, size_variables, i_rep_sec, input_variables)
1236 TYPE(section_vals_type),
POINTER :: gen_section
1237 CHARACTER(LEN=*),
INTENT(IN) :: func_name
1238 CHARACTER(LEN=default_path_length),
INTENT(OUT) :: xfunction
1239 CHARACTER(LEN=default_string_length), &
1240 DIMENSION(:),
POINTER :: parameters
1241 REAL(kind=
dp),
DIMENSION(:),
POINTER :: values
1242 REAL(kind=
dp),
DIMENSION(:),
OPTIONAL,
POINTER :: var_values
1243 INTEGER,
INTENT(IN),
OPTIONAL :: size_variables, i_rep_sec
1244 CHARACTER(LEN=*),
DIMENSION(:),
OPTIONAL :: input_variables
1246 CHARACTER(LEN=default_string_length), &
1247 DIMENSION(:),
POINTER :: my_par, my_par_tmp, my_units, &
1248 my_units_tmp, my_var
1249 INTEGER :: i, ind, irep, isize, j, mydim, n_par, &
1250 n_units, n_val, nblank
1252 REAL(kind=
dp),
DIMENSION(:),
POINTER :: my_val, my_val_tmp
1254 NULLIFY (my_var, my_par, my_val, my_par_tmp, my_val_tmp)
1256 NULLIFY (my_units_tmp)
1257 IF (
ASSOCIATED(parameters))
THEN
1258 DEALLOCATE (parameters)
1260 IF (
ASSOCIATED(values))
THEN
1264 IF (
PRESENT(i_rep_sec)) irep = i_rep_sec
1267 CALL compress(xfunction, full=.true.)
1268 IF (
PRESENT(input_variables))
THEN
1269 ALLOCATE (my_var(
SIZE(input_variables)))
1270 my_var = input_variables
1274 IF (
ASSOCIATED(my_var))
THEN
1275 mydim =
SIZE(my_var)
1277 IF (
PRESENT(size_variables))
THEN
1278 cpassert(mydim == size_variables)
1283 check = (n_par > 0) .EQV. (n_val > 0)
1288 ALLOCATE (my_par(0))
1289 ALLOCATE (my_val(0))
1291 isize =
SIZE(my_par)
1292 CALL section_vals_val_get(gen_section,
"PARAMETERS", i_rep_section=irep, i_rep_val=i, c_vals=my_par_tmp)
1293 nblank = count(my_par_tmp ==
"")
1294 CALL reallocate(my_par, 1, isize +
SIZE(my_par_tmp) - nblank)
1296 DO j = 1,
SIZE(my_par_tmp)
1297 IF (my_par_tmp(j) ==
"") cycle
1299 my_par(isize + ind) = my_par_tmp(j)
1303 isize =
SIZE(my_val)
1304 CALL section_vals_val_get(gen_section,
"VALUES", i_rep_section=irep, i_rep_val=i, r_vals=my_val_tmp)
1305 CALL reallocate(my_val, 1, isize +
SIZE(my_val_tmp))
1306 my_val(isize + 1:isize +
SIZE(my_val_tmp)) = my_val_tmp
1308 cpassert(
SIZE(my_par) ==
SIZE(my_val))
1310 ALLOCATE (my_units(0))
1311 IF (n_units > 0)
THEN
1313 isize =
SIZE(my_units)
1314 CALL section_vals_val_get(gen_section,
"UNITS", i_rep_section=irep, i_rep_val=i, c_vals=my_units_tmp)
1315 nblank = count(my_units_tmp ==
"")
1316 CALL reallocate(my_units, 1, isize +
SIZE(my_units_tmp) - nblank)
1318 DO j = 1,
SIZE(my_units_tmp)
1319 IF (my_units_tmp(j) ==
"") cycle
1321 my_units(isize + ind) = my_units_tmp(j)
1324 cpassert(
SIZE(my_units) ==
SIZE(my_val))
1326 mydim = mydim +
SIZE(my_val)
1327 IF (
SIZE(my_val) == 0)
THEN
1330 DEALLOCATE (my_units)
1334 ALLOCATE (parameters(mydim))
1335 ALLOCATE (values(mydim))
1337 parameters(1:
SIZE(my_var)) = my_var
1338 values(1:
SIZE(my_var)) = 0.0_dp
1339 IF (
PRESENT(var_values))
THEN
1340 cpassert(
SIZE(var_values) ==
SIZE(my_var))
1341 values(1:
SIZE(my_var)) = var_values
1343 IF (
ASSOCIATED(my_val))
THEN
1344 DO i = 1,
SIZE(my_val)
1345 parameters(
SIZE(my_var) + i) = my_par(i)
1346 IF (n_units > 0)
THEN
1347 values(
SIZE(my_var) + i) =
cp_unit_to_cp2k(my_val(i), trim(adjustl(my_units(i))))
1349 values(
SIZE(my_var) + i) = my_val(i)
1354 IF (
ASSOCIATED(my_par))
THEN
1357 IF (
ASSOCIATED(my_val))
THEN
1360 IF (
ASSOCIATED(my_units))
THEN
1361 DEALLOCATE (my_units)
1363 IF (
PRESENT(input_variables))
THEN
Define the atomic kind types and their sub types.
subroutine, public get_atomic_kind(atomic_kind, fist_potential, element_symbol, name, mass, kind_number, natom, atom_list, rcov, rvdw, z, qeff, apol, cpol, mm_radius, shell, shell_active, damping)
Get attributes of an atomic kind.
Handles all functions related to the CELL.
Initialize the collective variables types.
integer, parameter, public dist_colvar_id
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,...
real(kind=dp) function, public cp_unit_to_cp2k(value, unit_str, defaults, power)
converts to the internal cp2k units to the given unit
subroutine, public ewald_env_get(ewald_env, ewald_type, alpha, eps_pol, epsilon, gmax, ns_max, o_spline, group, para_env, poisson_section, precs, rcut, do_multipoles, max_multipole, do_ipol, max_ipol_iter, interaction_cutoffs, cell_hmat)
Purpose: Get the EWALD environment.
subroutine, public fist_nonbond_env_create(fist_nonbond_env, atomic_kind_set, potparm14, potparm, do_nonbonded, do_electrostatics, verlet_skin, ewald_rcut, ei_scale14, vdw_scale14, shift_cutoff)
allocates and intitializes a fist_nonbond_env
subroutine, public fist_nonbond_env_set(fist_nonbond_env, potparm14, potparm, rlist_cut, rlist_lowsq, nonbonded, aup, lup, ei_scale14, vdw_scale14, shift_cutoff, do_electrostatics, r_last_update, r_last_update_pbc, rshell_last_update_pbc, rcore_last_update_pbc, cell_last_update, num_update, last_update, counter, natom_types, long_range_correction, eam_data, quip_data, nequip_data, allegro_data, deepmd_data, charges)
sets a fist_nonbond_env
Define all structure types related to force field kinds.
pure subroutine, public deallocate_bend_kind_set(bend_kind_set)
Deallocate a bend kind set.
integer, parameter, public do_ff_undef
pure subroutine, public allocate_impr_kind_set(impr_kind_set, nkind)
Allocate and initialize a impr kind set.
pure subroutine, public torsion_kind_dealloc_ref(torsion_kind)
Deallocate a torsion kind element.
pure subroutine, public allocate_torsion_kind_set(torsion_kind_set, nkind)
Allocate and initialize a torsion kind set.
pure subroutine, public allocate_bond_kind_set(bond_kind_set, nkind)
Allocate and initialize a bond kind set.
pure subroutine, public allocate_opbend_kind_set(opbend_kind_set, nkind)
Allocate and initialize a opbend kind set.
pure subroutine, public ub_kind_dealloc_ref(ub_kind_set)
Deallocate a ub kind set.
pure subroutine, public allocate_bend_kind_set(bend_kind_set, nkind)
Allocate and initialize a bend kind set.
pure subroutine, public deallocate_bond_kind_set(bond_kind_set)
Deallocate a bond kind set.
pure subroutine, public allocate_ub_kind_set(ub_kind_set, nkind)
Allocate and initialize a ub kind set.
pure subroutine, public impr_kind_dealloc_ref()
Deallocate a impr kind element.
Define all structures types related to force_fields.
subroutine, public force_field_pack_radius(atomic_kind_set, iw, subsys_section)
Set up the radius of the electrostatic multipole in Fist.
subroutine, public force_field_pack_shell(particle_set, atomic_kind_set, molecule_kind_set, molecule_set, root_section, subsys_section, shell_particle_set, core_particle_set, cell, iw, inp_info)
Set up shell potential parameters.
subroutine, public force_field_pack_opbend(particle_set, molecule_kind_set, molecule_set, Ainfo, inp_info)
Pack in opbend information needed for the force_field. No loop over params for charmm,...
subroutine, public force_field_pack_impr(particle_set, molecule_kind_set, molecule_set, Ainfo, chm_info, inp_info, gro_info)
Pack in impropers information needed for the force_field.
subroutine, public force_field_pack_bend(particle_set, molecule_kind_set, molecule_set, fatal, Ainfo, chm_info, inp_info, gro_info, amb_info)
Pack in bends information needed for the force_field.
subroutine, public force_field_pack_charges(charges, charges_section, particle_set, my_qmmm, qmmm_env, inp_info, iw4)
Set up array of full charges.
subroutine, public force_field_pack_pol(atomic_kind_set, iw, inp_info)
Set up the polarizable FF parameters.
subroutine, public force_field_pack_nonbond(atomic_kind_set, ff_type, qmmm_env, fatal, iw, Ainfo, chm_info, inp_info, gro_info, amb_info, potparm_nonbond, ewald_env)
Assign input and potential info to potparm_nonbond.
subroutine, public force_field_pack_bond(particle_set, molecule_kind_set, molecule_set, fatal, Ainfo, chm_info, inp_info, gro_info, amb_info)
Pack in bonds information needed for the force_field.
subroutine, public force_field_unique_ub(particle_set, molecule_kind_set, molecule_set)
Determine the number of unique Urey-Bradley kind and allocate ub_kind_set.
subroutine, public force_field_pack_tors(particle_set, molecule_kind_set, molecule_set, Ainfo, chm_info, inp_info, gro_info, amb_info, iw)
Pack in torsion information needed for the force_field.
subroutine, public force_field_unique_opbend(particle_set, molecule_kind_set, molecule_set, ff_type)
Determine the number of unique opbend kind and allocate opbend_kind_set based on the present improper...
subroutine, public force_field_pack_splines(atomic_kind_set, ff_type, iw2, iw3, iw4, potparm, do_zbl, nonbonded_type)
create the pair potential spline environment
subroutine, public force_field_unique_bend(particle_set, molecule_kind_set, molecule_set, ff_type)
Determine the number of unique bend kind and allocate bend_kind_set.
subroutine, public force_field_unique_impr(particle_set, molecule_kind_set, molecule_set, ff_type)
Determine the number of unique impr kind and allocate impr_kind_set.
subroutine, public force_field_unique_bond(particle_set, molecule_kind_set, molecule_set, ff_type)
Determine the number of unique bond kind and allocate bond_kind_set.
subroutine, public force_field_pack_damp(atomic_kind_set, iw, inp_info)
Set up damping parameters.
subroutine, public force_field_pack_charge(atomic_kind_set, qmmm_env, fatal, iw, iw4, Ainfo, my_qmmm, inp_info)
Set up atomic_kind_set()fist_potentail%[qeff] and shell potential parameters.
subroutine, public force_field_pack_ub(particle_set, molecule_kind_set, molecule_set, Ainfo, chm_info, inp_info, iw)
Pack in Urey-Bradley information needed for the force_field.
subroutine, public force_field_pack_eicut(atomic_kind_set, ff_type, potparm_nonbond, ewald_env)
Compute the electrostatic interaction cutoffs.
subroutine, public force_field_unique_tors(particle_set, molecule_kind_set, molecule_set, ff_type)
Determine the number of unique torsion kind and allocate torsion_kind_set.
subroutine, public force_field_pack_nonbond14(atomic_kind_set, ff_type, qmmm_env, iw, Ainfo, chm_info, inp_info, gro_info, amb_info, potparm_nonbond14, ewald_env)
Assign input and potential info to potparm_nonbond14.
subroutine, public force_field_pack(particle_set, atomic_kind_set, molecule_kind_set, molecule_set, ewald_env, fist_nonbond_env, ff_type, root_section, qmmm, qmmm_env, mm_section, subsys_section, shell_particle_set, core_particle_set, cell)
Pack in all the information needed for the force_field.
subroutine, public get_generic_info(gen_section, func_name, xfunction, parameters, values, var_values, size_variables, i_rep_sec, input_variables)
Reads from the input structure all information for generic functions.
subroutine, public force_field_qeff_output(particle_set, molecule_kind_set, molecule_set, mm_section, charges)
Compute the total qeff charges for each molecule kind and total system.
subroutine, public clean_intra_force_kind(molecule_kind_set, mm_section)
Removes UNSET force field types.
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public default_path_length
Utility routines for the memory handling.
Define the molecule kind structure types and the corresponding functionality.
subroutine, public get_molecule_kind(molecule_kind, atom_list, bond_list, bend_list, ub_list, impr_list, opbend_list, colv_list, fixd_list, g3x3_list, g4x6_list, vsite_list, torsion_list, shell_list, name, mass, charge, kind_number, natom, nbend, nbond, nub, nimpr, nopbend, nconstraint, nconstraint_fixd, nfixd, ncolv, ng3x3, ng4x6, nvsite, nfixd_restraint, ng3x3_restraint, ng4x6_restraint, nvsite_restraint, nrestraints, nmolecule, nsgf, nshell, ntorsion, molecule_list, nelectron, nelectron_alpha, nelectron_beta, bond_kind_set, bend_kind_set, ub_kind_set, impr_kind_set, opbend_kind_set, torsion_kind_set, molname_generated)
Get informations about a molecule kind.
subroutine, public set_molecule_kind(molecule_kind, name, mass, charge, kind_number, molecule_list, atom_list, nbond, bond_list, nbend, bend_list, nub, ub_list, nimpr, impr_list, nopbend, opbend_list, ntorsion, torsion_list, fixd_list, ncolv, colv_list, ng3x3, g3x3_list, ng4x6, nfixd, g4x6_list, nvsite, vsite_list, ng3x3_restraint, ng4x6_restraint, nfixd_restraint, nshell, shell_list, nvsite_restraint, bond_kind_set, bend_kind_set, ub_kind_set, torsion_kind_set, impr_kind_set, opbend_kind_set, nelectron, nsgf, molname_generated)
Set the components of a molecule kind.
Define the data structure for the molecule information.
subroutine, public get_molecule(molecule, molecule_kind, lmi, lci, lg3x3, lg4x6, lcolv, first_atom, last_atom, first_shell, last_shell)
Get components from a molecule data set.
Define the data structure for the particle information.
Utilities for string manipulations.
subroutine, public compress(string, full)
Eliminate multiple space characters in a string. If full is .TRUE., then all spaces are eliminated.