(git:561f475)
Loading...
Searching...
No Matches
cp_ddapc_types.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!> \brief contains information regarding the decoupling/recoupling method of Bloechl
10!> \author Teodoro Laino
11! **************************************************************************************************
13 USE cell_methods, ONLY: read_cell
14 USE cell_types, ONLY: cell_release,&
28 USE kinds, ONLY: dp
29 USE mathconstants, ONLY: pi
30 USE mathlib, ONLY: det_3x3
34 USE pw_grids, ONLY: pw_grid_release
38 USE pw_types, ONLY: pw_c1d_gs_type,&
40#include "./base/base_uses.f90"
41
42 IMPLICIT NONE
43 PRIVATE
44 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .true.
45 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'cp_ddapc_types'
46
49
50! **************************************************************************************************
51!> \author Teodoro Laino
52! **************************************************************************************************
54 REAL(kind=dp) :: c0 = 0.0_dp
55 REAL(kind=dp), DIMENSION(:, :), POINTER :: ami => null()
56 REAL(kind=dp), DIMENSION(:, :), POINTER :: md => null() ! decoupling
57 REAL(kind=dp), DIMENSION(:, :), POINTER :: mr => null() ! recoupling
58 REAL(kind=dp), DIMENSION(:, :), POINTER :: mt => null() ! decoupling+recoupling
59 REAL(kind=dp), DIMENSION(:, :), POINTER :: ms => null() ! solvation
60 REAL(kind=dp), POINTER, DIMENSION(:, :) :: gfunc => null()
61 REAL(kind=dp), POINTER, DIMENSION(:) :: w => null()
62 END TYPE cp_ddapc_type
63
64! **************************************************************************************************
66 LOGICAL :: do_decoupling = .false.
67 LOGICAL :: do_qmmm_periodic_decpl = .false.
68 LOGICAL :: do_solvation = .false.
69 LOGICAL :: do_property = .false.
70 LOGICAL :: do_restraint = .false.
71 TYPE(section_vals_type), POINTER :: ewald_section => null()
72 TYPE(pw_pool_type), POINTER :: pw_pool_qm => null(), pw_pool_mm => null()
73 TYPE(pw_grid_type), POINTER :: pw_grid_qm => null(), pw_grid_mm => null()
74 TYPE(pw_r3d_rs_type), POINTER :: coeff_qm => null(), coeff_mm => null()
75 END TYPE cp_ddapc_ewald_type
76
77CONTAINS
78
79! **************************************************************************************************
80!> \brief ...
81!> \param cp_para_env ...
82!> \param cp_ddapc_env ...
83!> \param cp_ddapc_ewald ...
84!> \param particle_set ...
85!> \param radii ...
86!> \param cell ...
87!> \param super_cell ...
88!> \param rho_tot_g ...
89!> \param gcut ...
90!> \param iw2 ...
91!> \param Vol ...
92!> \param force_env_section ...
93!> \author Tedoro Laino
94!> \note NB receive cp_para_env to pass down to parallelized ewald_ddapc_pot()
95! **************************************************************************************************
96 SUBROUTINE cp_ddapc_create(cp_para_env, cp_ddapc_env, cp_ddapc_ewald, &
97 particle_set, radii, cell, super_cell, rho_tot_g, gcut, iw2, Vol, &
98 force_env_section)
99 TYPE(mp_para_env_type), POINTER :: cp_para_env
100 TYPE(cp_ddapc_type), INTENT(OUT) :: cp_ddapc_env
101 TYPE(cp_ddapc_ewald_type), POINTER :: cp_ddapc_ewald
102 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
103 REAL(kind=dp), DIMENSION(:), POINTER :: radii
104 TYPE(cell_type), POINTER :: cell, super_cell
105 TYPE(pw_c1d_gs_type), INTENT(IN) :: rho_tot_g
106 REAL(kind=dp), INTENT(IN) :: gcut
107 INTEGER, INTENT(IN) :: iw2
108 REAL(kind=dp), INTENT(IN) :: vol
109 TYPE(section_vals_type), POINTER :: force_env_section
110
111 CHARACTER(len=*), PARAMETER :: routinen = 'cp_ddapc_create'
112
113 INTEGER :: handle
114 TYPE(section_vals_type), POINTER :: param_section, solvation_section
115
116 CALL timeset(routinen, handle)
117 NULLIFY (cp_ddapc_env%AmI, &
118 cp_ddapc_env%Md, &
119 cp_ddapc_env%Mt, &
120 cp_ddapc_env%Mr, &
121 cp_ddapc_env%Ms, &
122 cp_ddapc_env%gfunc, &
123 cp_ddapc_env%w)
124 ! Evaluates gfunc and AmI
125 CALL ddapc_eval_gfunc(cp_ddapc_env%gfunc, cp_ddapc_env%w, gcut, rho_tot_g, radii)
126 CALL ddapc_eval_ami(cp_ddapc_env%AmI, &
127 cp_ddapc_env%c0, &
128 cp_ddapc_env%gfunc, &
129 cp_ddapc_env%w, &
130 particle_set, &
131 gcut, &
132 rho_tot_g, &
133 radii, &
134 iw2, &
135 vol)
136 IF (cp_ddapc_ewald%do_qmmm_periodic_decpl .OR. &
137 cp_ddapc_ewald%do_decoupling) THEN
138 !
139 ! Evaluate the matrix for the Classical contribution to the coupling/decoupling scheme
140 !
141 param_section => cp_ddapc_ewald%ewald_section
142 !NB parallelized ewald_ddapc_pot() needs cp_para_env
143 CALL ewald_ddapc_pot(cp_para_env, cp_ddapc_ewald%coeff_qm, &
144 1.0_dp, &
145 cell, &
146 param_section, &
147 particle_set, &
148 cp_ddapc_env%Md, &
149 radii)
150 IF (cp_ddapc_ewald%do_qmmm_periodic_decpl .OR. cp_ddapc_ewald%do_decoupling) THEN
151 ALLOCATE (cp_ddapc_env%Mt(SIZE(cp_ddapc_env%Md, 1), SIZE(cp_ddapc_env%Md, 2)))
152 IF (cp_ddapc_ewald%do_decoupling) THEN
153 ! Just decoupling
154 cp_ddapc_env%Mt = cp_ddapc_env%Md
155 ELSE
156 ! QMMM periodic calculation
157 !NB parallelized ewald_ddapc_pot() needs cp_para_env
158 CALL ewald_ddapc_pot(cp_para_env, cp_ddapc_ewald%coeff_mm, -1.0_dp, super_cell, param_section, &
159 particle_set, cp_ddapc_env%Mr, radii)
160 cp_ddapc_env%Mt = cp_ddapc_env%Md + cp_ddapc_env%Mr
161 END IF
162 END IF
163 END IF
164 IF (cp_ddapc_ewald%do_solvation) THEN
165 ! Spherical Solvation model
166 solvation_section => section_vals_get_subs_vals(force_env_section, "DFT%SCRF")
167 CALL solvation_ddapc_pot(solvation_section, &
168 particle_set, cp_ddapc_env%Ms, radii)
169 END IF
170 CALL timestop(handle)
171 END SUBROUTINE cp_ddapc_create
172
173! **************************************************************************************************
174!> \brief ...
175!> \param cp_ddapc_env ...
176!> \par History
177!> none
178!> \author Teodoro Laino - [tlaino]
179! **************************************************************************************************
180 SUBROUTINE cp_ddapc_release(cp_ddapc_env)
181 TYPE(cp_ddapc_type), INTENT(INOUT) :: cp_ddapc_env
182
183 IF (ASSOCIATED(cp_ddapc_env%AmI)) THEN
184 DEALLOCATE (cp_ddapc_env%AmI)
185 END IF
186 IF (ASSOCIATED(cp_ddapc_env%Mt)) THEN
187 DEALLOCATE (cp_ddapc_env%Mt)
188 END IF
189 IF (ASSOCIATED(cp_ddapc_env%Md)) THEN
190 DEALLOCATE (cp_ddapc_env%Md)
191 END IF
192 IF (ASSOCIATED(cp_ddapc_env%Mr)) THEN
193 DEALLOCATE (cp_ddapc_env%Mr)
194 END IF
195 IF (ASSOCIATED(cp_ddapc_env%Ms)) THEN
196 DEALLOCATE (cp_ddapc_env%Ms)
197 END IF
198 IF (ASSOCIATED(cp_ddapc_env%gfunc)) THEN
199 DEALLOCATE (cp_ddapc_env%gfunc)
200 END IF
201 IF (ASSOCIATED(cp_ddapc_env%w)) THEN
202 DEALLOCATE (cp_ddapc_env%w)
203 END IF
204
205 END SUBROUTINE cp_ddapc_release
206
207! **************************************************************************************************
208!> \brief ...
209!> \param cp_ddapc_ewald ...
210!> \param qmmm_decoupl ...
211!> \param qm_cell ...
212!> \param force_env_section ...
213!> \param subsys_section ...
214!> \param para_env ...
215!> \par History
216!> none
217!> \author Teodoro Laino - [tlaino]
218! **************************************************************************************************
219 SUBROUTINE cp_ddapc_ewald_create(cp_ddapc_ewald, qmmm_decoupl, qm_cell, &
220 force_env_section, subsys_section, para_env)
221 TYPE(cp_ddapc_ewald_type), POINTER :: cp_ddapc_ewald
222 LOGICAL, INTENT(IN) :: qmmm_decoupl
223 TYPE(cell_type), POINTER :: qm_cell
224 TYPE(section_vals_type), POINTER :: force_env_section, subsys_section
225 TYPE(mp_para_env_type), POINTER :: para_env
226
227 INTEGER :: my_val, npts(3)
228 INTEGER, DIMENSION(:), POINTER :: ngrids
229 LOGICAL :: analyt, decoupling, do_qmmm_periodic_decpl, do_restraint, do_restraintb, &
230 do_solvation, use_mm_spline, use_qm_spline
231 REAL(kind=dp) :: hmat(3, 3)
232 REAL(kind=dp), DIMENSION(:), POINTER :: gx, gy, gz, lg
233 TYPE(cell_type), POINTER :: dummy_cell, mm_cell
234 TYPE(cp_logger_type), POINTER :: logger
235 TYPE(section_vals_type), POINTER :: cell_section, grid_print_section, multipole_section, &
236 poisson_section, printc_section, qmmm_per_section, restraint_section, restraint_sectionb, &
237 solvation_section
238
239 logger => cp_get_default_logger()
240 cpassert(.NOT. ASSOCIATED(cp_ddapc_ewald))
241 ALLOCATE (cp_ddapc_ewald)
242 NULLIFY (cp_ddapc_ewald%pw_grid_mm, &
243 cp_ddapc_ewald%pw_grid_qm, &
244 cp_ddapc_ewald%ewald_section, &
245 cp_ddapc_ewald%pw_pool_mm, &
246 cp_ddapc_ewald%pw_pool_qm, &
247 cp_ddapc_ewald%coeff_mm, &
248 cp_ddapc_ewald%coeff_qm)
249 NULLIFY (multipole_section)
250
251 poisson_section => section_vals_get_subs_vals(force_env_section, "DFT%POISSON")
252 solvation_section => section_vals_get_subs_vals(force_env_section, "DFT%SCRF")
253 qmmm_per_section => section_vals_get_subs_vals(force_env_section, "QMMM%PERIODIC")
254 printc_section => section_vals_get_subs_vals(force_env_section, "PROPERTIES%FIT_CHARGE")
255 restraint_section => section_vals_get_subs_vals(force_env_section, "DFT%QS%DDAPC_RESTRAINT")
256 restraint_sectionb => section_vals_get_subs_vals(force_env_section, &
257 "PROPERTIES%ET_COUPLING%DDAPC_RESTRAINT_A")
258 CALL section_vals_get(solvation_section, explicit=do_solvation)
259 CALL section_vals_get(poisson_section, explicit=decoupling)
260 CALL section_vals_get(restraint_section, explicit=do_restraint)
261 CALL section_vals_get(restraint_sectionb, explicit=do_restraintb)
262 do_qmmm_periodic_decpl = qmmm_decoupl
263 cp_ddapc_ewald%do_solvation = do_solvation
264 cp_ddapc_ewald%do_qmmm_periodic_decpl = do_qmmm_periodic_decpl
265 cp_ddapc_ewald%do_property = cp_printkey_is_on(logger%iter_info, printc_section)
266 cp_ddapc_ewald%do_restraint = do_restraint .OR. do_restraintb
267 ! Determining the tasks and further check
268 IF (do_qmmm_periodic_decpl .AND. decoupling) THEN
269 CALL cp_warn(__location__, &
270 "A calculation with the QMMM periodic model has been requested. "// &
271 "The explicit POISSON section in DFT section will be IGNORED. "// &
272 "QM Electrostatic controlled only by the PERIODIC section in QMMM section")
273 decoupling = .false.
274 END IF
275 IF (decoupling) THEN
276 ! Simple decoupling technique
277 CALL section_vals_val_get(poisson_section, "POISSON_SOLVER", i_val=my_val)
278 SELECT CASE (my_val)
280 multipole_section => section_vals_get_subs_vals(poisson_section, "MULTIPOLE")
281 CASE DEFAULT
282 decoupling = .false.
283 END SELECT
284 END IF
285 cp_ddapc_ewald%do_decoupling = decoupling
286 IF (cp_ddapc_ewald%do_qmmm_periodic_decpl) THEN
287 ! QMMM periodic
288 multipole_section => section_vals_get_subs_vals(qmmm_per_section, "MULTIPOLE")
289 END IF
290 cp_ddapc_ewald%ewald_section => multipole_section
291 IF (cp_ddapc_ewald%do_decoupling .OR. cp_ddapc_ewald%do_qmmm_periodic_decpl) THEN
292 ! Do we do the calculation analytically or interpolating the g-space factor?
293 CALL section_vals_val_get(multipole_section, "ANALYTICAL_GTERM", l_val=analyt)
294 IF (.NOT. analyt) THEN
295 ! The tabulated spline path is only valid for orthorhombic grids.
296 use_qm_spline = qm_cell%orthorhombic
297 use_mm_spline = .false.
298 IF (cp_ddapc_ewald%do_qmmm_periodic_decpl) THEN
299 NULLIFY (mm_cell, dummy_cell)
300 cell_section => section_vals_get_subs_vals(subsys_section, "CELL")
301 CALL read_cell(mm_cell, dummy_cell, cell_section=cell_section, para_env=para_env)
302 use_mm_spline = mm_cell%orthorhombic
303 END IF
304 IF (use_qm_spline .OR. use_mm_spline) THEN
305 CALL section_vals_val_get(multipole_section, "ngrids", i_vals=ngrids)
306 npts = ngrids
307 grid_print_section => section_vals_get_subs_vals(force_env_section, "PRINT%GRID_INFORMATION")
308
309 IF (use_qm_spline) THEN
310 NULLIFY (lg, gx, gy, gz)
311 hmat = qm_cell%hmat
312 CALL eval_lg(multipole_section, hmat, lg, gx, gy, gz)
313 CALL setup_ewald_spline(pw_grid=cp_ddapc_ewald%pw_grid_qm, pw_pool=cp_ddapc_ewald%pw_pool_qm, &
314 coeff=cp_ddapc_ewald%coeff_qm, lg=lg, gx=gx, gy=gy, gz=gz, hmat=hmat, npts=npts, &
315 param_section=multipole_section, tag="ddapc", &
316 print_section=grid_print_section)
317 DEALLOCATE (lg)
318 DEALLOCATE (gx)
319 DEALLOCATE (gy)
320 DEALLOCATE (gz)
321 END IF
322 IF (use_mm_spline) THEN
323 NULLIFY (lg, gx, gy, gz)
324 hmat = mm_cell%hmat
325 CALL eval_lg(multipole_section, hmat, lg, gx, gy, gz)
326 CALL setup_ewald_spline(pw_grid=cp_ddapc_ewald%pw_grid_mm, pw_pool=cp_ddapc_ewald%pw_pool_mm, &
327 coeff=cp_ddapc_ewald%coeff_mm, lg=lg, gx=gx, gy=gy, gz=gz, hmat=hmat, npts=npts, &
328 param_section=multipole_section, tag="ddapc", &
329 print_section=grid_print_section)
330 DEALLOCATE (lg)
331 DEALLOCATE (gx)
332 DEALLOCATE (gy)
333 DEALLOCATE (gz)
334 END IF
335 END IF
336 IF (cp_ddapc_ewald%do_qmmm_periodic_decpl) THEN
337 CALL cell_release(dummy_cell)
338 CALL cell_release(mm_cell)
339 END IF
340 END IF
341 END IF
342 END SUBROUTINE cp_ddapc_ewald_create
343
344! **************************************************************************************************
345!> \brief ...
346!> \param multipole_section ...
347!> \param hmat ...
348!> \param LG ...
349!> \param gx ...
350!> \param gy ...
351!> \param gz ...
352!> \par History
353!> none
354!> \author Teodoro Laino - [tlaino]
355! **************************************************************************************************
356 SUBROUTINE eval_lg(multipole_section, hmat, LG, gx, gy, gz)
357 TYPE(section_vals_type), POINTER :: multipole_section
358 REAL(kind=dp), INTENT(IN) :: hmat(3, 3)
359 REAL(kind=dp), DIMENSION(:), POINTER :: lg, gx, gy, gz
360
361 INTEGER :: i, k1, k2, k3, n_rep, ndim, nmax1, &
362 nmax2, nmax3
363 REAL(kind=dp) :: alpha, deth, eps, fac, fs, fvec(3), &
364 galpha, gsq, gsqi, rcut, tol, tol1
365
366 deth = abs(det_3x3(hmat))
367 rcut = min(hmat(1, 1), hmat(2, 2), hmat(3, 3))/2.0_dp
368 CALL section_vals_val_get(multipole_section, "RCUT", n_rep_val=n_rep)
369 IF (n_rep == 1) CALL section_vals_val_get(multipole_section, "RCUT", r_val=rcut)
370 CALL section_vals_val_get(multipole_section, "EWALD_PRECISION", r_val=eps)
371 eps = min(abs(eps), 0.5_dp)
372 tol = sqrt(abs(log(eps*rcut)))
373 alpha = sqrt(abs(log(eps*rcut*tol)))/rcut
374 galpha = 1.0_dp/(4.0_dp*alpha*alpha)
375 tol1 = sqrt(-log(eps*rcut*(2.0_dp*tol*alpha)**2))
376 nmax1 = nint(0.25_dp + hmat(1, 1)*alpha*tol1/pi)
377 nmax2 = nint(0.25_dp + hmat(2, 2)*alpha*tol1/pi)
378 nmax3 = nint(0.25_dp + hmat(3, 3)*alpha*tol1/pi)
379 fac = 1.e0_dp/deth
380 fvec = 2.0_dp*pi/[hmat(1, 1), hmat(2, 2), hmat(3, 3)]
381 ndim = (nmax1 + 1)*(2*nmax2 + 1)*(2*nmax3 + 1) - 1
382 ALLOCATE (lg(ndim))
383 ALLOCATE (gx(ndim))
384 ALLOCATE (gy(ndim))
385 ALLOCATE (gz(ndim))
386
387 i = 0
388 DO k1 = 0, nmax1
389 DO k2 = -nmax2, nmax2
390 DO k3 = -nmax3, nmax3
391 IF (k1 == 0 .AND. k2 == 0 .AND. k3 == 0) cycle
392 i = i + 1
393 fs = 2.0_dp; IF (k1 == 0) fs = 1.0_dp
394 gx(i) = fvec(1)*real(k1, kind=dp)
395 gy(i) = fvec(2)*real(k2, kind=dp)
396 gz(i) = fvec(3)*real(k3, kind=dp)
397 gsq = gx(i)*gx(i) + gy(i)*gy(i) + gz(i)*gz(i)
398 gsqi = fs/gsq
399 lg(i) = fac*gsqi*exp(-galpha*gsq)
400 END DO
401 END DO
402 END DO
403
404 END SUBROUTINE eval_lg
405
406! **************************************************************************************************
407!> \brief ...
408!> \param cp_ddapc_ewald ...
409!> \par History
410!> none
411!> \author Teodoro Laino - [tlaino]
412! **************************************************************************************************
413 SUBROUTINE cp_ddapc_ewald_release(cp_ddapc_ewald)
414 TYPE(cp_ddapc_ewald_type), POINTER :: cp_ddapc_ewald
415
416 IF (ASSOCIATED(cp_ddapc_ewald)) THEN
417 IF (ASSOCIATED(cp_ddapc_ewald%coeff_qm)) THEN
418 CALL cp_ddapc_ewald%pw_pool_qm%give_back_pw(cp_ddapc_ewald%coeff_qm)
419 DEALLOCATE (cp_ddapc_ewald%coeff_qm)
420 END IF
421 IF (ASSOCIATED(cp_ddapc_ewald%coeff_mm)) THEN
422 CALL cp_ddapc_ewald%pw_pool_mm%give_back_pw(cp_ddapc_ewald%coeff_mm)
423 DEALLOCATE (cp_ddapc_ewald%coeff_mm)
424 END IF
425 IF (ASSOCIATED(cp_ddapc_ewald%pw_pool_qm)) THEN
426 CALL pw_pool_release(cp_ddapc_ewald%pw_pool_qm)
427 cpassert(.NOT. ASSOCIATED(cp_ddapc_ewald%pw_pool_qm))
428 END IF
429 IF (ASSOCIATED(cp_ddapc_ewald%pw_pool_mm)) THEN
430 CALL pw_pool_release(cp_ddapc_ewald%pw_pool_mm)
431 cpassert(.NOT. ASSOCIATED(cp_ddapc_ewald%pw_pool_mm))
432 END IF
433 IF (ASSOCIATED(cp_ddapc_ewald%pw_grid_qm)) THEN
434 CALL pw_grid_release(cp_ddapc_ewald%pw_grid_qm)
435 cpassert(.NOT. ASSOCIATED(cp_ddapc_ewald%pw_grid_qm))
436 END IF
437 IF (ASSOCIATED(cp_ddapc_ewald%pw_grid_mm)) THEN
438 CALL pw_grid_release(cp_ddapc_ewald%pw_grid_mm)
439 cpassert(.NOT. ASSOCIATED(cp_ddapc_ewald%pw_grid_mm))
440 END IF
441 DEALLOCATE (cp_ddapc_ewald)
442 END IF
443
444 END SUBROUTINE cp_ddapc_ewald_release
445
446END MODULE cp_ddapc_types
Handles all functions related to the CELL.
recursive subroutine, public read_cell(cell, cell_ref, use_ref_cell, cell_section, topology_section, check_for_ref, para_env)
...
Handles all functions related to the CELL.
Definition cell_types.F:15
subroutine, public cell_release(cell)
releases the given cell (see doc/ReferenceCounting.html)
Definition cell_types.F:608
contains information regarding the decoupling/recoupling method of Bloechl
subroutine, public solvation_ddapc_pot(solvation_section, particle_set, m, radii)
Evaluates the electrostatic potential due to a simple solvation model Spherical cavity in a dieletric...
recursive subroutine, public ewald_ddapc_pot(cp_para_env, coeff, factor, cell, multipole_section, particle_set, m, radii)
Evaluates the Ewald term E2 and E3 energy term for the decoupling/coupling of periodic images.
subroutine, public ddapc_eval_ami(gami, c0, gfunc, w, particle_set, gcut, rho_tot_g, radii, iw, vol)
Computes the inverse AmI of the Am matrix.
subroutine, public ddapc_eval_gfunc(gfunc, w, gcut, rho_tot_g, radii)
...
contains information regarding the decoupling/recoupling method of Bloechl
subroutine, public cp_ddapc_release(cp_ddapc_env)
...
subroutine, public cp_ddapc_ewald_create(cp_ddapc_ewald, qmmm_decoupl, qm_cell, force_env_section, subsys_section, para_env)
...
subroutine, public cp_ddapc_ewald_release(cp_ddapc_ewald)
...
subroutine, public cp_ddapc_create(cp_para_env, cp_ddapc_env, cp_ddapc_ewald, particle_set, radii, cell, super_cell, rho_tot_g, gcut, iw2, vol, force_env_section)
...
various routines to log and control the output. The idea is that decisions about where to log should ...
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...
logical function, public cp_printkey_is_on(iteration_info, print_key)
returns true if the printlevel activates this printkey does not look if this iteration it should be p...
Setting up the Spline coefficients used to Interpolate the G-Term in Ewald sums.
subroutine, public setup_ewald_spline(pw_grid, pw_pool, coeff, lg, gx, gy, gz, hmat, npts, param_section, tag, print_section)
Setup of the G-space Ewald Term Spline Coefficients.
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
subroutine, public section_vals_get(section_vals, ref_count, n_repetition, n_subs_vals_rep, section, explicit)
returns various attributes about the section_vals
subroutine, public section_vals_val_get(section_vals, keyword_name, i_rep_section, i_rep_val, n_rep_val, val, l_val, i_val, r_val, c_val, l_vals, i_vals, r_vals, c_vals, explicit)
returns the requested value
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Definition of mathematical constants and functions.
real(kind=dp), parameter, public pi
real(kind=dp), dimension(0:maxfac), parameter, public fac
Collection of simple mathematical functions and subroutines.
Definition mathlib.F:15
Interface to the message passing library MPI.
Define the data structure for the particle information.
This module defines the grid data type and some basic operations on it.
Definition pw_grids.F:36
subroutine, public pw_grid_release(pw_grid)
releases the given pw grid
Definition pw_grids.F:2163
functions related to the poisson solver on regular grids
integer, parameter, public pw_poisson_multipole
Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate ...
subroutine, public pw_pool_release(pool)
releases the given pool (see cp2k/doc/ReferenceCounting.html)
Type defining parameters related to the simulation cell.
Definition cell_types.F:60
type of a logger, at the moment it contains just a print level starting at which level it should be l...
stores all the informations relevant to an mpi environment
Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate ...