2 C This source code is part of
6 C Copyright (c) 1991-2000, University of Groningen, The Netherlands.
7 C Copyright (c) 2001-2009, The GROMACS Development Team
9 C Gromacs is a library for molecular simulation and trajectory analysis,
10 C written by Erik Lindahl, David van der Spoel, Berk Hess, and others - for
11 C a full list of developers and information, check out http://www.gromacs.org
13 C This program is free software; you can redistribute it and/or modify it under
14 C the terms of the GNU Lesser General Public License as published by the Free
15 C Software Foundation; either version 2 of the License, or (at your option) any
17 C As a special exception, you may use this file as part of a free software
18 C library without restriction. Specifically, if other files instantiate
19 C templates or use macros or inline functions from this file, or you compile
20 C this file and link it with other files to produce an executable, this
21 C file does not by itself cause the resulting executable to be covered by
22 C the GNU Lesser General Public License.
24 C In plain-speak: do not worry about classes/macros/templates either - only
25 C changes to the library have to be LGPL, not an application linking with it.
27 C To help fund GROMACS development, we humbly ask that you cite
28 C the papers people have written on it - you can find them on the website!
36 # define gmxreal real*8
38 # define gmxreal real*4
44 C Gromacs nonbonded kernel pwr6kernel224
45 C Coulomb interaction: Reaction field
46 C VdW interaction: Buckingham
47 C water optimization: pairs of TIP4P interactions
48 C Calculate forces: yes
50 subroutine pwr6kernel224(
83 integer*4 nri,iinr(*),jindex(*),jjnr(*),shift(*)
84 gmxreal shiftvec(*),fshift(*),pos(*),faction(*)
85 integer*4 gid(*),type(*),ntype
86 gmxreal charge(*),facel,krf,crf,Vc(*),vdwparam(*)
87 gmxreal Vvdw(*),tabscale,VFtab(*)
88 gmxreal invsqrta(*),dvda(*),gbtabscale,GBtab(*)
89 integer*4 nthreads,count,mtx,outeriter,inneriter
92 integer*4 n,ii,is3,ii3,k,nj0,nj1,jnr,j3,ggid
93 integer*4 nn0,nn1,nouter,ninner
95 gmxreal fscal,tx,ty,tz
97 gmxreal qq,vcoul,vctot
100 gmxreal Vvdw6,Vvdwtot
103 gmxreal ix1,iy1,iz1,fix1,fiy1,fiz1
104 gmxreal ix2,iy2,iz2,fix2,fiy2,fiz2
105 gmxreal ix3,iy3,iz3,fix3,fiy3,fiz3
106 gmxreal ix4,iy4,iz4,fix4,fiy4,fiz4
108 gmxreal jx2,jy2,jz2,fjx2,fjy2,fjz2
109 gmxreal jx3,jy3,jz3,fjx3,fjy3,fjz3
110 gmxreal jx4,jy4,jz4,fjx4,fjy4,fjz4
111 gmxreal dx11,dy11,dz11,rsq11,rinv11
112 gmxreal dx22,dy22,dz22,rsq22,rinv22
113 gmxreal dx23,dy23,dz23,rsq23,rinv23
114 gmxreal dx24,dy24,dz24,rsq24,rinv24
115 gmxreal dx32,dy32,dz32,rsq32,rinv32
116 gmxreal dx33,dy33,dz33,rsq33,rinv33
117 gmxreal dx34,dy34,dz34,rsq34,rinv34
118 gmxreal dx42,dy42,dz42,rsq42,rinv42
119 gmxreal dx43,dy43,dz43,rsq43,rinv43
120 gmxreal dx44,dy44,dz44,rsq44,rinv44
121 gmxreal qH,qM,qqMM,qqMH,qqHH
122 gmxreal c6,cexp1,cexp2
125 C Initialize water data
132 tj = 3*(ntype+1)*type(ii)+1
134 cexp1 = vdwparam(tj+1)
135 cexp2 = vdwparam(tj+2)
138 C Reset outer and inner iteration counters
142 C Loop over thread workunits
143 10 call pwr6kernelsync(mtx,count,nri,nthreads,nn0,nn1)
144 if(nn1.gt.nri) nn1=nri
146 C Start outer loop over neighborlists
150 C Load shift vector for this list
153 shY = shiftvec(is3+1)
154 shZ = shiftvec(is3+2)
156 C Load limits for loop over neighbors
160 C Get outer coordinate index
164 C Load i atom data, add shift vector
165 ix1 = shX + pos(ii3+0)
166 iy1 = shY + pos(ii3+1)
167 iz1 = shZ + pos(ii3+2)
168 ix2 = shX + pos(ii3+3)
169 iy2 = shY + pos(ii3+4)
170 iz2 = shZ + pos(ii3+5)
171 ix3 = shX + pos(ii3+6)
172 iy3 = shY + pos(ii3+7)
173 iz3 = shZ + pos(ii3+8)
174 ix4 = shX + pos(ii3+9)
175 iy4 = shY + pos(ii3+10)
176 iz4 = shZ + pos(ii3+11)
178 C Zero the potential energy for this list
182 C Clear i atom forces
198 C Get j neighbor index, and coordinate index
202 C load j atom coordinates
220 rsq11 = dx11*dx11+dy11*dy11+dz11*dz11
224 rsq22 = dx22*dx22+dy22*dy22+dz22*dz22
228 rsq23 = dx23*dx23+dy23*dy23+dz23*dz23
232 rsq24 = dx24*dx24+dy24*dy24+dz24*dz24
236 rsq32 = dx32*dx32+dy32*dy32+dz32*dz32
240 rsq33 = dx33*dx33+dy33*dy33+dz33*dz33
244 rsq34 = dx34*dx34+dy34*dy34+dz34*dz34
248 rsq42 = dx42*dx42+dy42*dy42+dz42*dz42
252 rsq43 = dx43*dx43+dy43*dy43+dz43*dz43
256 rsq44 = dx44*dx44+dy44*dy44+dz44*dz44
258 C Calculate 1/r and 1/r2
260 C PowerPC intrinsics 1/sqrt lookup table
262 rinv11 = frsqrtes(rsq11)
264 rinv11 = frsqrte(dble(rsq11))
266 rinv11 = (0.5*rinv11*(3.0-((rsq11*rinv11)
269 rinv11 = (0.5*rinv11*(3.0-((rsq11*rinv11)
273 C PowerPC intrinsics 1/sqrt lookup table
275 rinv22 = frsqrtes(rsq22)
277 rinv22 = frsqrte(dble(rsq22))
279 rinv22 = (0.5*rinv22*(3.0-((rsq22*rinv22)
282 rinv22 = (0.5*rinv22*(3.0-((rsq22*rinv22)
286 C PowerPC intrinsics 1/sqrt lookup table
288 rinv23 = frsqrtes(rsq23)
290 rinv23 = frsqrte(dble(rsq23))
292 rinv23 = (0.5*rinv23*(3.0-((rsq23*rinv23)
295 rinv23 = (0.5*rinv23*(3.0-((rsq23*rinv23)
299 C PowerPC intrinsics 1/sqrt lookup table
301 rinv24 = frsqrtes(rsq24)
303 rinv24 = frsqrte(dble(rsq24))
305 rinv24 = (0.5*rinv24*(3.0-((rsq24*rinv24)
308 rinv24 = (0.5*rinv24*(3.0-((rsq24*rinv24)
312 C PowerPC intrinsics 1/sqrt lookup table
314 rinv32 = frsqrtes(rsq32)
316 rinv32 = frsqrte(dble(rsq32))
318 rinv32 = (0.5*rinv32*(3.0-((rsq32*rinv32)
321 rinv32 = (0.5*rinv32*(3.0-((rsq32*rinv32)
325 C PowerPC intrinsics 1/sqrt lookup table
327 rinv33 = frsqrtes(rsq33)
329 rinv33 = frsqrte(dble(rsq33))
331 rinv33 = (0.5*rinv33*(3.0-((rsq33*rinv33)
334 rinv33 = (0.5*rinv33*(3.0-((rsq33*rinv33)
338 C PowerPC intrinsics 1/sqrt lookup table
340 rinv34 = frsqrtes(rsq34)
342 rinv34 = frsqrte(dble(rsq34))
344 rinv34 = (0.5*rinv34*(3.0-((rsq34*rinv34)
347 rinv34 = (0.5*rinv34*(3.0-((rsq34*rinv34)
351 C PowerPC intrinsics 1/sqrt lookup table
353 rinv42 = frsqrtes(rsq42)
355 rinv42 = frsqrte(dble(rsq42))
357 rinv42 = (0.5*rinv42*(3.0-((rsq42*rinv42)
360 rinv42 = (0.5*rinv42*(3.0-((rsq42*rinv42)
364 C PowerPC intrinsics 1/sqrt lookup table
366 rinv43 = frsqrtes(rsq43)
368 rinv43 = frsqrte(dble(rsq43))
370 rinv43 = (0.5*rinv43*(3.0-((rsq43*rinv43)
373 rinv43 = (0.5*rinv43*(3.0-((rsq43*rinv43)
377 C PowerPC intrinsics 1/sqrt lookup table
379 rinv44 = frsqrtes(rsq44)
381 rinv44 = frsqrte(dble(rsq44))
383 rinv44 = (0.5*rinv44*(3.0-((rsq44*rinv44)
386 rinv44 = (0.5*rinv44*(3.0-((rsq44*rinv44)
390 C Load parameters for j atom
391 rinvsq = rinv11*rinv11
393 C Buckingham interaction
394 rinvsix = rinvsq*rinvsq*rinvsq
396 br = cexp2*rsq11*rinv11
397 Vvdwexp = cexp1*exp(-br)
398 Vvdwtot = Vvdwtot+Vvdwexp-Vvdw6
399 fscal = (br*Vvdwexp-6.0*Vvdw6)*rinvsq
401 C Calculate temporary vectorial force
406 C Increment i atom force
411 C Decrement j atom force
412 faction(j3+0) = faction(j3+0) - tx
413 faction(j3+1) = faction(j3+1) - ty
414 faction(j3+2) = faction(j3+2) - tz
416 C Load parameters for j atom
418 rinvsq = rinv22*rinv22
420 C Coulomb reaction-field interaction
422 vcoul = qq*(rinv22+krsq-crf)
424 fscal = (qq*(rinv22-2.0*krsq))*rinvsq
426 C Calculate temporary vectorial force
431 C Increment i atom force
436 C Decrement j atom force
437 fjx2 = faction(j3+3) - tx
438 fjy2 = faction(j3+4) - ty
439 fjz2 = faction(j3+5) - tz
441 C Load parameters for j atom
443 rinvsq = rinv23*rinv23
445 C Coulomb reaction-field interaction
447 vcoul = qq*(rinv23+krsq-crf)
449 fscal = (qq*(rinv23-2.0*krsq))*rinvsq
451 C Calculate temporary vectorial force
456 C Increment i atom force
461 C Decrement j atom force
462 fjx3 = faction(j3+6) - tx
463 fjy3 = faction(j3+7) - ty
464 fjz3 = faction(j3+8) - tz
466 C Load parameters for j atom
468 rinvsq = rinv24*rinv24
470 C Coulomb reaction-field interaction
472 vcoul = qq*(rinv24+krsq-crf)
474 fscal = (qq*(rinv24-2.0*krsq))*rinvsq
476 C Calculate temporary vectorial force
481 C Increment i atom force
486 C Decrement j atom force
487 fjx4 = faction(j3+9) - tx
488 fjy4 = faction(j3+10) - ty
489 fjz4 = faction(j3+11) - tz
491 C Load parameters for j atom
493 rinvsq = rinv32*rinv32
495 C Coulomb reaction-field interaction
497 vcoul = qq*(rinv32+krsq-crf)
499 fscal = (qq*(rinv32-2.0*krsq))*rinvsq
501 C Calculate temporary vectorial force
506 C Increment i atom force
511 C Decrement j atom force
516 C Load parameters for j atom
518 rinvsq = rinv33*rinv33
520 C Coulomb reaction-field interaction
522 vcoul = qq*(rinv33+krsq-crf)
524 fscal = (qq*(rinv33-2.0*krsq))*rinvsq
526 C Calculate temporary vectorial force
531 C Increment i atom force
536 C Decrement j atom force
541 C Load parameters for j atom
543 rinvsq = rinv34*rinv34
545 C Coulomb reaction-field interaction
547 vcoul = qq*(rinv34+krsq-crf)
549 fscal = (qq*(rinv34-2.0*krsq))*rinvsq
551 C Calculate temporary vectorial force
556 C Increment i atom force
561 C Decrement j atom force
566 C Load parameters for j atom
568 rinvsq = rinv42*rinv42
570 C Coulomb reaction-field interaction
572 vcoul = qq*(rinv42+krsq-crf)
574 fscal = (qq*(rinv42-2.0*krsq))*rinvsq
576 C Calculate temporary vectorial force
581 C Increment i atom force
586 C Decrement j atom force
587 faction(j3+3) = fjx2 - tx
588 faction(j3+4) = fjy2 - ty
589 faction(j3+5) = fjz2 - tz
591 C Load parameters for j atom
593 rinvsq = rinv43*rinv43
595 C Coulomb reaction-field interaction
597 vcoul = qq*(rinv43+krsq-crf)
599 fscal = (qq*(rinv43-2.0*krsq))*rinvsq
601 C Calculate temporary vectorial force
606 C Increment i atom force
611 C Decrement j atom force
612 faction(j3+6) = fjx3 - tx
613 faction(j3+7) = fjy3 - ty
614 faction(j3+8) = fjz3 - tz
616 C Load parameters for j atom
618 rinvsq = rinv44*rinv44
620 C Coulomb reaction-field interaction
622 vcoul = qq*(rinv44+krsq-crf)
624 fscal = (qq*(rinv44-2.0*krsq))*rinvsq
626 C Calculate temporary vectorial force
631 C Increment i atom force
636 C Decrement j atom force
637 faction(j3+9) = fjx4 - tx
638 faction(j3+10) = fjy4 - ty
639 faction(j3+11) = fjz4 - tz
641 C Inner loop uses 359 flops/iteration
645 C Add i forces to mem and shifted force list
646 faction(ii3+0) = faction(ii3+0) + fix1
647 faction(ii3+1) = faction(ii3+1) + fiy1
648 faction(ii3+2) = faction(ii3+2) + fiz1
649 faction(ii3+3) = faction(ii3+3) + fix2
650 faction(ii3+4) = faction(ii3+4) + fiy2
651 faction(ii3+5) = faction(ii3+5) + fiz2
652 faction(ii3+6) = faction(ii3+6) + fix3
653 faction(ii3+7) = faction(ii3+7) + fiy3
654 faction(ii3+8) = faction(ii3+8) + fiz3
655 faction(ii3+9) = faction(ii3+9) + fix4
656 faction(ii3+10) = faction(ii3+10) + fiy4
657 faction(ii3+11) = faction(ii3+11) + fiz4
658 fshift(is3) = fshift(is3)+fix1+fix2+fix3+fix4
659 fshift(is3+1) = fshift(is3+1)+fiy1+fiy2+fiy3+fiy4
660 fshift(is3+2) = fshift(is3+2)+fiz1+fiz2+fiz3+fiz4
662 C Add potential energies to the group for this list
664 Vc(ggid) = Vc(ggid) + vctot
665 Vvdw(ggid) = Vvdw(ggid) + Vvdwtot
667 C Increment number of inner iterations
668 ninner = ninner + nj1 - nj0
670 C Outer loop uses 38 flops/iteration
674 C Increment number of outer iterations
675 nouter = nouter + nn1 - nn0
676 if(nn1.lt.nri) goto 10
678 C Write outer/inner iteration count to pointers
690 C Gromacs nonbonded kernel pwr6kernel224nf
691 C Coulomb interaction: Reaction field
692 C VdW interaction: Buckingham
693 C water optimization: pairs of TIP4P interactions
694 C Calculate forces: no
696 subroutine pwr6kernel224nf(
729 integer*4 nri,iinr(*),jindex(*),jjnr(*),shift(*)
730 gmxreal shiftvec(*),fshift(*),pos(*),faction(*)
731 integer*4 gid(*),type(*),ntype
732 gmxreal charge(*),facel,krf,crf,Vc(*),vdwparam(*)
733 gmxreal Vvdw(*),tabscale,VFtab(*)
734 gmxreal invsqrta(*),dvda(*),gbtabscale,GBtab(*)
735 integer*4 nthreads,count,mtx,outeriter,inneriter
738 integer*4 n,ii,is3,ii3,k,nj0,nj1,jnr,j3,ggid
739 integer*4 nn0,nn1,nouter,ninner
742 gmxreal qq,vcoul,vctot
745 gmxreal Vvdw6,Vvdwtot
756 gmxreal dx11,dy11,dz11,rsq11,rinv11
757 gmxreal dx22,dy22,dz22,rsq22,rinv22
758 gmxreal dx23,dy23,dz23,rsq23,rinv23
759 gmxreal dx24,dy24,dz24,rsq24,rinv24
760 gmxreal dx32,dy32,dz32,rsq32,rinv32
761 gmxreal dx33,dy33,dz33,rsq33,rinv33
762 gmxreal dx34,dy34,dz34,rsq34,rinv34
763 gmxreal dx42,dy42,dz42,rsq42,rinv42
764 gmxreal dx43,dy43,dz43,rsq43,rinv43
765 gmxreal dx44,dy44,dz44,rsq44,rinv44
766 gmxreal qH,qM,qqMM,qqMH,qqHH
767 gmxreal c6,cexp1,cexp2
770 C Initialize water data
777 tj = 3*(ntype+1)*type(ii)+1
779 cexp1 = vdwparam(tj+1)
780 cexp2 = vdwparam(tj+2)
783 C Reset outer and inner iteration counters
787 C Loop over thread workunits
788 10 call pwr6kernelsync(mtx,count,nri,nthreads,nn0,nn1)
789 if(nn1.gt.nri) nn1=nri
791 C Start outer loop over neighborlists
795 C Load shift vector for this list
798 shY = shiftvec(is3+1)
799 shZ = shiftvec(is3+2)
801 C Load limits for loop over neighbors
805 C Get outer coordinate index
809 C Load i atom data, add shift vector
810 ix1 = shX + pos(ii3+0)
811 iy1 = shY + pos(ii3+1)
812 iz1 = shZ + pos(ii3+2)
813 ix2 = shX + pos(ii3+3)
814 iy2 = shY + pos(ii3+4)
815 iz2 = shZ + pos(ii3+5)
816 ix3 = shX + pos(ii3+6)
817 iy3 = shY + pos(ii3+7)
818 iz3 = shZ + pos(ii3+8)
819 ix4 = shX + pos(ii3+9)
820 iy4 = shY + pos(ii3+10)
821 iz4 = shZ + pos(ii3+11)
823 C Zero the potential energy for this list
827 C Clear i atom forces
831 C Get j neighbor index, and coordinate index
835 C load j atom coordinates
853 rsq11 = dx11*dx11+dy11*dy11+dz11*dz11
857 rsq22 = dx22*dx22+dy22*dy22+dz22*dz22
861 rsq23 = dx23*dx23+dy23*dy23+dz23*dz23
865 rsq24 = dx24*dx24+dy24*dy24+dz24*dz24
869 rsq32 = dx32*dx32+dy32*dy32+dz32*dz32
873 rsq33 = dx33*dx33+dy33*dy33+dz33*dz33
877 rsq34 = dx34*dx34+dy34*dy34+dz34*dz34
881 rsq42 = dx42*dx42+dy42*dy42+dz42*dz42
885 rsq43 = dx43*dx43+dy43*dy43+dz43*dz43
889 rsq44 = dx44*dx44+dy44*dy44+dz44*dz44
891 C Calculate 1/r and 1/r2
893 C PowerPC intrinsics 1/sqrt lookup table
895 rinv11 = frsqrtes(rsq11)
897 rinv11 = frsqrte(dble(rsq11))
899 rinv11 = (0.5*rinv11*(3.0-((rsq11*rinv11)
902 rinv11 = (0.5*rinv11*(3.0-((rsq11*rinv11)
906 C PowerPC intrinsics 1/sqrt lookup table
908 rinv22 = frsqrtes(rsq22)
910 rinv22 = frsqrte(dble(rsq22))
912 rinv22 = (0.5*rinv22*(3.0-((rsq22*rinv22)
915 rinv22 = (0.5*rinv22*(3.0-((rsq22*rinv22)
919 C PowerPC intrinsics 1/sqrt lookup table
921 rinv23 = frsqrtes(rsq23)
923 rinv23 = frsqrte(dble(rsq23))
925 rinv23 = (0.5*rinv23*(3.0-((rsq23*rinv23)
928 rinv23 = (0.5*rinv23*(3.0-((rsq23*rinv23)
932 C PowerPC intrinsics 1/sqrt lookup table
934 rinv24 = frsqrtes(rsq24)
936 rinv24 = frsqrte(dble(rsq24))
938 rinv24 = (0.5*rinv24*(3.0-((rsq24*rinv24)
941 rinv24 = (0.5*rinv24*(3.0-((rsq24*rinv24)
945 C PowerPC intrinsics 1/sqrt lookup table
947 rinv32 = frsqrtes(rsq32)
949 rinv32 = frsqrte(dble(rsq32))
951 rinv32 = (0.5*rinv32*(3.0-((rsq32*rinv32)
954 rinv32 = (0.5*rinv32*(3.0-((rsq32*rinv32)
958 C PowerPC intrinsics 1/sqrt lookup table
960 rinv33 = frsqrtes(rsq33)
962 rinv33 = frsqrte(dble(rsq33))
964 rinv33 = (0.5*rinv33*(3.0-((rsq33*rinv33)
967 rinv33 = (0.5*rinv33*(3.0-((rsq33*rinv33)
971 C PowerPC intrinsics 1/sqrt lookup table
973 rinv34 = frsqrtes(rsq34)
975 rinv34 = frsqrte(dble(rsq34))
977 rinv34 = (0.5*rinv34*(3.0-((rsq34*rinv34)
980 rinv34 = (0.5*rinv34*(3.0-((rsq34*rinv34)
984 C PowerPC intrinsics 1/sqrt lookup table
986 rinv42 = frsqrtes(rsq42)
988 rinv42 = frsqrte(dble(rsq42))
990 rinv42 = (0.5*rinv42*(3.0-((rsq42*rinv42)
993 rinv42 = (0.5*rinv42*(3.0-((rsq42*rinv42)
997 C PowerPC intrinsics 1/sqrt lookup table
999 rinv43 = frsqrtes(rsq43)
1001 rinv43 = frsqrte(dble(rsq43))
1003 rinv43 = (0.5*rinv43*(3.0-((rsq43*rinv43)
1006 rinv43 = (0.5*rinv43*(3.0-((rsq43*rinv43)
1010 C PowerPC intrinsics 1/sqrt lookup table
1011 #ifndef GMX_BLUEGENE
1012 rinv44 = frsqrtes(rsq44)
1014 rinv44 = frsqrte(dble(rsq44))
1016 rinv44 = (0.5*rinv44*(3.0-((rsq44*rinv44)
1019 rinv44 = (0.5*rinv44*(3.0-((rsq44*rinv44)
1023 C Load parameters for j atom
1024 rinvsq = rinv11*rinv11
1026 C Buckingham interaction
1027 rinvsix = rinvsq*rinvsq*rinvsq
1029 br = cexp2*rsq11*rinv11
1030 Vvdwexp = cexp1*exp(-br)
1031 Vvdwtot = Vvdwtot+Vvdwexp-Vvdw6
1033 C Load parameters for j atom
1036 C Coulomb reaction-field interaction
1038 vcoul = qq*(rinv22+krsq-crf)
1041 C Load parameters for j atom
1044 C Coulomb reaction-field interaction
1046 vcoul = qq*(rinv23+krsq-crf)
1049 C Load parameters for j atom
1052 C Coulomb reaction-field interaction
1054 vcoul = qq*(rinv24+krsq-crf)
1057 C Load parameters for j atom
1060 C Coulomb reaction-field interaction
1062 vcoul = qq*(rinv32+krsq-crf)
1065 C Load parameters for j atom
1068 C Coulomb reaction-field interaction
1070 vcoul = qq*(rinv33+krsq-crf)
1073 C Load parameters for j atom
1076 C Coulomb reaction-field interaction
1078 vcoul = qq*(rinv34+krsq-crf)
1081 C Load parameters for j atom
1084 C Coulomb reaction-field interaction
1086 vcoul = qq*(rinv42+krsq-crf)
1089 C Load parameters for j atom
1092 C Coulomb reaction-field interaction
1094 vcoul = qq*(rinv43+krsq-crf)
1097 C Load parameters for j atom
1100 C Coulomb reaction-field interaction
1102 vcoul = qq*(rinv44+krsq-crf)
1105 C Inner loop uses 220 flops/iteration
1109 C Add i forces to mem and shifted force list
1111 C Add potential energies to the group for this list
1113 Vc(ggid) = Vc(ggid) + vctot
1114 Vvdw(ggid) = Vvdw(ggid) + Vvdwtot
1116 C Increment number of inner iterations
1117 ninner = ninner + nj1 - nj0
1119 C Outer loop uses 14 flops/iteration
1123 C Increment number of outer iterations
1124 nouter = nouter + nn1 - nn0
1125 if(nn1.lt.nri) goto 10
1127 C Write outer/inner iteration count to pointers