2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
5 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6 * and including many others, as listed in the AUTHORS file in the
7 * top-level source directory and at http://www.gromacs.org.
9 * GROMACS is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1
12 * of the License, or (at your option) any later version.
14 * GROMACS is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with GROMACS; if not, see
21 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 * If you want to redistribute modifications to GROMACS, please
25 * consider that scientific software is very special. Version
26 * control is crucial - bugs must be traceable. We will be happy to
27 * consider code for inclusion in the official distribution, but
28 * derived work must not be called official GROMACS. Details are found
29 * in the README & COPYING files - if they are missing, get the
30 * official version at http://www.gromacs.org.
32 * To help us fund GROMACS development, we humbly ask that you cite
33 * the research papers on the package. Check out http://www.gromacs.org.
36 * Note: this file was generated by the GROMACS c kernel generator.
42 #include "../nb_kernel.h"
43 #include "types/simple.h"
44 #include "gromacs/math/vec.h"
48 * Gromacs nonbonded kernel: nb_kernel_ElecEw_VdwLJEw_GeomW4P1_VF_c
49 * Electrostatics interaction: Ewald
50 * VdW interaction: LJEwald
51 * Geometry: Water4-Particle
52 * Calculate force/pot: PotentialAndForce
55 nb_kernel_ElecEw_VdwLJEw_GeomW4P1_VF_c
56 (t_nblist * gmx_restrict nlist,
57 rvec * gmx_restrict xx,
58 rvec * gmx_restrict ff,
59 t_forcerec * gmx_restrict fr,
60 t_mdatoms * gmx_restrict mdatoms,
61 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
62 t_nrnb * gmx_restrict nrnb)
64 int i_shift_offset,i_coord_offset,j_coord_offset;
65 int j_index_start,j_index_end;
66 int nri,inr,ggid,iidx,jidx,jnr,outeriter,inneriter;
67 real shX,shY,shZ,tx,ty,tz,fscal,rcutoff,rcutoff2;
68 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
69 real *shiftvec,*fshift,*x,*f;
71 real ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
73 real ix1,iy1,iz1,fix1,fiy1,fiz1,iq1,isai1;
75 real ix2,iy2,iz2,fix2,fiy2,fiz2,iq2,isai2;
77 real ix3,iy3,iz3,fix3,fiy3,fiz3,iq3,isai3;
79 real jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
80 real dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00,cexp1_00,cexp2_00;
81 real dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10,cexp1_10,cexp2_10;
82 real dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20,cexp1_20,cexp2_20;
83 real dx30,dy30,dz30,rsq30,rinv30,rinvsq30,r30,qq30,c6_30,c12_30,cexp1_30,cexp2_30;
84 real velec,felec,velecsum,facel,crf,krf,krf2;
87 real rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,br,vvdwexp,sh_vdw_invrcut6;
94 real ewclj,ewclj2,ewclj6,ewcljrsq,poly,exponent,sh_lj_ewald;
97 real ewtabscale,eweps,sh_ewald,ewrt,ewtabhalfspace;
105 jindex = nlist->jindex;
107 shiftidx = nlist->shift;
109 shiftvec = fr->shift_vec[0];
110 fshift = fr->fshift[0];
112 charge = mdatoms->chargeA;
113 nvdwtype = fr->ntype;
115 vdwtype = mdatoms->typeA;
116 vdwgridparam = fr->ljpme_c6grid;
117 ewclj = fr->ewaldcoeff_lj;
118 sh_lj_ewald = fr->ic->sh_lj_ewald;
119 ewclj2 = ewclj*ewclj;
120 ewclj6 = ewclj2*ewclj2*ewclj2;
122 sh_ewald = fr->ic->sh_ewald;
123 ewtab = fr->ic->tabq_coul_FDV0;
124 ewtabscale = fr->ic->tabq_scale;
125 ewtabhalfspace = 0.5/ewtabscale;
127 /* Setup water-specific parameters */
128 inr = nlist->iinr[0];
129 iq1 = facel*charge[inr+1];
130 iq2 = facel*charge[inr+2];
131 iq3 = facel*charge[inr+3];
132 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
137 /* Start outer loop over neighborlists */
138 for(iidx=0; iidx<nri; iidx++)
140 /* Load shift vector for this list */
141 i_shift_offset = DIM*shiftidx[iidx];
142 shX = shiftvec[i_shift_offset+XX];
143 shY = shiftvec[i_shift_offset+YY];
144 shZ = shiftvec[i_shift_offset+ZZ];
146 /* Load limits for loop over neighbors */
147 j_index_start = jindex[iidx];
148 j_index_end = jindex[iidx+1];
150 /* Get outer coordinate index */
152 i_coord_offset = DIM*inr;
154 /* Load i particle coords and add shift vector */
155 ix0 = shX + x[i_coord_offset+DIM*0+XX];
156 iy0 = shY + x[i_coord_offset+DIM*0+YY];
157 iz0 = shZ + x[i_coord_offset+DIM*0+ZZ];
158 ix1 = shX + x[i_coord_offset+DIM*1+XX];
159 iy1 = shY + x[i_coord_offset+DIM*1+YY];
160 iz1 = shZ + x[i_coord_offset+DIM*1+ZZ];
161 ix2 = shX + x[i_coord_offset+DIM*2+XX];
162 iy2 = shY + x[i_coord_offset+DIM*2+YY];
163 iz2 = shZ + x[i_coord_offset+DIM*2+ZZ];
164 ix3 = shX + x[i_coord_offset+DIM*3+XX];
165 iy3 = shY + x[i_coord_offset+DIM*3+YY];
166 iz3 = shZ + x[i_coord_offset+DIM*3+ZZ];
181 /* Reset potential sums */
185 /* Start inner kernel loop */
186 for(jidx=j_index_start; jidx<j_index_end; jidx++)
188 /* Get j neighbor index, and coordinate index */
190 j_coord_offset = DIM*jnr;
192 /* load j atom coordinates */
193 jx0 = x[j_coord_offset+DIM*0+XX];
194 jy0 = x[j_coord_offset+DIM*0+YY];
195 jz0 = x[j_coord_offset+DIM*0+ZZ];
197 /* Calculate displacement vector */
211 /* Calculate squared distance and things based on it */
212 rsq00 = dx00*dx00+dy00*dy00+dz00*dz00;
213 rsq10 = dx10*dx10+dy10*dy10+dz10*dz10;
214 rsq20 = dx20*dx20+dy20*dy20+dz20*dz20;
215 rsq30 = dx30*dx30+dy30*dy30+dz30*dz30;
217 rinv00 = gmx_invsqrt(rsq00);
218 rinv10 = gmx_invsqrt(rsq10);
219 rinv20 = gmx_invsqrt(rsq20);
220 rinv30 = gmx_invsqrt(rsq30);
222 rinvsq00 = rinv00*rinv00;
223 rinvsq10 = rinv10*rinv10;
224 rinvsq20 = rinv20*rinv20;
225 rinvsq30 = rinv30*rinv30;
227 /* Load parameters for j particles */
229 vdwjidx0 = 2*vdwtype[jnr+0];
231 /**************************
232 * CALCULATE INTERACTIONS *
233 **************************/
237 c6_00 = vdwparam[vdwioffset0+vdwjidx0];
238 c12_00 = vdwparam[vdwioffset0+vdwjidx0+1];
239 c6grid_00 = vdwgridparam[vdwioffset0+vdwjidx0];
241 rinvsix = rinvsq00*rinvsq00*rinvsq00;
242 ewcljrsq = ewclj2*rsq00;
243 exponent = exp(-ewcljrsq);
244 poly = exponent*(1.0 + ewcljrsq + ewcljrsq*ewcljrsq*0.5);
245 vvdw6 = (c6_00-c6grid_00*(1.0-poly))*rinvsix;
246 vvdw12 = c12_00*rinvsix*rinvsix;
247 vvdw = vvdw12*(1.0/12.0) - vvdw6*(1.0/6.0);
248 fvdw = (vvdw12 - vvdw6 - c6grid_00*(1.0/6.0)*exponent*ewclj6)*rinvsq00;
250 /* Update potential sums from outer loop */
255 /* Calculate temporary vectorial force */
260 /* Update vectorial force */
264 f[j_coord_offset+DIM*0+XX] -= tx;
265 f[j_coord_offset+DIM*0+YY] -= ty;
266 f[j_coord_offset+DIM*0+ZZ] -= tz;
268 /**************************
269 * CALCULATE INTERACTIONS *
270 **************************/
276 /* EWALD ELECTROSTATICS */
278 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
279 ewrt = r10*ewtabscale;
283 felec = ewtab[ewitab]+eweps*ewtab[ewitab+1];
284 velec = qq10*(rinv10-(ewtab[ewitab+2]-ewtabhalfspace*eweps*(ewtab[ewitab]+felec)));
285 felec = qq10*rinv10*(rinvsq10-felec);
287 /* Update potential sums from outer loop */
292 /* Calculate temporary vectorial force */
297 /* Update vectorial force */
301 f[j_coord_offset+DIM*0+XX] -= tx;
302 f[j_coord_offset+DIM*0+YY] -= ty;
303 f[j_coord_offset+DIM*0+ZZ] -= tz;
305 /**************************
306 * CALCULATE INTERACTIONS *
307 **************************/
313 /* EWALD ELECTROSTATICS */
315 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
316 ewrt = r20*ewtabscale;
320 felec = ewtab[ewitab]+eweps*ewtab[ewitab+1];
321 velec = qq20*(rinv20-(ewtab[ewitab+2]-ewtabhalfspace*eweps*(ewtab[ewitab]+felec)));
322 felec = qq20*rinv20*(rinvsq20-felec);
324 /* Update potential sums from outer loop */
329 /* Calculate temporary vectorial force */
334 /* Update vectorial force */
338 f[j_coord_offset+DIM*0+XX] -= tx;
339 f[j_coord_offset+DIM*0+YY] -= ty;
340 f[j_coord_offset+DIM*0+ZZ] -= tz;
342 /**************************
343 * CALCULATE INTERACTIONS *
344 **************************/
350 /* EWALD ELECTROSTATICS */
352 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
353 ewrt = r30*ewtabscale;
357 felec = ewtab[ewitab]+eweps*ewtab[ewitab+1];
358 velec = qq30*(rinv30-(ewtab[ewitab+2]-ewtabhalfspace*eweps*(ewtab[ewitab]+felec)));
359 felec = qq30*rinv30*(rinvsq30-felec);
361 /* Update potential sums from outer loop */
366 /* Calculate temporary vectorial force */
371 /* Update vectorial force */
375 f[j_coord_offset+DIM*0+XX] -= tx;
376 f[j_coord_offset+DIM*0+YY] -= ty;
377 f[j_coord_offset+DIM*0+ZZ] -= tz;
379 /* Inner loop uses 172 flops */
381 /* End of innermost loop */
384 f[i_coord_offset+DIM*0+XX] += fix0;
385 f[i_coord_offset+DIM*0+YY] += fiy0;
386 f[i_coord_offset+DIM*0+ZZ] += fiz0;
390 f[i_coord_offset+DIM*1+XX] += fix1;
391 f[i_coord_offset+DIM*1+YY] += fiy1;
392 f[i_coord_offset+DIM*1+ZZ] += fiz1;
396 f[i_coord_offset+DIM*2+XX] += fix2;
397 f[i_coord_offset+DIM*2+YY] += fiy2;
398 f[i_coord_offset+DIM*2+ZZ] += fiz2;
402 f[i_coord_offset+DIM*3+XX] += fix3;
403 f[i_coord_offset+DIM*3+YY] += fiy3;
404 f[i_coord_offset+DIM*3+ZZ] += fiz3;
408 fshift[i_shift_offset+XX] += tx;
409 fshift[i_shift_offset+YY] += ty;
410 fshift[i_shift_offset+ZZ] += tz;
413 /* Update potential energies */
414 kernel_data->energygrp_elec[ggid] += velecsum;
415 kernel_data->energygrp_vdw[ggid] += vvdwsum;
417 /* Increment number of inner iterations */
418 inneriter += j_index_end - j_index_start;
420 /* Outer loop uses 41 flops */
423 /* Increment number of outer iterations */
426 /* Update outer/inner flops */
428 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VDW_W4_VF,outeriter*41 + inneriter*172);
431 * Gromacs nonbonded kernel: nb_kernel_ElecEw_VdwLJEw_GeomW4P1_F_c
432 * Electrostatics interaction: Ewald
433 * VdW interaction: LJEwald
434 * Geometry: Water4-Particle
435 * Calculate force/pot: Force
438 nb_kernel_ElecEw_VdwLJEw_GeomW4P1_F_c
439 (t_nblist * gmx_restrict nlist,
440 rvec * gmx_restrict xx,
441 rvec * gmx_restrict ff,
442 t_forcerec * gmx_restrict fr,
443 t_mdatoms * gmx_restrict mdatoms,
444 nb_kernel_data_t gmx_unused * gmx_restrict kernel_data,
445 t_nrnb * gmx_restrict nrnb)
447 int i_shift_offset,i_coord_offset,j_coord_offset;
448 int j_index_start,j_index_end;
449 int nri,inr,ggid,iidx,jidx,jnr,outeriter,inneriter;
450 real shX,shY,shZ,tx,ty,tz,fscal,rcutoff,rcutoff2;
451 int *iinr,*jindex,*jjnr,*shiftidx,*gid;
452 real *shiftvec,*fshift,*x,*f;
454 real ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
456 real ix1,iy1,iz1,fix1,fiy1,fiz1,iq1,isai1;
458 real ix2,iy2,iz2,fix2,fiy2,fiz2,iq2,isai2;
460 real ix3,iy3,iz3,fix3,fiy3,fiz3,iq3,isai3;
462 real jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
463 real dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00,cexp1_00,cexp2_00;
464 real dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10,cexp1_10,cexp2_10;
465 real dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20,cexp1_20,cexp2_20;
466 real dx30,dy30,dz30,rsq30,rinv30,rinvsq30,r30,qq30,c6_30,c12_30,cexp1_30,cexp2_30;
467 real velec,felec,velecsum,facel,crf,krf,krf2;
470 real rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,br,vvdwexp,sh_vdw_invrcut6;
477 real ewclj,ewclj2,ewclj6,ewcljrsq,poly,exponent,sh_lj_ewald;
480 real ewtabscale,eweps,sh_ewald,ewrt,ewtabhalfspace;
488 jindex = nlist->jindex;
490 shiftidx = nlist->shift;
492 shiftvec = fr->shift_vec[0];
493 fshift = fr->fshift[0];
495 charge = mdatoms->chargeA;
496 nvdwtype = fr->ntype;
498 vdwtype = mdatoms->typeA;
499 vdwgridparam = fr->ljpme_c6grid;
500 ewclj = fr->ewaldcoeff_lj;
501 sh_lj_ewald = fr->ic->sh_lj_ewald;
502 ewclj2 = ewclj*ewclj;
503 ewclj6 = ewclj2*ewclj2*ewclj2;
505 sh_ewald = fr->ic->sh_ewald;
506 ewtab = fr->ic->tabq_coul_F;
507 ewtabscale = fr->ic->tabq_scale;
508 ewtabhalfspace = 0.5/ewtabscale;
510 /* Setup water-specific parameters */
511 inr = nlist->iinr[0];
512 iq1 = facel*charge[inr+1];
513 iq2 = facel*charge[inr+2];
514 iq3 = facel*charge[inr+3];
515 vdwioffset0 = 2*nvdwtype*vdwtype[inr+0];
520 /* Start outer loop over neighborlists */
521 for(iidx=0; iidx<nri; iidx++)
523 /* Load shift vector for this list */
524 i_shift_offset = DIM*shiftidx[iidx];
525 shX = shiftvec[i_shift_offset+XX];
526 shY = shiftvec[i_shift_offset+YY];
527 shZ = shiftvec[i_shift_offset+ZZ];
529 /* Load limits for loop over neighbors */
530 j_index_start = jindex[iidx];
531 j_index_end = jindex[iidx+1];
533 /* Get outer coordinate index */
535 i_coord_offset = DIM*inr;
537 /* Load i particle coords and add shift vector */
538 ix0 = shX + x[i_coord_offset+DIM*0+XX];
539 iy0 = shY + x[i_coord_offset+DIM*0+YY];
540 iz0 = shZ + x[i_coord_offset+DIM*0+ZZ];
541 ix1 = shX + x[i_coord_offset+DIM*1+XX];
542 iy1 = shY + x[i_coord_offset+DIM*1+YY];
543 iz1 = shZ + x[i_coord_offset+DIM*1+ZZ];
544 ix2 = shX + x[i_coord_offset+DIM*2+XX];
545 iy2 = shY + x[i_coord_offset+DIM*2+YY];
546 iz2 = shZ + x[i_coord_offset+DIM*2+ZZ];
547 ix3 = shX + x[i_coord_offset+DIM*3+XX];
548 iy3 = shY + x[i_coord_offset+DIM*3+YY];
549 iz3 = shZ + x[i_coord_offset+DIM*3+ZZ];
564 /* Start inner kernel loop */
565 for(jidx=j_index_start; jidx<j_index_end; jidx++)
567 /* Get j neighbor index, and coordinate index */
569 j_coord_offset = DIM*jnr;
571 /* load j atom coordinates */
572 jx0 = x[j_coord_offset+DIM*0+XX];
573 jy0 = x[j_coord_offset+DIM*0+YY];
574 jz0 = x[j_coord_offset+DIM*0+ZZ];
576 /* Calculate displacement vector */
590 /* Calculate squared distance and things based on it */
591 rsq00 = dx00*dx00+dy00*dy00+dz00*dz00;
592 rsq10 = dx10*dx10+dy10*dy10+dz10*dz10;
593 rsq20 = dx20*dx20+dy20*dy20+dz20*dz20;
594 rsq30 = dx30*dx30+dy30*dy30+dz30*dz30;
596 rinv00 = gmx_invsqrt(rsq00);
597 rinv10 = gmx_invsqrt(rsq10);
598 rinv20 = gmx_invsqrt(rsq20);
599 rinv30 = gmx_invsqrt(rsq30);
601 rinvsq00 = rinv00*rinv00;
602 rinvsq10 = rinv10*rinv10;
603 rinvsq20 = rinv20*rinv20;
604 rinvsq30 = rinv30*rinv30;
606 /* Load parameters for j particles */
608 vdwjidx0 = 2*vdwtype[jnr+0];
610 /**************************
611 * CALCULATE INTERACTIONS *
612 **************************/
616 c6_00 = vdwparam[vdwioffset0+vdwjidx0];
617 c12_00 = vdwparam[vdwioffset0+vdwjidx0+1];
618 c6grid_00 = vdwgridparam[vdwioffset0+vdwjidx0];
620 rinvsix = rinvsq00*rinvsq00*rinvsq00;
621 ewcljrsq = ewclj2*rsq00;
622 exponent = exp(-ewcljrsq);
623 poly = exponent*(1.0 + ewcljrsq + ewcljrsq*ewcljrsq*0.5);
624 fvdw = (((c12_00*rinvsix - c6_00 + c6grid_00*(1.0-poly))*rinvsix) - c6grid_00*(1.0/6.0)*exponent*ewclj6)*rinvsq00;
628 /* Calculate temporary vectorial force */
633 /* Update vectorial force */
637 f[j_coord_offset+DIM*0+XX] -= tx;
638 f[j_coord_offset+DIM*0+YY] -= ty;
639 f[j_coord_offset+DIM*0+ZZ] -= tz;
641 /**************************
642 * CALCULATE INTERACTIONS *
643 **************************/
649 /* EWALD ELECTROSTATICS */
651 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
652 ewrt = r10*ewtabscale;
655 felec = (1.0-eweps)*ewtab[ewitab]+eweps*ewtab[ewitab+1];
656 felec = qq10*rinv10*(rinvsq10-felec);
660 /* Calculate temporary vectorial force */
665 /* Update vectorial force */
669 f[j_coord_offset+DIM*0+XX] -= tx;
670 f[j_coord_offset+DIM*0+YY] -= ty;
671 f[j_coord_offset+DIM*0+ZZ] -= tz;
673 /**************************
674 * CALCULATE INTERACTIONS *
675 **************************/
681 /* EWALD ELECTROSTATICS */
683 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
684 ewrt = r20*ewtabscale;
687 felec = (1.0-eweps)*ewtab[ewitab]+eweps*ewtab[ewitab+1];
688 felec = qq20*rinv20*(rinvsq20-felec);
692 /* Calculate temporary vectorial force */
697 /* Update vectorial force */
701 f[j_coord_offset+DIM*0+XX] -= tx;
702 f[j_coord_offset+DIM*0+YY] -= ty;
703 f[j_coord_offset+DIM*0+ZZ] -= tz;
705 /**************************
706 * CALCULATE INTERACTIONS *
707 **************************/
713 /* EWALD ELECTROSTATICS */
715 /* Calculate Ewald table index by multiplying r with scale and truncate to integer */
716 ewrt = r30*ewtabscale;
719 felec = (1.0-eweps)*ewtab[ewitab]+eweps*ewtab[ewitab+1];
720 felec = qq30*rinv30*(rinvsq30-felec);
724 /* Calculate temporary vectorial force */
729 /* Update vectorial force */
733 f[j_coord_offset+DIM*0+XX] -= tx;
734 f[j_coord_offset+DIM*0+YY] -= ty;
735 f[j_coord_offset+DIM*0+ZZ] -= tz;
737 /* Inner loop uses 146 flops */
739 /* End of innermost loop */
742 f[i_coord_offset+DIM*0+XX] += fix0;
743 f[i_coord_offset+DIM*0+YY] += fiy0;
744 f[i_coord_offset+DIM*0+ZZ] += fiz0;
748 f[i_coord_offset+DIM*1+XX] += fix1;
749 f[i_coord_offset+DIM*1+YY] += fiy1;
750 f[i_coord_offset+DIM*1+ZZ] += fiz1;
754 f[i_coord_offset+DIM*2+XX] += fix2;
755 f[i_coord_offset+DIM*2+YY] += fiy2;
756 f[i_coord_offset+DIM*2+ZZ] += fiz2;
760 f[i_coord_offset+DIM*3+XX] += fix3;
761 f[i_coord_offset+DIM*3+YY] += fiy3;
762 f[i_coord_offset+DIM*3+ZZ] += fiz3;
766 fshift[i_shift_offset+XX] += tx;
767 fshift[i_shift_offset+YY] += ty;
768 fshift[i_shift_offset+ZZ] += tz;
770 /* Increment number of inner iterations */
771 inneriter += j_index_end - j_index_start;
773 /* Outer loop uses 39 flops */
776 /* Increment number of outer iterations */
779 /* Update outer/inner flops */
781 inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VDW_W4_F,outeriter*39 + inneriter*146);