%
% This file is part of the GROMACS molecular simulation package.
%
-% Copyright (c) 2013, by the GROMACS development team, led by
+% Copyright (c) 2013,2014, by the GROMACS development team, led by
% Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
% and including many others, as listed in the AUTHORS file in the
% top-level source directory and at http://www.gromacs.org.
current force field uses Lorentz-Berthelot combination rules, it is
possible to set {\tt lj-pme-comb-rule = geometric} in order to gain a
significant increase in performance for a small loss in accuracy. The
-details of this approximation can be found in the section above. The
-implementation of LJ-PME is currently unsupported together with the
-Verlet cut-off scheme and/or free energy calculations. These features
-will be added in upcoming releases
+details of this approximation can be found in the section above. The
+implementation of LJ-PME is supported with both cut-off schemes, but
+not free energy calculations. These features will be added in upcoming
+releases.
%} % Brace matches ifthenelse test for gmxlite
\section{Force field\index{force field}}
vr0_q = ewc_q*M_2_SQRTPI;
if (EVDW_PME(fr->vdwtype))
{
- vr0_lj = -pow(ewc_lj, 6)/6.0;
+ vr0_lj = -pow(ewc_lj, 6)/6.0;
}
AA = excl->a;
Vself_q[q] = ewc_q*one_4pi_eps*fr->q2sum[q]*M_1_SQRTPI;
if (EVDW_PME(fr->vdwtype))
{
- Vself_lj[q] = -pow(ewc_lj, 6)*fr->c6sum[q];
+ Vself_lj[q] = fr->c6sum[q]*0.5*vr0_lj;
}
}
{ "NxN LJ add F-switch [V&F]", 22 },
{ "NxN LJ add P-switch [F]", 27 }, /* extra cost for LJ P-switch */
{ "NxN LJ add P-switch [V&F]", 20 },
+ { "NxN LJ add LJ Ewald [F]", 36 }, /* extra cost for LJ Ewald */
+ { "NxN LJ add LJ Ewald [V&F]", 33 },
{ "1,4 nonbonded interactions", 90 },
{ "Born radii (Still)", 47 },
{ "Born radii (HCT/OBC)", 183 },
return (enr >= eNR_NBNXN_LJ_RF && enr <= eNR_NBNXN_LJ_E);
}
-/* Returns in enr is the index of an nbnxn kernel addition (switch function) */
+/* Returns in enr is the index of an nbnxn kernel addition (LJ modification) */
static gmx_bool nrnb_is_nbnxn_kernel_addition(int enr)
{
- return (enr >= eNR_NBNXN_LJ_FSW && enr <= eNR_NBNXN_LJ_PSW_E);
+ return (enr >= eNR_NBNXN_ADD_LJ_FSW && enr <= eNR_NBNXN_ADD_LJ_EWALD_E);
}
void print_flop(FILE *out, t_nrnb *nrnb, double *nbfs, double *mflop)
flop = nbdata[i].flop;
if (nrnb_is_nbnxn_vdw_kernel(i))
{
- /* Possibly add the cost of a switch function */
- for (j = eNR_NBNXN_LJ_FSW; j <= eNR_NBNXN_LJ_PSW; j += 2)
+ /* Possibly add the cost of an LJ switch/Ewald function */
+ for (j = eNR_NBNXN_ADD_LJ_FSW; j <= eNR_NBNXN_ADD_LJ_EWALD; j += 2)
{
int e_kernel_add;
/* Remove all charge groups */
gmx_mtop_remove_chargegroups(sys);
-
- if (EVDW_PME(ir->vdwtype))
- {
- gmx_fatal(FARGS, "LJ-PME not implemented together with verlet-scheme!");
- }
}
if (count_constraints(sys, mi, wi) && (ir->eConstrAlg == econtSHAKE))
}
}
- if (ir->vdwtype != evdwCUT)
+ if (!(ir->vdwtype == evdwCUT || ir->vdwtype == evdwPME))
{
- warning_error(wi, "With Verlet lists only cut-off LJ interactions are supported");
+ warning_error(wi, "With Verlet lists only cut-off and PME LJ interactions are supported");
}
if (!(ir->coulombtype == eelCUT ||
(EEL_RF(ir->coulombtype) && ir->coulombtype != eelRF_NEC) ||
}
}
- if (EVDW_PME(ir->vdwtype))
- {
- if (ir_vdw_might_be_zero_at_cutoff(ir))
- {
- sprintf(err_buf, "With vdwtype = %s, rvdw must be <= rlist",
- evdw_names[ir->vdwtype]);
- CHECK(ir->rvdw > ir->rlist);
- }
- else
- {
- sprintf(err_buf,
- "With vdwtype = %s, rvdw must be equal to rlist\n",
- evdw_names[ir->vdwtype]);
- CHECK(ir->rvdw != ir->rlist);
- }
- }
-
if (EEL_PME(ir->coulombtype) || EVDW_PME(ir->vdwtype))
{
if (ir->pme_order < 3)
sprintf(err_buf, "With switched vdw forces or potentials, rvdw-switch must be < rvdw");
CHECK(ir->rvdw_switch >= ir->rvdw);
}
- else if (ir->vdwtype == evdwCUT)
+ else if (ir->vdwtype == evdwCUT || ir->vdwtype == evdwPME)
{
if (ir->cutoff_scheme == ecutsGROUP && ir->vdw_modifier == eintmodNONE)
{
warning_note(wi, "You are using geometric combination rules in "
"LJ-PME, but your non-bonded C6 parameters do "
"not follow these rules. "
- "If your force field uses Lorentz-Berthelot combination rules this "
- "will introduce small errors in the forces and energies in "
- "your simulations. Dispersion correction will correct total "
- "energy and/or pressure, but not forces or surface tensions. "
- "Please check the LJ-PME section in the manual "
- "before proceeding further.");
+ "This will introduce very small errors in the forces and energies in "
+ "your simulations. Dispersion correction will correct total energy "
+ "and/or pressure for isotropic systems, but not forces or surface tensions.");
}
else
{
warning_note(wi, "You are using geometric combination rules in "
"LJ-PME, but your non-bonded C6 parameters do "
"not follow these rules. "
- "If your force field uses Lorentz-Berthelot combination rules this "
- "will introduce small errors in the forces and energies in "
- "your simulations. Consider using dispersion correction "
- "for the total energy and pressure. "
- "Please check the LJ-PME section in the manual "
- "before proceeding further.");
+ "This will introduce very small errors in the forces and energies in "
+ "your simulations. If your system is homogeneous, consider using dispersion correction "
+ "for the total energy and pressure.");
}
}
}
* and fp (if !=NULL) on the master node.
*/
+
+gmx_bool nbnxn_acceleration_supported(FILE *fplog,
+ const t_commrec *cr,
+ const t_inputrec *ir,
+ gmx_bool bGPU);
+/* Return if GPU/CPU-SIMD acceleration is supported with the given inputrec
+ * with bGPU TRUE/FALSE.
+ * If the return value is FALSE and fplog/cr != NULL, prints a fallback
+ * message to fplog/stderr.
+ */
+
gmx_bool uses_simple_tables(int cutoff_scheme,
nonbonded_verlet_t *nbv,
int group);
typedef struct {
/* VdW */
+ int vdwtype;
int vdw_modifier;
real rvdw;
real rvdw_switch;
/* type of electrostatics (defined in enums.h) */
int eeltype;
+ int coulomb_modifier;
/* Coulomb */
real rcoulomb;
/* PME/Ewald */
real ewaldcoeff_q;
real ewaldcoeff_lj;
- real sh_ewald; /* -sh_ewald is added to the direct space potential */
+ int ljpme_comb_rule; /* LJ combination rule for the LJ PME mesh part */
+ real sh_ewald; /* -sh_ewald is added to the direct space potential */
+ real sh_lj_ewald; /* sh_lj_ewald is added to the correction potential */
/* Dielectric constant resp. multiplication factor for charges */
real epsilon_r;
gmx_bool bOrires;
real *massA, *massB, *massT, *invmass;
real *chargeA, *chargeB;
- real *c6A, *c6B, *sigmaA, *sigmaB, *sigma3A, *sigma3B;
+ real *sqrt_c6A, *sqrt_c6B;
+ real *sigmaA, *sigmaB, *sigma3A, *sigma3B;
gmx_bool *bPerturbed;
int *typeA, *typeB;
unsigned short *ptype;
eNR_NBKERNEL_ALLVSALLGB,
eNR_NBNXN_DIST2,
- eNR_NBNXN_LJ_RF, eNR_NBNXN_LJ_RF_E,
- eNR_NBNXN_LJ_TAB, eNR_NBNXN_LJ_TAB_E,
- eNR_NBNXN_LJ_EWALD, eNR_NBNXN_LJ_EWALD_E,
- eNR_NBNXN_LJ, eNR_NBNXN_LJ_E,
- eNR_NBNXN_RF, eNR_NBNXN_RF_E,
- eNR_NBNXN_TAB, eNR_NBNXN_TAB_E,
- eNR_NBNXN_EWALD, eNR_NBNXN_EWALD_E,
- eNR_NBNXN_LJ_FSW, eNR_NBNXN_LJ_FSW_E,
- eNR_NBNXN_LJ_PSW, eNR_NBNXN_LJ_PSW_E,
+ eNR_NBNXN_LJ_RF, eNR_NBNXN_LJ_RF_E,
+ eNR_NBNXN_LJ_TAB, eNR_NBNXN_LJ_TAB_E,
+ eNR_NBNXN_LJ_EWALD, eNR_NBNXN_LJ_EWALD_E,
+ eNR_NBNXN_LJ, eNR_NBNXN_LJ_E,
+ eNR_NBNXN_RF, eNR_NBNXN_RF_E,
+ eNR_NBNXN_TAB, eNR_NBNXN_TAB_E,
+ eNR_NBNXN_EWALD, eNR_NBNXN_EWALD_E,
+ eNR_NBNXN_ADD_LJ_FSW, eNR_NBNXN_ADD_LJ_FSW_E,
+ eNR_NBNXN_ADD_LJ_PSW, eNR_NBNXN_ADD_LJ_PSW_E,
+ eNR_NBNXN_ADD_LJ_EWALD, eNR_NBNXN_ADD_LJ_EWALD_E,
eNR_NB14,
eNR_BORN_RADII_STILL, eNR_BORN_RADII_HCT_OBC,
eNR_BORN_CHAINRULE,
/* Send the charges and/or c6/sigmas to our PME only node */
gmx_pme_send_parameters(cr, mdatoms->nChargePerturbed, mdatoms->nTypePerturbed,
mdatoms->chargeA, mdatoms->chargeB,
- mdatoms->c6A, mdatoms->c6B,
+ mdatoms->sqrt_c6A, mdatoms->sqrt_c6B,
mdatoms->sigmaA, mdatoms->sigmaB,
dd_pme_maxshift_x(dd), dd_pme_maxshift_y(dd));
}
cr, t, fr,
md->chargeA,
md->nChargePerturbed ? md->chargeB : NULL,
- md->c6A,
- md->nChargePerturbed ? md->c6B : NULL,
+ md->sqrt_c6A,
+ md->nChargePerturbed ? md->sqrt_c6B : NULL,
md->sigmaA,
md->nChargePerturbed ? md->sigmaB : NULL,
md->sigma3A,
wallcycle_sub_stop(wcycle, ewcsEWALD_CORRECTION);
}
- if (fr->n_tpi == 0)
+ if (EEL_EWALD(fr->eeltype) && fr->n_tpi == 0)
{
Vcorr_q += ewald_charge_correction(cr, fr, lambda[efptCOUL], box,
&dvdl_long_range_correction_q,
0, md->homenr - fr->n_tpi,
x, fr->f_novirsum,
md->chargeA, md->chargeB,
- md->c6A, md->c6B,
+ md->sqrt_c6A, md->sqrt_c6B,
md->sigmaA, md->sigmaB,
bSB ? boxs : box, cr,
DOMAINDECOMP(cr) ? dd_pme_maxshift_x(cr->dd) : 0,
lambda[efptCOUL], &dvdl_long_range_q, fr->ewald_table);
PRINT_SEPDVDL("Ewald long-range", Vlr_q, dvdl_long_range_q);
}
- else if (!EEL_EWALD(fr->eeltype))
- {
- gmx_fatal(FARGS, "No such electrostatics method implemented %s",
- eel_names[fr->eeltype]);
- }
+
/* Note that with separate PME nodes we get the real energies later */
enerd->dvdl_lin[efptCOUL] += dvdl_long_range_q;
enerd->dvdl_lin[efptVDW] += dvdl_long_range_lj;
static void set_chargesum(FILE *log, t_forcerec *fr, const gmx_mtop_t *mtop)
{
/*This now calculates sum for q and c6*/
- double qsum, q2sum, q, c6sum, c6, sqrc6;
+ double qsum, q2sum, q, c6sum, c6;
int mb, nmol, i;
const t_atoms *atoms;
qsum += nmol*q;
q2sum += nmol*q*q;
c6 = mtop->ffparams.iparams[atoms->atom[i].type*(mtop->ffparams.atnr+1)].lj.c6;
- sqrc6 = sqrt(c6);
- c6sum += nmol*sqrc6*sqrc6;
+ c6sum += nmol*c6;
}
}
fr->qsum[0] = qsum;
fr->q2sum[0] = q2sum;
- fr->c6sum[0] = c6sum/12;
+ fr->c6sum[0] = c6sum;
if (fr->efep != efepNO)
{
qsum += nmol*q;
q2sum += nmol*q*q;
c6 = mtop->ffparams.iparams[atoms->atom[i].typeB*(mtop->ffparams.atnr+1)].lj.c6;
- sqrc6 = sqrt(c6);
- c6sum += nmol*sqrc6*sqrc6;
+ c6sum += nmol*c6;
}
fr->qsum[1] = qsum;
fr->q2sum[1] = q2sum;
- fr->c6sum[1] = c6sum/12;
+ fr->c6sum[1] = c6sum;
}
}
else
}
+gmx_bool nbnxn_acceleration_supported(FILE *fplog,
+ const t_commrec *cr,
+ const t_inputrec *ir,
+ gmx_bool bGPU)
+{
+ /* TODO: remove these GPU specific restrictions by implementing CUDA kernels */
+ if (bGPU)
+ {
+ if (ir->vdw_modifier == eintmodFORCESWITCH ||
+ ir->vdw_modifier == eintmodPOTSWITCH ||
+ ir->vdwtype == evdwPME)
+ {
+ md_print_warn(cr, fplog, "LJ switch functions and LJ-PME are not yet supported on the GPU, falling back to CPU only\n");
+ return FALSE;
+ }
+ }
+
+ if (ir->vdwtype == evdwPME && ir->ljpme_combination_rule == eljpmeLB)
+ {
+ md_print_warn(cr, fplog, "LJ-PME with Lorentz-Berthelot is not supported with %s, falling back to %s\n",
+ bGPU ? "GPUs" : "SIMD kernels",
+ bGPU ? "CPU only" : "plain-C kernels");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
static void pick_nbnxn_kernel_cpu(const t_inputrec gmx_unused *ir,
int *kernel_type,
int *ewald_excl)
if (*kernel_type == nbnxnkNotSet)
{
- if (use_simd_kernels)
+ /* LJ PME with LB combination rule does 7 mesh operations.
+ * This so slow that we don't compile SIMD non-bonded kernels for that.
+ */
+ if (use_simd_kernels &&
+ nbnxn_acceleration_supported(fp, cr, ir, FALSE))
{
pick_nbnxn_kernel_cpu(ir, kernel_type, ewald_excl);
}
snew_aligned(ic->tabq_coul_F, 16, 32);
snew_aligned(ic->tabq_coul_V, 16, 32);
- ic->rlist = fr->rlist;
- ic->rlistlong = fr->rlistlong;
+ ic->rlist = fr->rlist;
+ ic->rlistlong = fr->rlistlong;
/* Lennard-Jones */
- ic->vdw_modifier = fr->vdw_modifier;
- ic->rvdw = fr->rvdw;
- ic->rvdw_switch = fr->rvdw_switch;
+ ic->vdwtype = fr->vdwtype;
+ ic->vdw_modifier = fr->vdw_modifier;
+ ic->rvdw = fr->rvdw;
+ ic->rvdw_switch = fr->rvdw_switch;
+ ic->ewaldcoeff_lj = fr->ewaldcoeff_lj;
+ ic->ljpme_comb_rule = fr->ljpme_combination_rule;
+ ic->sh_lj_ewald = 0;
clear_force_switch_constants(&ic->dispersion_shift);
clear_force_switch_constants(&ic->repulsion_shift);
/* Only shift the potential, don't touch the force */
ic->dispersion_shift.cpot = -pow(ic->rvdw, -6.0);
ic->repulsion_shift.cpot = -pow(ic->rvdw, -12.0);
+ if (EVDW_PME(ic->vdwtype))
+ {
+ real crc2;
+
+ if (fr->cutoff_scheme == ecutsGROUP)
+ {
+ gmx_fatal(FARGS, "Potential-shift is not (yet) implemented for LJ-PME with cutoff-scheme=group");
+ }
+ crc2 = sqr(ic->ewaldcoeff_lj*ic->rvdw);
+ ic->sh_lj_ewald = (exp(-crc2)*(1 + crc2 + 0.5*crc2*crc2) - 1)*pow(ic->rvdw, -6.0);
+ }
break;
case eintmodFORCESWITCH:
/* Switch the force, switch and shift the potential */
ic->sh_invrc6 = -ic->dispersion_shift.cpot;
/* Electrostatics */
- ic->eeltype = fr->eeltype;
- ic->rcoulomb = fr->rcoulomb;
- ic->epsilon_r = fr->epsilon_r;
- ic->epsfac = fr->epsfac;
-
- /* Ewald */
- ic->ewaldcoeff_q = fr->ewaldcoeff_q;
- ic->ewaldcoeff_lj = fr->ewaldcoeff_lj;
+ ic->eeltype = fr->eeltype;
+ ic->coulomb_modifier = fr->coulomb_modifier;
+ ic->rcoulomb = fr->rcoulomb;
+ ic->epsilon_r = fr->epsilon_r;
+ ic->epsfac = fr->epsfac;
+ ic->ewaldcoeff_q = fr->ewaldcoeff_q;
if (fr->coulomb_modifier == eintmodPOTSHIFT)
{
if (fp != NULL)
{
- fprintf(fp, "Potential shift: LJ r^-12: %.3f r^-6 %.3f",
- ic->repulsion_shift.cpot, ic->dispersion_shift.cpot);
+ real dispersion_shift;
+
+ dispersion_shift = ic->dispersion_shift.cpot;
+ if (EVDW_PME(ic->vdwtype))
+ {
+ dispersion_shift -= ic->sh_lj_ewald;
+ }
+ fprintf(fp, "Potential shift: LJ r^-12: %.3e r^-6: %.3e",
+ ic->repulsion_shift.cpot, dispersion_shift);
+
if (ic->eeltype == eelCUT)
{
- fprintf(fp, ", Coulomb %.3f", -ic->c_rf);
+ fprintf(fp, ", Coulomb %.e", -ic->c_rf);
}
else if (EEL_PME(ic->eeltype))
{
nbv->grp[0].kernel_type != nbv->grp[i].kernel_type)
{
gmx_bool bSimpleList;
+ int enbnxninitcombrule;
bSimpleList = nbnxn_kernel_pairlist_simple(nbv->grp[i].kernel_type);
+ if (bSimpleList && (fr->vdwtype == evdwCUT && (fr->vdw_modifier == eintmodNONE || fr->vdw_modifier == eintmodPOTSHIFT)))
+ {
+ /* Plain LJ cut-off: we can optimize with combination rules */
+ enbnxninitcombrule = enbnxninitcombruleDETECT;
+ }
+ else if (fr->vdwtype == evdwPME)
+ {
+ /* LJ-PME: we need to use a combination rule for the grid */
+ if (fr->ljpme_combination_rule == eljpmeGEOM)
+ {
+ enbnxninitcombrule = enbnxninitcombruleGEOM;
+ }
+ else
+ {
+ enbnxninitcombrule = enbnxninitcombruleLB;
+ }
+ }
+ else
+ {
+ /* We use a full combination matrix: no rule required */
+ enbnxninitcombrule = enbnxninitcombruleNONE;
+ }
+
+
snew(nbv->grp[i].nbat, 1);
nbnxn_atomdata_init(fp,
nbv->grp[i].nbat,
nbv->grp[i].kernel_type,
- /* SIMD LJ switch kernels don't support LJ combination rules */
- bSimpleList && !(fr->vdw_modifier == eintmodFORCESWITCH || fr->vdw_modifier == eintmodPOTSWITCH),
+ enbnxninitcombrule,
fr->ntype, fr->nbfp,
ir->opts.ngener,
bSimpleList ? gmx_omp_nthreads_get(emntNonbonded) : 1,
{
fprintf(fp, "Will do PME sum in reciprocal space for LJ dispersion interactions.\n");
}
- please_cite(fp, "Essman95a");
+ please_cite(fp, "Essmann95a");
fr->ewaldcoeff_lj = calc_ewaldcoeff_lj(ir->rvdw, ir->ewald_rtol_lj);
if (fp)
{
int homenr,
t_mdatoms *md)
{
+ gmx_bool bLJPME;
gmx_mtop_atomlookup_t alook;
int i;
t_grpopts *opts;
gmx_groups_t *groups;
gmx_molblock_t *molblock;
+ bLJPME = EVDW_PME(ir->vdwtype);
+
opts = &ir->opts;
groups = &mtop->groups;
srenew(md->massT, md->nalloc);
srenew(md->invmass, md->nalloc);
srenew(md->chargeA, md->nalloc);
- srenew(md->c6A, md->nalloc);
- srenew(md->sigmaA, md->nalloc);
- srenew(md->sigma3A, md->nalloc);
+ if (bLJPME)
+ {
+ srenew(md->sqrt_c6A, md->nalloc);
+ srenew(md->sigmaA, md->nalloc);
+ srenew(md->sigma3A, md->nalloc);
+ }
if (md->nPerturbed)
{
srenew(md->chargeB, md->nalloc);
- srenew(md->c6B, md->nalloc);
- srenew(md->sigmaB, md->nalloc);
- srenew(md->sigma3B, md->nalloc);
+ if (bLJPME)
+ {
+ srenew(md->sqrt_c6B, md->nalloc);
+ srenew(md->sigmaB, md->nalloc);
+ srenew(md->sigma3B, md->nalloc);
+ }
}
srenew(md->typeA, md->nalloc);
if (md->nPerturbed)
}
md->chargeA[i] = atom->q;
md->typeA[i] = atom->type;
- c6 = mtop->ffparams.iparams[atom->type*(mtop->ffparams.atnr+1)].lj.c6;
- c12 = mtop->ffparams.iparams[atom->type*(mtop->ffparams.atnr+1)].lj.c12;
- md->c6A[i] = sqrt(c6);
- if (c6 == 0.0 || c12 == 0.0)
- {
- md->sigmaA[i] = 1.0;
- }
- else
+ if (bLJPME)
{
- md->sigmaA[i] = pow(c12/c6, 1.0/6.0);
+ c6 = mtop->ffparams.iparams[atom->type*(mtop->ffparams.atnr+1)].lj.c6;
+ c12 = mtop->ffparams.iparams[atom->type*(mtop->ffparams.atnr+1)].lj.c12;
+ md->sqrt_c6A[i] = sqrt(c6);
+ if (c6 == 0.0 || c12 == 0)
+ {
+ md->sigmaA[i] = 1.0;
+ }
+ else
+ {
+ md->sigmaA[i] = pow(c12/c6, 1.0/6.0);
+ }
+ md->sigma3A[i] = 1/(md->sigmaA[i]*md->sigmaA[i]*md->sigmaA[i]);
}
- md->sigma3A[i] = 1/(md->sigmaA[i]*md->sigmaA[i]*md->sigmaA[i]);
-
if (md->nPerturbed)
{
+ md->bPerturbed[i] = PERTURBED(*atom);
md->chargeB[i] = atom->qB;
md->typeB[i] = atom->typeB;
- c6 = mtop->ffparams.iparams[atom->typeB*(mtop->ffparams.atnr+1)].lj.c6;
- c12 = mtop->ffparams.iparams[atom->typeB*(mtop->ffparams.atnr+1)].lj.c12;
- md->c6B[i] = sqrt(c6);
- if (c6 == 0.0 || c12 == 0.0)
- {
- md->sigmaB[i] = 1.0;
- }
- else
+ if (bLJPME)
{
- md->sigmaB[i] = pow(c12/c6, 1.0/6.0);
+ c6 = mtop->ffparams.iparams[atom->typeB*(mtop->ffparams.atnr+1)].lj.c6;
+ c12 = mtop->ffparams.iparams[atom->typeB*(mtop->ffparams.atnr+1)].lj.c12;
+ md->sqrt_c6B[i] = sqrt(c6);
+ if (c6 == 0.0 || c12 == 0)
+ {
+ md->sigmaB[i] = 1.0;
+ }
+ else
+ {
+ md->sigmaB[i] = pow(c12/c6, 1.0/6.0);
+ }
+ md->sigma3B[i] = 1/(md->sigmaB[i]*md->sigmaB[i]*md->sigmaB[i]);
}
- md->bPerturbed[i] = PERTURBED(*atom);
- md->sigma3B[i] = 1/(md->sigmaB[i]*md->sigmaB[i]*md->sigmaB[i]);
}
md->ptype[i] = atom->ptype;
if (md->cTC)
#include "vec.h"
#include "nbnxn_consts.h"
#include "nbnxn_internal.h"
+#include "nbnxn_atomdata.h"
#include "nbnxn_search.h"
#include "gromacs/utility/gmxomp.h"
#include "gmx_omp_nthreads.h"
nt = nbat->ntype;
+ /* nbfp_s4 stores two parameters using a stride of 4,
+ * because this would suit x86 SIMD single-precision
+ * quad-load intrinsics. There's a slight inefficiency in
+ * allocating and initializing nbfp_s4 when it might not
+ * be used, but introducing the conditional code is not
+ * really worth it. */
+ nbat->alloc((void **)&nbat->nbfp_s4, nt*nt*4*sizeof(*nbat->nbfp_s4));
+ for (i = 0; i < nt; i++)
+ {
+ for (j = 0; j < nt; j++)
+ {
+ nbat->nbfp_s4[(i*nt+j)*4+0] = nbat->nbfp[(i*nt+j)*2+0];
+ nbat->nbfp_s4[(i*nt+j)*4+1] = nbat->nbfp[(i*nt+j)*2+1];
+ nbat->nbfp_s4[(i*nt+j)*4+2] = 0;
+ nbat->nbfp_s4[(i*nt+j)*4+3] = 0;
+ }
+ }
+
switch (nbat->comb_rule)
{
- case ljcrGEOM:
+ case ljcrGEOM:
nbat->comb_rule = ljcrGEOM;
for (i = 0; i < nt; i++)
}
break;
case ljcrNONE:
- /* nbfp_s4 stores two parameters using a stride of 4,
- * because this would suit x86 SIMD single-precision
- * quad-load intrinsics. There's a slight inefficiency in
- * allocating and initializing nbfp_s4 when it might not
- * be used, but introducing the conditional code is not
- * really worth it. */
- nbat->alloc((void **)&nbat->nbfp_s4, nt*nt*4*sizeof(*nbat->nbfp_s4));
- for (i = 0; i < nt; i++)
- {
- for (j = 0; j < nt; j++)
- {
- nbat->nbfp_s4[(i*nt+j)*4+0] = nbat->nbfp[(i*nt+j)*2+0];
- nbat->nbfp_s4[(i*nt+j)*4+1] = nbat->nbfp[(i*nt+j)*2+1];
- nbat->nbfp_s4[(i*nt+j)*4+2] = 0;
- nbat->nbfp_s4[(i*nt+j)*4+3] = 0;
- }
- }
+ /* We always store the full matrix (see code above) */
break;
default:
gmx_incons("Unknown combination rule");
void nbnxn_atomdata_init(FILE *fp,
nbnxn_atomdata_t *nbat,
int nb_kernel_type,
- gmx_bool bTryCombinationRule,
+ int enbnxninitcombrule,
int ntype, const real *nbfp,
int n_energygroups,
int nout,
simple = nbnxn_kernel_pairlist_simple(nb_kernel_type);
- if (bTryCombinationRule)
+ switch (enbnxninitcombrule)
{
- /* We prefer the geometic combination rule,
- * as that gives a slightly faster kernel than the LB rule.
- */
- if (bCombGeom)
- {
- nbat->comb_rule = ljcrGEOM;
- }
- else if (bCombLB)
- {
- nbat->comb_rule = ljcrLB;
- }
- else
- {
- nbat->comb_rule = ljcrNONE;
-
- nbat->free(nbat->nbfp_comb);
- }
-
- if (fp)
- {
- if (nbat->comb_rule == ljcrNONE)
+ case enbnxninitcombruleDETECT:
+ /* We prefer the geometic combination rule,
+ * as that gives a slightly faster kernel than the LB rule.
+ */
+ if (bCombGeom)
+ {
+ nbat->comb_rule = ljcrGEOM;
+ }
+ else if (bCombLB)
{
- fprintf(fp, "Using full Lennard-Jones parameter combination matrix\n\n");
+ nbat->comb_rule = ljcrLB;
}
else
{
- fprintf(fp, "Using %s Lennard-Jones combination rule\n\n",
- nbat->comb_rule == ljcrGEOM ? "geometric" : "Lorentz-Berthelot");
+ nbat->comb_rule = ljcrNONE;
+
+ nbat->free(nbat->nbfp_comb);
}
- }
- }
- else
- {
- nbat->comb_rule = ljcrNONE;
- nbat->free(nbat->nbfp_comb);
+ if (fp)
+ {
+ if (nbat->comb_rule == ljcrNONE)
+ {
+ fprintf(fp, "Using full Lennard-Jones parameter combination matrix\n\n");
+ }
+ else
+ {
+ fprintf(fp, "Using %s Lennard-Jones combination rule\n\n",
+ nbat->comb_rule == ljcrGEOM ? "geometric" : "Lorentz-Berthelot");
+ }
+ }
+ break;
+ case enbnxninitcombruleGEOM:
+ nbat->comb_rule = ljcrGEOM;
+ break;
+ case enbnxninitcombruleLB:
+ nbat->comb_rule = ljcrLB;
+ break;
+ case enbnxninitcombruleNONE:
+ nbat->comb_rule = ljcrNONE;
+
+ nbat->free(nbat->nbfp_comb);
+ break;
+ default:
+ gmx_incons("Unknown enbnxninitcombrule");
}
if (simple)
rvec *x, int nbatFormat, real *xnb, int a0,
int cx, int cy, int cz);
+enum {
+ enbnxninitcombruleDETECT, enbnxninitcombruleGEOM, enbnxninitcombruleLB, enbnxninitcombruleNONE
+};
+
/* Initialize the non-bonded atom data structure.
* The enum for nbatXFormat is in the file defining nbnxn_atomdata_t.
* Copy the ntypes*ntypes*2 sized nbfp non-bonded parameter list
* to the atom data structure.
+ * enbnxninitcombrule sets what combination rule data gets stored in nbat.
*/
void nbnxn_atomdata_init(FILE *fp,
nbnxn_atomdata_t *nbat,
int nb_kernel_type,
- gmx_bool bTryCombinationRule,
+ int enbnxninitcombrule,
int ntype, const real *nbfp,
int n_energygroups,
int nout,
# The dict order must match the order of a C enumeration.
VdwTreatmentDict = collections.OrderedDict()
-VdwTreatmentDict['VdwLJCombGeom'] = { 'define' : '#define LJ_COMB_GEOM' }
-VdwTreatmentDict['VdwLJCombLB'] = { 'define' : '#define LJ_COMB_LB' }
-VdwTreatmentDict['VdwLJ'] = { 'define' : '/* Use no LJ combination rule */' }
-VdwTreatmentDict['VdwLJFSw'] = { 'define' : '/* Use no LJ combination rule */\n#define LJ_FORCE_SWITCH' }
-VdwTreatmentDict['VdwLJPSw'] = { 'define' : '/* Use no LJ combination rule */\n#define LJ_POT_SWITCH' }
+VdwTreatmentDict['VdwLJCombGeom'] = { 'define' : '#define LJ_CUT\n#define LJ_COMB_GEOM' }
+VdwTreatmentDict['VdwLJCombLB'] = { 'define' : '#define LJ_CUT\n#define LJ_COMB_LB' }
+VdwTreatmentDict['VdwLJ'] = { 'define' : '#define LJ_CUT\n/* Use full LJ combination matrix */' }
+VdwTreatmentDict['VdwLJFSw'] = { 'define' : '#define LJ_FORCE_SWITCH\n/* Use full LJ combination matrix */' }
+VdwTreatmentDict['VdwLJPSw'] = { 'define' : '#define LJ_POT_SWITCH\n/* Use full LJ combination matrix */' }
+VdwTreatmentDict['VdwLJEwCombGeom'] = { 'define' : '#define LJ_CUT\n#define LJ_EWALD_GEOM\n/* Use full LJ combination matrix + geometric rule for the grid correction */' }
# This is OK as an unordered dict
EnergiesComputationDict = {
/*! \brief Kinds of electrostatic treatments in SIMD Verlet kernels
*/
enum {{
- coultRF, coultTAB, coultTAB_TWIN, coultEWALD, coultEWALD_TWIN, coultNR
+ coulktRF, coulktTAB, coulktTAB_TWIN, coulktEWALD, coulktEWALD_TWIN, coulktNR
+}};
+
+/*! \brief Kinds of Van der Waals treatments in SIMD Verlet kernels
+ */
+enum {{
+ vdwktLJCUT_COMBGEOM, vdwktLJCUT_COMBLB, vdwktLJCUT_COMBNONE, vdwktLJFORCESWITCH, vdwktLJPOTSWITCH, vdwktLJEWALDCOMBGEOM, vdwktNR
}};
/* Declare and define the kernel function pointer lookup tables.
* The minor index of the array goes over both the LJ combination rules,
- * which is only supported by plain cut-off, and the LJ switch functions.
+ * which is only supported by plain cut-off, and the LJ switch/PME functions.
*/
-static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
+static p_nbk_func_noener p_nbk_noener[coulktNR][vdwktNR] =
{7}
-static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
+static p_nbk_func_ener p_nbk_ener[coulktNR][vdwktNR] =
{8}
-static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
+static p_nbk_func_ener p_nbk_energrp[coulktNR][vdwktNR] =
{9}
static void
{{
int nnbl;
nbnxn_pairlist_t **nbl;
- int coult, ljtreatment = 0;
+ int coulkt, vdwkt = 0;
int nb;
nnbl = nbl_list->nnbl;
if (EEL_RF(ic->eeltype) || ic->eeltype == eelCUT)
{{
- coult = coultRF;
+ coulkt = coulktRF;
}}
else
{{
{{
if (ic->rcoulomb == ic->rvdw)
{{
- coult = coultTAB;
+ coulkt = coulktTAB;
}}
else
{{
- coult = coultTAB_TWIN;
+ coulkt = coulktTAB_TWIN;
}}
}}
else
{{
if (ic->rcoulomb == ic->rvdw)
{{
- coult = coultEWALD;
+ coulkt = coulktEWALD;
}}
else
{{
- coult = coultEWALD_TWIN;
+ coulkt = coulktEWALD_TWIN;
}}
}}
}}
- switch (ic->vdw_modifier)
+ if (ic->vdwtype == evdwCUT)
+ {{
+ switch (ic->vdw_modifier)
+ {{
+ case eintmodNONE:
+ case eintmodPOTSHIFT:
+ switch (nbat->comb_rule)
+ {{
+ case ljcrGEOM: vdwkt = vdwktLJCUT_COMBGEOM; break;
+ case ljcrLB: vdwkt = vdwktLJCUT_COMBLB; break;
+ case ljcrNONE: vdwkt = vdwktLJCUT_COMBNONE; break;
+ default: gmx_incons("Unknown combination rule");
+ }}
+ break;
+ case eintmodFORCESWITCH:
+ vdwkt = vdwktLJFORCESWITCH;
+ break;
+ case eintmodPOTSWITCH:
+ vdwkt = vdwktLJPOTSWITCH;
+ break;
+ default:
+ gmx_incons("Unsupported VdW interaction modifier");
+ }}
+ }}
+ else if (ic->vdwtype == evdwPME)
+ {{
+ if (ic->ljpme_comb_rule == eljpmeLB)
+ {{
+ gmx_incons("The nbnxn SIMD kernels don't suport LJ-PME with LB");
+ }}
+ vdwkt = vdwktLJEWALDCOMBGEOM;
+ }}
+ else
{{
- case eintmodNONE:
- case eintmodPOTSHIFT:
- ljtreatment = nbat->comb_rule;
- break;
- /* Switch functions follow after cut-off combination rule kernels */
- case eintmodFORCESWITCH:
- ljtreatment = ljcrNR;
- break;
- case eintmodPOTSWITCH:
- ljtreatment = ljcrNR + 1;
- break;
- default:
- gmx_incons("Unsupported VdW interaction modifier");
+ gmx_incons("Unsupported VdW interaction type");
}}
#pragma omp parallel for schedule(static) num_threads(gmx_omp_nthreads_get(emntNonbonded))
if (!(force_flags & GMX_FORCE_ENERGY))
{{
/* Don't calculate energies */
- p_nbk_noener[coult][ljtreatment](nbl[nb], nbat,
- ic,
- shift_vec,
- out->f,
- fshift_p);
+ p_nbk_noener[coulkt][vdwkt](nbl[nb], nbat,
+ ic,
+ shift_vec,
+ out->f,
+ fshift_p);
}}
else if (out->nV == 1)
{{
out->Vvdw[0] = 0;
out->Vc[0] = 0;
- p_nbk_ener[coult][ljtreatment](nbl[nb], nbat,
- ic,
- shift_vec,
- out->f,
- fshift_p,
- out->Vvdw,
- out->Vc);
+ p_nbk_ener[coulkt][vdwkt](nbl[nb], nbat,
+ ic,
+ shift_vec,
+ out->f,
+ fshift_p,
+ out->Vvdw,
+ out->Vc);
}}
else
{{
out->VSc[i] = 0;
}}
- p_nbk_energrp[coult][ljtreatment](nbl[nb], nbat,
- ic,
- shift_vec,
- out->f,
- fshift_p,
- out->VSvdw,
- out->VSc);
+ p_nbk_energrp[coulkt][vdwkt](nbl[nb], nbat,
+ ic,
+ shift_vec,
+ out->f,
+ fshift_p,
+ out->VSvdw,
+ out->VSc);
reduce_group_energies(nbat->nenergrp, nbat->neg_2log,
out->VSvdw, out->VSc,
#endif
#include <math.h>
+#include <assert.h>
#include "typedefs.h"
#include "vec.h"
/* Analytical reaction-field kernels */
#define CALC_COUL_RF
+#define LJ_CUT
#include "nbnxn_kernel_ref_includes.h"
-#define VDW_FORCE_SWITCH
+#undef LJ_CUT
+#define LJ_FORCE_SWITCH
#include "nbnxn_kernel_ref_includes.h"
-#undef VDW_FORCE_SWITCH
-#define VDW_POT_SWITCH
+#undef LJ_FORCE_SWITCH
+#define LJ_POT_SWITCH
#include "nbnxn_kernel_ref_includes.h"
-#undef VDW_POT_SWITCH
+#undef LJ_POT_SWITCH
+#define LJ_EWALD
+#define LJ_CUT
+#define LJ_EWALD_COMB_GEOM
+#include "nbnxn_kernel_ref_includes.h"
+#undef LJ_EWALD_COMB_GEOM
+#define LJ_EWALD_COMB_LB
+#include "nbnxn_kernel_ref_includes.h"
+#undef LJ_EWALD_COMB_LB
+#undef LJ_CUT
+#undef LJ_EWALD
#undef CALC_COUL_RF
/* Tabulated exclusion interaction electrostatics kernels */
#define CALC_COUL_TAB
+#define LJ_CUT
+#include "nbnxn_kernel_ref_includes.h"
+#undef LJ_CUT
+#define LJ_FORCE_SWITCH
#include "nbnxn_kernel_ref_includes.h"
-#define VDW_FORCE_SWITCH
+#undef LJ_FORCE_SWITCH
+#define LJ_POT_SWITCH
#include "nbnxn_kernel_ref_includes.h"
-#undef VDW_FORCE_SWITCH
-#define VDW_POT_SWITCH
+#undef LJ_POT_SWITCH
+#define LJ_EWALD
+#define LJ_CUT
+#define LJ_EWALD_COMB_GEOM
#include "nbnxn_kernel_ref_includes.h"
-#undef VDW_POT_SWITCH
+#undef LJ_EWALD_COMB_GEOM
+#define LJ_EWALD_COMB_LB
+#include "nbnxn_kernel_ref_includes.h"
+#undef LJ_EWALD_COMB_LB
+#undef LJ_CUT
+#undef LJ_EWALD
/* Twin-range cut-off kernels */
#define VDW_CUTOFF_CHECK
+#define LJ_CUT
+#include "nbnxn_kernel_ref_includes.h"
+#undef LJ_CUT
+#define LJ_FORCE_SWITCH
#include "nbnxn_kernel_ref_includes.h"
-#define VDW_FORCE_SWITCH
+#undef LJ_FORCE_SWITCH
+#define LJ_POT_SWITCH
#include "nbnxn_kernel_ref_includes.h"
-#undef VDW_FORCE_SWITCH
-#define VDW_POT_SWITCH
+#undef LJ_POT_SWITCH
+#define LJ_EWALD
+#define LJ_CUT
+#define LJ_EWALD_COMB_GEOM
#include "nbnxn_kernel_ref_includes.h"
-#undef VDW_POT_SWITCH
+#undef LJ_EWALD_COMB_GEOM
+#define LJ_EWALD_COMB_LB
+#include "nbnxn_kernel_ref_includes.h"
+#undef LJ_EWALD_COMB_LB
+#undef LJ_CUT
+#undef LJ_EWALD
#undef VDW_CUTOFF_CHECK
#undef CALC_COUL_TAB
};
enum {
- vdwtCUT, vdwtFSWITCH, vdwtPSWITCH, vdwtNR
+ vdwtCUT, vdwtFSWITCH, vdwtPSWITCH, vdwtEWALDGEOM, vdwtEWALDLB, vdwtNR
};
p_nbk_func_noener p_nbk_c_noener[coultNR][vdwtNR] =
{
- { nbnxn_kernel_ElecRF_VdwLJ_F_ref, nbnxn_kernel_ElecRF_VdwLJFsw_F_ref, nbnxn_kernel_ElecRF_VdwLJPsw_F_ref },
- { nbnxn_kernel_ElecQSTab_VdwLJ_F_ref, nbnxn_kernel_ElecQSTab_VdwLJFsw_F_ref, nbnxn_kernel_ElecQSTab_VdwLJPsw_F_ref },
- { nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_F_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_F_ref }
+ { nbnxn_kernel_ElecRF_VdwLJ_F_ref, nbnxn_kernel_ElecRF_VdwLJFsw_F_ref, nbnxn_kernel_ElecRF_VdwLJPsw_F_ref, nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_ref, nbnxn_kernel_ElecRF_VdwLJEwCombLB_F_ref },
+ { nbnxn_kernel_ElecQSTab_VdwLJ_F_ref, nbnxn_kernel_ElecQSTab_VdwLJFsw_F_ref, nbnxn_kernel_ElecQSTab_VdwLJPsw_F_ref, nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_ref, nbnxn_kernel_ElecQSTab_VdwLJEwCombLB_F_ref },
+ { nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_F_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_F_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_F_ref }
};
p_nbk_func_ener p_nbk_c_ener[coultNR][vdwtNR] =
{
- { nbnxn_kernel_ElecRF_VdwLJ_VF_ref, nbnxn_kernel_ElecRF_VdwLJFsw_VF_ref, nbnxn_kernel_ElecRF_VdwLJPsw_VF_ref },
- { nbnxn_kernel_ElecQSTab_VdwLJ_VF_ref, nbnxn_kernel_ElecQSTab_VdwLJFsw_VF_ref, nbnxn_kernel_ElecQSTab_VdwLJPsw_VF_ref },
- { nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_VF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_VF_ref }
+ { nbnxn_kernel_ElecRF_VdwLJ_VF_ref, nbnxn_kernel_ElecRF_VdwLJFsw_VF_ref, nbnxn_kernel_ElecRF_VdwLJPsw_VF_ref, nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_ref, nbnxn_kernel_ElecRF_VdwLJEwCombLB_VF_ref },
+ { nbnxn_kernel_ElecQSTab_VdwLJ_VF_ref, nbnxn_kernel_ElecQSTab_VdwLJFsw_VF_ref, nbnxn_kernel_ElecQSTab_VdwLJPsw_VF_ref, nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_ref, nbnxn_kernel_ElecQSTab_VdwLJEwCombLB_VF_ref },
+ { nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_VF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_VF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_VF_ref }
};
p_nbk_func_ener p_nbk_c_energrp[coultNR][vdwtNR] =
{
- { nbnxn_kernel_ElecRF_VdwLJ_VgrpF_ref, nbnxn_kernel_ElecRF_VdwLJFsw_VgrpF_ref, nbnxn_kernel_ElecRF_VdwLJPsw_VgrpF_ref },
- { nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_ref, nbnxn_kernel_ElecQSTab_VdwLJFsw_VgrpF_ref, nbnxn_kernel_ElecQSTab_VdwLJPsw_VgrpF_ref },
- { nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_VgrpF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_VgrpF_ref }
+ { nbnxn_kernel_ElecRF_VdwLJ_VgrpF_ref, nbnxn_kernel_ElecRF_VdwLJFsw_VgrpF_ref, nbnxn_kernel_ElecRF_VdwLJPsw_VgrpF_ref, nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_ref, nbnxn_kernel_ElecRF_VdwLJEwCombLB_VgrpF_ref },
+ { nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_ref, nbnxn_kernel_ElecQSTab_VdwLJFsw_VgrpF_ref, nbnxn_kernel_ElecQSTab_VdwLJPsw_VgrpF_ref, nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_ref, nbnxn_kernel_ElecQSTab_VdwLJEwCombLB_VgrpF_ref },
+ { nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_VgrpF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_VgrpF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_VgrpF_ref }
};
void
}
}
- switch (ic->vdw_modifier)
+ if (ic->vdwtype == evdwCUT)
+ {
+ switch (ic->vdw_modifier)
+ {
+ case eintmodPOTSHIFT:
+ case eintmodNONE:
+ vdwt = vdwtCUT;
+ break;
+ case eintmodFORCESWITCH:
+ vdwt = vdwtFSWITCH;
+ break;
+ case eintmodPOTSWITCH:
+ vdwt = vdwtPSWITCH;
+ break;
+ default:
+ gmx_incons("Unsupported VdW modifier");
+ break;
+ }
+ }
+ else if (ic->vdwtype == evdwPME)
+ {
+ if (ic->ljpme_comb_rule == ljcrGEOM)
+ {
+ assert(nbat->comb_rule == ljcrGEOM);
+ vdwt = vdwtEWALDGEOM;
+ }
+ else
+ {
+ assert(nbat->comb_rule == ljcrLB);
+ vdwt = vdwtEWALDLB;
+ }
+ }
+ else
{
- case eintmodPOTSHIFT:
- case eintmodNONE:
- vdwt = vdwtCUT;
- break;
- case eintmodFORCESWITCH:
- vdwt = vdwtFSWITCH;
- break;
- case eintmodPOTSWITCH:
- vdwt = vdwtPSWITCH;
- break;
- default:
- gmx_incons("Unsupported VdW modifier");
- break;
+ gmx_incons("Unsupported vdwtype in nbnxn reference kernel");
}
#pragma omp parallel for schedule(static) num_threads(gmx_omp_nthreads_get(emntNonbonded))
/* When calculating RF or Ewald interactions we calculate the electrostatic
* forces and energies on excluded atom pairs here in the non-bonded loops.
*/
-#if defined CHECK_EXCLS && defined CALC_COULOMB
+#if defined CHECK_EXCLS && (defined CALC_COULOMB || defined LJ_EWALD)
#define EXCL_FORCES
#endif
real rinvsq, rinvsix;
real c6, c12;
real FrLJ6 = 0, FrLJ12 = 0, frLJ = 0, VLJ = 0;
-#if defined VDW_FORCE_SWITCH || defined VDW_POT_SWITCH
+#if defined LJ_FORCE_SWITCH || defined LJ_POT_SWITCH
real r, rsw;
#endif
if (i < UNROLLI/2)
#endif
{
- rinvsix = interact*rinvsq*rinvsq*rinvsq;
-
c6 = nbfp[type_i_off+type[aj]*2 ];
c12 = nbfp[type_i_off+type[aj]*2+1];
+
+#if defined LJ_CUT || defined LJ_FORCE_SWITCH || defined LJ_POT_SWITCH
+ rinvsix = interact*rinvsq*rinvsq*rinvsq;
FrLJ6 = c6*rinvsix;
FrLJ12 = c12*rinvsix*rinvsix;
frLJ = FrLJ12 - FrLJ6;
/* 7 flops for r^-2 + LJ force */
-#if defined CALC_ENERGIES || defined VDW_POT_SWITCH
+#if defined CALC_ENERGIES || defined LJ_POT_SWITCH
VLJ = (FrLJ12 + c12*ic->repulsion_shift.cpot)/12 -
(FrLJ6 + c6*ic->dispersion_shift.cpot)/6;
/* 7 flops for LJ energy */
#endif
+#endif
-#if defined VDW_FORCE_SWITCH || defined VDW_POT_SWITCH
+#if defined LJ_FORCE_SWITCH || defined LJ_POT_SWITCH
/* Force or potential switching from ic->rvdw_switch */
r = rsq*rinv;
rsw = r - ic->rvdw_switch;
rsw = (rsw >= 0.0 ? rsw : 0.0);
#endif
-#ifdef VDW_FORCE_SWITCH
+#ifdef LJ_FORCE_SWITCH
frLJ +=
-c6*(ic->dispersion_shift.c2 + ic->dispersion_shift.c3*rsw)*rsw*rsw*r
+ c12*(ic->repulsion_shift.c2 + ic->repulsion_shift.c3*rsw)*rsw*rsw*r;
#endif
#endif
-#if defined CALC_ENERGIES || defined VDW_POT_SWITCH
- /* Masking shoule be done after force switching,
+#if defined CALC_ENERGIES || defined LJ_POT_SWITCH
+ /* Masking should be done after force switching,
* but before potential switching.
*/
- /* Need to zero the interaction if r >= rcut
- * or there should be exclusion. */
- VLJ = VLJ * skipmask * interact;
- /* 2 more flops for LJ energy */
+ /* Need to zero the interaction if there should be exclusion. */
+ VLJ = VLJ * interact;
#endif
-#ifdef VDW_POT_SWITCH
+#ifdef LJ_POT_SWITCH
{
real sw, dsw;
}
#endif
+#ifdef LJ_EWALD
+ {
+ real c6grid, rinvsix_nm, cr2, expmcr2, poly, sh_mask;
+
+#ifdef LJ_EWALD_COMB_GEOM
+ c6grid = ljc[type[ai]*2]*ljc[type[aj]*2];
+#elif defined LJ_EWALD_COMB_LB
+ {
+ real sigma, sigma2, epsilon;
+
+ /* These sigma and epsilon are scaled to give 6*C6 */
+ sigma = ljc[type[ai]*2] + ljc[type[aj]*2];
+ epsilon = ljc[type[ai]*2+1]*ljc[type[aj]*2+1];
+
+ sigma2 = sigma*sigma;
+ c6grid = epsilon*sigma2*sigma2*sigma2;
+ }
+#else
+#error "No LJ Ewald combination rule defined"
+#endif
+
+#ifdef CHECK_EXCLS
+ /* Recalculate rinvsix without exclusion mask */
+ rinvsix_nm = rinvsq*rinvsq*rinvsq;
+#else
+ rinvsix_nm = rinvsix;
+#endif
+ cr2 = lje_coeff2*rsq;
+#ifdef GMX_DOUBLE
+ expmcr2 = exp(-cr2);
+#else
+ expmcr2 = expf(-cr2);
+#endif
+ poly = 1 + cr2 + 0.5*cr2*cr2;
+
+ /* Subtract the grid force from the total LJ force */
+ frLJ += c6grid*(rinvsix_nm - expmcr2*(rinvsix_nm*poly + lje_coeff6_6));
+#ifdef CALC_ENERGIES
+ /* Shift should only be applied to real LJ pairs */
+ sh_mask = lje_vc*interact;
+
+ VLJ += c6grid/6*(rinvsix_nm*(1 - expmcr2*poly) + sh_mask);
+#endif
+ }
+#endif /* LJ_EWALD */
+
#ifdef VDW_CUTOFF_CHECK
/* Mask for VdW cut-off shorter than Coulomb cut-off */
{
VLJ *= skipmask_rvdw;
#endif
}
+#else
+#if defined CALC_ENERGIES
+ /* Need to zero the interaction if r >= rcut */
+ VLJ = VLJ * skipmask;
+ /* 1 more flop for LJ energy */
#endif
+#endif /* VDW_CUTOFF_CHECK */
+
#ifdef CALC_ENERGIES
#ifdef ENERGY_GROUPS
#endif
#endif
-#ifdef VDW_FORCE_SWITCH
+#if defined LJ_CUT && !defined LJ_EWALD
+#define NBK_FUNC_NAME(feg) NBK_FUNC_NAME2(_VdwLJ, feg)
+#elif defined LJ_FORCE_SWITCH
#define NBK_FUNC_NAME(feg) NBK_FUNC_NAME2(_VdwLJFsw, feg)
-#else
-#ifdef VDW_POT_SWITCH
+#elif defined LJ_POT_SWITCH
#define NBK_FUNC_NAME(feg) NBK_FUNC_NAME2(_VdwLJPsw, feg)
+#elif defined LJ_EWALD
+#ifdef LJ_EWALD_COMB_GEOM
+#define NBK_FUNC_NAME(feg) NBK_FUNC_NAME2(_VdwLJEwCombGeom, feg)
#else
-#define NBK_FUNC_NAME(feg) NBK_FUNC_NAME2(_VdwLJ, feg)
+#define NBK_FUNC_NAME(feg) NBK_FUNC_NAME2(_VdwLJEwCombLB, feg)
#endif
+#else
+#error "No VdW type defined"
#endif
static void
real *nbfp_i;
int n, ci, ci_sh;
int ish, ishf;
- gmx_bool do_LJ, half_LJ, do_coul;
+ gmx_bool do_LJ, half_LJ, do_coul, do_self;
int cjind0, cjind1, cjind;
int ip, jp;
int egp_sh_i[UNROLLI];
#endif
#endif
-#ifdef VDW_POT_SWITCH
+#ifdef LJ_POT_SWITCH
real swV3, swV4, swV5;
real swF2, swF3, swF4;
#endif
+#ifdef LJ_EWALD
+ real lje_coeff2, lje_coeff6_6, lje_vc;
+ const real *ljc;
+#endif
#ifdef CALC_COUL_RF
real k_rf2;
int npair = 0;
#endif
-#ifdef VDW_POT_SWITCH
+#ifdef LJ_POT_SWITCH
swV3 = ic->vdw_switch.c3;
swV4 = ic->vdw_switch.c4;
swV5 = ic->vdw_switch.c5;
swF4 = 5*ic->vdw_switch.c5;
#endif
+#ifdef LJ_EWALD
+ lje_coeff2 = ic->ewaldcoeff_lj*ic->ewaldcoeff_lj;
+ lje_coeff6_6 = lje_coeff2*lje_coeff2*lje_coeff2/6.0;
+ lje_vc = ic->sh_lj_ewald;
+
+ ljc = nbat->nbfp_comb;
+#endif
+
#ifdef CALC_COUL_RF
k_rf2 = 2*ic->k_rf;
#ifdef CALC_ENERGIES
do_LJ = (nbln->shift & NBNXN_CI_DO_LJ(0));
do_coul = (nbln->shift & NBNXN_CI_DO_COUL(0));
half_LJ = ((nbln->shift & NBNXN_CI_HALF_LJ(0)) || !do_LJ) && do_coul;
+#ifdef LJ_EWALD
+ do_self = TRUE;
+#else
+ do_self = do_coul;
+#endif
#ifdef CALC_ENERGIES
#ifndef ENERGY_GROUPS
xi[i*XI_STRIDE+d] = x[(ci*UNROLLI+i)*X_STRIDE+d] + shiftvec[ishf+d];
fi[i*FI_STRIDE+d] = 0;
}
+
+ qi[i] = facel*q[ci*UNROLLI+i];
}
- if (do_coul)
- {
#ifdef CALC_ENERGIES
+ if (do_self)
+ {
real Vc_sub_self;
#ifdef CALC_COUL_RF
#else
Vc_sub_self = 0.5*tab_coul_FDV0[2];
#endif
-#endif
#endif
- for (i = 0; i < UNROLLI; i++)
+ if (l_cj[nbln->cj_ind_start].cj == ci_sh)
{
- qi[i] = facel*q[ci*UNROLLI+i];
-
-#ifdef CALC_ENERGIES
- if (l_cj[nbln->cj_ind_start].cj == ci_sh)
+ for (i = 0; i < UNROLLI; i++)
{
+ int egp_ind;
#ifdef ENERGY_GROUPS
- Vc[egp_sh_i[i]+((nbat->energrp[ci]>>(i*nbat->neg_2log)) & egp_mask)]
+ egp_ind = egp_sh_i[i] + ((nbat->energrp[ci]>>(i*nbat->neg_2log)) & egp_mask);
#else
- Vc[0]
+ egp_ind = 0;
#endif
- -= qi[i]*q[ci*UNROLLI+i]*Vc_sub_self;
- }
+ /* Coulomb self interaction */
+ Vc[egp_ind] -= qi[i]*q[ci*UNROLLI+i]*Vc_sub_self;
+
+#ifdef LJ_EWALD
+ /* LJ Ewald self interaction */
+ Vvdw[egp_ind] += 0.5*nbat->nbfp[nbat->type[ci*UNROLLI+i]*(nbat->ntype + 1)*2]/6*lje_coeff6_6;
#endif
+ }
}
}
+#endif /* CALC_ENERGIES */
cjind = cjind0;
while (cjind < cjind1 && nbl->cj[cjind].excl != 0xffff)
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_GEOM
/* Will not calculate energies */
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#define ENERGY_GROUPS
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_LB
/* Will not calculate energies */
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#define ENERGY_GROUPS
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_EWALD
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_EWALD
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_EWALD
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
+#define LJ_CUT
#define LJ_COMB_GEOM
/* Will not calculate energies */
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
+#define LJ_CUT
#define LJ_COMB_LB
/* Will not calculate energies */
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#define ENERGY_GROUPS
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_EWALD
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_EWALD
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_EWALD
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_GEOM
/* Will not calculate energies */
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#define ENERGY_GROUPS
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_LB
/* Will not calculate energies */
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#define ENERGY_GROUPS
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_TAB
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_TAB
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_TAB
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
+#define LJ_CUT
#define LJ_COMB_GEOM
/* Will not calculate energies */
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
+#define LJ_CUT
#define LJ_COMB_LB
/* Will not calculate energies */
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#define ENERGY_GROUPS
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_TAB
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_TAB
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_TAB
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
+#define LJ_CUT
#define LJ_COMB_GEOM
/* Will not calculate energies */
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
+#define LJ_CUT
#define LJ_COMB_LB
/* Will not calculate energies */
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#define ENERGY_GROUPS
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_RF
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_RF
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_RF
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_2XNN
#include "nbnxn_kernel_simd_2xnn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
/*! \brief Kinds of electrostatic treatments in SIMD Verlet kernels
*/
enum {
- coultRF, coultTAB, coultTAB_TWIN, coultEWALD, coultEWALD_TWIN, coultNR
+ coulktRF, coulktTAB, coulktTAB_TWIN, coulktEWALD, coulktEWALD_TWIN, coulktNR
+};
+
+/*! \brief Kinds of Van der Waals treatments in SIMD Verlet kernels
+ */
+enum {
+ vdwktLJCUT_COMBGEOM, vdwktLJCUT_COMBLB, vdwktLJCUT_COMBNONE, vdwktLJFORCESWITCH, vdwktLJPOTSWITCH, vdwktLJEWALDCOMBGEOM, vdwktNR
};
/* Declare and define the kernel function pointer lookup tables.
* The minor index of the array goes over both the LJ combination rules,
- * which is only supported by plain cut-off, and the LJ switch functions.
+ * which is only supported by plain cut-off, and the LJ switch/PME functions.
*/
-static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
+static p_nbk_func_noener p_nbk_noener[coulktNR][vdwktNR] =
{
{
nbnxn_kernel_ElecRF_VdwLJCombGeom_F_2xnn,
nbnxn_kernel_ElecRF_VdwLJ_F_2xnn,
nbnxn_kernel_ElecRF_VdwLJFSw_F_2xnn,
nbnxn_kernel_ElecRF_VdwLJPSw_F_2xnn,
+ nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_2xnn,
},
{
nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_2xnn,
nbnxn_kernel_ElecQSTab_VdwLJ_F_2xnn,
nbnxn_kernel_ElecQSTab_VdwLJFSw_F_2xnn,
nbnxn_kernel_ElecQSTab_VdwLJPSw_F_2xnn,
+ nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xnn,
},
{
nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_2xnn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_2xnn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_2xnn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_2xnn,
+ nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xnn,
},
{
nbnxn_kernel_ElecEw_VdwLJCombGeom_F_2xnn,
nbnxn_kernel_ElecEw_VdwLJ_F_2xnn,
nbnxn_kernel_ElecEw_VdwLJFSw_F_2xnn,
nbnxn_kernel_ElecEw_VdwLJPSw_F_2xnn,
+ nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_2xnn,
},
{
nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_2xnn,
nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_2xnn,
nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_2xnn,
nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_2xnn,
+ nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xnn,
},
};
-static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
+static p_nbk_func_ener p_nbk_ener[coulktNR][vdwktNR] =
{
{
nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_2xnn,
nbnxn_kernel_ElecRF_VdwLJ_VF_2xnn,
nbnxn_kernel_ElecRF_VdwLJFSw_VF_2xnn,
nbnxn_kernel_ElecRF_VdwLJPSw_VF_2xnn,
+ nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_2xnn,
},
{
nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_2xnn,
nbnxn_kernel_ElecQSTab_VdwLJ_VF_2xnn,
nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_2xnn,
nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_2xnn,
+ nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xnn,
},
{
nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_2xnn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_2xnn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_2xnn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_2xnn,
+ nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xnn,
},
{
nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_2xnn,
nbnxn_kernel_ElecEw_VdwLJ_VF_2xnn,
nbnxn_kernel_ElecEw_VdwLJFSw_VF_2xnn,
nbnxn_kernel_ElecEw_VdwLJPSw_VF_2xnn,
+ nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_2xnn,
},
{
nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_2xnn,
nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_2xnn,
nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_2xnn,
nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_2xnn,
+ nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xnn,
},
};
-static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
+static p_nbk_func_ener p_nbk_energrp[coulktNR][vdwktNR] =
{
{
nbnxn_kernel_ElecRF_VdwLJCombGeom_VgrpF_2xnn,
nbnxn_kernel_ElecRF_VdwLJ_VgrpF_2xnn,
nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_2xnn,
nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_2xnn,
+ nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xnn,
},
{
nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_2xnn,
nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_2xnn,
nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_2xnn,
nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_2xnn,
+ nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xnn,
},
{
nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_2xnn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_2xnn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_2xnn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_2xnn,
+ nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xnn,
},
{
nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_2xnn,
nbnxn_kernel_ElecEw_VdwLJ_VgrpF_2xnn,
nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_2xnn,
nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_2xnn,
+ nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xnn,
},
{
nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_2xnn,
nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_2xnn,
nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_2xnn,
nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_2xnn,
+ nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xnn,
},
};
{
int nnbl;
nbnxn_pairlist_t **nbl;
- int coult, ljtreatment = 0;
+ int coulkt, vdwkt = 0;
int nb;
nnbl = nbl_list->nnbl;
if (EEL_RF(ic->eeltype) || ic->eeltype == eelCUT)
{
- coult = coultRF;
+ coulkt = coulktRF;
}
else
{
{
if (ic->rcoulomb == ic->rvdw)
{
- coult = coultTAB;
+ coulkt = coulktTAB;
}
else
{
- coult = coultTAB_TWIN;
+ coulkt = coulktTAB_TWIN;
}
}
else
{
if (ic->rcoulomb == ic->rvdw)
{
- coult = coultEWALD;
+ coulkt = coulktEWALD;
}
else
{
- coult = coultEWALD_TWIN;
+ coulkt = coulktEWALD_TWIN;
}
}
}
- switch (ic->vdw_modifier)
+ if (ic->vdwtype == evdwCUT)
+ {
+ switch (ic->vdw_modifier)
+ {
+ case eintmodNONE:
+ case eintmodPOTSHIFT:
+ switch (nbat->comb_rule)
+ {
+ case ljcrGEOM: vdwkt = vdwktLJCUT_COMBGEOM; break;
+ case ljcrLB: vdwkt = vdwktLJCUT_COMBLB; break;
+ case ljcrNONE: vdwkt = vdwktLJCUT_COMBNONE; break;
+ default: gmx_incons("Unknown combination rule");
+ }
+ break;
+ case eintmodFORCESWITCH:
+ vdwkt = vdwktLJFORCESWITCH;
+ break;
+ case eintmodPOTSWITCH:
+ vdwkt = vdwktLJPOTSWITCH;
+ break;
+ default:
+ gmx_incons("Unsupported VdW interaction modifier");
+ }
+ }
+ else if (ic->vdwtype == evdwPME)
+ {
+ if (ic->ljpme_comb_rule == eljpmeLB)
+ {
+ gmx_incons("The nbnxn SIMD kernels don't suport LJ-PME with LB");
+ }
+ vdwkt = vdwktLJEWALDCOMBGEOM;
+ }
+ else
{
- case eintmodNONE:
- case eintmodPOTSHIFT:
- ljtreatment = nbat->comb_rule;
- break;
- /* Switch functions follow after cut-off combination rule kernels */
- case eintmodFORCESWITCH:
- ljtreatment = ljcrNR;
- break;
- case eintmodPOTSWITCH:
- ljtreatment = ljcrNR + 1;
- break;
- default:
- gmx_incons("Unsupported VdW interaction modifier");
+ gmx_incons("Unsupported VdW interaction type");
}
#pragma omp parallel for schedule(static) num_threads(gmx_omp_nthreads_get(emntNonbonded))
if (!(force_flags & GMX_FORCE_ENERGY))
{
/* Don't calculate energies */
- p_nbk_noener[coult][ljtreatment](nbl[nb], nbat,
- ic,
- shift_vec,
- out->f,
- fshift_p);
+ p_nbk_noener[coulkt][vdwkt](nbl[nb], nbat,
+ ic,
+ shift_vec,
+ out->f,
+ fshift_p);
}
else if (out->nV == 1)
{
out->Vvdw[0] = 0;
out->Vc[0] = 0;
- p_nbk_ener[coult][ljtreatment](nbl[nb], nbat,
- ic,
- shift_vec,
- out->f,
- fshift_p,
- out->Vvdw,
- out->Vc);
+ p_nbk_ener[coulkt][vdwkt](nbl[nb], nbat,
+ ic,
+ shift_vec,
+ out->f,
+ fshift_p,
+ out->Vvdw,
+ out->Vc);
}
else
{
out->VSc[i] = 0;
}
- p_nbk_energrp[coult][ljtreatment](nbl[nb], nbat,
- ic,
- shift_vec,
- out->f,
- fshift_p,
- out->VSvdw,
- out->VSc);
+ p_nbk_energrp[coulkt][vdwkt](nbl[nb], nbat,
+ ic,
+ shift_vec,
+ out->f,
+ fshift_p,
+ out->VSvdw,
+ out->VSc);
reduce_group_energies(nbat->nenergrp, nbat->neg_2log,
out->VSvdw, out->VSc,
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJ_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_2xnn;
+nbk_func_ener nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJCombLB_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_2xnn;
+nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_2xnn;
+nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJ_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_2xnn;
+nbk_func_ener nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_2xnn;
+nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xnn;
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJCombLB_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJ_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJFSw_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJPSw_VF_2xnn;
+nbk_func_ener nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJCombLB_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJ_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_2xnn;
+nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_2xnn;
+nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJCombLB_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJ_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJFSw_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJPSw_VF_2xnn;
+nbk_func_ener nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_2xnn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_2xnn;
+nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xnn;
nbk_func_noener nbnxn_kernel_ElecRF_VdwLJCombGeom_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecRF_VdwLJCombLB_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecRF_VdwLJ_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecRF_VdwLJFSw_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecRF_VdwLJPSw_F_2xnn;
+nbk_func_noener nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJ_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJFSw_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJPSw_F_2xnn;
+nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_2xnn;
+nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecEw_VdwLJCombGeom_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecEw_VdwLJCombLB_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecEw_VdwLJ_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecEw_VdwLJFSw_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecEw_VdwLJPSw_F_2xnn;
+nbk_func_noener nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_2xnn;
nbk_func_noener nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_2xnn;
+nbk_func_noener nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xnn;
*/
-/* When calculating RF or Ewald interactions we calculate the electrostatic
+/* When calculating RF or Ewald interactions we calculate the electrostatic/LJ
* forces on excluded atom pairs here in the non-bonded loops.
* But when energies and/or virial is required we calculate them
* separately to as then it is easier to separate the energy and virial
* contributions.
*/
-#if defined CHECK_EXCLS && defined CALC_COULOMB
+#if defined CHECK_EXCLS && (defined CALC_COULOMB || defined LJ_EWALD_GEOM)
#define EXCL_FORCES
#endif
gmx_simd_real_t c6s_j_S, c12s_j_S;
#endif
-#if defined LJ_COMB_GEOM || defined LJ_COMB_LB
+#if defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined LJ_EWALD_GEOM
/* Index for loading LJ parameters, complicated when interleaving */
int aj2;
#endif
/* Atom indices (of the first atom in the cluster) */
aj = cj*UNROLLJ;
-#if defined CALC_LJ && (defined LJ_COMB_GEOM || defined LJ_COMB_LB)
+#if defined CALC_LJ && (defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined LJ_EWALD_GEOM)
#if UNROLLJ == STRIDE
aj2 = aj*2;
#else
#endif
#endif
-#ifndef LJ_FORCE_SWITCH
- /* We have plain LJ with simple C6/6 C12/12 coefficients */
+#if defined LJ_CUT || defined LJ_POT_SWITCH
+ /* We have plain LJ or LJ-PME with simple C6/6 C12/12 coefficients */
FrLJ6_S0 = gmx_simd_mul_r(c6_S0, rinvsix_S0);
#ifndef HALF_LJ
FrLJ6_S2 = gmx_simd_mul_r(c6_S2, rinvsix_S2);
frLJ_S2 = gmx_simd_sub_r(FrLJ12_S2, FrLJ6_S2);
#endif
-#if defined CALC_ENERGIES && !defined LJ_POT_SWITCH
-#ifndef LJ_FORCE_SWITCH
+#if (defined LJ_CUT || defined LJ_FORCE_SWITCH) && defined CALC_ENERGIES
+
+#ifdef LJ_CUT
/* Calculate the LJ energies, with constant potential shift */
VLJ6_S0 = gmx_simd_mul_r(sixth_S, gmx_simd_fmadd_r(c6_S0, p6_cpot_S, FrLJ6_S0));
#ifndef HALF_LJ
#ifndef HALF_LJ
VLJ12_S2 = gmx_simd_mul_r(twelveth_S, gmx_simd_fmadd_r(c12_S2, p12_cpot_S, FrLJ12_S2));
#endif
-#else
+#endif /* LJ_CUT */
+#ifdef LJ_FORCE_SWITCH
#define v_fswitch_pr(rsw, rsw2, c0, c3, c4) gmx_simd_fmadd_r(gmx_simd_fmadd_r(c4, rsw, c3), gmx_simd_mul_r(rsw2, rsw), c0)
VLJ6_S0 = gmx_simd_mul_r(c6_S0, gmx_simd_fmadd_r(sixth_S, rinvsix_S0, v_fswitch_pr(rsw_S0, rsw2_S0, p6_6cpot_S, p6_vc3_S, p6_vc4_S)));
#ifndef HALF_LJ
VLJ_S2 = gmx_simd_sub_r(VLJ12_S2, VLJ6_S2);
#endif
-#endif /* CALC_ENERGIES && !LJ_POT_SWITCH */
+
+#endif /* (LJ_CUT || LJ_FORCE_SWITCH) && CALC_ENERGIES */
#ifdef LJ_POT_SWITCH
/* We always need the potential, since it is needed for the force */
}
#endif /* LJ_POT_SWITCH */
+#if defined CALC_ENERGIES && defined CHECK_EXCLS
+ /* The potential shift should be removed for excluded pairs */
+ VLJ_S0 = gmx_simd_blendzero_r(VLJ_S0, interact_S0);
+#ifndef HALF_LJ
+ VLJ_S2 = gmx_simd_blendzero_r(VLJ_S2, interact_S2);
+#endif
+#endif
+
+#ifdef LJ_EWALD_GEOM
+ {
+ gmx_simd_real_t c6s_j_S;
+ gmx_simd_real_t c6grid_S0, rinvsix_nm_S0, cr2_S0, expmcr2_S0, poly_S0;
+#ifndef HALF_LJ
+ gmx_simd_real_t c6grid_S2, rinvsix_nm_S2, cr2_S2, expmcr2_S2, poly_S2;
+#endif
+#ifdef CALC_ENERGIES
+ gmx_simd_real_t sh_mask_S0;
+#ifndef HALF_LJ
+ gmx_simd_real_t sh_mask_S2;
+#endif
+#endif
+
+ /* Determine C6 for the grid using the geometric combination rule */
+ gmx_loaddh_pr(&c6s_j_S, ljc+aj2+0);
+ c6grid_S0 = gmx_simd_mul_r(c6s_S0, c6s_j_S);
+#ifndef HALF_LJ
+ c6grid_S2 = gmx_simd_mul_r(c6s_S2, c6s_j_S);
+#endif
+
+#ifdef CHECK_EXCLS
+ /* Recalculate rinvsix without exclusion mask (compiler might optimize) */
+ rinvsix_nm_S0 = gmx_simd_mul_r(rinvsq_S0, gmx_simd_mul_r(rinvsq_S0, rinvsq_S0));
+#ifndef HALF_LJ
+ rinvsix_nm_S2 = gmx_simd_mul_r(rinvsq_S2, gmx_simd_mul_r(rinvsq_S2, rinvsq_S2));
+#endif
+#else
+ /* We didn't use a mask, so we can copy */
+ rinvsix_nm_S0 = rinvsix_S0;
+#ifndef HALF_LJ
+ rinvsix_nm_S2 = rinvsix_S2;
+#endif
+#endif
+
+ cr2_S0 = gmx_simd_mul_r(lje_c2_S, rsq_S0);
+#ifndef HALF_LJ
+ cr2_S2 = gmx_simd_mul_r(lje_c2_S, rsq_S2);
+#endif
+ expmcr2_S0 = gmx_simd_exp_r(gmx_simd_mul_r(mone_S, cr2_S0));
+#ifndef HALF_LJ
+ expmcr2_S2 = gmx_simd_exp_r(gmx_simd_mul_r(mone_S, cr2_S2));
+#endif
+
+ /* 1 + cr2 + 1/2*cr2^2 */
+ poly_S0 = gmx_simd_fmadd_r(gmx_simd_fmadd_r(half_S, cr2_S0, one_S), cr2_S0, one_S);
+#ifndef HALF_LJ
+ poly_S2 = gmx_simd_fmadd_r(gmx_simd_fmadd_r(half_S, cr2_S2, one_S), cr2_S2, one_S);
+#endif
+
+ /* We calculate LJ F*r = (6*C6)*(r^-6 - F_mesh/6), we use:
+ * r^-6*cexp*(1 + cr2 + cr2^2/2 + cr2^3/6) = cexp*(r^-6*poly + c^6/6)
+ */
+ frLJ_S0 = gmx_simd_fmadd_r(c6grid_S0, gmx_simd_fnmadd_r(expmcr2_S0, gmx_simd_fmadd_r(rinvsix_nm_S0, poly_S0, lje_c6_6_S), rinvsix_nm_S0), frLJ_S0);
+#ifndef HALF_LJ
+ frLJ_S2 = gmx_simd_fmadd_r(c6grid_S2, gmx_simd_fnmadd_r(expmcr2_S2, gmx_simd_fmadd_r(rinvsix_nm_S2, poly_S2, lje_c6_6_S), rinvsix_nm_S2), frLJ_S2);
+#endif
+
+#ifdef CALC_ENERGIES
+#ifdef CHECK_EXCLS
+ sh_mask_S0 = gmx_simd_blendzero_r(lje_vc_S, interact_S0);
+#ifndef HALF_LJ
+ sh_mask_S2 = gmx_simd_blendzero_r(lje_vc_S, interact_S2);
+#endif
+#else
+ sh_mask_S0 = lje_vc_S;
+#ifndef HALF_LJ
+ sh_mask_S2 = lje_vc_S;
+#endif
+#endif
+
+ VLJ_S0 = gmx_simd_fmadd_r(gmx_simd_mul_r(sixth_S, c6grid_S0), gmx_simd_fmadd_r(rinvsix_nm_S0, gmx_simd_fnmadd_r(expmcr2_S0, poly_S0, one_S), sh_mask_S0), VLJ_S0);
+#ifndef HALF_LJ
+ VLJ_S2 = gmx_simd_fmadd_r(gmx_simd_mul_r(sixth_S, c6grid_S2), gmx_simd_fmadd_r(rinvsix_nm_S2, gmx_simd_fnmadd_r(expmcr2_S2, poly_S2, one_S), sh_mask_S2), VLJ_S2);
+#endif
+#endif /* CALC_ENERGIES */
+ }
+#endif /* LJ_EWALD_GEOM */
+
#if defined VDW_CUTOFF_CHECK
/* frLJ is multiplied later by rinvsq, which is masked for the Coulomb
* cut-off, but if the VdW cut-off is shorter, we need to mask with that.
#endif
#endif
-#if defined CALC_ENERGIES && defined CHECK_EXCLS
- /* The potential shift should be removed for excluded pairs */
- VLJ_S0 = gmx_simd_blendzero_r(VLJ_S0, interact_S0);
-#ifndef HALF_LJ
- VLJ_S2 = gmx_simd_blendzero_r(VLJ_S2, interact_S2);
-#endif
-#endif
-
-
#endif /* CALC_LJ */
#ifdef CALC_ENERGIES
real *nbfp_ptr;
int n, ci, ci_sh;
int ish, ish3;
- gmx_bool do_LJ, half_LJ, do_coul;
+ gmx_bool do_LJ, half_LJ, do_coul, do_self;
int sci, scix, sciy, sciz, sci2;
int cjind0, cjind1, cjind;
int ip, jp;
gmx_simd_real_t fix_S2, fiy_S2, fiz_S2;
/* We use an i-force SIMD register width of 4 */
/* The pr4 stuff is defined in nbnxn_kernel_simd_utils.h */
- gmx_mm_pr4 fix_S, fiy_S, fiz_S;
+ gmx_simd4_real_t fix_S, fiy_S, fiz_S;
gmx_simd_real_t diagonal_jmi_S;
#if UNROLLI == UNROLLJ
gmx_simd_real_t sh_ewald_S;
#endif
+#if defined LJ_CUT && defined CALC_ENERGIES
+ gmx_simd_real_t p6_cpot_S, p12_cpot_S;
+#endif
#ifdef LJ_POT_SWITCH
gmx_simd_real_t rswitch_S;
gmx_simd_real_t swV3_S, swV4_S, swV5_S;
gmx_simd_real_t swF2_S, swF3_S, swF4_S;
-#else
+#endif
#ifdef LJ_FORCE_SWITCH
gmx_simd_real_t rswitch_S;
gmx_simd_real_t p6_fc2_S, p6_fc3_S;
gmx_simd_real_t p12_vc3_S, p12_vc4_S;
gmx_simd_real_t p6_6cpot_S, p12_12cpot_S;
#endif
-#else
-#ifdef CALC_ENERGIES
- gmx_simd_real_t p6_cpot_S, p12_cpot_S;
-#endif
#endif
+#ifdef LJ_EWALD_GEOM
+ real lj_ewaldcoeff2, lj_ewaldcoeff6_6;
+ gmx_simd_real_t mone_S, half_S, lje_c2_S, lje_c6_6_S, lje_vc_S;
#endif
#ifdef LJ_COMB_LB
gmx_simd_real_t c6_S2, c12_S2;
#endif
-#ifdef LJ_COMB_GEOM
+#if defined LJ_COMB_GEOM || defined LJ_EWALD_GEOM
const real *ljc;
gmx_simd_real_t c6s_S0, c12s_S0;
- gmx_simd_real_t c6s_S1, c12s_S1;
gmx_simd_real_t c6s_S2 = gmx_simd_setzero_r();
gmx_simd_real_t c12s_S2 = gmx_simd_setzero_r();
- gmx_simd_real_t c6s_S3 = gmx_simd_setzero_r();
- gmx_simd_real_t c12s_S3 = gmx_simd_setzero_r();
#endif
#endif /* LJ_COMB_LB */
int npair = 0;
#endif
-#if defined LJ_COMB_GEOM || defined LJ_COMB_LB
+#if defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined LJ_EWALD_GEOM
ljc = nbat->lj_comb;
-#else
+#endif
+#if !(defined LJ_COMB_GEOM || defined LJ_COMB_LB)
/* No combination rule used */
nbfp_ptr = (4 == nbfp_stride) ? nbat->nbfp_s4 : nbat->nbfp;
#endif
twelveth_S = gmx_simd_set1_r(1.0/12.0);
#endif
+#if defined LJ_CUT && defined CALC_ENERGIES
+ /* We shift the potential by cpot, which can be zero */
+ p6_cpot_S = gmx_simd_set1_r(ic->dispersion_shift.cpot);
+ p12_cpot_S = gmx_simd_set1_r(ic->repulsion_shift.cpot);
+#endif
#ifdef LJ_POT_SWITCH
rswitch_S = gmx_simd_set1_r(ic->rvdw_switch);
swV3_S = gmx_simd_set1_r(ic->vdw_switch.c3);
swF2_S = gmx_simd_set1_r(3*ic->vdw_switch.c3);
swF3_S = gmx_simd_set1_r(4*ic->vdw_switch.c4);
swF4_S = gmx_simd_set1_r(5*ic->vdw_switch.c5);
-#else
- sixth_S = gmx_simd_set1_r(1.0/6.0);
- twelveth_S = gmx_simd_set1_r(1.0/12.0);
+#endif
#ifdef LJ_FORCE_SWITCH
rswitch_S = gmx_simd_set1_r(ic->rvdw_switch);
p6_fc2_S = gmx_simd_set1_r(ic->dispersion_shift.c2);
p12_12cpot_S = gmx_simd_set1_r(ic->repulsion_shift.cpot/12);
}
#endif
-#else
- /* Plain LJ cut-off, with potential shift cpot, which can be 0 */
-#ifdef CALC_ENERGIES
- p6_cpot_S = gmx_simd_set1_r(ic->dispersion_shift.cpot);
- p12_cpot_S = gmx_simd_set1_r(ic->repulsion_shift.cpot);
#endif
+#ifdef LJ_EWALD_GEOM
+ mone_S = gmx_simd_set1_r(-1.0);
+ half_S = gmx_simd_set1_r(0.5);
+ lj_ewaldcoeff2 = ic->ewaldcoeff_lj*ic->ewaldcoeff_lj;
+ lj_ewaldcoeff6_6 = lj_ewaldcoeff2*lj_ewaldcoeff2*lj_ewaldcoeff2/6;
+ lje_c2_S = gmx_simd_set1_r(lj_ewaldcoeff2);
+ lje_c6_6_S = gmx_simd_set1_r(lj_ewaldcoeff6_6);
+ /* Determine the grid potential at the cut-off */
+ lje_vc_S = gmx_simd_set1_r(ic->sh_lj_ewald);
#endif
-#endif /* LJ_POT_SWITCH */
/* The kernel either supports rcoulomb = rvdw or rcoulomb >= rvdw */
rc2_S = gmx_simd_set1_r(ic->rcoulomb*ic->rcoulomb);
do_LJ = (nbln->shift & NBNXN_CI_DO_LJ(0));
do_coul = (nbln->shift & NBNXN_CI_DO_COUL(0));
half_LJ = ((nbln->shift & NBNXN_CI_HALF_LJ(0)) || !do_LJ) && do_coul;
+#ifdef LJ_EWALD_GEOM
+ do_self = TRUE;
+#else
+ do_self = do_coul;
+#endif
#ifdef ENERGY_GROUPS
egps_i = nbat->energrp[ci];
}
}
#endif
-#if defined CALC_ENERGIES
+
+#ifdef CALC_ENERGIES
#if UNROLLJ == 4
- if (do_coul && l_cj[nbln->cj_ind_start].cj == ci_sh)
+ if (do_self && l_cj[nbln->cj_ind_start].cj == ci_sh)
#endif
#if UNROLLJ == 8
- if (do_coul && l_cj[nbln->cj_ind_start].cj == (ci_sh>>1))
+ if (do_self && l_cj[nbln->cj_ind_start].cj == (ci_sh>>1))
#endif
{
- int ia;
- real Vc_sub_self;
+ if (do_coul)
+ {
+ real Vc_sub_self;
+ int ia;
#ifdef CALC_COUL_RF
- Vc_sub_self = 0.5*ic->c_rf;
+ Vc_sub_self = 0.5*ic->c_rf;
#endif
#ifdef CALC_COUL_TAB
#ifdef TAB_FDV0
- Vc_sub_self = 0.5*tab_coul_F[2];
+ Vc_sub_self = 0.5*tab_coul_F[2];
#else
- Vc_sub_self = 0.5*tab_coul_V[0];
+ Vc_sub_self = 0.5*tab_coul_V[0];
#endif
#endif
#ifdef CALC_COUL_EWALD
- /* beta/sqrt(pi) */
- Vc_sub_self = 0.5*ic->ewaldcoeff_q*M_2_SQRTPI;
+ /* beta/sqrt(pi) */
+ Vc_sub_self = 0.5*ic->ewaldcoeff_q*M_2_SQRTPI;
#endif
- for (ia = 0; ia < UNROLLI; ia++)
+ for (ia = 0; ia < UNROLLI; ia++)
+ {
+ real qi;
+
+ qi = q[sci+ia];
+#ifdef ENERGY_GROUPS
+ vctp[ia][((egps_i>>(ia*egps_ishift)) & egps_imask)*egps_jstride]
+#else
+ Vc[0]
+#endif
+ -= facel*qi*qi*Vc_sub_self;
+ }
+ }
+
+#ifdef LJ_EWALD_GEOM
{
- real qi;
+ int ia;
+
+ for (ia = 0; ia < UNROLLI; ia++)
+ {
+ real c6_i;
- qi = q[sci+ia];
+ c6_i = nbat->nbfp[nbat->type[sci+ia]*(nbat->ntype + 1)*2]/6;
#ifdef ENERGY_GROUPS
- vctp[ia][((egps_i>>(ia*egps_ishift)) & egps_imask)*egps_jstride]
+ vvdwtp[ia][((egps_i>>(ia*egps_ishift)) & egps_imask)*egps_jstride]
#else
- Vc[0]
+ Vvdw[0]
#endif
- -= facel*qi*qi*Vc_sub_self;
+ += 0.5*c6_i*lj_ewaldcoeff6_6;
+ }
}
+#endif /* LJ_EWALD */
}
#endif
nbfp3 = nbfp_ptr + type[sci+3]*nbat->ntype*nbfp_stride;
}
#endif
+#endif
+#ifdef LJ_EWALD_GEOM
+ /* We need the geometrically combined C6 for the PME grid correction */
+ gmx_load1p1_pr(&c6s_S0, ljc+sci2+0);
+ if (!half_LJ)
+ {
+ gmx_load1p1_pr(&c6s_S2, ljc+sci2+2);
+ }
#endif
/* Zero the potential energy for this list */
/* Add accumulated i-forces to the force array */
fix_S = gmx_mm_transpose_sum4h_pr(fix_S0, fix_S2);
- gmx_simd4_store_r(f+scix, gmx_add_pr4(fix_S, gmx_load_pr4(f+scix)));
+ gmx_simd4_store_r(f+scix, gmx_add_pr4(fix_S, gmx_simd4_load_r(f+scix)));
fiy_S = gmx_mm_transpose_sum4h_pr(fiy_S0, fiy_S2);
- gmx_simd4_store_r(f+sciy, gmx_add_pr4(fiy_S, gmx_load_pr4(f+sciy)));
+ gmx_simd4_store_r(f+sciy, gmx_add_pr4(fiy_S, gmx_simd4_load_r(f+sciy)));
fiz_S = gmx_mm_transpose_sum4h_pr(fiz_S0, fiz_S2);
- gmx_simd4_store_r(f+sciz, gmx_add_pr4(fiz_S, gmx_load_pr4(f+sciz)));
+ gmx_simd4_store_r(f+sciz, gmx_add_pr4(fiz_S, gmx_simd4_load_r(f+sciz)));
#ifdef CALC_SHIFTFORCES
fshift[ish3+0] += gmx_sum_simd4(fix_S, shf);
{
*Vc += gmx_sum_simd(vctot_S, tmpsum);
}
+
*Vvdw += gmx_sum_simd(Vvdwtot_S, tmpsum);
#endif
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_GEOM
/* Will not calculate energies */
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#define ENERGY_GROUPS
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_LB
/* Will not calculate energies */
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#define ENERGY_GROUPS
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_EWALD
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_EWALD
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_EWALD
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#define CALC_COUL_EWALD
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
+#define LJ_CUT
#define LJ_COMB_GEOM
/* Will not calculate energies */
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
+#define LJ_CUT
#define LJ_COMB_LB
/* Will not calculate energies */
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#define ENERGY_GROUPS
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_EWALD
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_EWALD
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_EWALD
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_EWALD
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_GEOM
/* Will not calculate energies */
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#define ENERGY_GROUPS
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_LB
/* Will not calculate energies */
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#define ENERGY_GROUPS
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_TAB
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_TAB
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_TAB
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#define CALC_COUL_TAB
#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
+#define LJ_CUT
#define LJ_COMB_GEOM
/* Will not calculate energies */
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
+#define LJ_CUT
#define LJ_COMB_LB
/* Will not calculate energies */
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#define ENERGY_GROUPS
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_TAB
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_TAB
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_TAB
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_TAB
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
+#define LJ_CUT
#define LJ_COMB_GEOM
/* Will not calculate energies */
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
+#define LJ_CUT
#define LJ_COMB_GEOM
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
+#define LJ_CUT
#define LJ_COMB_LB
/* Will not calculate energies */
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
+#define LJ_CUT
#define LJ_COMB_LB
#define CALC_ENERGIES
#define ENERGY_GROUPS
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_RF
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_RF
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_RF
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift,
+ real gmx_unused *Vvdw,
+ real gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t gmx_unused *nbl,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ rvec gmx_unused *shift_vec,
+ real gmx_unused *f,
+ real gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
#define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
#define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
/* Will not calculate energies */
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#ifdef GMX_NBNXN_SIMD_4XN
#include "nbnxn_kernel_simd_4xn.h"
#define CALC_COUL_RF
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
#define CALC_ENERGIES
#define ENERGY_GROUPS
/*! \brief Kinds of electrostatic treatments in SIMD Verlet kernels
*/
enum {
- coultRF, coultTAB, coultTAB_TWIN, coultEWALD, coultEWALD_TWIN, coultNR
+ coulktRF, coulktTAB, coulktTAB_TWIN, coulktEWALD, coulktEWALD_TWIN, coulktNR
+};
+
+/*! \brief Kinds of Van der Waals treatments in SIMD Verlet kernels
+ */
+enum {
+ vdwktLJCUT_COMBGEOM, vdwktLJCUT_COMBLB, vdwktLJCUT_COMBNONE, vdwktLJFORCESWITCH, vdwktLJPOTSWITCH, vdwktLJEWALDCOMBGEOM, vdwktNR
};
/* Declare and define the kernel function pointer lookup tables.
* The minor index of the array goes over both the LJ combination rules,
- * which is only supported by plain cut-off, and the LJ switch functions.
+ * which is only supported by plain cut-off, and the LJ switch/PME functions.
*/
-static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
+static p_nbk_func_noener p_nbk_noener[coulktNR][vdwktNR] =
{
{
nbnxn_kernel_ElecRF_VdwLJCombGeom_F_4xn,
nbnxn_kernel_ElecRF_VdwLJ_F_4xn,
nbnxn_kernel_ElecRF_VdwLJFSw_F_4xn,
nbnxn_kernel_ElecRF_VdwLJPSw_F_4xn,
+ nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_4xn,
},
{
nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_4xn,
nbnxn_kernel_ElecQSTab_VdwLJ_F_4xn,
nbnxn_kernel_ElecQSTab_VdwLJFSw_F_4xn,
nbnxn_kernel_ElecQSTab_VdwLJPSw_F_4xn,
+ nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xn,
},
{
nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_4xn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_4xn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_4xn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_4xn,
+ nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xn,
},
{
nbnxn_kernel_ElecEw_VdwLJCombGeom_F_4xn,
nbnxn_kernel_ElecEw_VdwLJ_F_4xn,
nbnxn_kernel_ElecEw_VdwLJFSw_F_4xn,
nbnxn_kernel_ElecEw_VdwLJPSw_F_4xn,
+ nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_4xn,
},
{
nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_4xn,
nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_4xn,
nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_4xn,
nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_4xn,
+ nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xn,
},
};
-static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
+static p_nbk_func_ener p_nbk_ener[coulktNR][vdwktNR] =
{
{
nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_4xn,
nbnxn_kernel_ElecRF_VdwLJ_VF_4xn,
nbnxn_kernel_ElecRF_VdwLJFSw_VF_4xn,
nbnxn_kernel_ElecRF_VdwLJPSw_VF_4xn,
+ nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_4xn,
},
{
nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_4xn,
nbnxn_kernel_ElecQSTab_VdwLJ_VF_4xn,
nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_4xn,
nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_4xn,
+ nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xn,
},
{
nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_4xn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_4xn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_4xn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_4xn,
+ nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xn,
},
{
nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_4xn,
nbnxn_kernel_ElecEw_VdwLJ_VF_4xn,
nbnxn_kernel_ElecEw_VdwLJFSw_VF_4xn,
nbnxn_kernel_ElecEw_VdwLJPSw_VF_4xn,
+ nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_4xn,
},
{
nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_4xn,
nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_4xn,
nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_4xn,
nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_4xn,
+ nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xn,
},
};
-static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
+static p_nbk_func_ener p_nbk_energrp[coulktNR][vdwktNR] =
{
{
nbnxn_kernel_ElecRF_VdwLJCombGeom_VgrpF_4xn,
nbnxn_kernel_ElecRF_VdwLJ_VgrpF_4xn,
nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_4xn,
nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_4xn,
+ nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xn,
},
{
nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_4xn,
nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_4xn,
nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_4xn,
nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_4xn,
+ nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xn,
},
{
nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_4xn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_4xn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_4xn,
nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_4xn,
+ nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xn,
},
{
nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_4xn,
nbnxn_kernel_ElecEw_VdwLJ_VgrpF_4xn,
nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_4xn,
nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_4xn,
+ nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xn,
},
{
nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_4xn,
nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_4xn,
nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_4xn,
nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_4xn,
+ nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xn,
},
};
{
int nnbl;
nbnxn_pairlist_t **nbl;
- int coult, ljtreatment = 0;
+ int coulkt, vdwkt = 0;
int nb;
nnbl = nbl_list->nnbl;
if (EEL_RF(ic->eeltype) || ic->eeltype == eelCUT)
{
- coult = coultRF;
+ coulkt = coulktRF;
}
else
{
{
if (ic->rcoulomb == ic->rvdw)
{
- coult = coultTAB;
+ coulkt = coulktTAB;
}
else
{
- coult = coultTAB_TWIN;
+ coulkt = coulktTAB_TWIN;
}
}
else
{
if (ic->rcoulomb == ic->rvdw)
{
- coult = coultEWALD;
+ coulkt = coulktEWALD;
}
else
{
- coult = coultEWALD_TWIN;
+ coulkt = coulktEWALD_TWIN;
}
}
}
- switch (ic->vdw_modifier)
+ if (ic->vdwtype == evdwCUT)
+ {
+ switch (ic->vdw_modifier)
+ {
+ case eintmodNONE:
+ case eintmodPOTSHIFT:
+ switch (nbat->comb_rule)
+ {
+ case ljcrGEOM: vdwkt = vdwktLJCUT_COMBGEOM; break;
+ case ljcrLB: vdwkt = vdwktLJCUT_COMBLB; break;
+ case ljcrNONE: vdwkt = vdwktLJCUT_COMBNONE; break;
+ default: gmx_incons("Unknown combination rule");
+ }
+ break;
+ case eintmodFORCESWITCH:
+ vdwkt = vdwktLJFORCESWITCH;
+ break;
+ case eintmodPOTSWITCH:
+ vdwkt = vdwktLJPOTSWITCH;
+ break;
+ default:
+ gmx_incons("Unsupported VdW interaction modifier");
+ }
+ }
+ else if (ic->vdwtype == evdwPME)
+ {
+ if (ic->ljpme_comb_rule == eljpmeLB)
+ {
+ gmx_incons("The nbnxn SIMD kernels don't suport LJ-PME with LB");
+ }
+ vdwkt = vdwktLJEWALDCOMBGEOM;
+ }
+ else
{
- case eintmodNONE:
- case eintmodPOTSHIFT:
- ljtreatment = nbat->comb_rule;
- break;
- /* Switch functions follow after cut-off combination rule kernels */
- case eintmodFORCESWITCH:
- ljtreatment = ljcrNR;
- break;
- case eintmodPOTSWITCH:
- ljtreatment = ljcrNR + 1;
- break;
- default:
- gmx_incons("Unsupported VdW interaction modifier");
+ gmx_incons("Unsupported VdW interaction type");
}
#pragma omp parallel for schedule(static) num_threads(gmx_omp_nthreads_get(emntNonbonded))
if (!(force_flags & GMX_FORCE_ENERGY))
{
/* Don't calculate energies */
- p_nbk_noener[coult][ljtreatment](nbl[nb], nbat,
- ic,
- shift_vec,
- out->f,
- fshift_p);
+ p_nbk_noener[coulkt][vdwkt](nbl[nb], nbat,
+ ic,
+ shift_vec,
+ out->f,
+ fshift_p);
}
else if (out->nV == 1)
{
out->Vvdw[0] = 0;
out->Vc[0] = 0;
- p_nbk_ener[coult][ljtreatment](nbl[nb], nbat,
- ic,
- shift_vec,
- out->f,
- fshift_p,
- out->Vvdw,
- out->Vc);
+ p_nbk_ener[coulkt][vdwkt](nbl[nb], nbat,
+ ic,
+ shift_vec,
+ out->f,
+ fshift_p,
+ out->Vvdw,
+ out->Vc);
}
else
{
out->VSc[i] = 0;
}
- p_nbk_energrp[coult][ljtreatment](nbl[nb], nbat,
- ic,
- shift_vec,
- out->f,
- fshift_p,
- out->VSvdw,
- out->VSc);
+ p_nbk_energrp[coulkt][vdwkt](nbl[nb], nbat,
+ ic,
+ shift_vec,
+ out->f,
+ fshift_p,
+ out->VSvdw,
+ out->VSc);
reduce_group_energies(nbat->nenergrp, nbat->neg_2log,
out->VSvdw, out->VSc,
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJ_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_4xn;
+nbk_func_ener nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJCombLB_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_4xn;
+nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_4xn;
+nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJ_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_4xn;
+nbk_func_ener nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_4xn;
+nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xn;
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJCombLB_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJ_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJFSw_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecRF_VdwLJPSw_VF_4xn;
+nbk_func_ener nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJCombLB_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJ_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_4xn;
+nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_4xn;
+nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJCombLB_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJ_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJFSw_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecEw_VdwLJPSw_VF_4xn;
+nbk_func_ener nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_4xn;
nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_4xn;
+nbk_func_ener nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xn;
nbk_func_noener nbnxn_kernel_ElecRF_VdwLJCombGeom_F_4xn;
nbk_func_noener nbnxn_kernel_ElecRF_VdwLJCombLB_F_4xn;
nbk_func_noener nbnxn_kernel_ElecRF_VdwLJ_F_4xn;
nbk_func_noener nbnxn_kernel_ElecRF_VdwLJFSw_F_4xn;
nbk_func_noener nbnxn_kernel_ElecRF_VdwLJPSw_F_4xn;
+nbk_func_noener nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_4xn;
nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_4xn;
nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_4xn;
nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJ_F_4xn;
nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJFSw_F_4xn;
nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJPSw_F_4xn;
+nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xn;
nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_4xn;
nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_4xn;
nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_4xn;
nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_4xn;
nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_4xn;
+nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xn;
nbk_func_noener nbnxn_kernel_ElecEw_VdwLJCombGeom_F_4xn;
nbk_func_noener nbnxn_kernel_ElecEw_VdwLJCombLB_F_4xn;
nbk_func_noener nbnxn_kernel_ElecEw_VdwLJ_F_4xn;
nbk_func_noener nbnxn_kernel_ElecEw_VdwLJFSw_F_4xn;
nbk_func_noener nbnxn_kernel_ElecEw_VdwLJPSw_F_4xn;
+nbk_func_noener nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_4xn;
nbk_func_noener nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_4xn;
nbk_func_noener nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_F_4xn;
nbk_func_noener nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_4xn;
nbk_func_noener nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_4xn;
nbk_func_noener nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_4xn;
+nbk_func_noener nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xn;
*/
-/* When calculating RF or Ewald interactions we calculate the electrostatic
+/* When calculating RF or Ewald interactions we calculate the electrostatic/LJ
* forces on excluded atom pairs here in the non-bonded loops.
* But when energies and/or virial is required we calculate them
* separately to as then it is easier to separate the energy and virial
* contributions.
*/
-#if defined CHECK_EXCLS && defined CALC_COULOMB
+#if defined CHECK_EXCLS && (defined CALC_COULOMB || defined LJ_EWALD_GEOM)
#define EXCL_FORCES
#endif
gmx_simd_real_t c6s_j_S, c12s_j_S;
#endif
-#if defined LJ_COMB_GEOM || defined LJ_COMB_LB
+#if defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined LJ_EWALD_GEOM
/* Index for loading LJ parameters, complicated when interleaving */
int aj2;
#endif
/* Atom indices (of the first atom in the cluster) */
aj = cj*UNROLLJ;
-#if defined CALC_LJ && (defined LJ_COMB_GEOM || defined LJ_COMB_LB)
+#if defined CALC_LJ && (defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined LJ_EWALD_GEOM)
#if UNROLLJ == STRIDE
aj2 = aj*2;
#else
#endif
#endif
-#ifndef LJ_FORCE_SWITCH
- /* We have plain LJ with simple C6/6 C12/12 coefficients */
+#if defined LJ_CUT || defined LJ_POT_SWITCH
+ /* We have plain LJ or LJ-PME with simple C6/6 C12/12 coefficients */
FrLJ6_S0 = gmx_simd_mul_r(c6_S0, rinvsix_S0);
FrLJ6_S1 = gmx_simd_mul_r(c6_S1, rinvsix_S1);
#ifndef HALF_LJ
frLJ_S3 = gmx_simd_sub_r(FrLJ12_S3, FrLJ6_S3);
#endif
-#if defined CALC_ENERGIES && !defined LJ_POT_SWITCH
-#ifndef LJ_FORCE_SWITCH
+#if (defined LJ_CUT || defined LJ_FORCE_SWITCH) && defined CALC_ENERGIES
+
+#ifdef LJ_CUT
/* Calculate the LJ energies, with constant potential shift */
VLJ6_S0 = gmx_simd_mul_r(sixth_S, gmx_simd_fmadd_r(c6_S0, p6_cpot_S, FrLJ6_S0));
VLJ6_S1 = gmx_simd_mul_r(sixth_S, gmx_simd_fmadd_r(c6_S1, p6_cpot_S, FrLJ6_S1));
VLJ12_S2 = gmx_simd_mul_r(twelveth_S, gmx_simd_fmadd_r(c12_S2, p12_cpot_S, FrLJ12_S2));
VLJ12_S3 = gmx_simd_mul_r(twelveth_S, gmx_simd_fmadd_r(c12_S3, p12_cpot_S, FrLJ12_S3));
#endif
-#else
+#endif /* LJ_CUT */
+#ifdef LJ_FORCE_SWITCH
#define v_fswitch_r(rsw, rsw2, c0, c3, c4) gmx_simd_fmadd_r(gmx_simd_fmadd_r(c4, rsw, c3), gmx_simd_mul_r(rsw2, rsw), c0)
VLJ6_S0 = gmx_simd_mul_r(c6_S0, gmx_simd_fmadd_r(sixth_S, rinvsix_S0, v_fswitch_r(rsw_S0, rsw2_S0, p6_6cpot_S, p6_vc3_S, p6_vc4_S)));
VLJ_S2 = gmx_simd_sub_r(VLJ12_S2, VLJ6_S2);
VLJ_S3 = gmx_simd_sub_r(VLJ12_S3, VLJ6_S3);
#endif
-#endif /* CALC_ENERGIES && !LJ_POT_SWITCH */
+
+#endif /* (LJ_CUT || LJ_FORCE_SWITCH) && CALC_ENERGIES */
#ifdef LJ_POT_SWITCH
/* We always need the potential, since it is needed for the force */
}
#endif /* LJ_POT_SWITCH */
+#if defined CALC_ENERGIES && defined CHECK_EXCLS
+ /* The potential shift should be removed for excluded pairs */
+ VLJ_S0 = gmx_simd_blendzero_r(VLJ_S0, interact_S0);
+ VLJ_S1 = gmx_simd_blendzero_r(VLJ_S1, interact_S1);
+#ifndef HALF_LJ
+ VLJ_S2 = gmx_simd_blendzero_r(VLJ_S2, interact_S2);
+ VLJ_S3 = gmx_simd_blendzero_r(VLJ_S3, interact_S3);
+#endif
+#endif
+
+#ifdef LJ_EWALD_GEOM
+ {
+ gmx_simd_real_t c6s_j_S;
+ gmx_simd_real_t c6grid_S0, rinvsix_nm_S0, cr2_S0, expmcr2_S0, poly_S0;
+ gmx_simd_real_t c6grid_S1, rinvsix_nm_S1, cr2_S1, expmcr2_S1, poly_S1;
+#ifndef HALF_LJ
+ gmx_simd_real_t c6grid_S2, rinvsix_nm_S2, cr2_S2, expmcr2_S2, poly_S2;
+ gmx_simd_real_t c6grid_S3, rinvsix_nm_S3, cr2_S3, expmcr2_S3, poly_S3;
+#endif
+#ifdef CALC_ENERGIES
+ gmx_simd_real_t sh_mask_S0;
+ gmx_simd_real_t sh_mask_S1;
+#ifndef HALF_LJ
+ gmx_simd_real_t sh_mask_S2;
+ gmx_simd_real_t sh_mask_S3;
+#endif
+#endif
+
+ /* Determine C6 for the grid using the geometric combination rule */
+ c6s_j_S = gmx_simd_load_r(ljc+aj2+0);
+ c6grid_S0 = gmx_simd_mul_r(c6s_S0, c6s_j_S);
+ c6grid_S1 = gmx_simd_mul_r(c6s_S1, c6s_j_S);
+#ifndef HALF_LJ
+ c6grid_S2 = gmx_simd_mul_r(c6s_S2, c6s_j_S);
+ c6grid_S3 = gmx_simd_mul_r(c6s_S3, c6s_j_S);
+#endif
+
+#ifdef CHECK_EXCLS
+ /* Recalculate rinvsix without exclusion mask (compiler might optimize) */
+ rinvsix_nm_S0 = gmx_simd_mul_r(rinvsq_S0, gmx_simd_mul_r(rinvsq_S0, rinvsq_S0));
+ rinvsix_nm_S1 = gmx_simd_mul_r(rinvsq_S1, gmx_simd_mul_r(rinvsq_S1, rinvsq_S1));
+#ifndef HALF_LJ
+ rinvsix_nm_S2 = gmx_simd_mul_r(rinvsq_S2, gmx_simd_mul_r(rinvsq_S2, rinvsq_S2));
+ rinvsix_nm_S3 = gmx_simd_mul_r(rinvsq_S3, gmx_simd_mul_r(rinvsq_S3, rinvsq_S3));
+#endif
+#else
+ /* We didn't use a mask, so we can copy */
+ rinvsix_nm_S0 = rinvsix_S0;
+ rinvsix_nm_S1 = rinvsix_S1;
+#ifndef HALF_LJ
+ rinvsix_nm_S2 = rinvsix_S2;
+ rinvsix_nm_S3 = rinvsix_S3;
+#endif
+#endif
+
+ cr2_S0 = gmx_simd_mul_r(lje_c2_S, rsq_S0);
+ cr2_S1 = gmx_simd_mul_r(lje_c2_S, rsq_S1);
+#ifndef HALF_LJ
+ cr2_S2 = gmx_simd_mul_r(lje_c2_S, rsq_S2);
+ cr2_S3 = gmx_simd_mul_r(lje_c2_S, rsq_S3);
+#endif
+ expmcr2_S0 = gmx_simd_exp_r(gmx_simd_mul_r(mone_S, cr2_S0));
+ expmcr2_S1 = gmx_simd_exp_r(gmx_simd_mul_r(mone_S, cr2_S1));
+#ifndef HALF_LJ
+ expmcr2_S2 = gmx_simd_exp_r(gmx_simd_mul_r(mone_S, cr2_S2));
+ expmcr2_S3 = gmx_simd_exp_r(gmx_simd_mul_r(mone_S, cr2_S3));
+#endif
+
+ /* 1 + cr2 + 1/2*cr2^2 */
+ poly_S0 = gmx_simd_fmadd_r(gmx_simd_fmadd_r(half_S, cr2_S0, one_S), cr2_S0, one_S);
+ poly_S1 = gmx_simd_fmadd_r(gmx_simd_fmadd_r(half_S, cr2_S1, one_S), cr2_S1, one_S);
+#ifndef HALF_LJ
+ poly_S2 = gmx_simd_fmadd_r(gmx_simd_fmadd_r(half_S, cr2_S2, one_S), cr2_S2, one_S);
+ poly_S3 = gmx_simd_fmadd_r(gmx_simd_fmadd_r(half_S, cr2_S3, one_S), cr2_S3, one_S);
+#endif
+
+ /* We calculate LJ F*r = (6*C6)*(r^-6 - F_mesh/6), we use:
+ * r^-6*cexp*(1 + cr2 + cr2^2/2 + cr2^3/6) = cexp*(r^-6*poly + c^6/6)
+ */
+ frLJ_S0 = gmx_simd_fmadd_r(c6grid_S0, gmx_simd_fnmadd_r(expmcr2_S0, gmx_simd_fmadd_r(rinvsix_nm_S0, poly_S0, lje_c6_6_S), rinvsix_nm_S0), frLJ_S0);
+ frLJ_S1 = gmx_simd_fmadd_r(c6grid_S1, gmx_simd_fnmadd_r(expmcr2_S1, gmx_simd_fmadd_r(rinvsix_nm_S1, poly_S1, lje_c6_6_S), rinvsix_nm_S1), frLJ_S1);
+#ifndef HALF_LJ
+ frLJ_S2 = gmx_simd_fmadd_r(c6grid_S2, gmx_simd_fnmadd_r(expmcr2_S2, gmx_simd_fmadd_r(rinvsix_nm_S2, poly_S2, lje_c6_6_S), rinvsix_nm_S2), frLJ_S2);
+ frLJ_S3 = gmx_simd_fmadd_r(c6grid_S3, gmx_simd_fnmadd_r(expmcr2_S3, gmx_simd_fmadd_r(rinvsix_nm_S3, poly_S3, lje_c6_6_S), rinvsix_nm_S3), frLJ_S3);
+#endif
+
+#ifdef CALC_ENERGIES
+#ifdef CHECK_EXCLS
+ sh_mask_S0 = gmx_simd_blendzero_r(lje_vc_S, interact_S0);
+ sh_mask_S1 = gmx_simd_blendzero_r(lje_vc_S, interact_S1);
+#ifndef HALF_LJ
+ sh_mask_S2 = gmx_simd_blendzero_r(lje_vc_S, interact_S2);
+ sh_mask_S3 = gmx_simd_blendzero_r(lje_vc_S, interact_S3);
+#endif
+#else
+ sh_mask_S0 = lje_vc_S;
+ sh_mask_S1 = lje_vc_S;
+#ifndef HALF_LJ
+ sh_mask_S2 = lje_vc_S;
+ sh_mask_S3 = lje_vc_S;
+#endif
+#endif
+
+ VLJ_S0 = gmx_simd_fmadd_r(gmx_simd_mul_r(sixth_S, c6grid_S0), gmx_simd_fmadd_r(rinvsix_nm_S0, gmx_simd_fnmadd_r(expmcr2_S0, poly_S0, one_S), sh_mask_S0), VLJ_S0);
+ VLJ_S1 = gmx_simd_fmadd_r(gmx_simd_mul_r(sixth_S, c6grid_S1), gmx_simd_fmadd_r(rinvsix_nm_S1, gmx_simd_fnmadd_r(expmcr2_S1, poly_S1, one_S), sh_mask_S1), VLJ_S1);
+#ifndef HALF_LJ
+ VLJ_S2 = gmx_simd_fmadd_r(gmx_simd_mul_r(sixth_S, c6grid_S2), gmx_simd_fmadd_r(rinvsix_nm_S2, gmx_simd_fnmadd_r(expmcr2_S2, poly_S2, one_S), sh_mask_S2), VLJ_S2);
+ VLJ_S3 = gmx_simd_fmadd_r(gmx_simd_mul_r(sixth_S, c6grid_S3), gmx_simd_fmadd_r(rinvsix_nm_S3, gmx_simd_fnmadd_r(expmcr2_S3, poly_S3, one_S), sh_mask_S3), VLJ_S3);
+#endif
+#endif /* CALC_ENERGIES */
+ }
+#endif /* LJ_EWALD_GEOM */
+
#if defined VDW_CUTOFF_CHECK
/* frLJ is multiplied later by rinvsq, which is masked for the Coulomb
* cut-off, but if the VdW cut-off is shorter, we need to mask with that.
#endif
#endif
-#if defined CALC_ENERGIES && defined CHECK_EXCLS
- /* The potential shift should be removed for excluded pairs */
- VLJ_S0 = gmx_simd_blendzero_r(VLJ_S0, interact_S0);
- VLJ_S1 = gmx_simd_blendzero_r(VLJ_S1, interact_S1);
-#ifndef HALF_LJ
- VLJ_S2 = gmx_simd_blendzero_r(VLJ_S2, interact_S2);
- VLJ_S3 = gmx_simd_blendzero_r(VLJ_S3, interact_S3);
-#endif
-#endif
-
-
#endif /* CALC_LJ */
#ifdef CALC_ENERGIES
real *nbfp_ptr;
int n, ci, ci_sh;
int ish, ish3;
- gmx_bool do_LJ, half_LJ, do_coul;
+ gmx_bool do_LJ, half_LJ, do_coul, do_self;
int sci, scix, sciy, sciz, sci2;
int cjind0, cjind1, cjind;
int ip, jp;
gmx_simd_real_t sh_ewald_S;
#endif
+#if defined LJ_CUT && defined CALC_ENERGIES
+ gmx_simd_real_t p6_cpot_S, p12_cpot_S;
+#endif
#ifdef LJ_POT_SWITCH
gmx_simd_real_t rswitch_S;
gmx_simd_real_t swV3_S, swV4_S, swV5_S;
gmx_simd_real_t swF2_S, swF3_S, swF4_S;
-#else
+#endif
#ifdef LJ_FORCE_SWITCH
gmx_simd_real_t rswitch_S;
gmx_simd_real_t p6_fc2_S, p6_fc3_S;
gmx_simd_real_t p12_vc3_S, p12_vc4_S;
gmx_simd_real_t p6_6cpot_S, p12_12cpot_S;
#endif
-#else
-#ifdef CALC_ENERGIES
- gmx_simd_real_t p6_cpot_S, p12_cpot_S;
-#endif
#endif
+#ifdef LJ_EWALD_GEOM
+ real lj_ewaldcoeff2, lj_ewaldcoeff6_6;
+ gmx_simd_real_t mone_S, half_S, lje_c2_S, lje_c6_6_S, lje_vc_S;
#endif
#ifdef LJ_COMB_LB
gmx_simd_real_t c6_S3, c12_S3;
#endif
-#ifdef LJ_COMB_GEOM
+#if defined LJ_COMB_GEOM || defined LJ_EWALD_GEOM
const real *ljc;
gmx_simd_real_t c6s_S0, c12s_S0;
int npair = 0;
#endif
-#if defined LJ_COMB_GEOM || defined LJ_COMB_LB
+#if defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined LJ_EWALD_GEOM
ljc = nbat->lj_comb;
-#else
+#endif
+#if !(defined LJ_COMB_GEOM || defined LJ_COMB_LB)
/* No combination rule used */
nbfp_ptr = (4 == nbfp_stride) ? nbat->nbfp_s4 : nbat->nbfp;
#endif
twelveth_S = gmx_simd_set1_r(1.0/12.0);
#endif
+#if defined LJ_CUT && defined CALC_ENERGIES
+ /* We shift the potential by cpot, which can be zero */
+ p6_cpot_S = gmx_simd_set1_r(ic->dispersion_shift.cpot);
+ p12_cpot_S = gmx_simd_set1_r(ic->repulsion_shift.cpot);
+#endif
#ifdef LJ_POT_SWITCH
rswitch_S = gmx_simd_set1_r(ic->rvdw_switch);
swV3_S = gmx_simd_set1_r(ic->vdw_switch.c3);
swF2_S = gmx_simd_set1_r(3*ic->vdw_switch.c3);
swF3_S = gmx_simd_set1_r(4*ic->vdw_switch.c4);
swF4_S = gmx_simd_set1_r(5*ic->vdw_switch.c5);
-#else
- sixth_S = gmx_simd_set1_r(1.0/6.0);
- twelveth_S = gmx_simd_set1_r(1.0/12.0);
+#endif
#ifdef LJ_FORCE_SWITCH
rswitch_S = gmx_simd_set1_r(ic->rvdw_switch);
p6_fc2_S = gmx_simd_set1_r(ic->dispersion_shift.c2);
p12_12cpot_S = gmx_simd_set1_r(ic->repulsion_shift.cpot/12);
}
#endif
-#else
- /* Plain LJ cut-off, with potential shift cpot, which can be 0 */
-#ifdef CALC_ENERGIES
- p6_cpot_S = gmx_simd_set1_r(ic->dispersion_shift.cpot);
- p12_cpot_S = gmx_simd_set1_r(ic->repulsion_shift.cpot);
#endif
+#ifdef LJ_EWALD_GEOM
+ mone_S = gmx_simd_set1_r(-1.0);
+ half_S = gmx_simd_set1_r(0.5);
+ lj_ewaldcoeff2 = ic->ewaldcoeff_lj*ic->ewaldcoeff_lj;
+ lj_ewaldcoeff6_6 = lj_ewaldcoeff2*lj_ewaldcoeff2*lj_ewaldcoeff2/6;
+ lje_c2_S = gmx_simd_set1_r(lj_ewaldcoeff2);
+ lje_c6_6_S = gmx_simd_set1_r(lj_ewaldcoeff6_6);
+ /* Determine the grid potential at the cut-off */
+ lje_vc_S = gmx_simd_set1_r(ic->sh_lj_ewald);
#endif
-#endif /* LJ_POT_SWITCH */
/* The kernel either supports rcoulomb = rvdw or rcoulomb >= rvdw */
rc2_S = gmx_simd_set1_r(ic->rcoulomb*ic->rcoulomb);
do_LJ = (nbln->shift & NBNXN_CI_DO_LJ(0));
do_coul = (nbln->shift & NBNXN_CI_DO_COUL(0));
half_LJ = ((nbln->shift & NBNXN_CI_HALF_LJ(0)) || !do_LJ) && do_coul;
+#ifdef LJ_EWALD_GEOM
+ do_self = TRUE;
+#else
+ do_self = do_coul;
+#endif
#ifdef ENERGY_GROUPS
egps_i = nbat->energrp[ci];
}
}
#endif
-#if defined CALC_ENERGIES
+
+#ifdef CALC_ENERGIES
#if UNROLLJ == 4
- if (do_coul && l_cj[nbln->cj_ind_start].cj == ci_sh)
+ if (do_self && l_cj[nbln->cj_ind_start].cj == ci_sh)
#endif
#if UNROLLJ == 2
- if (do_coul && l_cj[nbln->cj_ind_start].cj == (ci_sh<<1))
+ if (do_self && l_cj[nbln->cj_ind_start].cj == (ci_sh<<1))
#endif
#if UNROLLJ == 8
- if (do_coul && l_cj[nbln->cj_ind_start].cj == (ci_sh>>1))
+ if (do_self && l_cj[nbln->cj_ind_start].cj == (ci_sh>>1))
#endif
{
- int ia;
- real Vc_sub_self;
+ if (do_coul)
+ {
+ real Vc_sub_self;
+ int ia;
#ifdef CALC_COUL_RF
- Vc_sub_self = 0.5*ic->c_rf;
+ Vc_sub_self = 0.5*ic->c_rf;
#endif
#ifdef CALC_COUL_TAB
#ifdef TAB_FDV0
- Vc_sub_self = 0.5*tab_coul_F[2];
+ Vc_sub_self = 0.5*tab_coul_F[2];
#else
- Vc_sub_self = 0.5*tab_coul_V[0];
+ Vc_sub_self = 0.5*tab_coul_V[0];
#endif
#endif
#ifdef CALC_COUL_EWALD
- /* beta/sqrt(pi) */
- Vc_sub_self = 0.5*ic->ewaldcoeff_q*M_2_SQRTPI;
+ /* beta/sqrt(pi) */
+ Vc_sub_self = 0.5*ic->ewaldcoeff_q*M_2_SQRTPI;
#endif
- for (ia = 0; ia < UNROLLI; ia++)
+ for (ia = 0; ia < UNROLLI; ia++)
+ {
+ real qi;
+
+ qi = q[sci+ia];
+#ifdef ENERGY_GROUPS
+ vctp[ia][((egps_i>>(ia*egps_ishift)) & egps_imask)*egps_jstride]
+#else
+ Vc[0]
+#endif
+ -= facel*qi*qi*Vc_sub_self;
+ }
+ }
+
+#ifdef LJ_EWALD_GEOM
{
- real qi;
+ int ia;
+
+ for (ia = 0; ia < UNROLLI; ia++)
+ {
+ real c6_i;
- qi = q[sci+ia];
+ c6_i = nbat->nbfp[nbat->type[sci+ia]*(nbat->ntype + 1)*2]/6;
#ifdef ENERGY_GROUPS
- vctp[ia][((egps_i>>(ia*egps_ishift)) & egps_imask)*egps_jstride]
+ vvdwtp[ia][((egps_i>>(ia*egps_ishift)) & egps_imask)*egps_jstride]
#else
- Vc[0]
+ Vvdw[0]
#endif
- -= facel*qi*qi*Vc_sub_self;
+ += 0.5*c6_i*lj_ewaldcoeff6_6;
+ }
}
+#endif /* LJ_EWALD_GEOM */
}
#endif
nbfp3 = nbfp_ptr + type[sci+3]*nbat->ntype*nbfp_stride;
}
#endif
+#endif
+#ifdef LJ_EWALD_GEOM
+ /* We need the geometrically combined C6 for the PME grid correction */
+ c6s_S0 = gmx_simd_load1_r(ljc+sci2+0);
+ c6s_S1 = gmx_simd_load1_r(ljc+sci2+1);
+ if (!half_LJ)
+ {
+ c6s_S2 = gmx_simd_load1_r(ljc+sci2+2);
+ c6s_S3 = gmx_simd_load1_r(ljc+sci2+3);
+ }
#endif
/* Zero the potential energy for this list */
/* Add accumulated i-forces to the force array */
#if UNROLLJ >= 4
fix_S = gmx_mm_transpose_sum4_pr(fix_S0, fix_S1, fix_S2, fix_S3);
- gmx_simd4_store_r(f+scix, gmx_add_pr4(fix_S, gmx_load_pr4(f+scix)));
+ gmx_simd4_store_r(f+scix, gmx_simd4_add_r(fix_S, gmx_simd4_load_r(f+scix)));
fiy_S = gmx_mm_transpose_sum4_pr(fiy_S0, fiy_S1, fiy_S2, fiy_S3);
- gmx_simd4_store_r(f+sciy, gmx_add_pr4(fiy_S, gmx_load_pr4(f+sciy)));
+ gmx_simd4_store_r(f+sciy, gmx_simd4_add_r(fiy_S, gmx_simd4_load_r(f+sciy)));
fiz_S = gmx_mm_transpose_sum4_pr(fiz_S0, fiz_S1, fiz_S2, fiz_S3);
- gmx_simd4_store_r(f+sciz, gmx_add_pr4(fiz_S, gmx_load_pr4(f+sciz)));
+ gmx_simd4_store_r(f+sciz, gmx_simd4_add_r(fiz_S, gmx_simd4_load_r(f+sciz)));
#ifdef CALC_SHIFTFORCES
fshift[ish3+0] += gmx_sum_simd4(fix_S, shf);
if (ic->vdw_modifier == eintmodFORCESWITCH)
{
/* We add up the switch cost separately */
- inc_nrnb(nrnb, eNR_NBNXN_LJ_FSW+((flags & GMX_FORCE_ENERGY) ? 1 : 0),
+ inc_nrnb(nrnb, eNR_NBNXN_ADD_LJ_FSW+((flags & GMX_FORCE_ENERGY) ? 1 : 0),
nbvg->nbl_lists.natpair_ljq + nbvg->nbl_lists.natpair_lj);
}
if (ic->vdw_modifier == eintmodPOTSWITCH)
{
/* We add up the switch cost separately */
- inc_nrnb(nrnb, eNR_NBNXN_LJ_PSW+((flags & GMX_FORCE_ENERGY) ? 1 : 0),
+ inc_nrnb(nrnb, eNR_NBNXN_ADD_LJ_PSW+((flags & GMX_FORCE_ENERGY) ? 1 : 0),
+ nbvg->nbl_lists.natpair_ljq + nbvg->nbl_lists.natpair_lj);
+ }
+ if (ic->vdwtype == evdwPME)
+ {
+ /* We add up the LJ Ewald cost separately */
+ inc_nrnb(nrnb, eNR_NBNXN_ADD_LJ_EWALD+((flags & GMX_FORCE_ENERGY) ? 1 : 0),
nbvg->nbl_lists.natpair_ljq + nbvg->nbl_lists.natpair_lj);
}
}
virs[0] += 8.0*M_PI/rc3;
virs[1] += -16.0*M_PI/(3.0*rc9);
}
- else if (EVDW_PME(fr->vdwtype))
- {
- scale = fr->nblists[0].table_vdw.scale;
- vdwtab = fr->nblists[0].table_vdw.data;
-
- ri0 = floor(fr->rvdw_switch*scale);
- ri1 = ceil(fr->rvdw*scale);
- r0 = ri0/scale;
- r1 = ri1/scale;
- rc3 = r0*r0*r0;
- rc9 = rc3*rc3*rc3;
-
- /* Calculate self-interaction coefficient (assuming that
- * the reciprocal-space contribution is constant in the
- * region that contributes to the self-interaction).
- */
- fr->enershiftsix = pow(fr->ewaldcoeff_lj, 6) / 6.0;
-
- /* Add analytical corrections, C6 for the whole range, C12
- * from rvdw_switch to infinity.
- */
-
- eners[0] += -pow(sqrt(M_PI)*fr->ewaldcoeff_lj, 3)/3.0;
- eners[1] += 4.0*M_PI/(9.0*rc9);
- virs[0] += pow(sqrt(M_PI)*fr->ewaldcoeff_lj, 3);
- virs[1] += -16.0*M_PI/(3.0*rc9);
- }
- else if ((fr->vdwtype == evdwCUT) || (fr->vdwtype == evdwUSER))
+ else if (fr->vdwtype == evdwCUT ||
+ EVDW_PME(fr->vdwtype) ||
+ fr->vdwtype == evdwUSER)
{
if (fr->vdwtype == evdwUSER && fplog)
{
fprintf(fplog,
"WARNING: using dispersion correction with user tables\n");
}
+
+ /* Note that with LJ-PME, the dispersion correction is multiplied
+ * by the difference between the actual C6 and the value of C6
+ * that would produce the combination rule.
+ * This means the normal energy and virial difference formulas
+ * can be used here.
+ */
+
rc3 = fr->rvdw*fr->rvdw*fr->rvdw;
rc9 = rc3*rc3*rc3;
/* Contribution beyond the cut-off */
"Dispersion correction is not implemented for vdw-type = %s",
evdw_names[fr->vdwtype]);
}
+
+ /* TODO: remove this code once we have group LJ-PME kernels
+ * that calculate the exact, full LJ param C6/r^6 within the cut-off,
+ * as the current nbnxn kernels do.
+ */
+ if (fr->vdwtype == evdwPME && fr->cutoff_scheme == ecutsGROUP)
+ {
+ /* Calculate self-interaction coefficient (assuming that
+ * the reciprocal-space contribution is constant in the
+ * region that contributes to the self-interaction).
+ */
+ fr->enershiftsix = pow(fr->ewaldcoeff_lj, 6) / 6.0;
+
+ eners[0] += -pow(sqrt(M_PI)*fr->ewaldcoeff_lj, 3)/3.0;
+ virs[0] += pow(sqrt(M_PI)*fr->ewaldcoeff_lj, 3);
+ }
+
fr->enerdiffsix = eners[0];
fr->enerdifftwelve = eners[1];
/* The 0.5 is due to the Gromacs definition of the virial */
if (!b14only && fr->vdw_modifier != eintmodNONE)
{
- if (fr->vdwtype != evdwCUT)
+ if (fr->vdw_modifier != eintmodPOTSHIFT &&
+ fr->vdwtype != evdwCUT)
{
- gmx_incons("Potential modifiers only implemented for LJ cut-off");
+ gmx_incons("Potential modifiers other than potential-shift are only implemented for LJ cut-off");
}
switch (fr->vdw_modifier)
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
ic->rlistlong = set->rlistlong;
ir->nstcalclr = set->nstcalclr;
ic->ewaldcoeff_q = set->ewaldcoeff_q;
+ if (ic->coulomb_modifier == eintmodPOTSHIFT)
+ {
+ ic->sh_ewald = gmx_erfc(ic->ewaldcoeff_q*ic->rcoulomb);
+ }
bUsesSimpleTables = uses_simple_tables(ir->cutoff_scheme, nbv, 0);
if (pme_lb->cutoff_scheme == ecutsVERLET &&
bUseGPU = (hwinfo->gpu_info.ncuda_dev_compatible > 0 ||
getenv("GMX_EMULATE_GPU") != NULL);
- if (bUseGPU && (inputrec->vdw_modifier == eintmodFORCESWITCH ||
- inputrec->vdw_modifier == eintmodPOTSWITCH))
+ /* TODO add GPU kernels for this and replace this check by:
+ * (bUseGPU && (ir->vdwtype == evdwPME &&
+ * ir->ljpme_combination_rule == eljpmeLB))
+ * update the message text and the content of nbnxn_acceleration_supported.
+ */
+ if (bUseGPU &&
+ !nbnxn_acceleration_supported(fplog, cr, inputrec, bUseGPU))
{
- md_print_warn(cr, fplog, "LJ switch functions are not yet supported on the GPU, falling back to CPU-only");
+ /* Fallback message printed by nbnxn_acceleration_supported */
+ if (bForceUseGPU)
+ {
+ gmx_fatal(FARGS, "GPU acceleration requested, but not supported with the given input settings");
+ }
bUseGPU = FALSE;
}