Fix component for libcudart
[alexxy/gromacs.git] / src / gmxlib / nonbonded / nb_kernel_c / nb_kernel_ElecRF_VdwLJ_GeomW3P1_c.c
1 /*
2  * Note: this file was generated by the Gromacs c kernel generator.
3  *
4  *                This source code is part of
5  *
6  *                 G   R   O   M   A   C   S
7  *
8  * Copyright (c) 2001-2012, The GROMACS Development Team
9  *
10  * Gromacs is a library for molecular simulation and trajectory analysis,
11  * written by Erik Lindahl, David van der Spoel, Berk Hess, and others - for
12  * a full list of developers and information, check out http://www.gromacs.org
13  *
14  * This program is free software; you can redistribute it and/or modify it under
15  * the terms of the GNU Lesser General Public License as published by the Free
16  * Software Foundation; either version 2 of the License, or (at your option) any
17  * later version.
18  *
19  * To help fund GROMACS development, we humbly ask that you cite
20  * the papers people have written on it - you can find them on the website.
21  */
22 #ifdef HAVE_CONFIG_H
23 #include <config.h>
24 #endif
25
26 #include <math.h>
27
28 #include "../nb_kernel.h"
29 #include "types/simple.h"
30 #include "vec.h"
31 #include "nrnb.h"
32
33 /*
34  * Gromacs nonbonded kernel:   nb_kernel_ElecRF_VdwLJ_GeomW3P1_VF_c
35  * Electrostatics interaction: ReactionField
36  * VdW interaction:            LennardJones
37  * Geometry:                   Water3-Particle
38  * Calculate force/pot:        PotentialAndForce
39  */
40 void
41 nb_kernel_ElecRF_VdwLJ_GeomW3P1_VF_c
42                     (t_nblist * gmx_restrict                nlist,
43                      rvec * gmx_restrict                    xx,
44                      rvec * gmx_restrict                    ff,
45                      t_forcerec * gmx_restrict              fr,
46                      t_mdatoms * gmx_restrict               mdatoms,
47                      nb_kernel_data_t * gmx_restrict        kernel_data,
48                      t_nrnb * gmx_restrict                  nrnb)
49 {
50     int              i_shift_offset,i_coord_offset,j_coord_offset;
51     int              j_index_start,j_index_end;
52     int              nri,inr,ggid,iidx,jidx,jnr,outeriter,inneriter;
53     real             shX,shY,shZ,tx,ty,tz,fscal,rcutoff,rcutoff2;
54     int              *iinr,*jindex,*jjnr,*shiftidx,*gid;
55     real             *shiftvec,*fshift,*x,*f;
56     int              vdwioffset0;
57     real             ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
58     int              vdwioffset1;
59     real             ix1,iy1,iz1,fix1,fiy1,fiz1,iq1,isai1;
60     int              vdwioffset2;
61     real             ix2,iy2,iz2,fix2,fiy2,fiz2,iq2,isai2;
62     int              vdwjidx0;
63     real             jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
64     real             dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00,cexp1_00,cexp2_00;
65     real             dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10,cexp1_10,cexp2_10;
66     real             dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20,cexp1_20,cexp2_20;
67     real             velec,felec,velecsum,facel,crf,krf,krf2;
68     real             *charge;
69     int              nvdwtype;
70     real             rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,br,vvdwexp,sh_vdw_invrcut6;
71     int              *vdwtype;
72     real             *vdwparam;
73
74     x                = xx[0];
75     f                = ff[0];
76
77     nri              = nlist->nri;
78     iinr             = nlist->iinr;
79     jindex           = nlist->jindex;
80     jjnr             = nlist->jjnr;
81     shiftidx         = nlist->shift;
82     gid              = nlist->gid;
83     shiftvec         = fr->shift_vec[0];
84     fshift           = fr->fshift[0];
85     facel            = fr->epsfac;
86     charge           = mdatoms->chargeA;
87     krf              = fr->ic->k_rf;
88     krf2             = krf*2.0;
89     crf              = fr->ic->c_rf;
90     nvdwtype         = fr->ntype;
91     vdwparam         = fr->nbfp;
92     vdwtype          = mdatoms->typeA;
93
94     /* Setup water-specific parameters */
95     inr              = nlist->iinr[0];
96     iq0              = facel*charge[inr+0];
97     iq1              = facel*charge[inr+1];
98     iq2              = facel*charge[inr+2];
99     vdwioffset0      = 2*nvdwtype*vdwtype[inr+0];
100
101     outeriter        = 0;
102     inneriter        = 0;
103
104     /* Start outer loop over neighborlists */
105     for(iidx=0; iidx<nri; iidx++)
106     {
107         /* Load shift vector for this list */
108         i_shift_offset   = DIM*shiftidx[iidx];
109         shX              = shiftvec[i_shift_offset+XX];
110         shY              = shiftvec[i_shift_offset+YY];
111         shZ              = shiftvec[i_shift_offset+ZZ];
112
113         /* Load limits for loop over neighbors */
114         j_index_start    = jindex[iidx];
115         j_index_end      = jindex[iidx+1];
116
117         /* Get outer coordinate index */
118         inr              = iinr[iidx];
119         i_coord_offset   = DIM*inr;
120
121         /* Load i particle coords and add shift vector */
122         ix0              = shX + x[i_coord_offset+DIM*0+XX];
123         iy0              = shY + x[i_coord_offset+DIM*0+YY];
124         iz0              = shZ + x[i_coord_offset+DIM*0+ZZ];
125         ix1              = shX + x[i_coord_offset+DIM*1+XX];
126         iy1              = shY + x[i_coord_offset+DIM*1+YY];
127         iz1              = shZ + x[i_coord_offset+DIM*1+ZZ];
128         ix2              = shX + x[i_coord_offset+DIM*2+XX];
129         iy2              = shY + x[i_coord_offset+DIM*2+YY];
130         iz2              = shZ + x[i_coord_offset+DIM*2+ZZ];
131
132         fix0             = 0.0;
133         fiy0             = 0.0;
134         fiz0             = 0.0;
135         fix1             = 0.0;
136         fiy1             = 0.0;
137         fiz1             = 0.0;
138         fix2             = 0.0;
139         fiy2             = 0.0;
140         fiz2             = 0.0;
141
142         /* Reset potential sums */
143         velecsum         = 0.0;
144         vvdwsum          = 0.0;
145
146         /* Start inner kernel loop */
147         for(jidx=j_index_start; jidx<j_index_end; jidx++)
148         {
149             /* Get j neighbor index, and coordinate index */
150             jnr              = jjnr[jidx];
151             j_coord_offset   = DIM*jnr;
152
153             /* load j atom coordinates */
154             jx0              = x[j_coord_offset+DIM*0+XX];
155             jy0              = x[j_coord_offset+DIM*0+YY];
156             jz0              = x[j_coord_offset+DIM*0+ZZ];
157
158             /* Calculate displacement vector */
159             dx00             = ix0 - jx0;
160             dy00             = iy0 - jy0;
161             dz00             = iz0 - jz0;
162             dx10             = ix1 - jx0;
163             dy10             = iy1 - jy0;
164             dz10             = iz1 - jz0;
165             dx20             = ix2 - jx0;
166             dy20             = iy2 - jy0;
167             dz20             = iz2 - jz0;
168
169             /* Calculate squared distance and things based on it */
170             rsq00            = dx00*dx00+dy00*dy00+dz00*dz00;
171             rsq10            = dx10*dx10+dy10*dy10+dz10*dz10;
172             rsq20            = dx20*dx20+dy20*dy20+dz20*dz20;
173
174             rinv00           = gmx_invsqrt(rsq00);
175             rinv10           = gmx_invsqrt(rsq10);
176             rinv20           = gmx_invsqrt(rsq20);
177
178             rinvsq00         = rinv00*rinv00;
179             rinvsq10         = rinv10*rinv10;
180             rinvsq20         = rinv20*rinv20;
181
182             /* Load parameters for j particles */
183             jq0              = charge[jnr+0];
184             vdwjidx0         = 2*vdwtype[jnr+0];
185
186             /**************************
187              * CALCULATE INTERACTIONS *
188              **************************/
189
190             qq00             = iq0*jq0;
191             c6_00            = vdwparam[vdwioffset0+vdwjidx0];
192             c12_00           = vdwparam[vdwioffset0+vdwjidx0+1];
193
194             /* REACTION-FIELD ELECTROSTATICS */
195             velec            = qq00*(rinv00+krf*rsq00-crf);
196             felec            = qq00*(rinv00*rinvsq00-krf2);
197
198             /* LENNARD-JONES DISPERSION/REPULSION */
199
200             rinvsix          = rinvsq00*rinvsq00*rinvsq00;
201             vvdw6            = c6_00*rinvsix;
202             vvdw12           = c12_00*rinvsix*rinvsix;
203             vvdw             = vvdw12*(1.0/12.0) - vvdw6*(1.0/6.0);
204             fvdw             = (vvdw12-vvdw6)*rinvsq00;
205
206             /* Update potential sums from outer loop */
207             velecsum        += velec;
208             vvdwsum         += vvdw;
209
210             fscal            = felec+fvdw;
211
212             /* Calculate temporary vectorial force */
213             tx               = fscal*dx00;
214             ty               = fscal*dy00;
215             tz               = fscal*dz00;
216
217             /* Update vectorial force */
218             fix0            += tx;
219             fiy0            += ty;
220             fiz0            += tz;
221             f[j_coord_offset+DIM*0+XX] -= tx;
222             f[j_coord_offset+DIM*0+YY] -= ty;
223             f[j_coord_offset+DIM*0+ZZ] -= tz;
224
225             /**************************
226              * CALCULATE INTERACTIONS *
227              **************************/
228
229             qq10             = iq1*jq0;
230
231             /* REACTION-FIELD ELECTROSTATICS */
232             velec            = qq10*(rinv10+krf*rsq10-crf);
233             felec            = qq10*(rinv10*rinvsq10-krf2);
234
235             /* Update potential sums from outer loop */
236             velecsum        += velec;
237
238             fscal            = felec;
239
240             /* Calculate temporary vectorial force */
241             tx               = fscal*dx10;
242             ty               = fscal*dy10;
243             tz               = fscal*dz10;
244
245             /* Update vectorial force */
246             fix1            += tx;
247             fiy1            += ty;
248             fiz1            += tz;
249             f[j_coord_offset+DIM*0+XX] -= tx;
250             f[j_coord_offset+DIM*0+YY] -= ty;
251             f[j_coord_offset+DIM*0+ZZ] -= tz;
252
253             /**************************
254              * CALCULATE INTERACTIONS *
255              **************************/
256
257             qq20             = iq2*jq0;
258
259             /* REACTION-FIELD ELECTROSTATICS */
260             velec            = qq20*(rinv20+krf*rsq20-crf);
261             felec            = qq20*(rinv20*rinvsq20-krf2);
262
263             /* Update potential sums from outer loop */
264             velecsum        += velec;
265
266             fscal            = felec;
267
268             /* Calculate temporary vectorial force */
269             tx               = fscal*dx20;
270             ty               = fscal*dy20;
271             tz               = fscal*dz20;
272
273             /* Update vectorial force */
274             fix2            += tx;
275             fiy2            += ty;
276             fiz2            += tz;
277             f[j_coord_offset+DIM*0+XX] -= tx;
278             f[j_coord_offset+DIM*0+YY] -= ty;
279             f[j_coord_offset+DIM*0+ZZ] -= tz;
280
281             /* Inner loop uses 108 flops */
282         }
283         /* End of innermost loop */
284
285         tx = ty = tz = 0;
286         f[i_coord_offset+DIM*0+XX] += fix0;
287         f[i_coord_offset+DIM*0+YY] += fiy0;
288         f[i_coord_offset+DIM*0+ZZ] += fiz0;
289         tx                         += fix0;
290         ty                         += fiy0;
291         tz                         += fiz0;
292         f[i_coord_offset+DIM*1+XX] += fix1;
293         f[i_coord_offset+DIM*1+YY] += fiy1;
294         f[i_coord_offset+DIM*1+ZZ] += fiz1;
295         tx                         += fix1;
296         ty                         += fiy1;
297         tz                         += fiz1;
298         f[i_coord_offset+DIM*2+XX] += fix2;
299         f[i_coord_offset+DIM*2+YY] += fiy2;
300         f[i_coord_offset+DIM*2+ZZ] += fiz2;
301         tx                         += fix2;
302         ty                         += fiy2;
303         tz                         += fiz2;
304         fshift[i_shift_offset+XX]  += tx;
305         fshift[i_shift_offset+YY]  += ty;
306         fshift[i_shift_offset+ZZ]  += tz;
307
308         ggid                        = gid[iidx];
309         /* Update potential energies */
310         kernel_data->energygrp_elec[ggid] += velecsum;
311         kernel_data->energygrp_vdw[ggid] += vvdwsum;
312
313         /* Increment number of inner iterations */
314         inneriter                  += j_index_end - j_index_start;
315
316         /* Outer loop uses 32 flops */
317     }
318
319     /* Increment number of outer iterations */
320     outeriter        += nri;
321
322     /* Update outer/inner flops */
323
324     inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VDW_W3_VF,outeriter*32 + inneriter*108);
325 }
326 /*
327  * Gromacs nonbonded kernel:   nb_kernel_ElecRF_VdwLJ_GeomW3P1_F_c
328  * Electrostatics interaction: ReactionField
329  * VdW interaction:            LennardJones
330  * Geometry:                   Water3-Particle
331  * Calculate force/pot:        Force
332  */
333 void
334 nb_kernel_ElecRF_VdwLJ_GeomW3P1_F_c
335                     (t_nblist * gmx_restrict                nlist,
336                      rvec * gmx_restrict                    xx,
337                      rvec * gmx_restrict                    ff,
338                      t_forcerec * gmx_restrict              fr,
339                      t_mdatoms * gmx_restrict               mdatoms,
340                      nb_kernel_data_t * gmx_restrict        kernel_data,
341                      t_nrnb * gmx_restrict                  nrnb)
342 {
343     int              i_shift_offset,i_coord_offset,j_coord_offset;
344     int              j_index_start,j_index_end;
345     int              nri,inr,ggid,iidx,jidx,jnr,outeriter,inneriter;
346     real             shX,shY,shZ,tx,ty,tz,fscal,rcutoff,rcutoff2;
347     int              *iinr,*jindex,*jjnr,*shiftidx,*gid;
348     real             *shiftvec,*fshift,*x,*f;
349     int              vdwioffset0;
350     real             ix0,iy0,iz0,fix0,fiy0,fiz0,iq0,isai0;
351     int              vdwioffset1;
352     real             ix1,iy1,iz1,fix1,fiy1,fiz1,iq1,isai1;
353     int              vdwioffset2;
354     real             ix2,iy2,iz2,fix2,fiy2,fiz2,iq2,isai2;
355     int              vdwjidx0;
356     real             jx0,jy0,jz0,fjx0,fjy0,fjz0,jq0,isaj0;
357     real             dx00,dy00,dz00,rsq00,rinv00,rinvsq00,r00,qq00,c6_00,c12_00,cexp1_00,cexp2_00;
358     real             dx10,dy10,dz10,rsq10,rinv10,rinvsq10,r10,qq10,c6_10,c12_10,cexp1_10,cexp2_10;
359     real             dx20,dy20,dz20,rsq20,rinv20,rinvsq20,r20,qq20,c6_20,c12_20,cexp1_20,cexp2_20;
360     real             velec,felec,velecsum,facel,crf,krf,krf2;
361     real             *charge;
362     int              nvdwtype;
363     real             rinvsix,rvdw,vvdw,vvdw6,vvdw12,fvdw,fvdw6,fvdw12,vvdwsum,br,vvdwexp,sh_vdw_invrcut6;
364     int              *vdwtype;
365     real             *vdwparam;
366
367     x                = xx[0];
368     f                = ff[0];
369
370     nri              = nlist->nri;
371     iinr             = nlist->iinr;
372     jindex           = nlist->jindex;
373     jjnr             = nlist->jjnr;
374     shiftidx         = nlist->shift;
375     gid              = nlist->gid;
376     shiftvec         = fr->shift_vec[0];
377     fshift           = fr->fshift[0];
378     facel            = fr->epsfac;
379     charge           = mdatoms->chargeA;
380     krf              = fr->ic->k_rf;
381     krf2             = krf*2.0;
382     crf              = fr->ic->c_rf;
383     nvdwtype         = fr->ntype;
384     vdwparam         = fr->nbfp;
385     vdwtype          = mdatoms->typeA;
386
387     /* Setup water-specific parameters */
388     inr              = nlist->iinr[0];
389     iq0              = facel*charge[inr+0];
390     iq1              = facel*charge[inr+1];
391     iq2              = facel*charge[inr+2];
392     vdwioffset0      = 2*nvdwtype*vdwtype[inr+0];
393
394     outeriter        = 0;
395     inneriter        = 0;
396
397     /* Start outer loop over neighborlists */
398     for(iidx=0; iidx<nri; iidx++)
399     {
400         /* Load shift vector for this list */
401         i_shift_offset   = DIM*shiftidx[iidx];
402         shX              = shiftvec[i_shift_offset+XX];
403         shY              = shiftvec[i_shift_offset+YY];
404         shZ              = shiftvec[i_shift_offset+ZZ];
405
406         /* Load limits for loop over neighbors */
407         j_index_start    = jindex[iidx];
408         j_index_end      = jindex[iidx+1];
409
410         /* Get outer coordinate index */
411         inr              = iinr[iidx];
412         i_coord_offset   = DIM*inr;
413
414         /* Load i particle coords and add shift vector */
415         ix0              = shX + x[i_coord_offset+DIM*0+XX];
416         iy0              = shY + x[i_coord_offset+DIM*0+YY];
417         iz0              = shZ + x[i_coord_offset+DIM*0+ZZ];
418         ix1              = shX + x[i_coord_offset+DIM*1+XX];
419         iy1              = shY + x[i_coord_offset+DIM*1+YY];
420         iz1              = shZ + x[i_coord_offset+DIM*1+ZZ];
421         ix2              = shX + x[i_coord_offset+DIM*2+XX];
422         iy2              = shY + x[i_coord_offset+DIM*2+YY];
423         iz2              = shZ + x[i_coord_offset+DIM*2+ZZ];
424
425         fix0             = 0.0;
426         fiy0             = 0.0;
427         fiz0             = 0.0;
428         fix1             = 0.0;
429         fiy1             = 0.0;
430         fiz1             = 0.0;
431         fix2             = 0.0;
432         fiy2             = 0.0;
433         fiz2             = 0.0;
434
435         /* Start inner kernel loop */
436         for(jidx=j_index_start; jidx<j_index_end; jidx++)
437         {
438             /* Get j neighbor index, and coordinate index */
439             jnr              = jjnr[jidx];
440             j_coord_offset   = DIM*jnr;
441
442             /* load j atom coordinates */
443             jx0              = x[j_coord_offset+DIM*0+XX];
444             jy0              = x[j_coord_offset+DIM*0+YY];
445             jz0              = x[j_coord_offset+DIM*0+ZZ];
446
447             /* Calculate displacement vector */
448             dx00             = ix0 - jx0;
449             dy00             = iy0 - jy0;
450             dz00             = iz0 - jz0;
451             dx10             = ix1 - jx0;
452             dy10             = iy1 - jy0;
453             dz10             = iz1 - jz0;
454             dx20             = ix2 - jx0;
455             dy20             = iy2 - jy0;
456             dz20             = iz2 - jz0;
457
458             /* Calculate squared distance and things based on it */
459             rsq00            = dx00*dx00+dy00*dy00+dz00*dz00;
460             rsq10            = dx10*dx10+dy10*dy10+dz10*dz10;
461             rsq20            = dx20*dx20+dy20*dy20+dz20*dz20;
462
463             rinv00           = gmx_invsqrt(rsq00);
464             rinv10           = gmx_invsqrt(rsq10);
465             rinv20           = gmx_invsqrt(rsq20);
466
467             rinvsq00         = rinv00*rinv00;
468             rinvsq10         = rinv10*rinv10;
469             rinvsq20         = rinv20*rinv20;
470
471             /* Load parameters for j particles */
472             jq0              = charge[jnr+0];
473             vdwjidx0         = 2*vdwtype[jnr+0];
474
475             /**************************
476              * CALCULATE INTERACTIONS *
477              **************************/
478
479             qq00             = iq0*jq0;
480             c6_00            = vdwparam[vdwioffset0+vdwjidx0];
481             c12_00           = vdwparam[vdwioffset0+vdwjidx0+1];
482
483             /* REACTION-FIELD ELECTROSTATICS */
484             felec            = qq00*(rinv00*rinvsq00-krf2);
485
486             /* LENNARD-JONES DISPERSION/REPULSION */
487
488             rinvsix          = rinvsq00*rinvsq00*rinvsq00;
489             fvdw             = (c12_00*rinvsix-c6_00)*rinvsix*rinvsq00;
490
491             fscal            = felec+fvdw;
492
493             /* Calculate temporary vectorial force */
494             tx               = fscal*dx00;
495             ty               = fscal*dy00;
496             tz               = fscal*dz00;
497
498             /* Update vectorial force */
499             fix0            += tx;
500             fiy0            += ty;
501             fiz0            += tz;
502             f[j_coord_offset+DIM*0+XX] -= tx;
503             f[j_coord_offset+DIM*0+YY] -= ty;
504             f[j_coord_offset+DIM*0+ZZ] -= tz;
505
506             /**************************
507              * CALCULATE INTERACTIONS *
508              **************************/
509
510             qq10             = iq1*jq0;
511
512             /* REACTION-FIELD ELECTROSTATICS */
513             felec            = qq10*(rinv10*rinvsq10-krf2);
514
515             fscal            = felec;
516
517             /* Calculate temporary vectorial force */
518             tx               = fscal*dx10;
519             ty               = fscal*dy10;
520             tz               = fscal*dz10;
521
522             /* Update vectorial force */
523             fix1            += tx;
524             fiy1            += ty;
525             fiz1            += tz;
526             f[j_coord_offset+DIM*0+XX] -= tx;
527             f[j_coord_offset+DIM*0+YY] -= ty;
528             f[j_coord_offset+DIM*0+ZZ] -= tz;
529
530             /**************************
531              * CALCULATE INTERACTIONS *
532              **************************/
533
534             qq20             = iq2*jq0;
535
536             /* REACTION-FIELD ELECTROSTATICS */
537             felec            = qq20*(rinv20*rinvsq20-krf2);
538
539             fscal            = felec;
540
541             /* Calculate temporary vectorial force */
542             tx               = fscal*dx20;
543             ty               = fscal*dy20;
544             tz               = fscal*dz20;
545
546             /* Update vectorial force */
547             fix2            += tx;
548             fiy2            += ty;
549             fiz2            += tz;
550             f[j_coord_offset+DIM*0+XX] -= tx;
551             f[j_coord_offset+DIM*0+YY] -= ty;
552             f[j_coord_offset+DIM*0+ZZ] -= tz;
553
554             /* Inner loop uses 88 flops */
555         }
556         /* End of innermost loop */
557
558         tx = ty = tz = 0;
559         f[i_coord_offset+DIM*0+XX] += fix0;
560         f[i_coord_offset+DIM*0+YY] += fiy0;
561         f[i_coord_offset+DIM*0+ZZ] += fiz0;
562         tx                         += fix0;
563         ty                         += fiy0;
564         tz                         += fiz0;
565         f[i_coord_offset+DIM*1+XX] += fix1;
566         f[i_coord_offset+DIM*1+YY] += fiy1;
567         f[i_coord_offset+DIM*1+ZZ] += fiz1;
568         tx                         += fix1;
569         ty                         += fiy1;
570         tz                         += fiz1;
571         f[i_coord_offset+DIM*2+XX] += fix2;
572         f[i_coord_offset+DIM*2+YY] += fiy2;
573         f[i_coord_offset+DIM*2+ZZ] += fiz2;
574         tx                         += fix2;
575         ty                         += fiy2;
576         tz                         += fiz2;
577         fshift[i_shift_offset+XX]  += tx;
578         fshift[i_shift_offset+YY]  += ty;
579         fshift[i_shift_offset+ZZ]  += tz;
580
581         /* Increment number of inner iterations */
582         inneriter                  += j_index_end - j_index_start;
583
584         /* Outer loop uses 30 flops */
585     }
586
587     /* Increment number of outer iterations */
588     outeriter        += nri;
589
590     /* Update outer/inner flops */
591
592     inc_nrnb(nrnb,eNR_NBKERNEL_ELEC_VDW_W3_F,outeriter*30 + inneriter*88);
593 }