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 pwr6kernel234
45 C Coulomb interaction: Reaction field
46 C VdW interaction: Tabulated
47 C water optimization: pairs of TIP4P interactions
48 C Calculate forces: yes
50 subroutine pwr6kernel234(
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
101 gmxreal r,rt,eps,eps2
103 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,rinv11
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
263 C PowerPC intrinsics 1/sqrt lookup table
265 rinv11 = frsqrtes(rsq11)
267 rinv11 = frsqrte(dble(rsq11))
269 rinv11 = (0.5*rinv11*(3.0-((rsq11*rinv11)
272 rinv11 = (0.5*rinv11*(3.0-((rsq11*rinv11)
276 C PowerPC intrinsics 1/sqrt lookup table
278 rinv22 = frsqrtes(rsq22)
280 rinv22 = frsqrte(dble(rsq22))
282 rinv22 = (0.5*rinv22*(3.0-((rsq22*rinv22)
285 rinv22 = (0.5*rinv22*(3.0-((rsq22*rinv22)
289 C PowerPC intrinsics 1/sqrt lookup table
291 rinv23 = frsqrtes(rsq23)
293 rinv23 = frsqrte(dble(rsq23))
295 rinv23 = (0.5*rinv23*(3.0-((rsq23*rinv23)
298 rinv23 = (0.5*rinv23*(3.0-((rsq23*rinv23)
302 C PowerPC intrinsics 1/sqrt lookup table
304 rinv24 = frsqrtes(rsq24)
306 rinv24 = frsqrte(dble(rsq24))
308 rinv24 = (0.5*rinv24*(3.0-((rsq24*rinv24)
311 rinv24 = (0.5*rinv24*(3.0-((rsq24*rinv24)
315 C PowerPC intrinsics 1/sqrt lookup table
317 rinv32 = frsqrtes(rsq32)
319 rinv32 = frsqrte(dble(rsq32))
321 rinv32 = (0.5*rinv32*(3.0-((rsq32*rinv32)
324 rinv32 = (0.5*rinv32*(3.0-((rsq32*rinv32)
328 C PowerPC intrinsics 1/sqrt lookup table
330 rinv33 = frsqrtes(rsq33)
332 rinv33 = frsqrte(dble(rsq33))
334 rinv33 = (0.5*rinv33*(3.0-((rsq33*rinv33)
337 rinv33 = (0.5*rinv33*(3.0-((rsq33*rinv33)
341 C PowerPC intrinsics 1/sqrt lookup table
343 rinv34 = frsqrtes(rsq34)
345 rinv34 = frsqrte(dble(rsq34))
347 rinv34 = (0.5*rinv34*(3.0-((rsq34*rinv34)
350 rinv34 = (0.5*rinv34*(3.0-((rsq34*rinv34)
354 C PowerPC intrinsics 1/sqrt lookup table
356 rinv42 = frsqrtes(rsq42)
358 rinv42 = frsqrte(dble(rsq42))
360 rinv42 = (0.5*rinv42*(3.0-((rsq42*rinv42)
363 rinv42 = (0.5*rinv42*(3.0-((rsq42*rinv42)
367 C PowerPC intrinsics 1/sqrt lookup table
369 rinv43 = frsqrtes(rsq43)
371 rinv43 = frsqrte(dble(rsq43))
373 rinv43 = (0.5*rinv43*(3.0-((rsq43*rinv43)
376 rinv43 = (0.5*rinv43*(3.0-((rsq43*rinv43)
380 C PowerPC intrinsics 1/sqrt lookup table
382 rinv44 = frsqrtes(rsq44)
384 rinv44 = frsqrte(dble(rsq44))
386 rinv44 = (0.5*rinv44*(3.0-((rsq44*rinv44)
389 rinv44 = (0.5*rinv44*(3.0-((rsq44*rinv44)
393 C Load parameters for j atom
395 C Calculate table index
398 C Calculate table index
405 C Tabulated VdW interaction - dispersion
408 Geps = eps*VFtab(nnn+2)
409 Heps2 = eps2*VFtab(nnn+3)
412 FF = Fp+Geps+2.0*Heps2
416 C Tabulated VdW interaction - repulsion
420 Geps = eps*VFtab(nnn+2)
421 Heps2 = eps2*VFtab(nnn+3)
424 FF = Fp+Geps+2.0*Heps2
427 Vvdwtot = Vvdwtot+ Vvdw6 + Vvdw12
428 fscal = -((fijD+fijR)*tabscale)*rinv11
430 C Calculate temporary vectorial force
435 C Increment i atom force
440 C Decrement j atom force
441 faction(j3+0) = faction(j3+0) - tx
442 faction(j3+1) = faction(j3+1) - ty
443 faction(j3+2) = faction(j3+2) - tz
445 C Load parameters for j atom
447 rinvsq = rinv22*rinv22
449 C Coulomb reaction-field interaction
451 vcoul = qq*(rinv22+krsq-crf)
453 fscal = (qq*(rinv22-2.0*krsq))*rinvsq
455 C Calculate temporary vectorial force
460 C Increment i atom force
465 C Decrement j atom force
466 fjx2 = faction(j3+3) - tx
467 fjy2 = faction(j3+4) - ty
468 fjz2 = faction(j3+5) - tz
470 C Load parameters for j atom
472 rinvsq = rinv23*rinv23
474 C Coulomb reaction-field interaction
476 vcoul = qq*(rinv23+krsq-crf)
478 fscal = (qq*(rinv23-2.0*krsq))*rinvsq
480 C Calculate temporary vectorial force
485 C Increment i atom force
490 C Decrement j atom force
491 fjx3 = faction(j3+6) - tx
492 fjy3 = faction(j3+7) - ty
493 fjz3 = faction(j3+8) - tz
495 C Load parameters for j atom
497 rinvsq = rinv24*rinv24
499 C Coulomb reaction-field interaction
501 vcoul = qq*(rinv24+krsq-crf)
503 fscal = (qq*(rinv24-2.0*krsq))*rinvsq
505 C Calculate temporary vectorial force
510 C Increment i atom force
515 C Decrement j atom force
516 fjx4 = faction(j3+9) - tx
517 fjy4 = faction(j3+10) - ty
518 fjz4 = faction(j3+11) - tz
520 C Load parameters for j atom
522 rinvsq = rinv32*rinv32
524 C Coulomb reaction-field interaction
526 vcoul = qq*(rinv32+krsq-crf)
528 fscal = (qq*(rinv32-2.0*krsq))*rinvsq
530 C Calculate temporary vectorial force
535 C Increment i atom force
540 C Decrement j atom force
545 C Load parameters for j atom
547 rinvsq = rinv33*rinv33
549 C Coulomb reaction-field interaction
551 vcoul = qq*(rinv33+krsq-crf)
553 fscal = (qq*(rinv33-2.0*krsq))*rinvsq
555 C Calculate temporary vectorial force
560 C Increment i atom force
565 C Decrement j atom force
570 C Load parameters for j atom
572 rinvsq = rinv34*rinv34
574 C Coulomb reaction-field interaction
576 vcoul = qq*(rinv34+krsq-crf)
578 fscal = (qq*(rinv34-2.0*krsq))*rinvsq
580 C Calculate temporary vectorial force
585 C Increment i atom force
590 C Decrement j atom force
595 C Load parameters for j atom
597 rinvsq = rinv42*rinv42
599 C Coulomb reaction-field interaction
601 vcoul = qq*(rinv42+krsq-crf)
603 fscal = (qq*(rinv42-2.0*krsq))*rinvsq
605 C Calculate temporary vectorial force
610 C Increment i atom force
615 C Decrement j atom force
616 faction(j3+3) = fjx2 - tx
617 faction(j3+4) = fjy2 - ty
618 faction(j3+5) = fjz2 - tz
620 C Load parameters for j atom
622 rinvsq = rinv43*rinv43
624 C Coulomb reaction-field interaction
626 vcoul = qq*(rinv43+krsq-crf)
628 fscal = (qq*(rinv43-2.0*krsq))*rinvsq
630 C Calculate temporary vectorial force
635 C Increment i atom force
640 C Decrement j atom force
641 faction(j3+6) = fjx3 - tx
642 faction(j3+7) = fjy3 - ty
643 faction(j3+8) = fjz3 - tz
645 C Load parameters for j atom
647 rinvsq = rinv44*rinv44
649 C Coulomb reaction-field interaction
651 vcoul = qq*(rinv44+krsq-crf)
653 fscal = (qq*(rinv44-2.0*krsq))*rinvsq
655 C Calculate temporary vectorial force
660 C Increment i atom force
665 C Decrement j atom force
666 faction(j3+9) = fjx4 - tx
667 faction(j3+10) = fjy4 - ty
668 faction(j3+11) = fjz4 - tz
670 C Inner loop uses 352 flops/iteration
674 C Add i forces to mem and shifted force list
675 faction(ii3+0) = faction(ii3+0) + fix1
676 faction(ii3+1) = faction(ii3+1) + fiy1
677 faction(ii3+2) = faction(ii3+2) + fiz1
678 faction(ii3+3) = faction(ii3+3) + fix2
679 faction(ii3+4) = faction(ii3+4) + fiy2
680 faction(ii3+5) = faction(ii3+5) + fiz2
681 faction(ii3+6) = faction(ii3+6) + fix3
682 faction(ii3+7) = faction(ii3+7) + fiy3
683 faction(ii3+8) = faction(ii3+8) + fiz3
684 faction(ii3+9) = faction(ii3+9) + fix4
685 faction(ii3+10) = faction(ii3+10) + fiy4
686 faction(ii3+11) = faction(ii3+11) + fiz4
687 fshift(is3) = fshift(is3)+fix1+fix2+fix3+fix4
688 fshift(is3+1) = fshift(is3+1)+fiy1+fiy2+fiy3+fiy4
689 fshift(is3+2) = fshift(is3+2)+fiz1+fiz2+fiz3+fiz4
691 C Add potential energies to the group for this list
693 Vc(ggid) = Vc(ggid) + vctot
694 Vvdw(ggid) = Vvdw(ggid) + Vvdwtot
696 C Increment number of inner iterations
697 ninner = ninner + nj1 - nj0
699 C Outer loop uses 38 flops/iteration
703 C Increment number of outer iterations
704 nouter = nouter + nn1 - nn0
705 if(nn1.lt.nri) goto 10
707 C Write outer/inner iteration count to pointers
719 C Gromacs nonbonded kernel pwr6kernel234nf
720 C Coulomb interaction: Reaction field
721 C VdW interaction: Tabulated
722 C water optimization: pairs of TIP4P interactions
723 C Calculate forces: no
725 subroutine pwr6kernel234nf(
758 integer*4 nri,iinr(*),jindex(*),jjnr(*),shift(*)
759 gmxreal shiftvec(*),fshift(*),pos(*),faction(*)
760 integer*4 gid(*),type(*),ntype
761 gmxreal charge(*),facel,krf,crf,Vc(*),vdwparam(*)
762 gmxreal Vvdw(*),tabscale,VFtab(*)
763 gmxreal invsqrta(*),dvda(*),gbtabscale,GBtab(*)
764 integer*4 nthreads,count,mtx,outeriter,inneriter
767 integer*4 n,ii,is3,ii3,k,nj0,nj1,jnr,j3,ggid
768 integer*4 nn0,nn1,nouter,ninner
770 gmxreal qq,vcoul,vctot
772 gmxreal Vvdw6,Vvdwtot
774 gmxreal r,rt,eps,eps2
776 gmxreal Y,F,Geps,Heps2,Fp,VV
786 gmxreal dx11,dy11,dz11,rsq11,rinv11
787 gmxreal dx22,dy22,dz22,rsq22,rinv22
788 gmxreal dx23,dy23,dz23,rsq23,rinv23
789 gmxreal dx24,dy24,dz24,rsq24,rinv24
790 gmxreal dx32,dy32,dz32,rsq32,rinv32
791 gmxreal dx33,dy33,dz33,rsq33,rinv33
792 gmxreal dx34,dy34,dz34,rsq34,rinv34
793 gmxreal dx42,dy42,dz42,rsq42,rinv42
794 gmxreal dx43,dy43,dz43,rsq43,rinv43
795 gmxreal dx44,dy44,dz44,rsq44,rinv44
796 gmxreal qH,qM,qqMM,qqMH,qqHH
800 C Initialize water data
807 tj = 2*(ntype+1)*type(ii)+1
812 C Reset outer and inner iteration counters
816 C Loop over thread workunits
817 10 call pwr6kernelsync(mtx,count,nri,nthreads,nn0,nn1)
818 if(nn1.gt.nri) nn1=nri
820 C Start outer loop over neighborlists
824 C Load shift vector for this list
827 shY = shiftvec(is3+1)
828 shZ = shiftvec(is3+2)
830 C Load limits for loop over neighbors
834 C Get outer coordinate index
838 C Load i atom data, add shift vector
839 ix1 = shX + pos(ii3+0)
840 iy1 = shY + pos(ii3+1)
841 iz1 = shZ + pos(ii3+2)
842 ix2 = shX + pos(ii3+3)
843 iy2 = shY + pos(ii3+4)
844 iz2 = shZ + pos(ii3+5)
845 ix3 = shX + pos(ii3+6)
846 iy3 = shY + pos(ii3+7)
847 iz3 = shZ + pos(ii3+8)
848 ix4 = shX + pos(ii3+9)
849 iy4 = shY + pos(ii3+10)
850 iz4 = shZ + pos(ii3+11)
852 C Zero the potential energy for this list
856 C Clear i atom forces
860 C Get j neighbor index, and coordinate index
864 C load j atom coordinates
882 rsq11 = dx11*dx11+dy11*dy11+dz11*dz11
886 rsq22 = dx22*dx22+dy22*dy22+dz22*dz22
890 rsq23 = dx23*dx23+dy23*dy23+dz23*dz23
894 rsq24 = dx24*dx24+dy24*dy24+dz24*dz24
898 rsq32 = dx32*dx32+dy32*dy32+dz32*dz32
902 rsq33 = dx33*dx33+dy33*dy33+dz33*dz33
906 rsq34 = dx34*dx34+dy34*dy34+dz34*dz34
910 rsq42 = dx42*dx42+dy42*dy42+dz42*dz42
914 rsq43 = dx43*dx43+dy43*dy43+dz43*dz43
918 rsq44 = dx44*dx44+dy44*dy44+dz44*dz44
920 C Calculate 1/r and 1/r2
922 C PowerPC intrinsics 1/sqrt lookup table
924 rinv11 = frsqrtes(rsq11)
926 rinv11 = frsqrte(dble(rsq11))
928 rinv11 = (0.5*rinv11*(3.0-((rsq11*rinv11)
931 rinv11 = (0.5*rinv11*(3.0-((rsq11*rinv11)
935 C PowerPC intrinsics 1/sqrt lookup table
937 rinv22 = frsqrtes(rsq22)
939 rinv22 = frsqrte(dble(rsq22))
941 rinv22 = (0.5*rinv22*(3.0-((rsq22*rinv22)
944 rinv22 = (0.5*rinv22*(3.0-((rsq22*rinv22)
948 C PowerPC intrinsics 1/sqrt lookup table
950 rinv23 = frsqrtes(rsq23)
952 rinv23 = frsqrte(dble(rsq23))
954 rinv23 = (0.5*rinv23*(3.0-((rsq23*rinv23)
957 rinv23 = (0.5*rinv23*(3.0-((rsq23*rinv23)
961 C PowerPC intrinsics 1/sqrt lookup table
963 rinv24 = frsqrtes(rsq24)
965 rinv24 = frsqrte(dble(rsq24))
967 rinv24 = (0.5*rinv24*(3.0-((rsq24*rinv24)
970 rinv24 = (0.5*rinv24*(3.0-((rsq24*rinv24)
974 C PowerPC intrinsics 1/sqrt lookup table
976 rinv32 = frsqrtes(rsq32)
978 rinv32 = frsqrte(dble(rsq32))
980 rinv32 = (0.5*rinv32*(3.0-((rsq32*rinv32)
983 rinv32 = (0.5*rinv32*(3.0-((rsq32*rinv32)
987 C PowerPC intrinsics 1/sqrt lookup table
989 rinv33 = frsqrtes(rsq33)
991 rinv33 = frsqrte(dble(rsq33))
993 rinv33 = (0.5*rinv33*(3.0-((rsq33*rinv33)
996 rinv33 = (0.5*rinv33*(3.0-((rsq33*rinv33)
1000 C PowerPC intrinsics 1/sqrt lookup table
1001 #ifndef GMX_BLUEGENE
1002 rinv34 = frsqrtes(rsq34)
1004 rinv34 = frsqrte(dble(rsq34))
1006 rinv34 = (0.5*rinv34*(3.0-((rsq34*rinv34)
1009 rinv34 = (0.5*rinv34*(3.0-((rsq34*rinv34)
1013 C PowerPC intrinsics 1/sqrt lookup table
1014 #ifndef GMX_BLUEGENE
1015 rinv42 = frsqrtes(rsq42)
1017 rinv42 = frsqrte(dble(rsq42))
1019 rinv42 = (0.5*rinv42*(3.0-((rsq42*rinv42)
1022 rinv42 = (0.5*rinv42*(3.0-((rsq42*rinv42)
1026 C PowerPC intrinsics 1/sqrt lookup table
1027 #ifndef GMX_BLUEGENE
1028 rinv43 = frsqrtes(rsq43)
1030 rinv43 = frsqrte(dble(rsq43))
1032 rinv43 = (0.5*rinv43*(3.0-((rsq43*rinv43)
1035 rinv43 = (0.5*rinv43*(3.0-((rsq43*rinv43)
1039 C PowerPC intrinsics 1/sqrt lookup table
1040 #ifndef GMX_BLUEGENE
1041 rinv44 = frsqrtes(rsq44)
1043 rinv44 = frsqrte(dble(rsq44))
1045 rinv44 = (0.5*rinv44*(3.0-((rsq44*rinv44)
1048 rinv44 = (0.5*rinv44*(3.0-((rsq44*rinv44)
1052 C Load parameters for j atom
1054 C Calculate table index
1057 C Calculate table index
1064 C Tabulated VdW interaction - dispersion
1067 Geps = eps*VFtab(nnn+2)
1068 Heps2 = eps2*VFtab(nnn+3)
1073 C Tabulated VdW interaction - repulsion
1077 Geps = eps*VFtab(nnn+2)
1078 Heps2 = eps2*VFtab(nnn+3)
1082 Vvdwtot = Vvdwtot+ Vvdw6 + Vvdw12
1084 C Load parameters for j atom
1087 C Coulomb reaction-field interaction
1089 vcoul = qq*(rinv22+krsq-crf)
1092 C Load parameters for j atom
1095 C Coulomb reaction-field interaction
1097 vcoul = qq*(rinv23+krsq-crf)
1100 C Load parameters for j atom
1103 C Coulomb reaction-field interaction
1105 vcoul = qq*(rinv24+krsq-crf)
1108 C Load parameters for j atom
1111 C Coulomb reaction-field interaction
1113 vcoul = qq*(rinv32+krsq-crf)
1116 C Load parameters for j atom
1119 C Coulomb reaction-field interaction
1121 vcoul = qq*(rinv33+krsq-crf)
1124 C Load parameters for j atom
1127 C Coulomb reaction-field interaction
1129 vcoul = qq*(rinv34+krsq-crf)
1132 C Load parameters for j atom
1135 C Coulomb reaction-field interaction
1137 vcoul = qq*(rinv42+krsq-crf)
1140 C Load parameters for j atom
1143 C Coulomb reaction-field interaction
1145 vcoul = qq*(rinv43+krsq-crf)
1148 C Load parameters for j atom
1151 C Coulomb reaction-field interaction
1153 vcoul = qq*(rinv44+krsq-crf)
1156 C Inner loop uses 205 flops/iteration
1160 C Add i forces to mem and shifted force list
1162 C Add potential energies to the group for this list
1164 Vc(ggid) = Vc(ggid) + vctot
1165 Vvdw(ggid) = Vvdw(ggid) + Vvdwtot
1167 C Increment number of inner iterations
1168 ninner = ninner + nj1 - nj0
1170 C Outer loop uses 14 flops/iteration
1174 C Increment number of outer iterations
1175 nouter = nouter + nn1 - nn0
1176 if(nn1.lt.nri) goto 10
1178 C Write outer/inner iteration count to pointers