import re
import sys
import os
+os.chdir(os.path.dirname(os.path.abspath(__file__)))
import collections # Requires Python 2.7
sys.path.append('../../../../../admin')
from copyright import create_copyright_header
# The dict order must match the order of a C enumeration.
VdwTreatmentDict = collections.OrderedDict()
-VdwTreatmentDict['VdwLJCombGeom'] = { 'define' : '#define LJ_COMB_GEOM' }
-VdwTreatmentDict['VdwLJCombLB'] = { 'define' : '#define LJ_COMB_LB' }
-VdwTreatmentDict['VdwLJ'] = { 'define' : '/* Use no LJ combination rule */' }
-VdwTreatmentDict['VdwLJFSw'] = { 'define' : '/* Use no LJ combination rule */\n#define LJ_FORCE_SWITCH' }
-VdwTreatmentDict['VdwLJPSw'] = { 'define' : '/* Use no LJ combination rule */\n#define LJ_POT_SWITCH' }
+VdwTreatmentDict['VdwLJCombGeom'] = { 'define' : '#define LJ_CUT\n#define LJ_COMB_GEOM' }
+VdwTreatmentDict['VdwLJCombLB'] = { 'define' : '#define LJ_CUT\n#define LJ_COMB_LB' }
+VdwTreatmentDict['VdwLJ'] = { 'define' : '#define LJ_CUT\n/* Use full LJ combination matrix */' }
+VdwTreatmentDict['VdwLJFSw'] = { 'define' : '#define LJ_FORCE_SWITCH\n/* Use full LJ combination matrix */' }
+VdwTreatmentDict['VdwLJPSw'] = { 'define' : '#define LJ_POT_SWITCH\n/* Use full LJ combination matrix */' }
+VdwTreatmentDict['VdwLJEwCombGeom'] = { 'define' : '#define LJ_CUT\n#define LJ_EWALD_GEOM\n/* Use full LJ combination matrix + geometric rule for the grid correction */' }
# This is OK as an unordered dict
EnergiesComputationDict = {
},
'4xn' : {
'Define' : 'GMX_NBNXN_SIMD_4XN',
- 'WidthSetup' : ('#ifdef GMX_NBNXN_HALF_WIDTH_SIMD\n' \
- '#define GMX_USE_HALF_WIDTH_SIMD_HERE\n' \
- '#endif\n'),
+ 'WidthSetup' : (''),
'WidthCheck' : ('#if !(GMX_SIMD_REAL_WIDTH == 2 || GMX_SIMD_REAL_WIDTH == 4 || GMX_SIMD_REAL_WIDTH == 8)\n' \
'#error "unsupported SIMD width"\n' \
'#endif\n'),
KernelNamePrefix = 'nbnxn_kernel'
KernelsName = "{0}_simd_{1}".format(KernelNamePrefix,type)
KernelsHeaderFileName = "{0}.h".format(KernelsName,type)
+ KernelsHeaderPathName = "gromacs/mdlib/nbnxn_kernels/simd_{0}/{1}".format(type,KernelsHeaderFileName)
KernelFunctionLookupTable = {}
KernelDeclarations = ''
KernelTemplate = read_kernel_template("{0}_kernel.c.pre".format(KernelsName))
ElectrostaticsDict[elec]['define'],
VdwTreatmentDict[ljtreat]['define'],
EnergiesComputationDict[ener]['define'],
- KernelsHeaderFileName,
+ KernelsHeaderPathName,
KernelName,
" " * (len(KernelName) + 1),
VerletKernelTypeDict[type]['UnrollSize'],