62#include "./base/base_uses.f90"
73 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'constraint'
74 INTEGER,
PARAMETER,
PRIVATE :: Max_Shake_Iter = 1000
98 SUBROUTINE shake_control(gci, local_molecules, molecule_set, molecule_kind_set, &
99 particle_set, pos, vel, dt, shake_tol, log_unit, lagrange_mult, dump_lm, &
100 cell, group, local_particles)
107 REAL(kind=
dp),
INTENT(INOUT) :: pos(:, :), vel(:, :)
108 REAL(kind=
dp),
INTENT(in) :: dt, shake_tol
109 INTEGER,
INTENT(in) :: log_unit, lagrange_mult
110 LOGICAL,
INTENT(IN) :: dump_lm
116 CHARACTER(LEN=*),
PARAMETER :: routinen =
'shake_control'
118 INTEGER :: handle, i, ikind, imol, ishake_ext, &
119 ishake_int, k, n3x3con, n4x6con, &
120 nconstraint, nkind, nmol_per_kind, &
122 LOGICAL :: do_ext_constraint
123 REAL(kind=
dp) :: int_max_sigma, mass, max_sigma
124 REAL(kind=
dp),
DIMENSION(SIZE(pos, 2)) :: imass
130 CALL timeset(routinen, handle)
131 nkind =
SIZE(molecule_kind_set)
132 DO k = 1,
SIZE(pos, 2)
133 atomic_kind => particle_set(k)%atomic_kind
135 imass(k) = 1.0_dp/max(mass, epsilon(0.0_dp))
137 do_ext_constraint = (gci%ntot /= 0)
139 max_sigma = -1.0e+10_dp
140 shake_inter_loop:
DO WHILE ((abs(max_sigma) >= shake_tol) .AND. (ishake_ext <= max_shake_iter))
142 ishake_ext = ishake_ext + 1
144 mol:
DO ikind = 1, nkind
145 nmol_per_kind = local_molecules%n_el(ikind)
146 DO imol = 1, nmol_per_kind
147 i = local_molecules%list(ikind)%array(imol)
148 molecule => molecule_set(i)
149 molecule_kind => molecule%molecule_kind
151 ng3x3=n3x3con, ng4x6=n4x6con, &
152 nconstraint=nconstraint, nvsite=nvsitecon)
153 IF (nconstraint == 0) cycle
155 int_max_sigma = -1.0e+10_dp
156 shake_intra_loop:
DO WHILE ((abs(int_max_sigma) >= shake_tol) .AND. (ishake_int <= max_shake_iter))
157 int_max_sigma = 0.0_dp
158 ishake_int = ishake_int + 1
160 IF (n3x3con /= 0)
THEN
161 CALL shake_3x3_int(molecule, particle_set, pos, vel, dt, ishake_int, &
165 IF (n4x6con /= 0)
THEN
166 CALL shake_4x6_int(molecule, particle_set, pos, vel, dt, ishake_int, &
170 IF (ncolv%ntot /= 0)
THEN
171 CALL shake_colv_int(molecule, particle_set, pos, vel, dt, ishake_int, &
172 cell, imass, int_max_sigma)
174 END DO shake_intra_loop
175 max_sigma = max(max_sigma, int_max_sigma)
176 CALL shake_int_info(log_unit, i, ishake_int, max_sigma)
178 IF (nvsitecon /= 0)
THEN
184 IF (do_ext_constraint)
THEN
187 IF (gci%ng3x3 /= 0)
THEN
188 CALL shake_3x3_ext(gci, particle_set, pos, vel, dt, ishake_ext, &
192 IF (gci%ng4x6 /= 0)
THEN
193 CALL shake_4x6_ext(gci, particle_set, pos, vel, dt, ishake_ext, &
197 IF (gci%ncolv%ntot /= 0)
THEN
198 CALL shake_colv_ext(gci, particle_set, pos, vel, dt, ishake_ext, &
199 cell, imass, max_sigma)
202 IF (gci%nvsite /= 0)
THEN
207 CALL shake_ext_info(log_unit, ishake_ext, max_sigma)
208 END DO shake_inter_loop
209 CALL dump_lagrange_mult(dump_lm, lagrange_mult, local_molecules, molecule_set, gci, &
210 molecule_kind_set, group,
"S")
212 CALL timestop(handle)
234 SUBROUTINE rattle_control(gci, local_molecules, molecule_set, molecule_kind_set, &
235 particle_set, vel, dt, rattle_tol, log_unit, lagrange_mult, dump_lm, cell, group, &
243 REAL(kind=
dp),
INTENT(INOUT) :: vel(:, :)
244 REAL(kind=
dp),
INTENT(in) :: dt, rattle_tol
245 INTEGER,
INTENT(in) :: log_unit, lagrange_mult
246 LOGICAL,
INTENT(IN) :: dump_lm
252 CHARACTER(LEN=*),
PARAMETER :: routinen =
'rattle_control'
254 INTEGER :: handle, i, ikind, imol, irattle_ext, &
255 irattle_int, k, n3x3con, n4x6con, &
256 nconstraint, nkind, nmol_per_kind
257 LOGICAL :: do_ext_constraint
258 REAL(kind=
dp) :: int_max_sigma, mass, max_sigma
259 REAL(kind=
dp),
DIMENSION(SIZE(vel, 2)) :: imass
265 CALL timeset(routinen, handle)
266 nkind =
SIZE(molecule_kind_set)
267 DO k = 1,
SIZE(vel, 2)
268 atomic_kind => particle_set(k)%atomic_kind
270 imass(k) = 1.0_dp/max(mass, epsilon(0.0_dp))
272 do_ext_constraint = (gci%ntot /= 0)
274 max_sigma = -1.0e+10_dp
275 rattle_inter_loop:
DO WHILE (abs(max_sigma) >= rattle_tol)
277 irattle_ext = irattle_ext + 1
279 mol:
DO ikind = 1, nkind
280 nmol_per_kind = local_molecules%n_el(ikind)
281 DO imol = 1, nmol_per_kind
282 i = local_molecules%list(ikind)%array(imol)
283 molecule => molecule_set(i)
284 molecule_kind => molecule%molecule_kind
286 ng4x6=n4x6con, nconstraint=nconstraint)
287 IF (nconstraint == 0) cycle
289 int_max_sigma = -1.0e+10_dp
290 rattle_intra_loop:
DO WHILE (abs(int_max_sigma) >= rattle_tol)
291 int_max_sigma = 0.0_dp
292 irattle_int = irattle_int + 1
294 IF (n3x3con /= 0)
THEN
298 IF (n4x6con /= 0)
THEN
302 IF (ncolv%ntot /= 0)
THEN
304 irattle_int, cell, imass, int_max_sigma)
306 END DO rattle_intra_loop
307 max_sigma = max(max_sigma, int_max_sigma)
308 CALL rattle_int_info(log_unit, i, irattle_int, max_sigma)
312 IF (do_ext_constraint)
THEN
315 IF (gci%ng3x3 /= 0)
THEN
319 IF (gci%ng4x6 /= 0)
THEN
323 IF (gci%ncolv%ntot /= 0)
THEN
325 irattle_ext, cell, imass, max_sigma)
329 CALL rattle_ext_info(log_unit, irattle_ext, max_sigma)
330 END DO rattle_inter_loop
331 CALL dump_lagrange_mult(dump_lm, lagrange_mult, local_molecules, molecule_set, gci, &
332 molecule_kind_set, group,
"R")
333 CALL timestop(handle)
360 molecule_kind_set, particle_set, pos, vel, dt, simpar, roll_tol, iroll, &
361 vector_r, vector_v, group, u, cell, local_particles)
368 REAL(kind=
dp),
INTENT(INOUT) :: pos(:, :), vel(:, :)
369 REAL(kind=
dp),
INTENT(IN) :: dt
371 REAL(kind=
dp),
INTENT(OUT) :: roll_tol
372 INTEGER,
INTENT(INOUT) :: iroll
373 REAL(kind=
dp),
DIMENSION(:),
INTENT(IN) :: vector_r, vector_v
376 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(IN), &
381 CHARACTER(LEN=*),
PARAMETER :: routinen =
'shake_roll_control'
383 INTEGER :: handle, i, ikind, imol, ishake_ext, ishake_int, k, lagrange_mult, log_unit, &
384 n3x3con, n4x6con, nconstraint, nkind, nmol_per_kind, nvsitecon
385 LOGICAL :: do_ext_constraint, dump_lm
386 REAL(kind=
dp) :: int_max_sigma, mass, max_sigma, shake_tol
387 REAL(kind=
dp),
DIMENSION(3, 3) :: r_shake, v_shake
388 REAL(kind=
dp),
DIMENSION(SIZE(pos, 2)) :: imass
394 CALL timeset(routinen, handle)
395 nkind =
SIZE(molecule_kind_set)
396 shake_tol = simpar%shake_tol
397 log_unit = simpar%info_constraint
398 lagrange_mult = simpar%lagrange_multipliers
399 dump_lm = simpar%dump_lm
406 DO k = 1,
SIZE(pos, 2)
407 atomic_kind => particle_set(k)%atomic_kind
409 imass(k) = 1.0_dp/max(mass, epsilon(0.0_dp))
411 do_ext_constraint = (gci%ntot /= 0)
413 max_sigma = -1.0e+10_dp
414 shake_inter_loop:
DO WHILE (abs(max_sigma) >= shake_tol)
416 ishake_ext = ishake_ext + 1
418 mol:
DO ikind = 1, nkind
419 nmol_per_kind = local_molecules%n_el(ikind)
420 DO imol = 1, nmol_per_kind
421 i = local_molecules%list(ikind)%array(imol)
422 molecule => molecule_set(i)
423 molecule_kind => molecule%molecule_kind
425 ng3x3=n3x3con, ng4x6=n4x6con, &
426 nconstraint=nconstraint, nvsite=nvsitecon)
427 IF (nconstraint == 0) cycle
429 int_max_sigma = -1.0e+10_dp
430 shake_roll_intra_loop:
DO WHILE (abs(int_max_sigma) >= shake_tol)
431 int_max_sigma = 0.0_dp
432 ishake_int = ishake_int + 1
434 IF (n3x3con /= 0)
THEN
436 v_shake, dt, ishake_int, int_max_sigma)
439 IF (n4x6con /= 0)
THEN
441 dt, ishake_int, int_max_sigma)
444 IF (ncolv%ntot /= 0)
THEN
446 v_shake, dt, ishake_int, cell, imass, int_max_sigma)
448 END DO shake_roll_intra_loop
449 max_sigma = max(max_sigma, int_max_sigma)
450 CALL shake_int_info(log_unit, i, ishake_int, max_sigma)
452 IF (nvsitecon /= 0)
THEN
453 cpabort(
"Virtual Site Constraint/Restraint not implemented for SHAKE_ROLL!")
458 IF (do_ext_constraint)
THEN
461 IF (gci%ng3x3 /= 0)
THEN
463 v_shake, dt, ishake_ext, max_sigma)
466 IF (gci%ng4x6 /= 0)
THEN
468 dt, ishake_ext, max_sigma)
471 IF (gci%ncolv%ntot /= 0)
THEN
473 v_shake, dt, ishake_ext, cell, imass, max_sigma)
476 IF (gci%nvsite /= 0)
THEN
477 cpabort(
"Virtual Site Constraint/Restraint not implemented for SHAKE_ROLL!")
481 CALL shake_ext_info(log_unit, ishake_ext, max_sigma)
482 END DO shake_inter_loop
483 CALL dump_lagrange_mult(dump_lm, lagrange_mult, local_molecules, molecule_set, gci, &
484 molecule_kind_set, group,
"S")
485 CALL check_tol(roll_tol, iroll,
'SHAKE', r_shake)
486 CALL timestop(handle)
512 molecule_kind_set, particle_set, vel, dt, simpar, vector, &
513 veps, roll_tol, iroll, para_env, u, cell, local_particles)
520 REAL(kind=
dp),
INTENT(INOUT) :: vel(:, :)
521 REAL(kind=
dp),
INTENT(IN) :: dt
523 REAL(kind=
dp),
DIMENSION(:),
INTENT(IN) :: vector
524 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(INOUT) :: veps
525 REAL(kind=
dp),
INTENT(OUT) :: roll_tol
526 INTEGER,
INTENT(INOUT) :: iroll
528 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(IN), &
533 CHARACTER(LEN=*),
PARAMETER :: routinen =
'rattle_roll_control'
535 INTEGER :: handle, i, ikind, imol, irattle_ext, irattle_int, k, lagrange_mult, log_unit, &
536 n3x3con, n4x6con, nconstraint, nkind, nmol_per_kind
537 LOGICAL :: do_ext_constraint, dump_lm
538 REAL(kind=
dp) :: int_max_sigma, mass, max_sigma, &
540 REAL(kind=
dp),
DIMENSION(3, 3) :: r_rattle
541 REAL(kind=
dp),
DIMENSION(SIZE(vel, 2)) :: imass
547 CALL timeset(routinen, handle)
549 nkind =
SIZE(molecule_kind_set)
550 rattle_tol = simpar%shake_tol
551 log_unit = simpar%info_constraint
552 lagrange_mult = simpar%lagrange_multipliers
553 dump_lm = simpar%dump_lm
560 DO k = 1,
SIZE(vel, 2)
561 atomic_kind => particle_set(k)%atomic_kind
563 imass(k) = 1.0_dp/max(mass, epsilon(0.0_dp))
565 do_ext_constraint = (gci%ntot /= 0)
567 max_sigma = -1.0e+10_dp
568 rattle_inter_loop:
DO WHILE (abs(max_sigma) >= rattle_tol)
570 irattle_ext = irattle_ext + 1
572 mol:
DO ikind = 1, nkind
573 nmol_per_kind = local_molecules%n_el(ikind)
574 DO imol = 1, nmol_per_kind
575 i = local_molecules%list(ikind)%array(imol)
576 molecule => molecule_set(i)
577 molecule_kind => molecule%molecule_kind
579 ng3x3=n3x3con, ng4x6=n4x6con, &
580 nconstraint=nconstraint)
581 IF (nconstraint == 0) cycle
582 int_max_sigma = -1.0e+10_dp
584 rattle_roll_intramolecular:
DO WHILE (abs(int_max_sigma) >= rattle_tol)
585 int_max_sigma = 0.0_dp
586 irattle_int = irattle_int + 1
588 IF (n3x3con /= 0)
THEN
593 IF (n4x6con /= 0)
THEN
598 IF (ncolv%ntot /= 0)
THEN
600 irattle_int, veps, cell, imass, int_max_sigma)
602 END DO rattle_roll_intramolecular
603 max_sigma = max(max_sigma, int_max_sigma)
604 CALL rattle_int_info(log_unit, i, irattle_int, max_sigma)
608 IF (do_ext_constraint)
THEN
611 IF (gci%ng3x3 /= 0)
THEN
616 IF (gci%ng4x6 /= 0)
THEN
621 IF (gci%ncolv%ntot /= 0)
THEN
623 irattle_ext, veps, cell, imass, max_sigma)
627 CALL rattle_ext_info(log_unit, irattle_ext, max_sigma)
628 END DO rattle_inter_loop
629 CALL dump_lagrange_mult(dump_lm, lagrange_mult, local_molecules, molecule_set, gci, &
630 molecule_kind_set, para_env,
"R")
631 CALL check_tol(roll_tol, iroll,
'RATTLE', veps=veps)
632 CALL timestop(handle)
648 SUBROUTINE dump_lagrange_mult(dump_lm, log_unit, local_molecules, molecule_set, gci, &
649 molecule_kind_set, group, id_type)
650 LOGICAL,
INTENT(IN) :: dump_lm
651 INTEGER,
INTENT(IN) :: log_unit
658 CHARACTER(LEN=1),
INTENT(IN) :: id_type
660 CHARACTER(LEN=*),
PARAMETER :: routinen =
'dump_lagrange_mult'
662 CHARACTER(LEN=default_string_length) :: label
663 INTEGER :: handle, i, ikind, imol, j, my_index, &
664 n3x3con, n4x6con, nconstraint, nkind
665 LOGICAL :: do_ext_constraint, do_int_constraint
666 REAL(kind=
dp),
DIMENSION(:),
POINTER :: lagr
671 CALL timeset(routinen, handle)
674 nconstraint=nconstraint)
675 do_int_constraint = (nconstraint > 0)
676 do_ext_constraint = (gci%ntot > 0)
677 IF (dump_lm .AND. (do_int_constraint .OR. do_ext_constraint))
THEN
678 nkind =
SIZE(molecule_kind_set)
679 ALLOCATE (lagr(nconstraint))
683 IF (do_int_constraint)
THEN
684 mol:
DO ikind = 1, nkind
685 molecule_kind => molecule_kind_set(ikind)
690 DO imol = 1, molecule_kind%nmolecule
691 i = molecule_kind%molecule_list(imol)
692 IF (any(local_molecules%list(ikind)%array == i))
THEN
693 molecule => molecule_set(i)
696 lagr(my_index + 1) = molecule%lci%lcolv(j)%lambda
697 my_index = my_index + 1
701 lagr(my_index + 1:my_index + 3) = molecule%lci%lg3x3(j)%lambda(:)
702 my_index = my_index + 3
706 lagr(my_index + 1:my_index + 6) = molecule%lci%lg4x6(j)%lambda(:)
707 my_index = my_index + 6
710 my_index = my_index + ncolv%ntot + 3*n3x3con + 6*n4x6con
717 IF (do_ext_constraint)
THEN
718 CALL reallocate(lagr, 1,
SIZE(lagr) + gci%ntot)
720 DO j = 1, gci%ncolv%ntot
721 lagr(my_index + 1) = gci%lcolv(j)%lambda
722 my_index = my_index + 1
726 lagr(my_index + 1:my_index + 3) = gci%lg3x3(j)%lambda(:)
727 my_index = my_index + 3
731 lagr(my_index + 1:my_index + 6) = gci%lg4x6(j)%lambda(:)
732 my_index = my_index + 6
735 IF (log_unit > 0)
THEN
736 IF (id_type ==
"S")
THEN
737 label =
"Shake Lagrangian Multipliers:"
738 ELSE IF (id_type ==
"R")
THEN
739 label =
"Rattle Lagrangian Multipliers:"
741 cpabort(
"Only S for Shake or R for Rattle are supported for Lagrangian Multipliers")
743 WRITE (log_unit, fmt=
'(A,T40,4F15.9)') trim(label), lagr(1:min(4,
SIZE(lagr)))
744 DO j = 5,
SIZE(lagr), 4
745 WRITE (log_unit, fmt=
'(T40,4F15.9)') lagr(j:min(j + 3,
SIZE(lagr)))
750 CALL timestop(handle)
752 END SUBROUTINE dump_lagrange_mult
763 SUBROUTINE shake_int_info(log_unit, i, ishake_int, max_sigma)
764 INTEGER,
INTENT(IN) :: log_unit, i, ishake_int
765 REAL(kind=
dp),
INTENT(IN) :: max_sigma
767 IF (log_unit > 0)
THEN
769 WRITE (log_unit,
'("SHAKE_INFO|",2X,2(A,I6),A,F15.9)') &
770 "Molecule Nr.:", i,
" Nr. Iterations:", ishake_int,
" Max. Err.:", max_sigma
773 IF (ishake_int > max_shake_iter)
THEN
774 CALL cp_warn(__location__, &
775 "Shake NOT converged in "//
cp_to_string(max_shake_iter)//
" iterations in the "// &
776 "intramolecular constraint loop for Molecule nr. "//
cp_to_string(i)// &
777 ". CP2K continues but results could be meaningless. ")
779 END SUBROUTINE shake_int_info
789 SUBROUTINE shake_ext_info(log_unit, ishake_ext, max_sigma)
790 INTEGER,
INTENT(IN) :: log_unit, ishake_ext
791 REAL(kind=
dp),
INTENT(IN) :: max_sigma
793 IF (log_unit > 0)
THEN
795 WRITE (log_unit,
'("SHAKE_INFO|",2X,A,I6,A,F15.9)') &
796 "External Shake Nr. Iterations:", ishake_ext, &
797 " Max. Err.:", max_sigma
800 IF (ishake_ext > max_shake_iter)
THEN
801 CALL cp_warn(__location__, &
802 "Shake NOT converged in "//
cp_to_string(max_shake_iter)//
" iterations in the "// &
803 "intermolecular constraint. CP2K continues but results could be meaningless.")
805 END SUBROUTINE shake_ext_info
816 SUBROUTINE rattle_int_info(log_unit, i, irattle_int, max_sigma)
817 INTEGER,
INTENT(IN) :: log_unit, i, irattle_int
818 REAL(kind=
dp),
INTENT(IN) :: max_sigma
820 IF (log_unit > 0)
THEN
822 WRITE (log_unit,
'("RATTLE_INFO|",1X,2(A,I6),A,F15.9)') &
823 "Molecule Nr.:", i,
" Nr. Iterations:", irattle_int,
" Max. Err.:", max_sigma
826 IF (irattle_int > max_shake_iter)
THEN
827 CALL cp_warn(__location__, &
828 "Rattle NOT converged in "//
cp_to_string(max_shake_iter)//
" iterations in the "// &
829 "intramolecular constraint loop for Molecule nr. "//
cp_to_string(i)// &
830 ". CP2K continues but results could be meaningless.")
832 END SUBROUTINE rattle_int_info
842 SUBROUTINE rattle_ext_info(log_unit, irattle_ext, max_sigma)
843 INTEGER,
INTENT(IN) :: log_unit, irattle_ext
844 REAL(kind=
dp),
INTENT(IN) :: max_sigma
846 IF (log_unit > 0)
THEN
848 WRITE (log_unit,
'("RATTLE_INFO|",1X,A,I6,A,F15.9)') &
849 "External Rattle Nr. Iterations:", irattle_ext, &
850 " Max. Err.:", max_sigma
853 IF (irattle_ext > max_shake_iter)
THEN
854 CALL cp_warn(__location__, &
855 "Rattle NOT converged in "//
cp_to_string(max_shake_iter)//
" iterations in the "// &
856 "intermolecular constraint. CP2K continues but results could be meaningless.")
858 END SUBROUTINE rattle_ext_info
873 molecule_kind_set, dt, root_section)
879 REAL(kind=
dp),
INTENT(in) :: dt
882 CHARACTER(LEN=*),
PARAMETER :: routinen =
'shake_update_targets'
884 INTEGER :: handle, i, ikind, imol, nkind, &
886 LOGICAL :: do_ext_constraint
892 CALL timeset(routinen, handle)
894 nkind =
SIZE(molecule_kind_set)
895 do_ext_constraint = (gci%ntot /= 0)
897 mol:
DO ikind = 1, nkind
898 nmol_per_kind = local_molecules%n_el(ikind)
899 DO imol = 1, nmol_per_kind
900 i = local_molecules%list(ikind)%array(imol)
901 molecule => molecule_set(i)
902 molecule_kind => molecule%molecule_kind
910 IF (do_ext_constraint)
THEN
914 CALL timestop(handle)
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.
subroutine, public shake_3x3_ext(gci, particle_set, pos, vel, dt, ishake, max_sigma)
...
subroutine, public rattle_roll_3x3_ext(gci, particle_set, vel, r_rattle, dt, veps)
...
subroutine, public shake_roll_3x3_int(molecule, particle_set, pos, vel, r_shake, v_shake, dt, ishake, max_sigma)
...
subroutine, public rattle_3x3_int(molecule, particle_set, vel, dt)
...
subroutine, public shake_3x3_int(molecule, particle_set, pos, vel, dt, ishake, max_sigma)
...
subroutine, public rattle_3x3_ext(gci, particle_set, vel, dt)
...
subroutine, public shake_roll_3x3_ext(gci, particle_set, pos, vel, r_shake, v_shake, dt, ishake, max_sigma)
...
subroutine, public rattle_roll_3x3_int(molecule, particle_set, vel, r_rattle, dt, veps)
...
subroutine, public rattle_roll_4x6_int(molecule, particle_set, vel, r_rattle, dt, veps)
Intramolecular rattle_4x6_roll.
subroutine, public rattle_4x6_int(molecule, particle_set, vel, dt)
Intramolecular rattle_4x6.
subroutine, public shake_roll_4x6_ext(gci, particle_set, pos, vel, r_shake, dt, ishake, max_sigma)
Intramolecular shake_4x6_roll.
subroutine, public rattle_4x6_ext(gci, particle_set, vel, dt)
Intramolecular rattle_4x6.
subroutine, public shake_4x6_ext(gci, particle_set, pos, vel, dt, ishake, max_sigma)
Intramolecular shake_4x6.
subroutine, public shake_roll_4x6_int(molecule, particle_set, pos, vel, r_shake, dt, ishake, max_sigma)
Intramolecular shake_4x6_roll.
subroutine, public rattle_roll_4x6_ext(gci, particle_set, vel, r_rattle, dt, veps)
Intramolecular rattle_4x6_roll.
subroutine, public shake_4x6_int(molecule, particle_set, pos, vel, dt, ishake, max_sigma)
Intramolecular shake_4x6.
Module that handles the COLLECTIVE constraints.
subroutine, public shake_colv_int(molecule, particle_set, pos, vel, dt, ishake, cell, imass, max_sigma)
Intramolecular subroutine shake_colv algorithm for collective variables constraints updates the multi...
subroutine, public shake_roll_colv_int(molecule, particle_set, pos, vel, r_shake, v_shake, dt, ishake, cell, imass, max_sigma)
Intramolecular subroutine shake algorithm (box allowed to change) for collective variables constraint...
subroutine, public shake_update_colv_ext(gci, dt, motion_section)
Intermolecular subroutine for updating the TARGET value for collective constraints.
subroutine, public rattle_roll_colv_ext(gci, particle_set, vel, r_rattle, dt, irattle, veps, cell, imass, max_sigma)
Intermolecular subroutine rattle algorithm (box allowed to change) for collective variables constrain...
subroutine, public shake_colv_ext(gci, particle_set, pos, vel, dt, ishake, cell, imass, max_sigma)
Intermolecular subroutine shake_colv algorithm for collective variables constraints updates the multi...
subroutine, public rattle_roll_colv_int(molecule, particle_set, vel, r_rattle, dt, irattle, veps, cell, imass, max_sigma)
Intramolecular subroutine rattle algorithm (box allowed to change) for collective variables constrain...
subroutine, public rattle_colv_int(molecule, particle_set, vel, dt, irattle, cell, imass, max_sigma)
Intramolecular subroutine rattle algorithm for collective variables constraints updates the multiplie...
subroutine, public rattle_colv_ext(gci, particle_set, vel, dt, irattle, cell, imass, max_sigma)
Intermolecular subroutine rattle algorithm for collective variables constraints updates the multiplie...
subroutine, public shake_update_colv_int(molecule, dt, motion_section)
Intramolecular subroutine for updating the TARGET value of collective constraints.
subroutine, public shake_roll_colv_ext(gci, particle_set, pos, vel, r_shake, v_shake, dt, ishake, cell, imass, max_sigma)
Intermolecular subroutine shake algorithm (box allowed to change) for collective variables constraint...
Contains routines useful for the application of constraints during MD.
subroutine, public get_roll_matrix(char, r_shake, v_shake, vector_r, vector_v, u)
...
subroutine, public restore_temporary_set(particle_set, local_particles, pos, vel)
...
subroutine, public update_temporary_set(group, pos, vel)
...
subroutine, public check_tol(roll_tol, iroll, char, matrix, veps)
...
Routines to handle the virtual site constraint/restraint.
subroutine, public shake_vsite_ext(gci, pos)
Intramolecular virtual site.
subroutine, public shake_vsite_int(molecule, pos)
Intramolecular virtual site.
subroutine, public rattle_control(gci, local_molecules, molecule_set, molecule_kind_set, particle_set, vel, dt, rattle_tol, log_unit, lagrange_mult, dump_lm, cell, group, local_particles)
...
subroutine, public rattle_roll_control(gci, local_molecules, molecule_set, molecule_kind_set, particle_set, vel, dt, simpar, vector, veps, roll_tol, iroll, para_env, u, cell, local_particles)
...
subroutine, public shake_control(gci, local_molecules, molecule_set, molecule_kind_set, particle_set, pos, vel, dt, shake_tol, log_unit, lagrange_mult, dump_lm, cell, group, local_particles)
...
subroutine, public shake_roll_control(gci, local_molecules, molecule_set, molecule_kind_set, particle_set, pos, vel, dt, simpar, roll_tol, iroll, vector_r, vector_v, group, u, cell, local_particles)
...
subroutine, public shake_update_targets(gci, local_molecules, molecule_set, molecule_kind_set, dt, root_section)
Updates the TARGET of the COLLECTIVE constraints if the growth speed is different from zero.
various routines to log and control the output. The idea is that decisions about where to log should ...
stores a lists of integer that are local to a processor. The idea is that these integers represent ob...
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
Utility routines for the memory handling.
Interface to the message passing library MPI.
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 get_molecule_kind_set(molecule_kind_set, maxatom, natom, nbond, nbend, nub, ntorsion, nimpr, nopbend, nconstraint, nconstraint_fixd, nmolecule, nrestraints)
Get informations about a molecule kind set.
Define the data structure for the molecule information.
Define the data structure for the particle information.
Type for storing MD parameters.
Provides all information about an atomic kind.
Type defining parameters related to the simulation cell.
structure to store local (to a processor) ordered lists of integers.
stores all the informations relevant to an mpi environment
Simulation parameter type for molecular dynamics.