2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5 * Copyright (c) 2001-2004, The GROMACS development team.
6 * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
7 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
8 * and including many others, as listed in the AUTHORS file in the
9 * top-level source directory and at http://www.gromacs.org.
11 * GROMACS is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public License
13 * as published by the Free Software Foundation; either version 2.1
14 * of the License, or (at your option) any later version.
16 * GROMACS is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with GROMACS; if not, see
23 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
24 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 * If you want to redistribute modifications to GROMACS, please
27 * consider that scientific software is very special. Version
28 * control is crucial - bugs must be traceable. We will be happy to
29 * consider code for inclusion in the official distribution, but
30 * derived work must not be called official GROMACS. Details are found
31 * in the README & COPYING files - if they are missing, get the
32 * official version at http://www.gromacs.org.
34 * To help us fund GROMACS development, we humbly ask that you cite
35 * the research papers on the package. Check out http://www.gromacs.org.
39 #include "nb_free_energy.h"
45 #include "gromacs/gmxlib/nrnb.h"
46 #include "gromacs/gmxlib/nonbonded/nb_kernel.h"
47 #include "gromacs/gmxlib/nonbonded/nonbonded.h"
48 #include "gromacs/math/functions.h"
49 #include "gromacs/math/vec.h"
50 #include "gromacs/mdtypes/forcerec.h"
51 #include "gromacs/mdtypes/md_enums.h"
52 #include "gromacs/utility/fatalerror.h"
55 //! Enum for templating the soft-core treatment in the kernel
56 enum class SoftCoreTreatment
58 None, //!< No soft-core
59 RPower6, //!< Soft-core with r-power = 6
60 RPower48 //!< Soft-core with r-power = 48
63 //! Most treatments are fine with float in mixed-precision mode.
64 template <SoftCoreTreatment softCoreTreatment>
67 //! Real type for soft-core calculations
71 //! This treatment requires double precision for some computations.
73 struct SoftCoreReal<SoftCoreTreatment::RPower48>
75 //! Real type for soft-core calculations
79 //! Templated free-energy non-bonded kernel
80 template<SoftCoreTreatment softCoreTreatment, bool scLambdasOrAlphasDiffer>
82 nb_free_energy_kernel(const t_nblist * gmx_restrict nlist,
83 rvec * gmx_restrict xx,
84 rvec * gmx_restrict ff,
85 t_forcerec * gmx_restrict fr,
86 const t_mdatoms * gmx_restrict mdatoms,
87 nb_kernel_data_t * gmx_restrict kernel_data,
88 t_nrnb * gmx_restrict nrnb)
90 using SCReal = typename SoftCoreReal<softCoreTreatment>::Real;
92 constexpr bool useSoftCore = (softCoreTreatment != SoftCoreTreatment::None);
97 int i, n, ii, is3, ii3, k, nj0, nj1, jnr, j3, ggid;
99 real tx, ty, tz, Fscal;
100 SCReal FscalC[NSTATES], FscalV[NSTATES]; /* Needs double for sc_power==48 */
101 SCReal Vcoul[NSTATES], Vvdw[NSTATES]; /* Needs double for sc_power==48 */
104 real qq[NSTATES], vctot;
105 int ntiA, ntiB, tj[NSTATES];
106 real Vvdw6, Vvdw12, vvtot;
107 real ix, iy, iz, fix, fiy, fiz;
108 real dx, dy, dz, rsq, rinv;
109 real c6[NSTATES], c12[NSTATES], c6grid;
110 real LFC[NSTATES], LFV[NSTATES], DLF[NSTATES];
111 SCReal dvdl_coul, dvdl_vdw;
112 real lfac_coul[NSTATES], dlfac_coul[NSTATES], lfac_vdw[NSTATES], dlfac_vdw[NSTATES];
113 real sigma6[NSTATES], alpha_vdw_eff, alpha_coul_eff;
114 SCReal rp, rpm2, rC, rV, rinvC, rpinvC, rinvV, rpinvV; /* Needs double for sc_power==48 */
115 real sigma_pow[NSTATES];
127 const real * shiftvec;
131 const real * chargeA;
132 const real * chargeB;
133 real sigma6_min, sigma6_def, lam_power;
134 real alpha_coul, alpha_vdw, lambda_coul, lambda_vdw;
135 const real * nbfp, *nbfp_grid;
139 gmx_bool bDoForces, bDoShiftForces, bDoPotential;
140 gmx_bool bEwald, bEwaldLJ;
142 const real * tab_ewald_F_lj = nullptr;
143 const real * tab_ewald_V_lj = nullptr;
145 real vdw_swV3, vdw_swV4, vdw_swV5, vdw_swF2, vdw_swF3, vdw_swF4;
146 gmx_bool bComputeVdwInteraction, bComputeElecInteraction;
147 const real * ewtab = nullptr;
149 real ewrt, eweps, ewtabscale = 0, ewtabhalfspace = 0, sh_ewald = 0;
151 const real onetwelfth = 1.0/12.0;
152 const real onesixth = 1.0/6.0;
153 const real zero = 0.0;
154 const real half = 0.5;
155 const real one = 1.0;
156 const real two = 2.0;
157 const real six = 6.0;
159 /* Extract pointer to non-bonded interaction constants */
160 const interaction_const_t *ic = fr->ic;
165 fshift = fr->fshift[0];
169 jindex = nlist->jindex;
171 shift = nlist->shift;
174 shiftvec = fr->shift_vec[0];
175 chargeA = mdatoms->chargeA;
176 chargeB = mdatoms->chargeB;
177 Vc = kernel_data->energygrp_elec;
178 typeA = mdatoms->typeA;
179 typeB = mdatoms->typeB;
182 nbfp_grid = fr->ljpme_c6grid;
183 Vv = kernel_data->energygrp_vdw;
184 lambda_coul = kernel_data->lambda[efptCOUL];
185 lambda_vdw = kernel_data->lambda[efptVDW];
186 dvdl = kernel_data->dvdl;
187 alpha_coul = fr->sc_alphacoul;
188 alpha_vdw = fr->sc_alphavdw;
189 lam_power = fr->sc_power;
190 sigma6_def = fr->sc_sigma6_def;
191 sigma6_min = fr->sc_sigma6_min;
192 bDoForces = ((kernel_data->flags & GMX_NONBONDED_DO_FORCE) != 0);
193 bDoShiftForces = ((kernel_data->flags & GMX_NONBONDED_DO_SHIFTFORCE) != 0);
194 bDoPotential = ((kernel_data->flags & GMX_NONBONDED_DO_POTENTIAL) != 0);
196 // Extract data from interaction_const_t
197 const real facel = ic->epsfac;
198 const real rcoulomb = ic->rcoulomb;
199 const real krf = ic->k_rf;
200 const real crf = ic->c_rf;
201 const real sh_lj_ewald = ic->sh_lj_ewald;
202 const real rvdw = ic->rvdw;
203 const real dispersionShift = ic->dispersion_shift.cpot;
204 const real repulsionShift = ic->repulsion_shift.cpot;
206 // Note that the nbnxm kernels do not support Coulomb potential switching at all
207 GMX_ASSERT(ic->coulomb_modifier != eintmodPOTSWITCH,
208 "Potential switching is not supported for Coulomb with FEP");
210 if (ic->vdw_modifier == eintmodPOTSWITCH)
212 d = ic->rvdw - ic->rvdw_switch;
213 vdw_swV3 = -10.0/(d*d*d);
214 vdw_swV4 = 15.0/(d*d*d*d);
215 vdw_swV5 = -6.0/(d*d*d*d*d);
216 vdw_swF2 = -30.0/(d*d*d);
217 vdw_swF3 = 60.0/(d*d*d*d);
218 vdw_swF4 = -30.0/(d*d*d*d*d);
222 /* Avoid warnings from stupid compilers (looking at you, Clang!) */
223 vdw_swV3 = vdw_swV4 = vdw_swV5 = vdw_swF2 = vdw_swF3 = vdw_swF4 = 0.0;
226 if (EVDW_PME(ic->vdwtype))
228 ivdw = GMX_NBKERNEL_VDW_LJEWALD;
232 ivdw = GMX_NBKERNEL_VDW_LENNARDJONES;
235 if (ic->eeltype == eelCUT || EEL_RF(ic->eeltype))
237 icoul = GMX_NBKERNEL_ELEC_REACTIONFIELD;
239 else if (EEL_PME_EWALD(ic->eeltype))
241 icoul = GMX_NBKERNEL_ELEC_EWALD;
245 gmx_incons("Unsupported eeltype with Verlet and free-energy");
248 rcutoff_max2 = std::max(ic->rcoulomb, ic->rvdw);
249 rcutoff_max2 = rcutoff_max2*rcutoff_max2;
251 bEwald = (icoul == GMX_NBKERNEL_ELEC_EWALD);
252 bEwaldLJ = (ivdw == GMX_NBKERNEL_VDW_LJEWALD);
254 if (bEwald || bEwaldLJ)
256 sh_ewald = ic->sh_ewald;
257 ewtab = ic->tabq_coul_FDV0;
258 ewtabscale = ic->tabq_scale;
259 ewtabhalfspace = half/ewtabscale;
260 tab_ewald_F_lj = ic->tabq_vdw_F;
261 tab_ewald_V_lj = ic->tabq_vdw_V;
264 /* For Ewald/PME interactions we cannot easily apply the soft-core component to
265 * reciprocal space. When we use non-switched Ewald interactions, we
266 * assume the soft-coring does not significantly affect the grid contribution
267 * and apply the soft-core only to the full 1/r (- shift) pair contribution.
269 * However, we cannot use this approach for switch-modified since we would then
270 * effectively end up evaluating a significantly different interaction here compared to the
271 * normal (non-free-energy) kernels, either by applying a cutoff at a different
272 * position than what the user requested, or by switching different
273 * things (1/r rather than short-range Ewald). For these settings, we just
274 * use the traditional short-range Ewald interaction in that case.
276 GMX_RELEASE_ASSERT(!(bEwald && ic->coulomb_modifier == eintmodPOTSWITCH) &&
277 !(bEwaldLJ && ic->vdw_modifier == eintmodPOTSWITCH),
278 "Can not apply soft-core to switched Ewald potentials");
283 /* Lambda factor for state A, 1-lambda*/
284 LFC[STATE_A] = one - lambda_coul;
285 LFV[STATE_A] = one - lambda_vdw;
287 /* Lambda factor for state B, lambda*/
288 LFC[STATE_B] = lambda_coul;
289 LFV[STATE_B] = lambda_vdw;
291 /*derivative of the lambda factor for state A and B */
295 constexpr real sc_r_power = (softCoreTreatment == SoftCoreTreatment::RPower48 ? 48.0_real : 6.0_real);
296 for (i = 0; i < NSTATES; i++)
298 lfac_coul[i] = (lam_power == 2 ? (1-LFC[i])*(1-LFC[i]) : (1-LFC[i]));
299 dlfac_coul[i] = DLF[i]*lam_power/sc_r_power*(lam_power == 2 ? (1-LFC[i]) : 1);
300 lfac_vdw[i] = (lam_power == 2 ? (1-LFV[i])*(1-LFV[i]) : (1-LFV[i]));
301 dlfac_vdw[i] = DLF[i]*lam_power/sc_r_power*(lam_power == 2 ? (1-LFV[i]) : 1);
304 for (n = 0; (n < nri); n++)
306 int npair_within_cutoff;
308 npair_within_cutoff = 0;
312 shY = shiftvec[is3+1];
313 shZ = shiftvec[is3+2];
321 iqA = facel*chargeA[ii];
322 iqB = facel*chargeB[ii];
323 ntiA = 2*ntype*typeA[ii];
324 ntiB = 2*ntype*typeB[ii];
331 for (k = nj0; (k < nj1); k++)
338 rsq = dx*dx + dy*dy + dz*dz;
340 if (rsq >= rcutoff_max2)
342 /* We save significant time by skipping all code below.
343 * Note that with soft-core interactions, the actual cut-off
344 * check might be different. But since the soft-core distance
345 * is always larger than r, checking on r here is safe.
349 npair_within_cutoff++;
353 /* Note that unlike in the nbnxn kernels, we do not need
354 * to clamp the value of rsq before taking the invsqrt
355 * to avoid NaN in the LJ calculation, since here we do
356 * not calculate LJ interactions when C6 and C12 are zero.
359 rinv = gmx::invsqrt(rsq);
364 /* The force at r=0 is zero, because of symmetry.
365 * But note that the potential is in general non-zero,
366 * since the soft-cored r will be non-zero.
372 if (softCoreTreatment == SoftCoreTreatment::None)
374 /* The soft-core power p will not affect the results
375 * with not using soft-core, so we use power of 0 which gives
376 * the simplest math and cheapest code.
381 if (softCoreTreatment == SoftCoreTreatment::RPower6)
383 rpm2 = rsq*rsq; /* r4 */
384 rp = rpm2*rsq; /* r6 */
386 if (softCoreTreatment == SoftCoreTreatment::RPower48)
388 rp = rsq*rsq*rsq; /* r6 */
389 rp = rp*rp; /* r12 */
390 rp = rp*rp; /* r24 */
391 rp = rp*rp; /* r48 */
392 rpm2 = rp/rsq; /* r46 */
397 qq[STATE_A] = iqA*chargeA[jnr];
398 qq[STATE_B] = iqB*chargeB[jnr];
400 tj[STATE_A] = ntiA+2*typeA[jnr];
401 tj[STATE_B] = ntiB+2*typeB[jnr];
403 if (nlist->excl_fep == nullptr || nlist->excl_fep[k])
405 c6[STATE_A] = nbfp[tj[STATE_A]];
406 c6[STATE_B] = nbfp[tj[STATE_B]];
408 for (i = 0; i < NSTATES; i++)
410 c12[i] = nbfp[tj[i]+1];
413 if ((c6[i] > 0) && (c12[i] > 0))
415 /* c12 is stored scaled with 12.0 and c6 is scaled with 6.0 - correct for this */
416 sigma6[i] = half*c12[i]/c6[i];
417 if (sigma6[i] < sigma6_min) /* for disappearing coul and vdw with soft core at the same time */
419 sigma6[i] = sigma6_min;
424 sigma6[i] = sigma6_def;
426 if (softCoreTreatment == SoftCoreTreatment::RPower6)
428 sigma_pow[i] = sigma6[i];
432 sigma_pow[i] = sigma6[i]*sigma6[i]; /* sigma^12 */
433 sigma_pow[i] = sigma_pow[i]*sigma_pow[i]; /* sigma^24 */
434 sigma_pow[i] = sigma_pow[i]*sigma_pow[i]; /* sigma^48 */
441 /* only use softcore if one of the states has a zero endstate - softcore is for avoiding infinities!*/
442 if ((c12[STATE_A] > 0) && (c12[STATE_B] > 0))
449 alpha_vdw_eff = alpha_vdw;
450 alpha_coul_eff = alpha_coul;
454 for (i = 0; i < NSTATES; i++)
461 /* Only spend time on A or B state if it is non-zero */
462 if ( (qq[i] != 0) || (c6[i] != 0) || (c12[i] != 0) )
464 /* this section has to be inside the loop because of the dependence on sigma_pow */
467 rpinvC = one/(alpha_coul_eff*lfac_coul[i]*sigma_pow[i]+rp);
468 rinvC = std::pow(rpinvC, one/sc_r_power);
471 if (scLambdasOrAlphasDiffer)
473 rpinvV = one/(alpha_vdw_eff*lfac_vdw[i]*sigma_pow[i]+rp);
474 rinvV = std::pow(rpinvV, one/sc_r_power);
479 /* We can avoid one expensive pow and one / operation */
496 /* Only process the coulomb interactions if we have charges,
497 * and if we either include all entries in the list (no cutoff
498 * used in the kernel), or if we are within the cutoff.
500 bComputeElecInteraction =
501 ( bEwald && r < rcoulomb) ||
502 (!bEwald && rC < rcoulomb);
504 if ( (qq[i] != 0) && bComputeElecInteraction)
508 /* Ewald FEP is done only on the 1/r part */
509 Vcoul[i] = qq[i]*(rinvC-sh_ewald);
510 FscalC[i] = qq[i]*rinvC;
515 Vcoul[i] = qq[i]*(rinvC + krf*rC*rC-crf);
516 FscalC[i] = qq[i]*(rinvC - two*krf*rC*rC);
520 /* Only process the VDW interactions if we have
521 * some non-zero parameters, and if we either
522 * include all entries in the list (no cutoff used
523 * in the kernel), or if we are within the cutoff.
525 bComputeVdwInteraction =
526 ( bEwaldLJ && r < rvdw) ||
527 (!bEwaldLJ && rV < rvdw);
528 if ((c6[i] != 0 || c12[i] != 0) && bComputeVdwInteraction)
530 /* cutoff LJ, also handles part of Ewald LJ */
531 if (softCoreTreatment == SoftCoreTreatment::RPower6)
538 rinv6 = rinv6*rinv6*rinv6;
541 Vvdw12 = c12[i]*rinv6*rinv6;
543 Vvdw[i] = ( (Vvdw12 + c12[i]*repulsionShift)*onetwelfth
544 - (Vvdw6 + c6[i]*dispersionShift)*onesixth);
545 FscalV[i] = Vvdw12 - Vvdw6;
549 /* Subtract the grid potential at the cut-off */
550 c6grid = nbfp_grid[tj[i]];
551 Vvdw[i] += c6grid*sh_lj_ewald*onesixth;
554 if (ic->vdw_modifier == eintmodPOTSWITCH)
556 d = rV - ic->rvdw_switch;
557 d = (d > zero) ? d : zero;
559 sw = one+d2*d*(vdw_swV3+d*(vdw_swV4+d*vdw_swV5));
560 dsw = d2*(vdw_swF2+d*(vdw_swF3+d*vdw_swF4));
562 FscalV[i] = FscalV[i]*sw - rV*Vvdw[i]*dsw;
565 FscalV[i] = (rV < rvdw) ? FscalV[i] : zero;
566 Vvdw[i] = (rV < rvdw) ? Vvdw[i] : zero;
570 /* FscalC (and FscalV) now contain: dV/drC * rC
571 * Now we multiply by rC^-p, so it will be: dV/drC * rC^1-p
572 * Further down we first multiply by r^p-2 and then by
573 * the vector r, which in total gives: dV/drC * (r/rC)^1-p
580 /* Assemble A and B states */
581 for (i = 0; i < NSTATES; i++)
583 vctot += LFC[i]*Vcoul[i];
584 vvtot += LFV[i]*Vvdw[i];
586 Fscal += LFC[i]*FscalC[i]*rpm2;
587 Fscal += LFV[i]*FscalV[i]*rpm2;
591 dvdl_coul += Vcoul[i]*DLF[i] + LFC[i]*alpha_coul_eff*dlfac_coul[i]*FscalC[i]*sigma_pow[i];
592 dvdl_vdw += Vvdw[i]*DLF[i] + LFV[i]*alpha_vdw_eff*dlfac_vdw[i]*FscalV[i]*sigma_pow[i];
596 dvdl_coul += Vcoul[i]*DLF[i];
597 dvdl_vdw += Vvdw[i]*DLF[i];
601 else if (icoul == GMX_NBKERNEL_ELEC_REACTIONFIELD)
603 /* For excluded pairs, which are only in this pair list when
604 * using the Verlet scheme, we don't use soft-core.
605 * The group scheme also doesn't soft-core for these.
606 * As there is no singularity, there is no need for soft-core.
616 for (i = 0; i < NSTATES; i++)
618 vctot += LFC[i]*qq[i]*VV;
619 Fscal += LFC[i]*qq[i]*FF;
620 dvdl_coul += DLF[i]*qq[i]*VV;
624 if (bEwald && r < rcoulomb)
626 /* See comment in the preamble. When using Ewald interactions
627 * (unless we use a switch modifier) we subtract the reciprocal-space
628 * Ewald component here which made it possible to apply the free
629 * energy interaction to 1/r (vanilla coulomb short-range part)
630 * above. This gets us closer to the ideal case of applying
631 * the softcore to the entire electrostatic interaction,
632 * including the reciprocal-space component.
637 ewitab = static_cast<int>(ewrt);
640 f_lr = ewtab[ewitab]+eweps*ewtab[ewitab+1];
641 v_lr = (ewtab[ewitab+2]-ewtabhalfspace*eweps*(ewtab[ewitab]+f_lr));
644 /* Note that any possible Ewald shift has already been applied in
645 * the normal interaction part above.
650 /* If we get here, the i particle (ii) has itself (jnr)
651 * in its neighborlist. This can only happen with the Verlet
652 * scheme, and corresponds to a self-interaction that will
653 * occur twice. Scale it down by 50% to only include it once.
658 for (i = 0; i < NSTATES; i++)
660 vctot -= LFC[i]*qq[i]*v_lr;
661 Fscal -= LFC[i]*qq[i]*f_lr;
662 dvdl_coul -= (DLF[i]*qq[i])*v_lr;
666 if (bEwaldLJ && r < rvdw)
668 /* See comment in the preamble. When using LJ-Ewald interactions
669 * (unless we use a switch modifier) we subtract the reciprocal-space
670 * Ewald component here which made it possible to apply the free
671 * energy interaction to r^-6 (vanilla LJ6 short-range part)
672 * above. This gets us closer to the ideal case of applying
673 * the softcore to the entire VdW interaction,
674 * including the reciprocal-space component.
676 /* We could also use the analytical form here
677 * iso a table, but that can cause issues for
678 * r close to 0 for non-interacting pairs.
683 rs = rsq*rinv*ewtabscale;
684 ri = static_cast<int>(rs);
686 f_lr = (1 - frac)*tab_ewald_F_lj[ri] + frac*tab_ewald_F_lj[ri+1];
687 /* TODO: Currently the Ewald LJ table does not contain
688 * the factor 1/6, we should add this.
691 VV = (tab_ewald_V_lj[ri] - ewtabhalfspace*frac*(tab_ewald_F_lj[ri] + f_lr))/six;
695 /* If we get here, the i particle (ii) has itself (jnr)
696 * in its neighborlist. This can only happen with the Verlet
697 * scheme, and corresponds to a self-interaction that will
698 * occur twice. Scale it down by 50% to only include it once.
703 for (i = 0; i < NSTATES; i++)
705 c6grid = nbfp_grid[tj[i]];
706 vvtot += LFV[i]*c6grid*VV;
707 Fscal += LFV[i]*c6grid*FF;
708 dvdl_vdw += (DLF[i]*c6grid)*VV;
720 /* OpenMP atomics are expensive, but this kernels is also
721 * expensive, so we can take this hit, instead of using
722 * thread-local output buffers and extra reduction.
724 * All the OpenMP regions in this file are trivial and should
725 * not throw, so no need for try/catch.
736 /* The atomics below are expensive with many OpenMP threads.
737 * Here unperturbed i-particles will usually only have a few
738 * (perturbed) j-particles in the list. Thus with a buffered list
739 * we can skip a significant number of i-reductions with a check.
741 if (npair_within_cutoff > 0)
757 fshift[is3+1] += fiy;
759 fshift[is3+2] += fiz;
773 dvdl[efptCOUL] += dvdl_coul;
775 dvdl[efptVDW] += dvdl_vdw;
777 /* Estimate flops, average for free energy stuff:
778 * 12 flops per outer iteration
779 * 150 flops per inner iteration
782 inc_nrnb(nrnb, eNR_NBKERNEL_FREE_ENERGY, nlist->nri*12 + nlist->jindex[n]*150);
785 void gmx_nb_free_energy_kernel(const t_nblist *nlist,
789 const t_mdatoms *mdatoms,
790 nb_kernel_data_t *kernel_data,
793 if (fr->sc_alphacoul == 0 && fr->sc_alphavdw == 0)
795 nb_free_energy_kernel<SoftCoreTreatment::None, false>(nlist, xx, ff, fr, mdatoms, kernel_data, nrnb);
797 else if (fr->sc_r_power == 6.0_real)
799 if (kernel_data->lambda[efptCOUL] == kernel_data->lambda[efptVDW] &&
800 fr->sc_alphacoul == fr->sc_alphavdw)
802 nb_free_energy_kernel<SoftCoreTreatment::RPower6, false>(nlist, xx, ff, fr, mdatoms, kernel_data, nrnb);
806 nb_free_energy_kernel<SoftCoreTreatment::RPower6, true>(nlist, xx, ff, fr, mdatoms, kernel_data, nrnb);
809 else if (fr->sc_r_power == 48.0_real)
811 nb_free_energy_kernel<SoftCoreTreatment::RPower48, true>(nlist, xx, ff, fr, mdatoms, kernel_data, nrnb);
815 GMX_RELEASE_ASSERT(false, "Unsupported soft-core r-power");