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 pwr6kernel314
45 C Coulomb interaction: Tabulated
46 C VdW interaction: Lennard-Jones
47 C water optimization: pairs of TIP4P interactions
48 C Calculate forces: yes
50 subroutine pwr6kernel314(
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
102 gmxreal r,rt,eps,eps2
104 gmxreal Y,F,Geps,Heps2,Fp,VV
107 gmxreal ix1,iy1,iz1,fix1,fiy1,fiz1
108 gmxreal ix2,iy2,iz2,fix2,fiy2,fiz2
109 gmxreal ix3,iy3,iz3,fix3,fiy3,fiz3
110 gmxreal ix4,iy4,iz4,fix4,fiy4,fiz4
112 gmxreal jx2,jy2,jz2,fjx2,fjy2,fjz2
113 gmxreal jx3,jy3,jz3,fjx3,fjy3,fjz3
114 gmxreal jx4,jy4,jz4,fjx4,fjy4,fjz4
115 gmxreal dx11,dy11,dz11,rsq11
116 gmxreal dx22,dy22,dz22,rsq22,rinv22
117 gmxreal dx23,dy23,dz23,rsq23,rinv23
118 gmxreal dx24,dy24,dz24,rsq24,rinv24
119 gmxreal dx32,dy32,dz32,rsq32,rinv32
120 gmxreal dx33,dy33,dz33,rsq33,rinv33
121 gmxreal dx34,dy34,dz34,rsq34,rinv34
122 gmxreal dx42,dy42,dz42,rsq42,rinv42
123 gmxreal dx43,dy43,dz43,rsq43,rinv43
124 gmxreal dx44,dy44,dz44,rsq44,rinv44
125 gmxreal qH,qM,qqMM,qqMH,qqHH
129 C Initialize water data
136 tj = 2*(ntype+1)*type(ii)+1
141 C Reset outer and inner iteration counters
145 C Loop over thread workunits
146 10 call pwr6kernelsync(mtx,count,nri,nthreads,nn0,nn1)
147 if(nn1.gt.nri) nn1=nri
149 C Start outer loop over neighborlists
153 C Load shift vector for this list
156 shY = shiftvec(is3+1)
157 shZ = shiftvec(is3+2)
159 C Load limits for loop over neighbors
163 C Get outer coordinate index
167 C Load i atom data, add shift vector
168 ix1 = shX + pos(ii3+0)
169 iy1 = shY + pos(ii3+1)
170 iz1 = shZ + pos(ii3+2)
171 ix2 = shX + pos(ii3+3)
172 iy2 = shY + pos(ii3+4)
173 iz2 = shZ + pos(ii3+5)
174 ix3 = shX + pos(ii3+6)
175 iy3 = shY + pos(ii3+7)
176 iz3 = shZ + pos(ii3+8)
177 ix4 = shX + pos(ii3+9)
178 iy4 = shY + pos(ii3+10)
179 iz4 = shZ + pos(ii3+11)
181 C Zero the potential energy for this list
185 C Clear i atom forces
201 C Get j neighbor index, and coordinate index
205 C load j atom coordinates
223 rsq11 = dx11*dx11+dy11*dy11+dz11*dz11
227 rsq22 = dx22*dx22+dy22*dy22+dz22*dz22
231 rsq23 = dx23*dx23+dy23*dy23+dz23*dz23
235 rsq24 = dx24*dx24+dy24*dy24+dz24*dz24
239 rsq32 = dx32*dx32+dy32*dy32+dz32*dz32
243 rsq33 = dx33*dx33+dy33*dy33+dz33*dz33
247 rsq34 = dx34*dx34+dy34*dy34+dz34*dz34
251 rsq42 = dx42*dx42+dy42*dy42+dz42*dz42
255 rsq43 = dx43*dx43+dy43*dy43+dz43*dz43
259 rsq44 = dx44*dx44+dy44*dy44+dz44*dz44
261 C Calculate 1/r and 1/r2
264 C PowerPC intrinsics 1/sqrt lookup table
266 rinv22 = frsqrtes(rsq22)
268 rinv22 = frsqrte(dble(rsq22))
270 rinv22 = (0.5*rinv22*(3.0-((rsq22*rinv22)
273 rinv22 = (0.5*rinv22*(3.0-((rsq22*rinv22)
277 C PowerPC intrinsics 1/sqrt lookup table
279 rinv23 = frsqrtes(rsq23)
281 rinv23 = frsqrte(dble(rsq23))
283 rinv23 = (0.5*rinv23*(3.0-((rsq23*rinv23)
286 rinv23 = (0.5*rinv23*(3.0-((rsq23*rinv23)
290 C PowerPC intrinsics 1/sqrt lookup table
292 rinv24 = frsqrtes(rsq24)
294 rinv24 = frsqrte(dble(rsq24))
296 rinv24 = (0.5*rinv24*(3.0-((rsq24*rinv24)
299 rinv24 = (0.5*rinv24*(3.0-((rsq24*rinv24)
303 C PowerPC intrinsics 1/sqrt lookup table
305 rinv32 = frsqrtes(rsq32)
307 rinv32 = frsqrte(dble(rsq32))
309 rinv32 = (0.5*rinv32*(3.0-((rsq32*rinv32)
312 rinv32 = (0.5*rinv32*(3.0-((rsq32*rinv32)
316 C PowerPC intrinsics 1/sqrt lookup table
318 rinv33 = frsqrtes(rsq33)
320 rinv33 = frsqrte(dble(rsq33))
322 rinv33 = (0.5*rinv33*(3.0-((rsq33*rinv33)
325 rinv33 = (0.5*rinv33*(3.0-((rsq33*rinv33)
329 C PowerPC intrinsics 1/sqrt lookup table
331 rinv34 = frsqrtes(rsq34)
333 rinv34 = frsqrte(dble(rsq34))
335 rinv34 = (0.5*rinv34*(3.0-((rsq34*rinv34)
338 rinv34 = (0.5*rinv34*(3.0-((rsq34*rinv34)
342 C PowerPC intrinsics 1/sqrt lookup table
344 rinv42 = frsqrtes(rsq42)
346 rinv42 = frsqrte(dble(rsq42))
348 rinv42 = (0.5*rinv42*(3.0-((rsq42*rinv42)
351 rinv42 = (0.5*rinv42*(3.0-((rsq42*rinv42)
355 C PowerPC intrinsics 1/sqrt lookup table
357 rinv43 = frsqrtes(rsq43)
359 rinv43 = frsqrte(dble(rsq43))
361 rinv43 = (0.5*rinv43*(3.0-((rsq43*rinv43)
364 rinv43 = (0.5*rinv43*(3.0-((rsq43*rinv43)
368 C PowerPC intrinsics 1/sqrt lookup table
370 rinv44 = frsqrtes(rsq44)
372 rinv44 = frsqrte(dble(rsq44))
374 rinv44 = (0.5*rinv44*(3.0-((rsq44*rinv44)
377 rinv44 = (0.5*rinv44*(3.0-((rsq44*rinv44)
381 C Load parameters for j atom
383 C Lennard-Jones interaction
384 rinvsix = rinvsq*rinvsq*rinvsq
386 Vvdw12 = c12*rinvsix*rinvsix
387 Vvdwtot = Vvdwtot+Vvdw12-Vvdw6
388 fscal = (12.0*Vvdw12-6.0*Vvdw6)*rinvsq
390 C Calculate temporary vectorial force
395 C Increment i atom force
400 C Decrement j atom force
401 faction(j3+0) = faction(j3+0) - tx
402 faction(j3+1) = faction(j3+1) - ty
403 faction(j3+2) = faction(j3+2) - tz
405 C Load parameters for j atom
408 C Calculate table index
411 C Calculate table index
418 C Tabulated coulomb interaction
421 Geps = eps*VFtab(nnn+2)
422 Heps2 = eps2*VFtab(nnn+3)
425 FF = Fp+Geps+2.0*Heps2
428 vctot = vctot + vcoul
429 fscal = -((fijC)*tabscale)*rinv22
431 C Calculate temporary vectorial force
436 C Increment i atom force
441 C Decrement j atom force
442 fjx2 = faction(j3+3) - tx
443 fjy2 = faction(j3+4) - ty
444 fjz2 = faction(j3+5) - tz
446 C Load parameters for j atom
449 C Calculate table index
452 C Calculate table index
459 C Tabulated coulomb interaction
462 Geps = eps*VFtab(nnn+2)
463 Heps2 = eps2*VFtab(nnn+3)
466 FF = Fp+Geps+2.0*Heps2
469 vctot = vctot + vcoul
470 fscal = -((fijC)*tabscale)*rinv23
472 C Calculate temporary vectorial force
477 C Increment i atom force
482 C Decrement j atom force
483 fjx3 = faction(j3+6) - tx
484 fjy3 = faction(j3+7) - ty
485 fjz3 = faction(j3+8) - tz
487 C Load parameters for j atom
490 C Calculate table index
493 C Calculate table index
500 C Tabulated coulomb interaction
503 Geps = eps*VFtab(nnn+2)
504 Heps2 = eps2*VFtab(nnn+3)
507 FF = Fp+Geps+2.0*Heps2
510 vctot = vctot + vcoul
511 fscal = -((fijC)*tabscale)*rinv24
513 C Calculate temporary vectorial force
518 C Increment i atom force
523 C Decrement j atom force
524 fjx4 = faction(j3+9) - tx
525 fjy4 = faction(j3+10) - ty
526 fjz4 = faction(j3+11) - tz
528 C Load parameters for j atom
531 C Calculate table index
534 C Calculate table index
541 C Tabulated coulomb interaction
544 Geps = eps*VFtab(nnn+2)
545 Heps2 = eps2*VFtab(nnn+3)
548 FF = Fp+Geps+2.0*Heps2
551 vctot = vctot + vcoul
552 fscal = -((fijC)*tabscale)*rinv32
554 C Calculate temporary vectorial force
559 C Increment i atom force
564 C Decrement j atom force
569 C Load parameters for j atom
572 C Calculate table index
575 C Calculate table index
582 C Tabulated coulomb interaction
585 Geps = eps*VFtab(nnn+2)
586 Heps2 = eps2*VFtab(nnn+3)
589 FF = Fp+Geps+2.0*Heps2
592 vctot = vctot + vcoul
593 fscal = -((fijC)*tabscale)*rinv33
595 C Calculate temporary vectorial force
600 C Increment i atom force
605 C Decrement j atom force
610 C Load parameters for j atom
613 C Calculate table index
616 C Calculate table index
623 C Tabulated coulomb interaction
626 Geps = eps*VFtab(nnn+2)
627 Heps2 = eps2*VFtab(nnn+3)
630 FF = Fp+Geps+2.0*Heps2
633 vctot = vctot + vcoul
634 fscal = -((fijC)*tabscale)*rinv34
636 C Calculate temporary vectorial force
641 C Increment i atom force
646 C Decrement j atom force
651 C Load parameters for j atom
654 C Calculate table index
657 C Calculate table index
664 C Tabulated coulomb interaction
667 Geps = eps*VFtab(nnn+2)
668 Heps2 = eps2*VFtab(nnn+3)
671 FF = Fp+Geps+2.0*Heps2
674 vctot = vctot + vcoul
675 fscal = -((fijC)*tabscale)*rinv42
677 C Calculate temporary vectorial force
682 C Increment i atom force
687 C Decrement j atom force
688 faction(j3+3) = fjx2 - tx
689 faction(j3+4) = fjy2 - ty
690 faction(j3+5) = fjz2 - tz
692 C Load parameters for j atom
695 C Calculate table index
698 C Calculate table index
705 C Tabulated coulomb interaction
708 Geps = eps*VFtab(nnn+2)
709 Heps2 = eps2*VFtab(nnn+3)
712 FF = Fp+Geps+2.0*Heps2
715 vctot = vctot + vcoul
716 fscal = -((fijC)*tabscale)*rinv43
718 C Calculate temporary vectorial force
723 C Increment i atom force
728 C Decrement j atom force
729 faction(j3+6) = fjx3 - tx
730 faction(j3+7) = fjy3 - ty
731 faction(j3+8) = fjz3 - tz
733 C Load parameters for j atom
736 C Calculate table index
739 C Calculate table index
746 C Tabulated coulomb interaction
749 Geps = eps*VFtab(nnn+2)
750 Heps2 = eps2*VFtab(nnn+3)
753 FF = Fp+Geps+2.0*Heps2
756 vctot = vctot + vcoul
757 fscal = -((fijC)*tabscale)*rinv44
759 C Calculate temporary vectorial force
764 C Increment i atom force
769 C Decrement j atom force
770 faction(j3+9) = fjx4 - tx
771 faction(j3+10) = fjy4 - ty
772 faction(j3+11) = fjz4 - tz
774 C Inner loop uses 411 flops/iteration
778 C Add i forces to mem and shifted force list
779 faction(ii3+0) = faction(ii3+0) + fix1
780 faction(ii3+1) = faction(ii3+1) + fiy1
781 faction(ii3+2) = faction(ii3+2) + fiz1
782 faction(ii3+3) = faction(ii3+3) + fix2
783 faction(ii3+4) = faction(ii3+4) + fiy2
784 faction(ii3+5) = faction(ii3+5) + fiz2
785 faction(ii3+6) = faction(ii3+6) + fix3
786 faction(ii3+7) = faction(ii3+7) + fiy3
787 faction(ii3+8) = faction(ii3+8) + fiz3
788 faction(ii3+9) = faction(ii3+9) + fix4
789 faction(ii3+10) = faction(ii3+10) + fiy4
790 faction(ii3+11) = faction(ii3+11) + fiz4
791 fshift(is3) = fshift(is3)+fix1+fix2+fix3+fix4
792 fshift(is3+1) = fshift(is3+1)+fiy1+fiy2+fiy3+fiy4
793 fshift(is3+2) = fshift(is3+2)+fiz1+fiz2+fiz3+fiz4
795 C Add potential energies to the group for this list
797 Vc(ggid) = Vc(ggid) + vctot
798 Vvdw(ggid) = Vvdw(ggid) + Vvdwtot
800 C Increment number of inner iterations
801 ninner = ninner + nj1 - nj0
803 C Outer loop uses 38 flops/iteration
807 C Increment number of outer iterations
808 nouter = nouter + nn1 - nn0
809 if(nn1.lt.nri) goto 10
811 C Write outer/inner iteration count to pointers
823 C Gromacs nonbonded kernel pwr6kernel314nf
824 C Coulomb interaction: Tabulated
825 C VdW interaction: Lennard-Jones
826 C water optimization: pairs of TIP4P interactions
827 C Calculate forces: no
829 subroutine pwr6kernel314nf(
862 integer*4 nri,iinr(*),jindex(*),jjnr(*),shift(*)
863 gmxreal shiftvec(*),fshift(*),pos(*),faction(*)
864 integer*4 gid(*),type(*),ntype
865 gmxreal charge(*),facel,krf,crf,Vc(*),vdwparam(*)
866 gmxreal Vvdw(*),tabscale,VFtab(*)
867 gmxreal invsqrta(*),dvda(*),gbtabscale,GBtab(*)
868 integer*4 nthreads,count,mtx,outeriter,inneriter
871 integer*4 n,ii,is3,ii3,k,nj0,nj1,jnr,j3,ggid
872 integer*4 nn0,nn1,nouter,ninner
875 gmxreal qq,vcoul,vctot
878 gmxreal Vvdw6,Vvdwtot
880 gmxreal r,rt,eps,eps2
882 gmxreal Y,F,Geps,Heps2,Fp,VV
891 gmxreal dx11,dy11,dz11,rsq11
892 gmxreal dx22,dy22,dz22,rsq22,rinv22
893 gmxreal dx23,dy23,dz23,rsq23,rinv23
894 gmxreal dx24,dy24,dz24,rsq24,rinv24
895 gmxreal dx32,dy32,dz32,rsq32,rinv32
896 gmxreal dx33,dy33,dz33,rsq33,rinv33
897 gmxreal dx34,dy34,dz34,rsq34,rinv34
898 gmxreal dx42,dy42,dz42,rsq42,rinv42
899 gmxreal dx43,dy43,dz43,rsq43,rinv43
900 gmxreal dx44,dy44,dz44,rsq44,rinv44
901 gmxreal qH,qM,qqMM,qqMH,qqHH
905 C Initialize water data
912 tj = 2*(ntype+1)*type(ii)+1
917 C Reset outer and inner iteration counters
921 C Loop over thread workunits
922 10 call pwr6kernelsync(mtx,count,nri,nthreads,nn0,nn1)
923 if(nn1.gt.nri) nn1=nri
925 C Start outer loop over neighborlists
929 C Load shift vector for this list
932 shY = shiftvec(is3+1)
933 shZ = shiftvec(is3+2)
935 C Load limits for loop over neighbors
939 C Get outer coordinate index
943 C Load i atom data, add shift vector
944 ix1 = shX + pos(ii3+0)
945 iy1 = shY + pos(ii3+1)
946 iz1 = shZ + pos(ii3+2)
947 ix2 = shX + pos(ii3+3)
948 iy2 = shY + pos(ii3+4)
949 iz2 = shZ + pos(ii3+5)
950 ix3 = shX + pos(ii3+6)
951 iy3 = shY + pos(ii3+7)
952 iz3 = shZ + pos(ii3+8)
953 ix4 = shX + pos(ii3+9)
954 iy4 = shY + pos(ii3+10)
955 iz4 = shZ + pos(ii3+11)
957 C Zero the potential energy for this list
961 C Clear i atom forces
965 C Get j neighbor index, and coordinate index
969 C load j atom coordinates
987 rsq11 = dx11*dx11+dy11*dy11+dz11*dz11
991 rsq22 = dx22*dx22+dy22*dy22+dz22*dz22
995 rsq23 = dx23*dx23+dy23*dy23+dz23*dz23
999 rsq24 = dx24*dx24+dy24*dy24+dz24*dz24
1003 rsq32 = dx32*dx32+dy32*dy32+dz32*dz32
1007 rsq33 = dx33*dx33+dy33*dy33+dz33*dz33
1011 rsq34 = dx34*dx34+dy34*dy34+dz34*dz34
1015 rsq42 = dx42*dx42+dy42*dy42+dz42*dz42
1019 rsq43 = dx43*dx43+dy43*dy43+dz43*dz43
1023 rsq44 = dx44*dx44+dy44*dy44+dz44*dz44
1025 C Calculate 1/r and 1/r2
1028 C PowerPC intrinsics 1/sqrt lookup table
1029 #ifndef GMX_BLUEGENE
1030 rinv22 = frsqrtes(rsq22)
1032 rinv22 = frsqrte(dble(rsq22))
1034 rinv22 = (0.5*rinv22*(3.0-((rsq22*rinv22)
1037 rinv22 = (0.5*rinv22*(3.0-((rsq22*rinv22)
1041 C PowerPC intrinsics 1/sqrt lookup table
1042 #ifndef GMX_BLUEGENE
1043 rinv23 = frsqrtes(rsq23)
1045 rinv23 = frsqrte(dble(rsq23))
1047 rinv23 = (0.5*rinv23*(3.0-((rsq23*rinv23)
1050 rinv23 = (0.5*rinv23*(3.0-((rsq23*rinv23)
1054 C PowerPC intrinsics 1/sqrt lookup table
1055 #ifndef GMX_BLUEGENE
1056 rinv24 = frsqrtes(rsq24)
1058 rinv24 = frsqrte(dble(rsq24))
1060 rinv24 = (0.5*rinv24*(3.0-((rsq24*rinv24)
1063 rinv24 = (0.5*rinv24*(3.0-((rsq24*rinv24)
1067 C PowerPC intrinsics 1/sqrt lookup table
1068 #ifndef GMX_BLUEGENE
1069 rinv32 = frsqrtes(rsq32)
1071 rinv32 = frsqrte(dble(rsq32))
1073 rinv32 = (0.5*rinv32*(3.0-((rsq32*rinv32)
1076 rinv32 = (0.5*rinv32*(3.0-((rsq32*rinv32)
1080 C PowerPC intrinsics 1/sqrt lookup table
1081 #ifndef GMX_BLUEGENE
1082 rinv33 = frsqrtes(rsq33)
1084 rinv33 = frsqrte(dble(rsq33))
1086 rinv33 = (0.5*rinv33*(3.0-((rsq33*rinv33)
1089 rinv33 = (0.5*rinv33*(3.0-((rsq33*rinv33)
1093 C PowerPC intrinsics 1/sqrt lookup table
1094 #ifndef GMX_BLUEGENE
1095 rinv34 = frsqrtes(rsq34)
1097 rinv34 = frsqrte(dble(rsq34))
1099 rinv34 = (0.5*rinv34*(3.0-((rsq34*rinv34)
1102 rinv34 = (0.5*rinv34*(3.0-((rsq34*rinv34)
1106 C PowerPC intrinsics 1/sqrt lookup table
1107 #ifndef GMX_BLUEGENE
1108 rinv42 = frsqrtes(rsq42)
1110 rinv42 = frsqrte(dble(rsq42))
1112 rinv42 = (0.5*rinv42*(3.0-((rsq42*rinv42)
1115 rinv42 = (0.5*rinv42*(3.0-((rsq42*rinv42)
1119 C PowerPC intrinsics 1/sqrt lookup table
1120 #ifndef GMX_BLUEGENE
1121 rinv43 = frsqrtes(rsq43)
1123 rinv43 = frsqrte(dble(rsq43))
1125 rinv43 = (0.5*rinv43*(3.0-((rsq43*rinv43)
1128 rinv43 = (0.5*rinv43*(3.0-((rsq43*rinv43)
1132 C PowerPC intrinsics 1/sqrt lookup table
1133 #ifndef GMX_BLUEGENE
1134 rinv44 = frsqrtes(rsq44)
1136 rinv44 = frsqrte(dble(rsq44))
1138 rinv44 = (0.5*rinv44*(3.0-((rsq44*rinv44)
1141 rinv44 = (0.5*rinv44*(3.0-((rsq44*rinv44)
1145 C Load parameters for j atom
1147 C Lennard-Jones interaction
1148 rinvsix = rinvsq*rinvsq*rinvsq
1150 Vvdw12 = c12*rinvsix*rinvsix
1151 Vvdwtot = Vvdwtot+Vvdw12-Vvdw6
1153 C Load parameters for j atom
1156 C Calculate table index
1159 C Calculate table index
1166 C Tabulated coulomb interaction
1169 Geps = eps*VFtab(nnn+2)
1170 Heps2 = eps2*VFtab(nnn+3)
1174 vctot = vctot + vcoul
1176 C Load parameters for j atom
1179 C Calculate table index
1182 C Calculate table index
1189 C Tabulated coulomb interaction
1192 Geps = eps*VFtab(nnn+2)
1193 Heps2 = eps2*VFtab(nnn+3)
1197 vctot = vctot + vcoul
1199 C Load parameters for j atom
1202 C Calculate table index
1205 C Calculate table index
1212 C Tabulated coulomb interaction
1215 Geps = eps*VFtab(nnn+2)
1216 Heps2 = eps2*VFtab(nnn+3)
1220 vctot = vctot + vcoul
1222 C Load parameters for j atom
1225 C Calculate table index
1228 C Calculate table index
1235 C Tabulated coulomb interaction
1238 Geps = eps*VFtab(nnn+2)
1239 Heps2 = eps2*VFtab(nnn+3)
1243 vctot = vctot + vcoul
1245 C Load parameters for j atom
1248 C Calculate table index
1251 C Calculate table index
1258 C Tabulated coulomb interaction
1261 Geps = eps*VFtab(nnn+2)
1262 Heps2 = eps2*VFtab(nnn+3)
1266 vctot = vctot + vcoul
1268 C Load parameters for j atom
1271 C Calculate table index
1274 C Calculate table index
1281 C Tabulated coulomb interaction
1284 Geps = eps*VFtab(nnn+2)
1285 Heps2 = eps2*VFtab(nnn+3)
1289 vctot = vctot + vcoul
1291 C Load parameters for j atom
1294 C Calculate table index
1297 C Calculate table index
1304 C Tabulated coulomb interaction
1307 Geps = eps*VFtab(nnn+2)
1308 Heps2 = eps2*VFtab(nnn+3)
1312 vctot = vctot + vcoul
1314 C Load parameters for j atom
1317 C Calculate table index
1320 C Calculate table index
1327 C Tabulated coulomb interaction
1330 Geps = eps*VFtab(nnn+2)
1331 Heps2 = eps2*VFtab(nnn+3)
1335 vctot = vctot + vcoul
1337 C Load parameters for j atom
1340 C Calculate table index
1343 C Calculate table index
1350 C Tabulated coulomb interaction
1353 Geps = eps*VFtab(nnn+2)
1354 Heps2 = eps2*VFtab(nnn+3)
1358 vctot = vctot + vcoul
1360 C Inner loop uses 253 flops/iteration
1364 C Add i forces to mem and shifted force list
1366 C Add potential energies to the group for this list
1368 Vc(ggid) = Vc(ggid) + vctot
1369 Vvdw(ggid) = Vvdw(ggid) + Vvdwtot
1371 C Increment number of inner iterations
1372 ninner = ninner + nj1 - nj0
1374 C Outer loop uses 14 flops/iteration
1378 C Increment number of outer iterations
1379 nouter = nouter + nn1 - nn0
1380 if(nn1.lt.nri) goto 10
1382 C Write outer/inner iteration count to pointers