(git:ccc2433)
qmmm_per_elpot.F
Go to the documentation of this file.
1 !--------------------------------------------------------------------------------------------------!
2 ! CP2K: A general program to perform molecular dynamics simulations !
3 ! Copyright 2000-2024 CP2K developers group <https://cp2k.org> !
4 ! !
5 ! SPDX-License-Identifier: GPL-2.0-or-later !
6 !--------------------------------------------------------------------------------------------------!
7 
8 ! **************************************************************************************************
9 !> \brief Setting up the potential for QM/MM periodic boundary conditions calculations
10 !> \par History
11 !> 07.2005 created [tlaino]
12 !> \author Teodoro Laino
13 ! **************************************************************************************************
15  USE ao_util, ONLY: exp_radius
16  USE cell_types, ONLY: cell_type
19  cp_logger_type
25  ewald_environment_type,&
27  USE ewald_pw_types, ONLY: ewald_pw_create,&
28  ewald_pw_type
30  USE input_constants, ONLY: do_qmmm_coulomb,&
35  section_vals_type,&
37  USE kinds, ONLY: dp
38  USE mathconstants, ONLY: pi
39  USE message_passing, ONLY: mp_para_env_type
40  USE pw_poisson_types, ONLY: do_ewald_ewald,&
42  do_ewald_pme,&
44  USE qmmm_gaussian_types, ONLY: qmmm_gaussian_p_type,&
45  qmmm_gaussian_type
46  USE qmmm_types_low, ONLY: qmmm_per_pot_p_type,&
47  qmmm_per_pot_type,&
48  qmmm_pot_p_type
49 #include "./base/base_uses.f90"
50 
51  IMPLICIT NONE
52  PRIVATE
53 
54  LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .true.
55  CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qmmm_per_elpot'
57 
58 CONTAINS
59 
60 ! **************************************************************************************************
61 !> \brief Initialize the QMMM potential stored on vector,
62 !> according the qmmm_coupl_type
63 !> \param qmmm_coupl_type ...
64 !> \param per_potentials ...
65 !> \param potentials ...
66 !> \param pgfs ...
67 !> \param qm_cell_small ...
68 !> \param mm_cell ...
69 !> \param para_env ...
70 !> \param compatibility ...
71 !> \param qmmm_periodic ...
72 !> \param print_section ...
73 !> \param eps_mm_rspace ...
74 !> \param maxchrg ...
75 !> \param ncp ...
76 !> \param ncpl ...
77 !> \par History
78 !> 09.2004 created [tlaino]
79 !> \author Teodoro Laino
80 ! **************************************************************************************************
81  SUBROUTINE qmmm_per_potential_init(qmmm_coupl_type, per_potentials, potentials, &
82  pgfs, qm_cell_small, mm_cell, para_env, compatibility, qmmm_periodic, print_section, &
83  eps_mm_rspace, maxchrg, ncp, ncpl)
84  INTEGER, INTENT(IN) :: qmmm_coupl_type
85  TYPE(qmmm_per_pot_p_type), DIMENSION(:), POINTER :: per_potentials
86  TYPE(qmmm_pot_p_type), DIMENSION(:), POINTER :: potentials
87  TYPE(qmmm_gaussian_p_type), DIMENSION(:), POINTER :: pgfs
88  TYPE(cell_type), POINTER :: qm_cell_small, mm_cell
89  TYPE(mp_para_env_type), POINTER :: para_env
90  LOGICAL, INTENT(IN) :: compatibility
91  TYPE(section_vals_type), POINTER :: qmmm_periodic, print_section
92  REAL(kind=dp), INTENT(IN) :: eps_mm_rspace, maxchrg
93  INTEGER, INTENT(IN) :: ncp(3), ncpl(3)
94 
95  INTEGER :: i, idim, ig, ig_start, iw, ix, iy, iz, &
96  k, kmax(3), n_rep_real(3), &
97  n_rep_real_val, ncoarsel, ncoarset, &
98  ndim, output_unit
99  INTEGER, DIMENSION(:), POINTER :: mm_atom_index
100  REAL(kind=dp) :: ak, alpha, box(3), fac(3), fs, g, g2, &
101  gk, gmax, mymaxradius, npl, npt, &
102  prefactor, rc, rc2, rmax, tmp, vec(3), &
103  vol
104  REAL(kind=dp), DIMENSION(:), POINTER :: gx, gy, gz, lg
105  TYPE(cp_logger_type), POINTER :: logger
106  TYPE(qmmm_gaussian_type), POINTER :: pgf
107 
108  NULLIFY (lg, gx, gy, gz)
109  ncoarset = product(ncp)
110  ncoarsel = product(ncpl)
111  logger => cp_get_default_logger()
112  output_unit = cp_logger_get_default_io_unit(logger)
113  rmax = sqrt(mm_cell%hmat(1, 1)**2 + &
114  mm_cell%hmat(2, 2)**2 + &
115  mm_cell%hmat(3, 3)**2)
116  CALL section_vals_val_get(qmmm_periodic, "GMAX", r_val=gmax)
117  CALL section_vals_val_get(qmmm_periodic, "REPLICA", i_val=n_rep_real_val)
118  fac = 2.0e0_dp*pi/(/mm_cell%hmat(1, 1), mm_cell%hmat(2, 2), mm_cell%hmat(3, 3)/)
119  kmax = ceiling(gmax/fac)
120  vol = mm_cell%hmat(1, 1)* &
121  mm_cell%hmat(2, 2)* &
122  mm_cell%hmat(3, 3)
123  ndim = (kmax(1) + 1)*(2*kmax(2) + 1)*(2*kmax(3) + 1)
124  ig_start = 1
125  n_rep_real = n_rep_real_val
126  IF (compatibility .AND. (qmmm_coupl_type == do_qmmm_gauss)) ig_start = 2
127 
128  cpassert(.NOT. ASSOCIATED(per_potentials))
129  ALLOCATE (per_potentials(SIZE(pgfs)))
130  cpassert(SIZE(pgfs) == SIZE(potentials))
131  potential_type: DO k = 1, SIZE(pgfs)
132 
133  rc = pgfs(k)%pgf%Elp_Radius
134  ALLOCATE (per_potentials(k)%Pot)
135  SELECT CASE (qmmm_coupl_type)
137  ! Not yet implemented for this case
138  cpabort("")
140  ALLOCATE (lg(ndim))
141  ALLOCATE (gx(ndim))
142  ALLOCATE (gy(ndim))
143  ALLOCATE (gz(ndim))
144  END SELECT
145 
146  lg = 0.0_dp
147  gx = 0.0_dp
148  gy = 0.0_dp
149  gz = 0.0_dp
150 
151  SELECT CASE (qmmm_coupl_type)
153  ! Not yet implemented for this case
154  cpabort("")
156  pgf => pgfs(k)%pgf
157  idim = 0
158  DO ix = 0, kmax(1)
159  DO iy = -kmax(2), kmax(2)
160  DO iz = -kmax(3), kmax(3)
161  idim = idim + 1
162  IF (ix == 0 .AND. iy == 0 .AND. iz == 0) THEN
163  DO ig = ig_start, pgf%number_of_gaussians
164  gk = pgf%Gk(ig)
165  ak = pgf%Ak(ig)*pi**(3.0_dp/2.0_dp)*gk**3.0_dp
166  lg(idim) = lg(idim) - ak
167  END DO
168  ELSE
169  fs = 2.0_dp; IF (ix == 0) fs = 1.0_dp
170  vec = fac*(/real(ix, kind=dp), real(iy, kind=dp), real(iz, kind=dp)/)
171  g2 = dot_product(vec, vec)
172  rc2 = rc*rc
173  g = sqrt(g2)
174  IF (qmmm_coupl_type == do_qmmm_gauss) THEN
175  lg(idim) = 4.0_dp*pi/g2*exp(-(g2*rc2)/4.0_dp)
176  ELSEIF (qmmm_coupl_type == do_qmmm_swave) THEN
177  tmp = 4.0_dp/rc2
178  lg(idim) = 4.0_dp*pi*tmp**2/(g2*(g2 + tmp)**2)
179  END IF
180  DO ig = ig_start, pgf%number_of_gaussians
181  gk = pgf%Gk(ig)
182  ak = pgf%Ak(ig)*pi**(3.0_dp/2.0_dp)*gk**3.0_dp
183  lg(idim) = lg(idim) - ak*exp(-(g*gk)**2.0_dp/4.0_dp)
184  END DO
185  END IF
186  lg(idim) = fs*lg(idim)*1.0_dp/vol
187  gx(idim) = fac(1)*real(ix, kind=dp)
188  gy(idim) = fac(2)*real(iy, kind=dp)
189  gz(idim) = fac(3)*real(iz, kind=dp)
190  END DO
191  END DO
192  END DO
193 
194  IF (all(n_rep_real == -1)) THEN
195  mymaxradius = 0.0_dp
196  DO i = 1, pgf%number_of_gaussians
197  IF (pgf%Gk(i) /= 0.0_dp) THEN
198  alpha = 1.0_dp/pgf%Gk(i)
199  alpha = alpha*alpha
200  prefactor = pgf%Ak(i)*maxchrg
201  mymaxradius = max(mymaxradius, exp_radius(0, alpha, eps_mm_rspace, prefactor, rlow=mymaxradius))
202  END IF
203  END DO
204  box(1) = (qm_cell_small%hmat(1, 1) - mm_cell%hmat(1, 1))/2.0_dp
205  box(2) = (qm_cell_small%hmat(2, 2) - mm_cell%hmat(2, 2))/2.0_dp
206  box(3) = (qm_cell_small%hmat(3, 3) - mm_cell%hmat(3, 3))/2.0_dp
207  IF (any(box > 0.0_dp)) THEN
208  cpabort("")
209  END IF
210  n_rep_real(1) = ceiling((box(1) + mymaxradius)/mm_cell%hmat(1, 1))
211  n_rep_real(2) = ceiling((box(2) + mymaxradius)/mm_cell%hmat(2, 2))
212  n_rep_real(3) = ceiling((box(3) + mymaxradius)/mm_cell%hmat(3, 3))
213  END IF
214 
215  CASE DEFAULT
216  DEALLOCATE (per_potentials(k)%Pot)
217  IF (output_unit > 0) WRITE (output_unit, '(A)') " QMMM Periodic Potential - not Initialized!"
218  cycle potential_type
219  END SELECT
220 
221  NULLIFY (mm_atom_index)
222  ALLOCATE (mm_atom_index(SIZE(potentials(k)%pot%mm_atom_index)))
223  mm_atom_index = potentials(k)%pot%mm_atom_index
224 
225  NULLIFY (per_potentials(k)%Pot%LG, per_potentials(k)%Pot%mm_atom_index, &
226  per_potentials(k)%Pot%gx, per_potentials(k)%Pot%gy, per_potentials(k)%Pot%gz)
227  CALL qmmm_per_pot_type_create(per_potentials(k)%Pot, lg=lg, gx=gx, gy=gy, gz=gz, &
228  gmax=gmax, kmax=kmax, n_rep_real=n_rep_real, &
229  fac=fac, mm_atom_index=mm_atom_index, &
230  mm_cell=mm_cell, para_env=para_env, &
231  qmmm_per_section=qmmm_periodic, print_section=print_section)
232 
233  iw = cp_print_key_unit_nr(logger, print_section, "PERIODIC_INFO", &
234  extension=".log")
235  IF (iw > 0) THEN
236  npt = real(ncoarset, kind=dp)*real(ndim, kind=dp)*real(SIZE(mm_atom_index), kind=dp)
237  npl = real(ncoarsel, kind=dp)*real(ndim, kind=dp)*real(SIZE(mm_atom_index), kind=dp)
238  WRITE (unit=iw, fmt="(/,T2,A)") repeat("-", 79)
239  WRITE (unit=iw, fmt="(T2,A,T20,A,T80,A)") "-", "QMMM PERIODIC BOUNDARY CONDITION INFO", "-"
240  WRITE (unit=iw, fmt="(T2,A)") repeat("-", 79)
241  WRITE (unit=iw, fmt="(T2,A,T10,A,F15.6,T50,A,3I5,T80,A)") "-", "RADIUS =", rc, "REPLICA =", n_rep_real, "-"
242  WRITE (unit=iw, fmt="(T2,A,T10,A,F15.6,T50,A,I15,T80,A)") "-", "MINGVAL =", minval(abs(lg)), &
243  "GPOINTS =", ndim, "-"
244  WRITE (unit=iw, fmt="(T2,A,T10,A,3I5,T50,A,3I5,T80,A)") "-", "NCOARSL =", ncpl, &
245  "NCOARST =", ncp, "-"
246  WRITE (unit=iw, fmt="(T2,A,T10,A,F15.0,T50,A,F15.0,T80,A)") "-", "NFLOP-L ~", npl, &
247  "NFLOP-T ~", npt, "-"
248  WRITE (unit=iw, fmt="(T2,A)") repeat("-", 79)
249  END IF
250  CALL cp_print_key_finished_output(iw, logger, print_section, &
251  "PERIODIC_INFO")
252 
253  END DO potential_type
254 
255  END SUBROUTINE qmmm_per_potential_init
256 
257 ! **************************************************************************************************
258 !> \brief Creates the qmmm_pot_type structure
259 !> \param Pot ...
260 !> \param LG ...
261 !> \param gx ...
262 !> \param gy ...
263 !> \param gz ...
264 !> \param GMax ...
265 !> \param Kmax ...
266 !> \param n_rep_real ...
267 !> \param Fac ...
268 !> \param mm_atom_index ...
269 !> \param mm_cell ...
270 !> \param para_env ...
271 !> \param qmmm_per_section ...
272 !> \param print_section ...
273 !> \par History
274 !> 09.2004 created [tlaino]
275 !> \author Teodoro Laino
276 ! **************************************************************************************************
277  SUBROUTINE qmmm_per_pot_type_create(Pot, LG, gx, gy, gz, GMax, Kmax, n_rep_real, &
278  Fac, mm_atom_index, mm_cell, para_env, qmmm_per_section, print_section)
279  TYPE(qmmm_per_pot_type), POINTER :: pot
280  REAL(kind=dp), DIMENSION(:), POINTER :: lg, gx, gy, gz
281  REAL(kind=dp), INTENT(IN) :: gmax
282  INTEGER, INTENT(IN) :: kmax(3), n_rep_real(3)
283  REAL(kind=dp), INTENT(IN) :: fac(3)
284  INTEGER, DIMENSION(:), POINTER :: mm_atom_index
285  TYPE(cell_type), POINTER :: mm_cell
286  TYPE(mp_para_env_type), POINTER :: para_env
287  TYPE(section_vals_type), POINTER :: qmmm_per_section, print_section
288 
289  INTEGER :: npts(3)
290  INTEGER, DIMENSION(:), POINTER :: ngrids
291  REAL(kind=dp) :: hmat(3, 3)
292  TYPE(section_vals_type), POINTER :: grid_print_section
293 
294  pot%LG => lg
295  pot%gx => gx
296  pot%gy => gy
297  pot%gz => gz
298  pot%mm_atom_index => mm_atom_index
299  pot%Gmax = gmax
300  pot%Kmax = kmax
301  pot%n_rep_real = n_rep_real
302  pot%Fac = fac
303  !
304  ! Setting Up Fit Procedure
305  !
306  NULLIFY (pot%pw_grid)
307  NULLIFY (pot%pw_pool)
308  NULLIFY (pot%TabLR, ngrids)
309  CALL section_vals_val_get(qmmm_per_section, "ngrids", i_vals=ngrids)
310  npts = ngrids
311  hmat = mm_cell%hmat
312 
313  grid_print_section => section_vals_get_subs_vals(print_section, "GRID_INFORMATION")
314  CALL setup_ewald_spline(pw_grid=pot%pw_grid, pw_pool=pot%pw_pool, coeff=pot%TabLR, &
315  lg=lg, gx=gx, gy=gy, gz=gz, hmat=hmat, npts=npts, param_section=qmmm_per_section, &
316  tag="qmmm", para_env=para_env, print_section=grid_print_section)
317 
318  END SUBROUTINE qmmm_per_pot_type_create
319 
320 ! **************************************************************************************************
321 !> \brief Initialize the QMMM Ewald potential needed for QM-QM Coupling using
322 !> point charges
323 !> \param ewald_env ...
324 !> \param ewald_pw ...
325 !> \param qmmm_coupl_type ...
326 !> \param mm_cell ...
327 !> \param para_env ...
328 !> \param qmmm_periodic ...
329 !> \param print_section ...
330 !> \par History
331 !> 10.2014 created [JGH]
332 !> \author JGH
333 ! **************************************************************************************************
334  SUBROUTINE qmmm_ewald_potential_init(ewald_env, ewald_pw, qmmm_coupl_type, mm_cell, para_env, &
335  qmmm_periodic, print_section)
336  TYPE(ewald_environment_type), POINTER :: ewald_env
337  TYPE(ewald_pw_type), POINTER :: ewald_pw
338  INTEGER, INTENT(IN) :: qmmm_coupl_type
339  TYPE(cell_type), POINTER :: mm_cell
340  TYPE(mp_para_env_type), POINTER :: para_env
341  TYPE(section_vals_type), POINTER :: qmmm_periodic, print_section
342 
343  INTEGER :: ewald_type, gmax(3), iw, o_spline, ounit
344  LOGICAL :: do_multipoles
345  REAL(kind=dp) :: alpha, rcut
346  TYPE(cp_logger_type), POINTER :: logger
347  TYPE(section_vals_type), POINTER :: ewald_print_section, ewald_section, &
348  poisson_section
349 
350  logger => cp_get_default_logger()
351  ounit = cp_logger_get_default_io_unit(logger)
352  cpassert(.NOT. ASSOCIATED(ewald_env))
353  cpassert(.NOT. ASSOCIATED(ewald_pw))
354 
355  ! Create Ewald environments
356  poisson_section => section_vals_get_subs_vals(qmmm_periodic, "POISSON")
357  ALLOCATE (ewald_env)
358  CALL ewald_env_create(ewald_env, para_env)
359  CALL ewald_env_set(ewald_env, poisson_section=poisson_section)
360  ewald_section => section_vals_get_subs_vals(poisson_section, "EWALD")
361  CALL read_ewald_section(ewald_env, ewald_section)
362  ewald_print_section => section_vals_get_subs_vals(print_section, "GRID_INFORMATION")
363  ALLOCATE (ewald_pw)
364  CALL ewald_pw_create(ewald_pw, ewald_env, mm_cell, mm_cell, print_section=ewald_print_section)
365 
366  CALL ewald_env_get(ewald_env, ewald_type=ewald_type, do_multipoles=do_multipoles, &
367  gmax=gmax, o_spline=o_spline, alpha=alpha, rcut=rcut)
368  IF (do_multipoles) &
369  cpabort("No multipole force fields allowed in QM-QM Ewald long range correction")
370 
371  SELECT CASE (qmmm_coupl_type)
372  CASE (do_qmmm_coulomb)
373  cpabort("QM-QM long range correction not possible with COULOMB coupling")
374  CASE (do_qmmm_pcharge)
375  ! OK
377  cpabort("QM-QM long range correction not possible with GAUSS/SWAVE coupling")
378  CASE DEFAULT
379  ! We should never get to this point
380  cpabort("")
381  END SELECT
382 
383  iw = cp_print_key_unit_nr(logger, print_section, "PERIODIC_INFO", extension=".log")
384  IF (iw > 0) THEN
385  WRITE (unit=iw, fmt="(/,T2,A)") repeat("-", 79)
386  WRITE (unit=iw, fmt="(T2,A,T20,A,T80,A)") "-", "QMMM PERIODIC BOUNDARY CONDITION INFO", "-"
387  WRITE (unit=iw, fmt="(T2,A,T25,A,T80,A)") "-", "QM-QM Long Range Correction", "-"
388  WRITE (unit=iw, fmt="(T2,A)") repeat("-", 79)
389  SELECT CASE (ewald_type)
390  CASE (do_ewald_none)
391  cpabort("QM-QM long range correction not compatible with Ewald=NONE")
392  CASE (do_ewald_pme)
393  cpabort("QM-QM long range correction not possible with Ewald=PME")
394  CASE (do_ewald_ewald)
395  cpabort("QM-QM long range correction not possible with Ewald method")
396  CASE (do_ewald_spme)
397  WRITE (unit=iw, fmt="(T2,A,T35,A,T75,A,T80,A)") "-", "Ewald type", "SPME", "-"
398  WRITE (unit=iw, fmt="(T2,A,T35,A,T61,3I6,T80,A)") "-", "GMAX values", gmax, "-"
399  WRITE (unit=iw, fmt="(T2,A,T35,A,T73,I6,T80,A)") "-", "Spline order", o_spline, "-"
400  WRITE (unit=iw, fmt="(T2,A,T35,A,T67,F12.4,T80,A)") "-", "Alpha value", alpha, "-"
401  WRITE (unit=iw, fmt="(T2,A,T35,A,T67,F12.4,T80,A)") "-", "Real space cutoff value", rcut, "-"
402  END SELECT
403  WRITE (unit=iw, fmt="(T2,A)") repeat("-", 79)
404  END IF
405  CALL cp_print_key_finished_output(iw, logger, print_section, "PERIODIC_INFO")
406 
407  END SUBROUTINE qmmm_ewald_potential_init
408 
409 END MODULE qmmm_per_elpot
static GRID_HOST_DEVICE double fac(const int i)
Factorial function, e.g. fac(5) = 5! = 120.
Definition: grid_common.h:48
All kind of helpful little routines.
Definition: ao_util.F:14
real(kind=dp) function, public exp_radius(l, alpha, threshold, prefactor, epsabs, epsrel, rlow)
The radius of a primitive Gaussian function for a given threshold is calculated. g(r) = prefactor*r**...
Definition: ao_util.F:96
Handles all functions related to the CELL.
Definition: cell_types.F:15
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,...
subroutine, public ewald_env_set(ewald_env, ewald_type, alpha, epsilon, eps_pol, gmax, ns_max, precs, o_spline, para_env, poisson_section, interaction_cutoffs, cell_hmat)
Purpose: Set the EWALD environment.
subroutine, public ewald_env_create(ewald_env, para_env)
allocates and intitializes a ewald_env
subroutine, public read_ewald_section(ewald_env, ewald_section)
Purpose: read the EWALD section.
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 ewald_pw_create(ewald_pw, ewald_env, cell, cell_ref, print_section)
creates the structure ewald_pw_type
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, para_env)
Setup of the G-space Ewald Term Spline Coefficients.
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public do_qmmm_pcharge
integer, parameter, public do_qmmm_coulomb
integer, parameter, public do_qmmm_swave
integer, parameter, public do_qmmm_gauss
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_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.
Definition: mathconstants.F:16
real(kind=dp), parameter, public pi
Interface to the message passing library MPI.
functions related to the poisson solver on regular grids
integer, parameter, public do_ewald_pme
integer, parameter, public do_ewald_ewald
integer, parameter, public do_ewald_none
integer, parameter, public do_ewald_spme
Sets the typo for the gaussian treatment of the qm/mm interaction.
Setting up the potential for QM/MM periodic boundary conditions calculations.
subroutine, public qmmm_per_potential_init(qmmm_coupl_type, per_potentials, potentials, pgfs, qm_cell_small, mm_cell, para_env, compatibility, qmmm_periodic, print_section, eps_mm_rspace, maxchrg, ncp, ncpl)
Initialize the QMMM potential stored on vector, according the qmmm_coupl_type.
subroutine, public qmmm_ewald_potential_init(ewald_env, ewald_pw, qmmm_coupl_type, mm_cell, para_env, qmmm_periodic, print_section)
Initialize the QMMM Ewald potential needed for QM-QM Coupling using point charges.