(git:71c3ab0)
Loading...
Searching...
No Matches
constraint.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \par History
10!> Teodoro Laino [tlaino] 2007 - Extension to Intermolecular constraints
11! **************************************************************************************************
15 USE cell_types, ONLY: cell_type
33 USE constraint_clv, ONLY: &
37 USE constraint_util, ONLY: check_tol,&
50 USE kinds, ONLY: default_string_length,&
51 dp
53 USE message_passing, ONLY: mp_comm_type,&
61 USE simpar_types, ONLY: simpar_type
62#include "./base/base_uses.f90"
63
64 IMPLICIT NONE
65
66 PRIVATE
67 PUBLIC :: shake_control, &
72
73 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'constraint'
74 INTEGER, PARAMETER, PRIVATE :: Max_Shake_Iter = 1000
75
76CONTAINS
77
78! **************************************************************************************************
79!> \brief ...
80!> \param gci ...
81!> \param local_molecules ...
82!> \param molecule_set ...
83!> \param molecule_kind_set ...
84!> \param particle_set ...
85!> \param pos ...
86!> \param vel ...
87!> \param dt ...
88!> \param shake_tol ...
89!> \param log_unit ...
90!> \param lagrange_mult ...
91!> \param dump_lm ...
92!> \param cell ...
93!> \param group ...
94!> \param local_particles ...
95!> \par History
96!> Teodoro Laino [tlaino] 2007 - Extension to Intermolecular constraints
97! **************************************************************************************************
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)
101
102 TYPE(global_constraint_type), POINTER :: gci
103 TYPE(distribution_1d_type), POINTER :: local_molecules
104 TYPE(molecule_type), POINTER :: molecule_set(:)
105 TYPE(molecule_kind_type), POINTER :: molecule_kind_set(:)
106 TYPE(particle_type), POINTER :: particle_set(:)
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
111 TYPE(cell_type), POINTER :: cell
112
113 CLASS(mp_comm_type), INTENT(in) :: group
114 TYPE(distribution_1d_type), POINTER :: local_particles
115
116 CHARACTER(LEN=*), PARAMETER :: routinen = 'shake_control'
117
118 INTEGER :: handle, i, ikind, imol, ishake_ext, &
119 ishake_int, k, n3x3con, n4x6con, &
120 nconstraint, nkind, nmol_per_kind, &
121 nvsitecon
122 LOGICAL :: do_ext_constraint
123 REAL(kind=dp) :: int_max_sigma, mass, max_sigma
124 REAL(kind=dp), DIMENSION(SIZE(pos, 2)) :: imass
125 TYPE(atomic_kind_type), POINTER :: atomic_kind
126 TYPE(colvar_counters) :: ncolv
127 TYPE(molecule_kind_type), POINTER :: molecule_kind
128 TYPE(molecule_type), POINTER :: molecule
129
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
134 CALL get_atomic_kind(atomic_kind=atomic_kind, mass=mass)
135 imass(k) = 1.0_dp/max(mass, epsilon(0.0_dp))
136 END DO
137 do_ext_constraint = (gci%ntot /= 0)
138 ishake_ext = 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))
141 max_sigma = 0.0_dp
142 ishake_ext = ishake_ext + 1
143 ! Intramolecular Constraints
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
150 CALL get_molecule_kind(molecule_kind, ncolv=ncolv, &
151 ng3x3=n3x3con, ng4x6=n4x6con, &
152 nconstraint=nconstraint, nvsite=nvsitecon)
153 IF (nconstraint == 0) cycle
154 ishake_int = 0
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
159 ! 3x3
160 IF (n3x3con /= 0) THEN
161 CALL shake_3x3_int(molecule, particle_set, pos, vel, dt, ishake_int, &
162 int_max_sigma)
163 END IF
164 ! 4x6
165 IF (n4x6con /= 0) THEN
166 CALL shake_4x6_int(molecule, particle_set, pos, vel, dt, ishake_int, &
167 int_max_sigma)
168 END IF
169 ! Collective Variables
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)
173 END IF
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)
177 ! Virtual Site
178 IF (nvsitecon /= 0) THEN
179 CALL shake_vsite_int(molecule, pos)
180 END IF
181 END DO
182 END DO mol
183 ! Intermolecular constraints
184 IF (do_ext_constraint) THEN
185 CALL update_temporary_set(group, pos=pos, vel=vel)
186 ! 3x3
187 IF (gci%ng3x3 /= 0) THEN
188 CALL shake_3x3_ext(gci, particle_set, pos, vel, dt, ishake_ext, &
189 max_sigma)
190 END IF
191 ! 4x6
192 IF (gci%ng4x6 /= 0) THEN
193 CALL shake_4x6_ext(gci, particle_set, pos, vel, dt, ishake_ext, &
194 max_sigma)
195 END IF
196 ! Collective Variables
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)
200 END IF
201 ! Virtual Site
202 IF (gci%nvsite /= 0) THEN
203 CALL shake_vsite_ext(gci, pos)
204 END IF
205 CALL restore_temporary_set(particle_set, local_particles, pos=pos, vel=vel)
206 END IF
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")
211
212 CALL timestop(handle)
213 END SUBROUTINE shake_control
214
215! **************************************************************************************************
216!> \brief ...
217!> \param gci ...
218!> \param local_molecules ...
219!> \param molecule_set ...
220!> \param molecule_kind_set ...
221!> \param particle_set ...
222!> \param vel ...
223!> \param dt ...
224!> \param rattle_tol ...
225!> \param log_unit ...
226!> \param lagrange_mult ...
227!> \param dump_lm ...
228!> \param cell ...
229!> \param group ...
230!> \param local_particles ...
231!> \par History
232!> Teodoro Laino [tlaino] 2007 - Extension to Intermolecular constraints
233! **************************************************************************************************
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, &
236 local_particles)
237
238 TYPE(global_constraint_type), POINTER :: gci
239 TYPE(distribution_1d_type), POINTER :: local_molecules
240 TYPE(molecule_type), POINTER :: molecule_set(:)
241 TYPE(molecule_kind_type), POINTER :: molecule_kind_set(:)
242 TYPE(particle_type), POINTER :: particle_set(:)
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
247 TYPE(cell_type), POINTER :: cell
248
249 CLASS(mp_comm_type), INTENT(in) :: group
250 TYPE(distribution_1d_type), POINTER :: local_particles
251
252 CHARACTER(LEN=*), PARAMETER :: routinen = 'rattle_control'
253
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
260 TYPE(atomic_kind_type), POINTER :: atomic_kind
261 TYPE(colvar_counters) :: ncolv
262 TYPE(molecule_kind_type), POINTER :: molecule_kind
263 TYPE(molecule_type), POINTER :: molecule
264
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
269 CALL get_atomic_kind(atomic_kind=atomic_kind, mass=mass)
270 imass(k) = 1.0_dp/max(mass, epsilon(0.0_dp))
271 END DO
272 do_ext_constraint = (gci%ntot /= 0)
273 irattle_ext = 0
274 max_sigma = -1.0e+10_dp
275 rattle_inter_loop: DO WHILE (abs(max_sigma) >= rattle_tol)
276 max_sigma = 0.0_dp
277 irattle_ext = irattle_ext + 1
278 ! Intramolecular Constraints
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
285 CALL get_molecule_kind(molecule_kind, ncolv=ncolv, ng3x3=n3x3con, &
286 ng4x6=n4x6con, nconstraint=nconstraint)
287 IF (nconstraint == 0) cycle
288 irattle_int = 0
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
293 ! 3x3
294 IF (n3x3con /= 0) THEN
295 CALL rattle_3x3_int(molecule, particle_set, vel, dt)
296 END IF
297 ! 4x6
298 IF (n4x6con /= 0) THEN
299 CALL rattle_4x6_int(molecule, particle_set, vel, dt)
300 END IF
301 ! Collective Variables
302 IF (ncolv%ntot /= 0) THEN
303 CALL rattle_colv_int(molecule, particle_set, vel, dt, &
304 irattle_int, cell, imass, int_max_sigma)
305 END IF
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)
309 END DO
310 END DO mol
311 ! Intermolecular Constraints
312 IF (do_ext_constraint) THEN
313 CALL update_temporary_set(group, vel=vel)
314 ! 3x3
315 IF (gci%ng3x3 /= 0) THEN
316 CALL rattle_3x3_ext(gci, particle_set, vel, dt)
317 END IF
318 ! 4x6
319 IF (gci%ng4x6 /= 0) THEN
320 CALL rattle_4x6_ext(gci, particle_set, vel, dt)
321 END IF
322 ! Collective Variables
323 IF (gci%ncolv%ntot /= 0) THEN
324 CALL rattle_colv_ext(gci, particle_set, vel, dt, &
325 irattle_ext, cell, imass, max_sigma)
326 END IF
327 CALL restore_temporary_set(particle_set, local_particles, vel=vel)
328 END IF
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)
334
335 END SUBROUTINE rattle_control
336
337! **************************************************************************************************
338!> \brief ...
339!> \param gci ...
340!> \param local_molecules ...
341!> \param molecule_set ...
342!> \param molecule_kind_set ...
343!> \param particle_set ...
344!> \param pos ...
345!> \param vel ...
346!> \param dt ...
347!> \param simpar ...
348!> \param roll_tol ...
349!> \param iroll ...
350!> \param vector_r ...
351!> \param vector_v ...
352!> \param group ...
353!> \param u ...
354!> \param cell ...
355!> \param local_particles ...
356!> \par History
357!> Teodoro Laino [tlaino] 2007 - Extension to Intermolecular constraints
358! **************************************************************************************************
359 SUBROUTINE shake_roll_control(gci, local_molecules, molecule_set, &
360 molecule_kind_set, particle_set, pos, vel, dt, simpar, roll_tol, iroll, &
361 vector_r, vector_v, group, u, cell, local_particles)
362
363 TYPE(global_constraint_type), POINTER :: gci
364 TYPE(distribution_1d_type), POINTER :: local_molecules
365 TYPE(molecule_type), POINTER :: molecule_set(:)
366 TYPE(molecule_kind_type), POINTER :: molecule_kind_set(:)
367 TYPE(particle_type), POINTER :: particle_set(:)
368 REAL(kind=dp), INTENT(INOUT) :: pos(:, :), vel(:, :)
369 REAL(kind=dp), INTENT(IN) :: dt
370 TYPE(simpar_type), INTENT(IN) :: simpar
371 REAL(kind=dp), INTENT(OUT) :: roll_tol
372 INTEGER, INTENT(INOUT) :: iroll
373 REAL(kind=dp), DIMENSION(:), INTENT(IN) :: vector_r, vector_v
374
375 CLASS(mp_comm_type), INTENT(IN) :: group
376 REAL(kind=dp), DIMENSION(:, :), INTENT(IN), &
377 OPTIONAL :: u
378 TYPE(cell_type), POINTER :: cell
379 TYPE(distribution_1d_type), POINTER :: local_particles
380
381 CHARACTER(LEN=*), PARAMETER :: routinen = 'shake_roll_control'
382
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
389 TYPE(atomic_kind_type), POINTER :: atomic_kind
390 TYPE(colvar_counters) :: ncolv
391 TYPE(molecule_kind_type), POINTER :: molecule_kind
392 TYPE(molecule_type), POINTER :: molecule
393
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
400 ! setting up for roll
401 IF (simpar%ensemble == npt_i_ensemble .OR. simpar%ensemble == npt_ia_ensemble) THEN
402 CALL get_roll_matrix('SHAKE', r_shake, v_shake, vector_r, vector_v)
403 ELSE IF (simpar%ensemble == npt_f_ensemble) THEN
404 CALL get_roll_matrix('SHAKE', r_shake, v_shake, vector_r, vector_v, u)
405 END IF
406 DO k = 1, SIZE(pos, 2)
407 atomic_kind => particle_set(k)%atomic_kind
408 CALL get_atomic_kind(atomic_kind=atomic_kind, mass=mass)
409 imass(k) = 1.0_dp/max(mass, epsilon(0.0_dp))
410 END DO
411 do_ext_constraint = (gci%ntot /= 0)
412 ishake_ext = 0
413 max_sigma = -1.0e+10_dp
414 shake_inter_loop: DO WHILE (abs(max_sigma) >= shake_tol)
415 max_sigma = 0.0_dp
416 ishake_ext = ishake_ext + 1
417 ! Intramolecular Constraints
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
424 CALL get_molecule_kind(molecule_kind, ncolv=ncolv, &
425 ng3x3=n3x3con, ng4x6=n4x6con, &
426 nconstraint=nconstraint, nvsite=nvsitecon)
427 IF (nconstraint == 0) cycle
428 ishake_int = 0
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
433 ! 3x3
434 IF (n3x3con /= 0) THEN
435 CALL shake_roll_3x3_int(molecule, particle_set, pos, vel, r_shake, &
436 v_shake, dt, ishake_int, int_max_sigma)
437 END IF
438 ! 4x6
439 IF (n4x6con /= 0) THEN
440 CALL shake_roll_4x6_int(molecule, particle_set, pos, vel, r_shake, &
441 dt, ishake_int, int_max_sigma)
442 END IF
443 ! Collective Variables
444 IF (ncolv%ntot /= 0) THEN
445 CALL shake_roll_colv_int(molecule, particle_set, pos, vel, r_shake, &
446 v_shake, dt, ishake_int, cell, imass, int_max_sigma)
447 END IF
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)
451 ! Virtual Site
452 IF (nvsitecon /= 0) THEN
453 cpabort("Virtual Site Constraint/Restraint not implemented for SHAKE_ROLL!")
454 END IF
455 END DO
456 END DO mol
457 ! Intermolecular constraints
458 IF (do_ext_constraint) THEN
459 CALL update_temporary_set(group, pos=pos, vel=vel)
460 ! 3x3
461 IF (gci%ng3x3 /= 0) THEN
462 CALL shake_roll_3x3_ext(gci, particle_set, pos, vel, r_shake, &
463 v_shake, dt, ishake_ext, max_sigma)
464 END IF
465 ! 4x6
466 IF (gci%ng4x6 /= 0) THEN
467 CALL shake_roll_4x6_ext(gci, particle_set, pos, vel, r_shake, &
468 dt, ishake_ext, max_sigma)
469 END IF
470 ! Collective Variables
471 IF (gci%ncolv%ntot /= 0) THEN
472 CALL shake_roll_colv_ext(gci, particle_set, pos, vel, r_shake, &
473 v_shake, dt, ishake_ext, cell, imass, max_sigma)
474 END IF
475 ! Virtual Site
476 IF (gci%nvsite /= 0) THEN
477 cpabort("Virtual Site Constraint/Restraint not implemented for SHAKE_ROLL!")
478 END IF
479 CALL restore_temporary_set(particle_set, local_particles, pos=pos, vel=vel)
480 END IF
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)
487
488 END SUBROUTINE shake_roll_control
489
490! **************************************************************************************************
491!> \brief ...
492!> \param gci ...
493!> \param local_molecules ...
494!> \param molecule_set ...
495!> \param molecule_kind_set ...
496!> \param particle_set ...
497!> \param vel ...
498!> \param dt ...
499!> \param simpar ...
500!> \param vector ...
501!> \param veps ...
502!> \param roll_tol ...
503!> \param iroll ...
504!> \param para_env ...
505!> \param u ...
506!> \param cell ...
507!> \param local_particles ...
508!> \par History
509!> Teodoro Laino [tlaino] 2007 - Extension to Intermolecular constraints
510! **************************************************************************************************
511 SUBROUTINE rattle_roll_control(gci, local_molecules, molecule_set, &
512 molecule_kind_set, particle_set, vel, dt, simpar, vector, &
513 veps, roll_tol, iroll, para_env, u, cell, local_particles)
514
515 TYPE(global_constraint_type), POINTER :: gci
516 TYPE(distribution_1d_type), POINTER :: local_molecules
517 TYPE(molecule_type), POINTER :: molecule_set(:)
518 TYPE(molecule_kind_type), POINTER :: molecule_kind_set(:)
519 TYPE(particle_type), POINTER :: particle_set(:)
520 REAL(kind=dp), INTENT(INOUT) :: vel(:, :)
521 REAL(kind=dp), INTENT(IN) :: dt
522 TYPE(simpar_type), INTENT(IN) :: simpar
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
527 TYPE(mp_para_env_type), INTENT(IN) :: para_env
528 REAL(kind=dp), DIMENSION(:, :), INTENT(IN), &
529 OPTIONAL :: u
530 TYPE(cell_type), POINTER :: cell
531 TYPE(distribution_1d_type), POINTER :: local_particles
532
533 CHARACTER(LEN=*), PARAMETER :: routinen = 'rattle_roll_control'
534
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, &
539 rattle_tol
540 REAL(kind=dp), DIMENSION(3, 3) :: r_rattle
541 REAL(kind=dp), DIMENSION(SIZE(vel, 2)) :: imass
542 TYPE(atomic_kind_type), POINTER :: atomic_kind
543 TYPE(colvar_counters) :: ncolv
544 TYPE(molecule_kind_type), POINTER :: molecule_kind
545 TYPE(molecule_type), POINTER :: molecule
546
547 CALL timeset(routinen, handle)
548 ! initialize locals
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
554 ! setting up for roll
555 IF (simpar%ensemble == npt_i_ensemble .OR. simpar%ensemble == npt_ia_ensemble) THEN
556 CALL get_roll_matrix('RATTLE', v_shake=r_rattle, vector_v=vector)
557 ELSE IF (simpar%ensemble == npt_f_ensemble) THEN
558 CALL get_roll_matrix('RATTLE', v_shake=r_rattle, vector_v=vector, u=u)
559 END IF
560 DO k = 1, SIZE(vel, 2)
561 atomic_kind => particle_set(k)%atomic_kind
562 CALL get_atomic_kind(atomic_kind=atomic_kind, mass=mass)
563 imass(k) = 1.0_dp/max(mass, epsilon(0.0_dp))
564 END DO
565 do_ext_constraint = (gci%ntot /= 0)
566 irattle_ext = 0
567 max_sigma = -1.0e+10_dp
568 rattle_inter_loop: DO WHILE (abs(max_sigma) >= rattle_tol)
569 max_sigma = 0.0_dp
570 irattle_ext = irattle_ext + 1
571 ! Intramolecular Constraints
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
578 CALL get_molecule_kind(molecule_kind, ncolv=ncolv, &
579 ng3x3=n3x3con, ng4x6=n4x6con, &
580 nconstraint=nconstraint)
581 IF (nconstraint == 0) cycle
582 int_max_sigma = -1.0e+10_dp
583 irattle_int = 0
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
587 ! 3x3
588 IF (n3x3con /= 0) THEN
589 CALL rattle_roll_3x3_int(molecule, particle_set, vel, r_rattle, dt, &
590 veps)
591 END IF
592 ! 4x6
593 IF (n4x6con /= 0) THEN
594 CALL rattle_roll_4x6_int(molecule, particle_set, vel, r_rattle, dt, &
595 veps)
596 END IF
597 ! Collective Variables
598 IF (ncolv%ntot /= 0) THEN
599 CALL rattle_roll_colv_int(molecule, particle_set, vel, r_rattle, dt, &
600 irattle_int, veps, cell, imass, int_max_sigma)
601 END IF
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)
605 END DO
606 END DO mol
607 ! Intermolecular Constraints
608 IF (do_ext_constraint) THEN
609 CALL update_temporary_set(para_env, vel=vel)
610 ! 3x3
611 IF (gci%ng3x3 /= 0) THEN
612 CALL rattle_roll_3x3_ext(gci, particle_set, vel, r_rattle, dt, &
613 veps)
614 END IF
615 ! 4x6
616 IF (gci%ng4x6 /= 0) THEN
617 CALL rattle_roll_4x6_ext(gci, particle_set, vel, r_rattle, dt, &
618 veps)
619 END IF
620 ! Collective Variables
621 IF (gci%ncolv%ntot /= 0) THEN
622 CALL rattle_roll_colv_ext(gci, particle_set, vel, r_rattle, dt, &
623 irattle_ext, veps, cell, imass, max_sigma)
624 END IF
625 CALL restore_temporary_set(particle_set, local_particles, vel=vel)
626 END IF
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)
633 END SUBROUTINE rattle_roll_control
634
635! **************************************************************************************************
636!> \brief ...
637!> \param dump_lm ...
638!> \param log_unit ...
639!> \param local_molecules ...
640!> \param molecule_set ...
641!> \param gci ...
642!> \param molecule_kind_set ...
643!> \param group ...
644!> \param id_type ...
645!> \par History
646!> Teodoro Laino [tlaino] 2007 - Dumps lagrange multipliers
647! **************************************************************************************************
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
652 TYPE(distribution_1d_type), POINTER :: local_molecules
653 TYPE(molecule_type), POINTER :: molecule_set(:)
654 TYPE(global_constraint_type), POINTER :: gci
655 TYPE(molecule_kind_type), POINTER :: molecule_kind_set(:)
656
657 CLASS(mp_comm_type), INTENT(IN) :: group
658 CHARACTER(LEN=1), INTENT(IN) :: id_type
659
660 CHARACTER(LEN=*), PARAMETER :: routinen = 'dump_lagrange_mult'
661
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
667 TYPE(colvar_counters) :: ncolv
668 TYPE(molecule_kind_type), POINTER :: molecule_kind
669 TYPE(molecule_type), POINTER :: molecule
670
671 CALL timeset(routinen, handle)
672 ! Total number of intramolecular constraints (distributed)
673 CALL get_molecule_kind_set(molecule_kind_set=molecule_kind_set, &
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))
680 lagr = 0.0_dp
681 ! Dump lagrange multipliers for Intramolecular Constraints
682 my_index = 0
683 IF (do_int_constraint) THEN
684 mol: DO ikind = 1, nkind
685 molecule_kind => molecule_kind_set(ikind)
686 CALL get_molecule_kind(molecule_kind, &
687 ncolv=ncolv, &
688 ng3x3=n3x3con, &
689 ng4x6=n4x6con)
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)
694 ! Collective Variables
695 DO j = 1, ncolv%ntot
696 lagr(my_index + 1) = molecule%lci%lcolv(j)%lambda
697 my_index = my_index + 1
698 END DO
699 ! 3x3
700 DO j = 1, n3x3con
701 lagr(my_index + 1:my_index + 3) = molecule%lci%lg3x3(j)%lambda(:)
702 my_index = my_index + 3
703 END DO
704 ! 4x6
705 DO j = 1, n4x6con
706 lagr(my_index + 1:my_index + 6) = molecule%lci%lg4x6(j)%lambda(:)
707 my_index = my_index + 6
708 END DO
709 ELSE
710 my_index = my_index + ncolv%ntot + 3*n3x3con + 6*n4x6con
711 END IF
712 END DO
713 END DO mol
714 CALL group%sum(lagr)
715 END IF
716 ! Intermolecular constraints
717 IF (do_ext_constraint) THEN
718 CALL reallocate(lagr, 1, SIZE(lagr) + gci%ntot)
719 ! Collective Variables
720 DO j = 1, gci%ncolv%ntot
721 lagr(my_index + 1) = gci%lcolv(j)%lambda
722 my_index = my_index + 1
723 END DO
724 ! 3x3
725 DO j = 1, gci%ng3x3
726 lagr(my_index + 1:my_index + 3) = gci%lg3x3(j)%lambda(:)
727 my_index = my_index + 3
728 END DO
729 ! 4x6
730 DO j = 1, gci%ng4x6
731 lagr(my_index + 1:my_index + 6) = gci%lg4x6(j)%lambda(:)
732 my_index = my_index + 6
733 END DO
734 END IF
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:"
740 ELSE
741 cpabort("Only S for Shake or R for Rattle are supported for Lagrangian Multipliers")
742 END IF
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)))
746 END DO
747 END IF
748 DEALLOCATE (lagr)
749 END IF
750 CALL timestop(handle)
751
752 END SUBROUTINE dump_lagrange_mult
753
754! **************************************************************************************************
755!> \brief Dumps convergence info about shake - intramolecular constraint loop
756!> \param log_unit ...
757!> \param i ...
758!> \param ishake_int ...
759!> \param max_sigma ...
760!> \par History
761!> Teodoro Laino [tlaino] 2007 - University of Zurich
762! **************************************************************************************************
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
766
767 IF (log_unit > 0) THEN
768 ! Dump info if requested
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
771 END IF
772 ! Notify a not converged SHAKE
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. ")
778 END IF
779 END SUBROUTINE shake_int_info
780
781! **************************************************************************************************
782!> \brief Dumps convergence info about shake - intermolecular constraint loop
783!> \param log_unit ...
784!> \param ishake_ext ...
785!> \param max_sigma ...
786!> \par History
787!> Teodoro Laino [tlaino] 2007 - University of Zurich
788! **************************************************************************************************
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
792
793 IF (log_unit > 0) THEN
794 ! Dump info if requested
795 WRITE (log_unit, '("SHAKE_INFO|",2X,A,I6,A,F15.9)') &
796 "External Shake Nr. Iterations:", ishake_ext, &
797 " Max. Err.:", max_sigma
798 END IF
799 ! Notify a not converged SHAKE
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.")
804 END IF
805 END SUBROUTINE shake_ext_info
806
807! **************************************************************************************************
808!> \brief Dumps convergence info about rattle - intramolecular constraint loop
809!> \param log_unit ...
810!> \param i ...
811!> \param irattle_int ...
812!> \param max_sigma ...
813!> \par History
814!> Teodoro Laino [tlaino] 2007 - University of Zurich
815! **************************************************************************************************
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
819
820 IF (log_unit > 0) THEN
821 ! Dump info if requested
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
824 END IF
825 ! Notify a not converged RATTLE
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.")
831 END IF
832 END SUBROUTINE rattle_int_info
833
834! **************************************************************************************************
835!> \brief Dumps convergence info about rattle - intermolecular constraint loop
836!> \param log_unit ...
837!> \param irattle_ext ...
838!> \param max_sigma ...
839!> \par History
840!> Teodoro Laino [tlaino] 2007 - University of Zurich
841! **************************************************************************************************
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
845
846 IF (log_unit > 0) THEN
847 ! Dump info if requested
848 WRITE (log_unit, '("RATTLE_INFO|",1X,A,I6,A,F15.9)') &
849 "External Rattle Nr. Iterations:", irattle_ext, &
850 " Max. Err.:", max_sigma
851 END IF
852 ! Notify a not converged RATTLE
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.")
857 END IF
858 END SUBROUTINE rattle_ext_info
859
860! **************************************************************************************************
861!> \brief Updates the TARGET of the COLLECTIVE constraints if the growth speed
862!> is different from zero.
863!> \param gci ...
864!> \param local_molecules ...
865!> \param molecule_set ...
866!> \param molecule_kind_set ...
867!> \param dt ...
868!> \param root_section ...
869!> \date 02.2008
870!> \author Teodoro Laino [tlaino] - University of Zurich
871! **************************************************************************************************
872 SUBROUTINE shake_update_targets(gci, local_molecules, molecule_set, &
873 molecule_kind_set, dt, root_section)
874
875 TYPE(global_constraint_type), POINTER :: gci
876 TYPE(distribution_1d_type), POINTER :: local_molecules
877 TYPE(molecule_type), POINTER :: molecule_set(:)
878 TYPE(molecule_kind_type), POINTER :: molecule_kind_set(:)
879 REAL(kind=dp), INTENT(in) :: dt
880 TYPE(section_vals_type), POINTER :: root_section
881
882 CHARACTER(LEN=*), PARAMETER :: routinen = 'shake_update_targets'
883
884 INTEGER :: handle, i, ikind, imol, nkind, &
885 nmol_per_kind
886 LOGICAL :: do_ext_constraint
887 TYPE(colvar_counters) :: ncolv
888 TYPE(molecule_kind_type), POINTER :: molecule_kind
889 TYPE(molecule_type), POINTER :: molecule
890 TYPE(section_vals_type), POINTER :: motion_section
891
892 CALL timeset(routinen, handle)
893 motion_section => section_vals_get_subs_vals(root_section, "MOTION")
894 nkind = SIZE(molecule_kind_set)
895 do_ext_constraint = (gci%ntot /= 0)
896 ! Intramolecular Constraints
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
903 CALL get_molecule_kind(molecule_kind, ncolv=ncolv)
904
905 ! Updating TARGETS for Collective Variables only
906 IF (ncolv%ntot /= 0) CALL shake_update_colv_int(molecule, dt, motion_section)
907 END DO
908 END DO mol
909 ! Intermolecular constraints
910 IF (do_ext_constraint) THEN
911 ! Collective Variables
912 IF (gci%ncolv%ntot /= 0) CALL shake_update_colv_ext(gci, dt, motion_section)
913 END IF
914 CALL timestop(handle)
915 END SUBROUTINE shake_update_targets
916
917END MODULE constraint
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.
Definition cell_types.F:15
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)
...
Definition constraint.F:237
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)
...
Definition constraint.F:514
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)
...
Definition constraint.F:101
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)
...
Definition constraint.F:362
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.
Definition constraint.F:874
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...
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public npt_i_ensemble
integer, parameter, public npt_ia_ensemble
integer, parameter, public npt_f_ensemble
objects that represent the structure of input sections and the data contained in an input section
recursive type(section_vals_type) function, pointer, public section_vals_get_subs_vals(section_vals, subsection_name, i_rep_section, can_return_null)
returns the values of the requested subsection
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
integer, parameter, public default_string_length
Definition kinds.F:57
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.
Definition cell_types.F:60
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.