Implemented LJ-PME nbnxn kernels
authorBerk Hess <hess@kth.se>
Thu, 5 Dec 2013 09:27:59 +0000 (10:27 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Mon, 24 Feb 2014 16:21:48 +0000 (17:21 +0100)
Implemented nbnxn SIMD and C kernels for LJ-PME. CUDA kernels will
follow later.
The nbnxn LJ-PME kernels subtract the full mesh contribution, using
the mesh C6 coefficients (usually geometrically combined). This gives
much higher accuracy for non-geometric force-fields.
The group kernels will soon be changed to use the same setup.

Change-Id: Ibbc6eef1c62a97ff6b2e3013f19594946581e44e

212 files changed:
manual/forcefield.tex
src/gromacs/gmxlib/ewald_util.c
src/gromacs/gmxlib/nrnb.c
src/gromacs/gmxpreprocess/grompp.c
src/gromacs/gmxpreprocess/readir.c
src/gromacs/legacyheaders/force.h
src/gromacs/legacyheaders/types/interaction_const.h
src/gromacs/legacyheaders/types/mdatom.h
src/gromacs/legacyheaders/types/nrnb.h
src/gromacs/mdlib/domdec.c
src/gromacs/mdlib/force.c
src/gromacs/mdlib/forcerec.c
src/gromacs/mdlib/mdatom.c
src/gromacs/mdlib/nbnxn_atomdata.c
src/gromacs/mdlib/nbnxn_atomdata.h
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/make_verlet_simd_kernel_files.py
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/nbnxn_kernel_simd_template.c.pre
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.c
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref_inner.h
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref_outer.h
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xnn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_F_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_VF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_VgrpF_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.h
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_inner.h
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_outer.h
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xn.c [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_F_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_VF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_VgrpF_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.c
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.h
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_inner.h
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_outer.h
src/gromacs/mdlib/sim_util.c
src/gromacs/mdlib/tables.c
src/programs/mdrun/pme_loadbal.c
src/programs/mdrun/runner.c

index 829106091afcb953b938f9a36d54cfd40f51038d..7fe2cd02934f6000d21ee3d950dff9c0e76f8d0c 100644 (file)
@@ -1,7 +1,7 @@
 %
 % This file is part of the GROMACS molecular simulation package.
 %
-% Copyright (c) 2013, by the GROMACS development team, led by
+% Copyright (c) 2013,2014, by the GROMACS development team, led by
 % Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 % and including many others, as listed in the AUTHORS file in the
 % top-level source directory and at http://www.gromacs.org.
@@ -2618,10 +2618,10 @@ in reciprocal space is determined by {\tt lj-pme-comb-rule}. If the
 current force field uses Lorentz-Berthelot combination rules, it is
 possible to set {\tt lj-pme-comb-rule = geometric} in order to gain a
 significant increase in performance for a small loss in accuracy. The
-details of this approximation can be found in the section above.  The
-implementation of LJ-PME is currently unsupported together with the
-Verlet cut-off scheme and/or free energy calculations. These features
-will be added in upcoming releases
+details of this approximation can be found in the section above. The
+implementation of LJ-PME is supported with both cut-off schemes, but
+not free energy calculations. These features will be added in upcoming
+releases.
 %} % Brace matches ifthenelse test for gmxlite
 
 \section{Force field\index{force field}}
index 2cbf504392d7e5a365ce07f46d55999c7ccd06eb..99e57148ccdba4ceb1140e0a4e67c84da7bad48b 100644 (file)
@@ -167,7 +167,7 @@ void ewald_LRcorrection(int start, int end,
     vr0_q         = ewc_q*M_2_SQRTPI;
     if (EVDW_PME(fr->vdwtype))
     {
-        vr0_lj        = -pow(ewc_lj, 6)/6.0;
+        vr0_lj    = -pow(ewc_lj, 6)/6.0;
     }
 
     AA           = excl->a;
@@ -560,7 +560,7 @@ void ewald_LRcorrection(int start, int end,
                 Vself_q[q] = ewc_q*one_4pi_eps*fr->q2sum[q]*M_1_SQRTPI;
                 if (EVDW_PME(fr->vdwtype))
                 {
-                    Vself_lj[q] = -pow(ewc_lj, 6)*fr->c6sum[q];
+                    Vself_lj[q] =  fr->c6sum[q]*0.5*vr0_lj;
                 }
             }
 
index 2f818ff2525cdc7611fcd98d8e7f74187340f0f5..9fd76c22d7d4c5fc7a8d142c97731501872f9b25 100644 (file)
@@ -118,6 +118,8 @@ static const t_nrnb_data nbdata[eNRNB] = {
     { "NxN LJ add F-switch [V&F]",      22 },
     { "NxN LJ add P-switch [F]",        27 }, /* extra cost for LJ P-switch */
     { "NxN LJ add P-switch [V&F]",      20 },
+    { "NxN LJ add LJ Ewald [F]",        36 }, /* extra cost for LJ Ewald */
+    { "NxN LJ add LJ Ewald [V&F]",      33 },
     { "1,4 nonbonded interactions",     90 },
     { "Born radii (Still)",             47 },
     { "Born radii (HCT/OBC)",          183 },
@@ -316,10 +318,10 @@ static gmx_bool nrnb_is_nbnxn_vdw_kernel(int enr)
     return (enr >= eNR_NBNXN_LJ_RF && enr <= eNR_NBNXN_LJ_E);
 }
 
-/* Returns in enr is the index of an nbnxn kernel addition (switch function) */
+/* Returns in enr is the index of an nbnxn kernel addition (LJ modification) */
 static gmx_bool nrnb_is_nbnxn_kernel_addition(int enr)
 {
-    return (enr >= eNR_NBNXN_LJ_FSW && enr <= eNR_NBNXN_LJ_PSW_E);
+    return (enr >= eNR_NBNXN_ADD_LJ_FSW && enr <= eNR_NBNXN_ADD_LJ_EWALD_E);
 }
 
 void print_flop(FILE *out, t_nrnb *nrnb, double *nbfs, double *mflop)
@@ -394,8 +396,8 @@ void print_flop(FILE *out, t_nrnb *nrnb, double *nbfs, double *mflop)
             flop    = nbdata[i].flop;
             if (nrnb_is_nbnxn_vdw_kernel(i))
             {
-                /* Possibly add the cost of a switch function */
-                for (j = eNR_NBNXN_LJ_FSW; j <= eNR_NBNXN_LJ_PSW; j += 2)
+                /* Possibly add the cost of an LJ switch/Ewald function */
+                for (j = eNR_NBNXN_ADD_LJ_FSW; j <= eNR_NBNXN_ADD_LJ_EWALD; j += 2)
                 {
                     int e_kernel_add;
 
index d604b1fb29813ab95d0a43f9192bf4382ab066e4..5c20e5d4c84b082af2829b8af6756b697db3de3f 100644 (file)
@@ -1620,11 +1620,6 @@ int gmx_grompp(int argc, char *argv[])
 
         /* Remove all charge groups */
         gmx_mtop_remove_chargegroups(sys);
-
-        if (EVDW_PME(ir->vdwtype))
-        {
-            gmx_fatal(FARGS, "LJ-PME not implemented together with verlet-scheme!");
-        }
     }
 
     if (count_constraints(sys, mi, wi) && (ir->eConstrAlg == econtSHAKE))
index 22bc4b0835d0e224d8a22864b3587b8c7a8e9d95..63b5e8f4b4190c3a082a65cf831ed742b25d5b10 100644 (file)
@@ -344,9 +344,9 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
             }
         }
 
-        if (ir->vdwtype != evdwCUT)
+        if (!(ir->vdwtype == evdwCUT || ir->vdwtype == evdwPME))
         {
-            warning_error(wi, "With Verlet lists only cut-off LJ interactions are supported");
+            warning_error(wi, "With Verlet lists only cut-off and PME LJ interactions are supported");
         }
         if (!(ir->coulombtype == eelCUT ||
               (EEL_RF(ir->coulombtype) && ir->coulombtype != eelRF_NEC) ||
@@ -1170,23 +1170,6 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
         }
     }
 
-    if (EVDW_PME(ir->vdwtype))
-    {
-        if (ir_vdw_might_be_zero_at_cutoff(ir))
-        {
-            sprintf(err_buf, "With vdwtype = %s, rvdw must be <= rlist",
-                    evdw_names[ir->vdwtype]);
-            CHECK(ir->rvdw > ir->rlist);
-        }
-        else
-        {
-            sprintf(err_buf,
-                    "With vdwtype = %s, rvdw must be equal to rlist\n",
-                    evdw_names[ir->vdwtype]);
-            CHECK(ir->rvdw != ir->rlist);
-        }
-    }
-
     if (EEL_PME(ir->coulombtype) || EVDW_PME(ir->vdwtype))
     {
         if (ir->pme_order < 3)
@@ -1213,7 +1196,7 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
         sprintf(err_buf, "With switched vdw forces or potentials, rvdw-switch must be < rvdw");
         CHECK(ir->rvdw_switch >= ir->rvdw);
     }
-    else if (ir->vdwtype == evdwCUT)
+    else if (ir->vdwtype == evdwCUT || ir->vdwtype == evdwPME)
     {
         if (ir->cutoff_scheme == ecutsGROUP && ir->vdw_modifier == eintmodNONE)
         {
@@ -3869,24 +3852,18 @@ check_combination_rules(const t_inputrec *ir, const gmx_mtop_t *mtop,
                 warning_note(wi, "You are using geometric combination rules in "
                              "LJ-PME, but your non-bonded C6 parameters do "
                              "not follow these rules. "
-                             "If your force field uses Lorentz-Berthelot combination rules this "
-                             "will introduce small errors in the forces and energies in "
-                             "your simulations. Dispersion correction will correct total "
-                             "energy and/or pressure, but not forces or surface tensions. "
-                             "Please check the LJ-PME section in the manual "
-                             "before proceeding further.");
+                             "This will introduce very small errors in the forces and energies in "
+                             "your simulations. Dispersion correction will correct total energy "
+                             "and/or pressure for isotropic systems, but not forces or surface tensions.");
             }
             else
             {
                 warning_note(wi, "You are using geometric combination rules in "
                              "LJ-PME, but your non-bonded C6 parameters do "
                              "not follow these rules. "
-                             "If your force field uses Lorentz-Berthelot combination rules this "
-                             "will introduce small errors in the forces and energies in "
-                             "your simulations. Consider using dispersion correction "
-                             "for the total energy and pressure. "
-                             "Please check the LJ-PME section in the manual "
-                             "before proceeding further.");
+                             "This will introduce very small errors in the forces and energies in "
+                             "your simulations. If your system is homogeneous, consider using dispersion correction "
+                             "for the total energy and pressure.");
             }
         }
     }
index 80b3f7012a41157ab42518976f0ed795a3dd2686..e053a0de3355a2471ccc292de60d0168abed90c3 100644 (file)
@@ -135,6 +135,17 @@ gmx_bool can_use_allvsall(const t_inputrec *ir,
  * and fp (if !=NULL) on the master node.
  */
 
+
+gmx_bool nbnxn_acceleration_supported(FILE             *fplog,
+                                      const t_commrec  *cr,
+                                      const t_inputrec *ir,
+                                      gmx_bool          bGPU);
+/* Return if GPU/CPU-SIMD acceleration is supported with the given inputrec
+ * with bGPU TRUE/FALSE.
+ * If the return value is FALSE and fplog/cr != NULL, prints a fallback
+ * message to fplog/stderr.
+ */
+
 gmx_bool uses_simple_tables(int                 cutoff_scheme,
                             nonbonded_verlet_t *nbv,
                             int                 group);
index 2f82b4956bdd47384e838222c1bb9f91d65921cf..b5f6e79055fc174a5b4d024e2dfc0e8a1ffce672 100644 (file)
@@ -67,6 +67,7 @@ typedef struct {
 
 typedef struct {
     /* VdW */
+    int             vdwtype;
     int             vdw_modifier;
     real            rvdw;
     real            rvdw_switch;
@@ -80,6 +81,7 @@ typedef struct {
 
     /* type of electrostatics (defined in enums.h) */
     int  eeltype;
+    int  coulomb_modifier;
 
     /* Coulomb */
     real rcoulomb;
@@ -91,7 +93,9 @@ typedef struct {
     /* PME/Ewald */
     real ewaldcoeff_q;
     real ewaldcoeff_lj;
-    real sh_ewald;   /* -sh_ewald is added to the direct space potential */
+    int  ljpme_comb_rule; /* LJ combination rule for the LJ PME mesh part */
+    real sh_ewald;        /* -sh_ewald is added to the direct space potential */
+    real sh_lj_ewald;     /* sh_lj_ewald is added to the correction potential */
 
     /* Dielectric constant resp. multiplication factor for charges */
     real epsilon_r;
index 30f46ee16661531e29a9d39b09302530517753d2..08a2ff54906f203c7883047098d1fa9147d22c17 100644 (file)
@@ -61,7 +61,8 @@ typedef struct {
     gmx_bool               bOrires;
     real                  *massA, *massB, *massT, *invmass;
     real                  *chargeA, *chargeB;
-    real                  *c6A, *c6B, *sigmaA, *sigmaB, *sigma3A, *sigma3B;
+    real                  *sqrt_c6A, *sqrt_c6B;
+    real                  *sigmaA, *sigmaB, *sigma3A, *sigma3B;
     gmx_bool              *bPerturbed;
     int                   *typeA, *typeB;
     unsigned short        *ptype;
index cd504aa273134380a135f8d9486cba52ad65de1d..8830f3113da3f8ca96a4808be6cc41160702c5ae 100644 (file)
@@ -84,15 +84,16 @@ enum
     eNR_NBKERNEL_ALLVSALLGB,
 
     eNR_NBNXN_DIST2,
-    eNR_NBNXN_LJ_RF,    eNR_NBNXN_LJ_RF_E,
-    eNR_NBNXN_LJ_TAB,   eNR_NBNXN_LJ_TAB_E,
-    eNR_NBNXN_LJ_EWALD, eNR_NBNXN_LJ_EWALD_E,
-    eNR_NBNXN_LJ,       eNR_NBNXN_LJ_E,
-    eNR_NBNXN_RF,       eNR_NBNXN_RF_E,
-    eNR_NBNXN_TAB,      eNR_NBNXN_TAB_E,
-    eNR_NBNXN_EWALD,    eNR_NBNXN_EWALD_E,
-    eNR_NBNXN_LJ_FSW,   eNR_NBNXN_LJ_FSW_E,
-    eNR_NBNXN_LJ_PSW,   eNR_NBNXN_LJ_PSW_E,
+    eNR_NBNXN_LJ_RF,          eNR_NBNXN_LJ_RF_E,
+    eNR_NBNXN_LJ_TAB,         eNR_NBNXN_LJ_TAB_E,
+    eNR_NBNXN_LJ_EWALD,       eNR_NBNXN_LJ_EWALD_E,
+    eNR_NBNXN_LJ,             eNR_NBNXN_LJ_E,
+    eNR_NBNXN_RF,             eNR_NBNXN_RF_E,
+    eNR_NBNXN_TAB,            eNR_NBNXN_TAB_E,
+    eNR_NBNXN_EWALD,          eNR_NBNXN_EWALD_E,
+    eNR_NBNXN_ADD_LJ_FSW,     eNR_NBNXN_ADD_LJ_FSW_E,
+    eNR_NBNXN_ADD_LJ_PSW,     eNR_NBNXN_ADD_LJ_PSW_E,
+    eNR_NBNXN_ADD_LJ_EWALD,   eNR_NBNXN_ADD_LJ_EWALD_E,
     eNR_NB14,
     eNR_BORN_RADII_STILL,     eNR_BORN_RADII_HCT_OBC,
     eNR_BORN_CHAINRULE,
index 37b40d309b15d862599f75487097ad44b2b5ae97..0d5a51049a7354dfe3db6f9eb3662235cd9c9caa 100644 (file)
@@ -9799,7 +9799,7 @@ void dd_partition_system(FILE                *fplog,
         /* Send the charges and/or c6/sigmas to our PME only node */
         gmx_pme_send_parameters(cr, mdatoms->nChargePerturbed, mdatoms->nTypePerturbed,
                                 mdatoms->chargeA, mdatoms->chargeB,
-                                mdatoms->c6A, mdatoms->c6B,
+                                mdatoms->sqrt_c6A, mdatoms->sqrt_c6B,
                                 mdatoms->sigmaA, mdatoms->sigmaB,
                                 dd_pme_maxshift_x(dd), dd_pme_maxshift_y(dd));
     }
index bd6fa62f414e4d86a258e116e28b7dae8b0d6e0d..93a9d06936c649aff40d47f1fde1826d4730ba7e 100644 (file)
@@ -534,8 +534,8 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
                                        cr, t, fr,
                                        md->chargeA,
                                        md->nChargePerturbed ? md->chargeB : NULL,
-                                       md->c6A,
-                                       md->nChargePerturbed ? md->c6B : NULL,
+                                       md->sqrt_c6A,
+                                       md->nChargePerturbed ? md->sqrt_c6B : NULL,
                                        md->sigmaA,
                                        md->nChargePerturbed ? md->sigmaB : NULL,
                                        md->sigma3A,
@@ -561,7 +561,7 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
                 wallcycle_sub_stop(wcycle, ewcsEWALD_CORRECTION);
             }
 
-            if (fr->n_tpi == 0)
+            if (EEL_EWALD(fr->eeltype) && fr->n_tpi == 0)
             {
                 Vcorr_q += ewald_charge_correction(cr, fr, lambda[efptCOUL], box,
                                                    &dvdl_long_range_correction_q,
@@ -614,7 +614,7 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
                                         0, md->homenr - fr->n_tpi,
                                         x, fr->f_novirsum,
                                         md->chargeA, md->chargeB,
-                                        md->c6A, md->c6B,
+                                        md->sqrt_c6A, md->sqrt_c6B,
                                         md->sigmaA, md->sigmaB,
                                         bSB ? boxs : box, cr,
                                         DOMAINDECOMP(cr) ? dd_pme_maxshift_x(cr->dd) : 0,
@@ -666,11 +666,7 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
                              lambda[efptCOUL], &dvdl_long_range_q, fr->ewald_table);
             PRINT_SEPDVDL("Ewald long-range", Vlr_q, dvdl_long_range_q);
         }
-        else if (!EEL_EWALD(fr->eeltype))
-        {
-            gmx_fatal(FARGS, "No such electrostatics method implemented %s",
-                      eel_names[fr->eeltype]);
-        }
+
         /* Note that with separate PME nodes we get the real energies later */
         enerd->dvdl_lin[efptCOUL] += dvdl_long_range_q;
         enerd->dvdl_lin[efptVDW]  += dvdl_long_range_lj;
index 4f4e5495c0ca73ff6ca3c4bf6f988b72e78c4a23..64fef1f839d830bb614b3b15b17a32d03b9b68fb 100644 (file)
@@ -864,7 +864,7 @@ static int *cginfo_expand(int nmb, cginfo_mb_t *cgi_mb)
 static void set_chargesum(FILE *log, t_forcerec *fr, const gmx_mtop_t *mtop)
 {
     /*This now calculates sum for q and c6*/
-    double         qsum, q2sum, q, c6sum, c6, sqrc6;
+    double         qsum, q2sum, q, c6sum, c6;
     int            mb, nmol, i;
     const t_atoms *atoms;
 
@@ -881,13 +881,12 @@ static void set_chargesum(FILE *log, t_forcerec *fr, const gmx_mtop_t *mtop)
             qsum   += nmol*q;
             q2sum  += nmol*q*q;
             c6      = mtop->ffparams.iparams[atoms->atom[i].type*(mtop->ffparams.atnr+1)].lj.c6;
-            sqrc6   = sqrt(c6);
-            c6sum  += nmol*sqrc6*sqrc6;
+            c6sum  += nmol*c6;
         }
     }
     fr->qsum[0]   = qsum;
     fr->q2sum[0]  = q2sum;
-    fr->c6sum[0]  = c6sum/12;
+    fr->c6sum[0]  = c6sum;
 
     if (fr->efep != efepNO)
     {
@@ -904,12 +903,11 @@ static void set_chargesum(FILE *log, t_forcerec *fr, const gmx_mtop_t *mtop)
                 qsum   += nmol*q;
                 q2sum  += nmol*q*q;
                 c6      = mtop->ffparams.iparams[atoms->atom[i].typeB*(mtop->ffparams.atnr+1)].lj.c6;
-                sqrc6   = sqrt(c6);
-                c6sum  += nmol*sqrc6*sqrc6;
+                c6sum  += nmol*c6;
             }
             fr->qsum[1]   = qsum;
             fr->q2sum[1]  = q2sum;
-            fr->c6sum[1]  = c6sum/12;
+            fr->c6sum[1]  = c6sum;
         }
     }
     else
@@ -1528,6 +1526,35 @@ static void init_forcerec_f_threads(t_forcerec *fr, int nenergrp)
 }
 
 
+gmx_bool nbnxn_acceleration_supported(FILE             *fplog,
+                                      const t_commrec  *cr,
+                                      const t_inputrec *ir,
+                                      gmx_bool          bGPU)
+{
+    /* TODO: remove these GPU specific restrictions by implementing CUDA kernels */
+    if (bGPU)
+    {
+        if (ir->vdw_modifier == eintmodFORCESWITCH ||
+            ir->vdw_modifier == eintmodPOTSWITCH ||
+            ir->vdwtype == evdwPME)
+        {
+            md_print_warn(cr, fplog, "LJ switch functions and LJ-PME are not yet supported on the GPU, falling back to CPU only\n");
+            return FALSE;
+        }
+    }
+
+    if (ir->vdwtype == evdwPME && ir->ljpme_combination_rule == eljpmeLB)
+    {
+        md_print_warn(cr, fplog, "LJ-PME with Lorentz-Berthelot is not supported with %s, falling back to %s\n",
+                      bGPU ? "GPUs" : "SIMD kernels",
+                      bGPU ? "CPU only" : "plain-C kernels");
+        return FALSE;
+    }
+
+    return TRUE;
+}
+
+
 static void pick_nbnxn_kernel_cpu(const t_inputrec gmx_unused *ir,
                                   int                         *kernel_type,
                                   int                         *ewald_excl)
@@ -1686,7 +1713,11 @@ static void pick_nbnxn_kernel(FILE                *fp,
 
     if (*kernel_type == nbnxnkNotSet)
     {
-        if (use_simd_kernels)
+        /* LJ PME with LB combination rule does 7 mesh operations.
+         * This so slow that we don't compile SIMD non-bonded kernels for that.
+         */
+        if (use_simd_kernels &&
+            nbnxn_acceleration_supported(fp, cr, ir, FALSE))
         {
             pick_nbnxn_kernel_cpu(ir, kernel_type, ewald_excl);
         }
@@ -1892,13 +1923,17 @@ init_interaction_const(FILE                       *fp,
     snew_aligned(ic->tabq_coul_F, 16, 32);
     snew_aligned(ic->tabq_coul_V, 16, 32);
 
-    ic->rlist       = fr->rlist;
-    ic->rlistlong   = fr->rlistlong;
+    ic->rlist           = fr->rlist;
+    ic->rlistlong       = fr->rlistlong;
 
     /* Lennard-Jones */
-    ic->vdw_modifier = fr->vdw_modifier;
-    ic->rvdw         = fr->rvdw;
-    ic->rvdw_switch  = fr->rvdw_switch;
+    ic->vdwtype         = fr->vdwtype;
+    ic->vdw_modifier    = fr->vdw_modifier;
+    ic->rvdw            = fr->rvdw;
+    ic->rvdw_switch     = fr->rvdw_switch;
+    ic->ewaldcoeff_lj   = fr->ewaldcoeff_lj;
+    ic->ljpme_comb_rule = fr->ljpme_combination_rule;
+    ic->sh_lj_ewald     = 0;
     clear_force_switch_constants(&ic->dispersion_shift);
     clear_force_switch_constants(&ic->repulsion_shift);
 
@@ -1908,6 +1943,17 @@ init_interaction_const(FILE                       *fp,
             /* Only shift the potential, don't touch the force */
             ic->dispersion_shift.cpot = -pow(ic->rvdw, -6.0);
             ic->repulsion_shift.cpot  = -pow(ic->rvdw, -12.0);
+            if (EVDW_PME(ic->vdwtype))
+            {
+                real crc2;
+
+                if (fr->cutoff_scheme == ecutsGROUP)
+                {
+                    gmx_fatal(FARGS, "Potential-shift is not (yet) implemented for LJ-PME with cutoff-scheme=group");
+                }
+                crc2            = sqr(ic->ewaldcoeff_lj*ic->rvdw);
+                ic->sh_lj_ewald = (exp(-crc2)*(1 + crc2 + 0.5*crc2*crc2) - 1)*pow(ic->rvdw, -6.0);
+            }
             break;
         case eintmodFORCESWITCH:
             /* Switch the force, switch and shift the potential */
@@ -1932,14 +1978,12 @@ init_interaction_const(FILE                       *fp,
     ic->sh_invrc6 = -ic->dispersion_shift.cpot;
 
     /* Electrostatics */
-    ic->eeltype     = fr->eeltype;
-    ic->rcoulomb    = fr->rcoulomb;
-    ic->epsilon_r   = fr->epsilon_r;
-    ic->epsfac      = fr->epsfac;
-
-    /* Ewald */
-    ic->ewaldcoeff_q   = fr->ewaldcoeff_q;
-    ic->ewaldcoeff_lj  = fr->ewaldcoeff_lj;
+    ic->eeltype          = fr->eeltype;
+    ic->coulomb_modifier = fr->coulomb_modifier;
+    ic->rcoulomb         = fr->rcoulomb;
+    ic->epsilon_r        = fr->epsilon_r;
+    ic->epsfac           = fr->epsfac;
+    ic->ewaldcoeff_q     = fr->ewaldcoeff_q;
 
     if (fr->coulomb_modifier == eintmodPOTSHIFT)
     {
@@ -1974,11 +2018,19 @@ init_interaction_const(FILE                       *fp,
 
     if (fp != NULL)
     {
-        fprintf(fp, "Potential shift: LJ r^-12: %.3f r^-6 %.3f",
-                ic->repulsion_shift.cpot, ic->dispersion_shift.cpot);
+        real dispersion_shift;
+
+        dispersion_shift = ic->dispersion_shift.cpot;
+        if (EVDW_PME(ic->vdwtype))
+        {
+            dispersion_shift -= ic->sh_lj_ewald;
+        }
+        fprintf(fp, "Potential shift: LJ r^-12: %.3e r^-6: %.3e",
+                ic->repulsion_shift.cpot, dispersion_shift);
+
         if (ic->eeltype == eelCUT)
         {
-            fprintf(fp, ", Coulomb %.3f", -ic->c_rf);
+            fprintf(fp, ", Coulomb %.e", -ic->c_rf);
         }
         else if (EEL_PME(ic->eeltype))
         {
@@ -2149,15 +2201,39 @@ static void init_nb_verlet(FILE                *fp,
             nbv->grp[0].kernel_type != nbv->grp[i].kernel_type)
         {
             gmx_bool bSimpleList;
+            int      enbnxninitcombrule;
 
             bSimpleList = nbnxn_kernel_pairlist_simple(nbv->grp[i].kernel_type);
 
+            if (bSimpleList && (fr->vdwtype == evdwCUT && (fr->vdw_modifier == eintmodNONE || fr->vdw_modifier == eintmodPOTSHIFT)))
+            {
+                /* Plain LJ cut-off: we can optimize with combination rules */
+                enbnxninitcombrule = enbnxninitcombruleDETECT;
+            }
+            else if (fr->vdwtype == evdwPME)
+            {
+                /* LJ-PME: we need to use a combination rule for the grid */
+                if (fr->ljpme_combination_rule == eljpmeGEOM)
+                {
+                    enbnxninitcombrule = enbnxninitcombruleGEOM;
+                }
+                else
+                {
+                    enbnxninitcombrule = enbnxninitcombruleLB;
+                }
+            }
+            else
+            {
+                /* We use a full combination matrix: no rule required */
+                enbnxninitcombrule = enbnxninitcombruleNONE;
+            }
+
+
             snew(nbv->grp[i].nbat, 1);
             nbnxn_atomdata_init(fp,
                                 nbv->grp[i].nbat,
                                 nbv->grp[i].kernel_type,
-                                /* SIMD LJ switch kernels don't support LJ combination rules */
-                                bSimpleList && !(fr->vdw_modifier == eintmodFORCESWITCH || fr->vdw_modifier == eintmodPOTSWITCH),
+                                enbnxninitcombrule,
                                 fr->ntype, fr->nbfp,
                                 ir->opts.ngener,
                                 bSimpleList ? gmx_omp_nthreads_get(emntNonbonded) : 1,
@@ -2621,7 +2697,7 @@ void init_forcerec(FILE              *fp,
         {
             fprintf(fp, "Will do PME sum in reciprocal space for LJ dispersion interactions.\n");
         }
-        please_cite(fp, "Essman95a");
+        please_cite(fp, "Essmann95a");
         fr->ewaldcoeff_lj = calc_ewaldcoeff_lj(ir->rvdw, ir->ewald_rtol_lj);
         if (fp)
         {
index eb41eb1c9d95c0b5d67eaa5757d5cddd4a72538f..b3d6475c531fe5b6e9cae6b2a1d78c853ae28bbf 100644 (file)
@@ -115,12 +115,15 @@ void atoms2md(gmx_mtop_t *mtop, t_inputrec *ir,
               int homenr,
               t_mdatoms *md)
 {
+    gmx_bool              bLJPME;
     gmx_mtop_atomlookup_t alook;
     int                   i;
     t_grpopts            *opts;
     gmx_groups_t         *groups;
     gmx_molblock_t       *molblock;
 
+    bLJPME = EVDW_PME(ir->vdwtype);
+
     opts = &ir->opts;
 
     groups = &mtop->groups;
@@ -152,15 +155,21 @@ void atoms2md(gmx_mtop_t *mtop, t_inputrec *ir,
         srenew(md->massT, md->nalloc);
         srenew(md->invmass, md->nalloc);
         srenew(md->chargeA, md->nalloc);
-        srenew(md->c6A, md->nalloc);
-        srenew(md->sigmaA, md->nalloc);
-        srenew(md->sigma3A, md->nalloc);
+        if (bLJPME)
+        {
+            srenew(md->sqrt_c6A, md->nalloc);
+            srenew(md->sigmaA, md->nalloc);
+            srenew(md->sigma3A, md->nalloc);
+        }
         if (md->nPerturbed)
         {
             srenew(md->chargeB, md->nalloc);
-            srenew(md->c6B, md->nalloc);
-            srenew(md->sigmaB, md->nalloc);
-            srenew(md->sigma3B, md->nalloc);
+            if (bLJPME)
+            {
+                srenew(md->sqrt_c6B, md->nalloc);
+                srenew(md->sigmaB, md->nalloc);
+                srenew(md->sigma3B, md->nalloc);
+            }
         }
         srenew(md->typeA, md->nalloc);
         if (md->nPerturbed)
@@ -314,36 +323,41 @@ void atoms2md(gmx_mtop_t *mtop, t_inputrec *ir,
         }
         md->chargeA[i]      = atom->q;
         md->typeA[i]        = atom->type;
-        c6                  = mtop->ffparams.iparams[atom->type*(mtop->ffparams.atnr+1)].lj.c6;
-        c12                 = mtop->ffparams.iparams[atom->type*(mtop->ffparams.atnr+1)].lj.c12;
-        md->c6A[i]          = sqrt(c6);
-        if (c6 == 0.0 || c12 == 0.0)
-        {
-            md->sigmaA[i]     = 1.0;
-        }
-        else
+        if (bLJPME)
         {
-            md->sigmaA[i]     = pow(c12/c6, 1.0/6.0);
+            c6                = mtop->ffparams.iparams[atom->type*(mtop->ffparams.atnr+1)].lj.c6;
+            c12               = mtop->ffparams.iparams[atom->type*(mtop->ffparams.atnr+1)].lj.c12;
+            md->sqrt_c6A[i]   = sqrt(c6);
+            if (c6 == 0.0 || c12 == 0)
+            {
+                md->sigmaA[i] = 1.0;
+            }
+            else
+            {
+                md->sigmaA[i] = pow(c12/c6, 1.0/6.0);
+            }
+            md->sigma3A[i]    = 1/(md->sigmaA[i]*md->sigmaA[i]*md->sigmaA[i]);
         }
-        md->sigma3A[i] = 1/(md->sigmaA[i]*md->sigmaA[i]*md->sigmaA[i]);
-
         if (md->nPerturbed)
         {
+            md->bPerturbed[i] = PERTURBED(*atom);
             md->chargeB[i]    = atom->qB;
             md->typeB[i]      = atom->typeB;
-            c6                = mtop->ffparams.iparams[atom->typeB*(mtop->ffparams.atnr+1)].lj.c6;
-            c12               = mtop->ffparams.iparams[atom->typeB*(mtop->ffparams.atnr+1)].lj.c12;
-            md->c6B[i]        = sqrt(c6);
-            if (c6 == 0.0 || c12 == 0.0)
-            {
-                md->sigmaB[i]   = 1.0;
-            }
-            else
+            if (bLJPME)
             {
-                md->sigmaB[i]   = pow(c12/c6, 1.0/6.0);
+                c6                = mtop->ffparams.iparams[atom->typeB*(mtop->ffparams.atnr+1)].lj.c6;
+                c12               = mtop->ffparams.iparams[atom->typeB*(mtop->ffparams.atnr+1)].lj.c12;
+                md->sqrt_c6B[i]   = sqrt(c6);
+                if (c6 == 0.0 || c12 == 0)
+                {
+                    md->sigmaB[i] = 1.0;
+                }
+                else
+                {
+                    md->sigmaB[i] = pow(c12/c6, 1.0/6.0);
+                }
+                md->sigma3B[i]    = 1/(md->sigmaB[i]*md->sigmaB[i]*md->sigmaB[i]);
             }
-            md->bPerturbed[i] = PERTURBED(*atom);
-            md->sigma3B[i]    = 1/(md->sigmaB[i]*md->sigmaB[i]*md->sigmaB[i]);
         }
         md->ptype[i]    = atom->ptype;
         if (md->cTC)
index 157f788e3fa539a6b88cea65eafc3bed76c61ff8..2d9e10559dd132bdd7f568d68f35507d830b8fef 100644 (file)
@@ -45,6 +45,7 @@
 #include "vec.h"
 #include "nbnxn_consts.h"
 #include "nbnxn_internal.h"
+#include "nbnxn_atomdata.h"
 #include "nbnxn_search.h"
 #include "gromacs/utility/gmxomp.h"
 #include "gmx_omp_nthreads.h"
@@ -367,9 +368,27 @@ static void set_ljparam_simd_data(nbnxn_atomdata_t *nbat)
 
     nt = nbat->ntype;
 
+    /* nbfp_s4 stores two parameters using a stride of 4,
+     * because this would suit x86 SIMD single-precision
+     * quad-load intrinsics. There's a slight inefficiency in
+     * allocating and initializing nbfp_s4 when it might not
+     * be used, but introducing the conditional code is not
+     * really worth it. */
+    nbat->alloc((void **)&nbat->nbfp_s4, nt*nt*4*sizeof(*nbat->nbfp_s4));
+    for (i = 0; i < nt; i++)
+    {
+        for (j = 0; j < nt; j++)
+        {
+            nbat->nbfp_s4[(i*nt+j)*4+0] = nbat->nbfp[(i*nt+j)*2+0];
+            nbat->nbfp_s4[(i*nt+j)*4+1] = nbat->nbfp[(i*nt+j)*2+1];
+            nbat->nbfp_s4[(i*nt+j)*4+2] = 0;
+            nbat->nbfp_s4[(i*nt+j)*4+3] = 0;
+        }
+    }
+
     switch (nbat->comb_rule)
     {
-        case  ljcrGEOM:
+        case ljcrGEOM:
             nbat->comb_rule = ljcrGEOM;
 
             for (i = 0; i < nt; i++)
@@ -401,23 +420,7 @@ static void set_ljparam_simd_data(nbnxn_atomdata_t *nbat)
             }
             break;
         case ljcrNONE:
-            /* nbfp_s4 stores two parameters using a stride of 4,
-             * because this would suit x86 SIMD single-precision
-             * quad-load intrinsics. There's a slight inefficiency in
-             * allocating and initializing nbfp_s4 when it might not
-             * be used, but introducing the conditional code is not
-             * really worth it. */
-            nbat->alloc((void **)&nbat->nbfp_s4, nt*nt*4*sizeof(*nbat->nbfp_s4));
-            for (i = 0; i < nt; i++)
-            {
-                for (j = 0; j < nt; j++)
-                {
-                    nbat->nbfp_s4[(i*nt+j)*4+0] = nbat->nbfp[(i*nt+j)*2+0];
-                    nbat->nbfp_s4[(i*nt+j)*4+1] = nbat->nbfp[(i*nt+j)*2+1];
-                    nbat->nbfp_s4[(i*nt+j)*4+2] = 0;
-                    nbat->nbfp_s4[(i*nt+j)*4+3] = 0;
-                }
-            }
+            /* We always store the full matrix (see code above) */
             break;
         default:
             gmx_incons("Unknown combination rule");
@@ -514,7 +517,7 @@ nbnxn_atomdata_init_simple_exclusion_masks(nbnxn_atomdata_t *nbat)
 void nbnxn_atomdata_init(FILE *fp,
                          nbnxn_atomdata_t *nbat,
                          int nb_kernel_type,
-                         gmx_bool bTryCombinationRule,
+                         int enbnxninitcombrule,
                          int ntype, const real *nbfp,
                          int n_energygroups,
                          int nout,
@@ -636,44 +639,53 @@ void nbnxn_atomdata_init(FILE *fp,
 
     simple = nbnxn_kernel_pairlist_simple(nb_kernel_type);
 
-    if (bTryCombinationRule)
+    switch (enbnxninitcombrule)
     {
-        /* We prefer the geometic combination rule,
-         * as that gives a slightly faster kernel than the LB rule.
-         */
-        if (bCombGeom)
-        {
-            nbat->comb_rule = ljcrGEOM;
-        }
-        else if (bCombLB)
-        {
-            nbat->comb_rule = ljcrLB;
-        }
-        else
-        {
-            nbat->comb_rule = ljcrNONE;
-
-            nbat->free(nbat->nbfp_comb);
-        }
-
-        if (fp)
-        {
-            if (nbat->comb_rule == ljcrNONE)
+        case enbnxninitcombruleDETECT:
+            /* We prefer the geometic combination rule,
+             * as that gives a slightly faster kernel than the LB rule.
+             */
+            if (bCombGeom)
+            {
+                nbat->comb_rule = ljcrGEOM;
+            }
+            else if (bCombLB)
             {
-                fprintf(fp, "Using full Lennard-Jones parameter combination matrix\n\n");
+                nbat->comb_rule = ljcrLB;
             }
             else
             {
-                fprintf(fp, "Using %s Lennard-Jones combination rule\n\n",
-                        nbat->comb_rule == ljcrGEOM ? "geometric" : "Lorentz-Berthelot");
+                nbat->comb_rule = ljcrNONE;
+
+                nbat->free(nbat->nbfp_comb);
             }
-        }
-    }
-    else
-    {
-        nbat->comb_rule = ljcrNONE;
 
-        nbat->free(nbat->nbfp_comb);
+            if (fp)
+            {
+                if (nbat->comb_rule == ljcrNONE)
+                {
+                    fprintf(fp, "Using full Lennard-Jones parameter combination matrix\n\n");
+                }
+                else
+                {
+                    fprintf(fp, "Using %s Lennard-Jones combination rule\n\n",
+                            nbat->comb_rule == ljcrGEOM ? "geometric" : "Lorentz-Berthelot");
+                }
+            }
+            break;
+        case enbnxninitcombruleGEOM:
+            nbat->comb_rule = ljcrGEOM;
+            break;
+        case enbnxninitcombruleLB:
+            nbat->comb_rule = ljcrLB;
+            break;
+        case enbnxninitcombruleNONE:
+            nbat->comb_rule = ljcrNONE;
+
+            nbat->free(nbat->nbfp_comb);
+            break;
+        default:
+            gmx_incons("Unknown enbnxninitcombrule");
     }
 
     if (simple)
index 989bd4b127e21f3f660795aee1ce8d4c43d9888b..5855e5b50d1e5845a514553b85ffb0866da850d3 100644 (file)
@@ -67,15 +67,20 @@ void copy_rvec_to_nbat_real(const int *a, int na, int na_round,
                             rvec *x, int nbatFormat, real *xnb, int a0,
                             int cx, int cy, int cz);
 
+enum {
+    enbnxninitcombruleDETECT, enbnxninitcombruleGEOM, enbnxninitcombruleLB, enbnxninitcombruleNONE
+};
+
 /* Initialize the non-bonded atom data structure.
  * The enum for nbatXFormat is in the file defining nbnxn_atomdata_t.
  * Copy the ntypes*ntypes*2 sized nbfp non-bonded parameter list
  * to the atom data structure.
+ * enbnxninitcombrule sets what combination rule data gets stored in nbat.
  */
 void nbnxn_atomdata_init(FILE *fp,
                          nbnxn_atomdata_t *nbat,
                          int nb_kernel_type,
-                         gmx_bool bTryCombinationRule,
+                         int enbnxninitcombrule,
                          int ntype, const real *nbfp,
                          int n_energygroups,
                          int nout,
index 68d90850791f29f51dcff408799a88983bfef131..76a1c5d4abca266f206492a177ad11b35131318c 100755 (executable)
@@ -107,11 +107,12 @@ ElectrostaticsDict['ElecEwTwinCut'] = { 'define' : '#define CALC_COUL_EWALD\n#de
  
 # 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 = {
index bbc8188528f6057fccc3f282cc33270f89522b09..1ac1bf54197b72c8f86bb80d24bd711d9cd5d26e 100644 (file)
 /*! \brief Kinds of electrostatic treatments in SIMD Verlet kernels
  */
 enum {{
-    coultRF, coultTAB, coultTAB_TWIN, coultEWALD, coultEWALD_TWIN, coultNR
+    coulktRF, coulktTAB, coulktTAB_TWIN, coulktEWALD, coulktEWALD_TWIN, coulktNR
+}};
+
+/*! \brief Kinds of Van der Waals treatments in SIMD Verlet kernels
+ */
+enum {{
+    vdwktLJCUT_COMBGEOM, vdwktLJCUT_COMBLB, vdwktLJCUT_COMBNONE, vdwktLJFORCESWITCH, vdwktLJPOTSWITCH, vdwktLJEWALDCOMBGEOM, vdwktNR
 }};
 
 /* Declare and define the kernel function pointer lookup tables.
  * The minor index of the array goes over both the LJ combination rules,
- * which is only supported by plain cut-off, and the LJ switch functions.
+ * which is only supported by plain cut-off, and the LJ switch/PME functions.
  */
-static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
+static p_nbk_func_noener p_nbk_noener[coulktNR][vdwktNR] =
 {7}
-static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
+static p_nbk_func_ener p_nbk_ener[coulktNR][vdwktNR] =
 {8}
-static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
+static p_nbk_func_ener p_nbk_energrp[coulktNR][vdwktNR] =
 {9}
 
 static void
@@ -129,7 +135,7 @@ void
 {{
     int                nnbl;
     nbnxn_pairlist_t **nbl;
-    int                coult, ljtreatment = 0;
+    int                coulkt, vdwkt = 0;
     int                nb;
 
     nnbl = nbl_list->nnbl;
@@ -137,7 +143,7 @@ void
 
     if (EEL_RF(ic->eeltype) || ic->eeltype == eelCUT)
     {{
-        coult = coultRF;
+        coulkt = coulktRF;
     }}
     else
     {{
@@ -145,41 +151,61 @@ void
         {{
             if (ic->rcoulomb == ic->rvdw)
             {{
-                coult = coultTAB;
+                coulkt = coulktTAB;
             }}
             else
             {{
-                coult = coultTAB_TWIN;
+                coulkt = coulktTAB_TWIN;
             }}
         }}
         else
         {{
             if (ic->rcoulomb == ic->rvdw)
             {{
-                coult = coultEWALD;
+                coulkt = coulktEWALD;
             }}
             else
             {{
-                coult = coultEWALD_TWIN;
+                coulkt = coulktEWALD_TWIN;
             }}
         }}
     }}
 
-    switch (ic->vdw_modifier)
+    if (ic->vdwtype == evdwCUT)
+    {{
+        switch (ic->vdw_modifier)
+        {{
+            case eintmodNONE:
+            case eintmodPOTSHIFT:
+                switch (nbat->comb_rule)
+                {{
+                    case ljcrGEOM: vdwkt = vdwktLJCUT_COMBGEOM; break;
+                    case ljcrLB:   vdwkt = vdwktLJCUT_COMBLB;   break;
+                    case ljcrNONE: vdwkt = vdwktLJCUT_COMBNONE; break;
+                    default:       gmx_incons("Unknown combination rule");
+                }}
+                break;
+            case eintmodFORCESWITCH:
+                vdwkt = vdwktLJFORCESWITCH;
+                break;
+            case eintmodPOTSWITCH:
+                vdwkt = vdwktLJPOTSWITCH;
+                break;
+            default:
+                gmx_incons("Unsupported VdW interaction modifier");
+        }}
+    }}
+    else if (ic->vdwtype == evdwPME)
+    {{
+        if (ic->ljpme_comb_rule == eljpmeLB)
+        {{
+            gmx_incons("The nbnxn SIMD kernels don't suport LJ-PME with LB");
+        }}
+        vdwkt = vdwktLJEWALDCOMBGEOM;
+    }}
+    else
     {{
-        case eintmodNONE:
-        case eintmodPOTSHIFT:
-            ljtreatment = nbat->comb_rule;
-            break;
-        /* Switch functions follow after cut-off combination rule kernels */
-        case eintmodFORCESWITCH:
-            ljtreatment = ljcrNR;
-            break;
-        case eintmodPOTSWITCH:
-            ljtreatment = ljcrNR + 1;
-            break;
-        default:
-            gmx_incons("Unsupported VdW interaction modifier");
+        gmx_incons("Unsupported VdW interaction type");
     }}
 
 #pragma omp parallel for schedule(static) num_threads(gmx_omp_nthreads_get(emntNonbonded))
@@ -212,11 +238,11 @@ void
         if (!(force_flags & GMX_FORCE_ENERGY))
         {{
             /* Don't calculate energies */
-            p_nbk_noener[coult][ljtreatment](nbl[nb], nbat,
-                                             ic,
-                                             shift_vec,
-                                             out->f,
-                                             fshift_p);
+            p_nbk_noener[coulkt][vdwkt](nbl[nb], nbat,
+                                        ic,
+                                        shift_vec,
+                                        out->f,
+                                        fshift_p);
         }}
         else if (out->nV == 1)
         {{
@@ -224,13 +250,13 @@ void
             out->Vvdw[0] = 0;
             out->Vc[0]   = 0;
 
-            p_nbk_ener[coult][ljtreatment](nbl[nb], nbat,
-                                           ic,
-                                           shift_vec,
-                                           out->f,
-                                           fshift_p,
-                                           out->Vvdw,
-                                           out->Vc);
+            p_nbk_ener[coulkt][vdwkt](nbl[nb], nbat,
+                                      ic,
+                                      shift_vec,
+                                      out->f,
+                                      fshift_p,
+                                      out->Vvdw,
+                                      out->Vc);
         }}
         else
         {{
@@ -246,13 +272,13 @@ void
                 out->VSc[i] = 0;
             }}
 
-            p_nbk_energrp[coult][ljtreatment](nbl[nb], nbat,
-                                              ic,
-                                              shift_vec,
-                                              out->f,
-                                              fshift_p,
-                                              out->VSvdw,
-                                              out->VSc);
+            p_nbk_energrp[coulkt][vdwkt](nbl[nb], nbat,
+                                         ic,
+                                         shift_vec,
+                                         out->f,
+                                         fshift_p,
+                                         out->VSvdw,
+                                         out->VSc);
 
             reduce_group_energies(nbat->nenergrp, nbat->neg_2log,
                                   out->VSvdw, out->VSc,
index e659e5a262d33e7c131f034c1ead81ae00c7dcec..3a04cb57538b48c7957cc540d8775f23922a4677 100644 (file)
@@ -37,6 +37,7 @@
 #endif
 
 #include <math.h>
+#include <assert.h>
 
 #include "typedefs.h"
 #include "vec.h"
@@ -68,34 +69,70 @@ typedef void (*p_nbk_func_ener)(const nbnxn_pairlist_t     *nbl,
 
 /* Analytical reaction-field kernels */
 #define CALC_COUL_RF
+#define LJ_CUT
 #include "nbnxn_kernel_ref_includes.h"
-#define VDW_FORCE_SWITCH
+#undef LJ_CUT
+#define LJ_FORCE_SWITCH
 #include "nbnxn_kernel_ref_includes.h"
-#undef VDW_FORCE_SWITCH
-#define VDW_POT_SWITCH
+#undef LJ_FORCE_SWITCH
+#define LJ_POT_SWITCH
 #include "nbnxn_kernel_ref_includes.h"
-#undef VDW_POT_SWITCH
+#undef LJ_POT_SWITCH
+#define LJ_EWALD
+#define LJ_CUT
+#define LJ_EWALD_COMB_GEOM
+#include "nbnxn_kernel_ref_includes.h"
+#undef LJ_EWALD_COMB_GEOM
+#define LJ_EWALD_COMB_LB
+#include "nbnxn_kernel_ref_includes.h"
+#undef LJ_EWALD_COMB_LB
+#undef LJ_CUT
+#undef LJ_EWALD
 #undef CALC_COUL_RF
 
 
 /* Tabulated exclusion interaction electrostatics kernels */
 #define CALC_COUL_TAB
+#define LJ_CUT
+#include "nbnxn_kernel_ref_includes.h"
+#undef LJ_CUT
+#define LJ_FORCE_SWITCH
 #include "nbnxn_kernel_ref_includes.h"
-#define VDW_FORCE_SWITCH
+#undef LJ_FORCE_SWITCH
+#define LJ_POT_SWITCH
 #include "nbnxn_kernel_ref_includes.h"
-#undef VDW_FORCE_SWITCH
-#define VDW_POT_SWITCH
+#undef LJ_POT_SWITCH
+#define LJ_EWALD
+#define LJ_CUT
+#define LJ_EWALD_COMB_GEOM
 #include "nbnxn_kernel_ref_includes.h"
-#undef VDW_POT_SWITCH
+#undef LJ_EWALD_COMB_GEOM
+#define LJ_EWALD_COMB_LB
+#include "nbnxn_kernel_ref_includes.h"
+#undef LJ_EWALD_COMB_LB
+#undef LJ_CUT
+#undef LJ_EWALD
 /* Twin-range cut-off kernels */
 #define VDW_CUTOFF_CHECK
+#define LJ_CUT
+#include "nbnxn_kernel_ref_includes.h"
+#undef LJ_CUT
+#define LJ_FORCE_SWITCH
 #include "nbnxn_kernel_ref_includes.h"
-#define VDW_FORCE_SWITCH
+#undef LJ_FORCE_SWITCH
+#define LJ_POT_SWITCH
 #include "nbnxn_kernel_ref_includes.h"
-#undef VDW_FORCE_SWITCH
-#define VDW_POT_SWITCH
+#undef LJ_POT_SWITCH
+#define LJ_EWALD
+#define LJ_CUT
+#define LJ_EWALD_COMB_GEOM
 #include "nbnxn_kernel_ref_includes.h"
-#undef VDW_POT_SWITCH
+#undef LJ_EWALD_COMB_GEOM
+#define LJ_EWALD_COMB_LB
+#include "nbnxn_kernel_ref_includes.h"
+#undef LJ_EWALD_COMB_LB
+#undef LJ_CUT
+#undef LJ_EWALD
 #undef VDW_CUTOFF_CHECK
 #undef CALC_COUL_TAB
 
@@ -105,28 +142,28 @@ enum {
 };
 
 enum {
-    vdwtCUT, vdwtFSWITCH, vdwtPSWITCH, vdwtNR
+    vdwtCUT, vdwtFSWITCH, vdwtPSWITCH, vdwtEWALDGEOM, vdwtEWALDLB, vdwtNR
 };
 
 p_nbk_func_noener p_nbk_c_noener[coultNR][vdwtNR] =
 {
-    { nbnxn_kernel_ElecRF_VdwLJ_F_ref,           nbnxn_kernel_ElecRF_VdwLJFsw_F_ref,           nbnxn_kernel_ElecRF_VdwLJPsw_F_ref           },
-    { nbnxn_kernel_ElecQSTab_VdwLJ_F_ref,        nbnxn_kernel_ElecQSTab_VdwLJFsw_F_ref,        nbnxn_kernel_ElecQSTab_VdwLJPsw_F_ref        },
-    { nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_F_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_F_ref }
+    { nbnxn_kernel_ElecRF_VdwLJ_F_ref,           nbnxn_kernel_ElecRF_VdwLJFsw_F_ref,           nbnxn_kernel_ElecRF_VdwLJPsw_F_ref,           nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_ref,           nbnxn_kernel_ElecRF_VdwLJEwCombLB_F_ref           },
+    { nbnxn_kernel_ElecQSTab_VdwLJ_F_ref,        nbnxn_kernel_ElecQSTab_VdwLJFsw_F_ref,        nbnxn_kernel_ElecQSTab_VdwLJPsw_F_ref,        nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_ref,        nbnxn_kernel_ElecQSTab_VdwLJEwCombLB_F_ref        },
+    { nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_F_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_F_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_F_ref }
 };
 
 p_nbk_func_ener p_nbk_c_ener[coultNR][vdwtNR] =
 {
-    { nbnxn_kernel_ElecRF_VdwLJ_VF_ref,           nbnxn_kernel_ElecRF_VdwLJFsw_VF_ref,           nbnxn_kernel_ElecRF_VdwLJPsw_VF_ref           },
-    { nbnxn_kernel_ElecQSTab_VdwLJ_VF_ref,        nbnxn_kernel_ElecQSTab_VdwLJFsw_VF_ref,        nbnxn_kernel_ElecQSTab_VdwLJPsw_VF_ref        },
-    { nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_VF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_VF_ref }
+    { nbnxn_kernel_ElecRF_VdwLJ_VF_ref,           nbnxn_kernel_ElecRF_VdwLJFsw_VF_ref,           nbnxn_kernel_ElecRF_VdwLJPsw_VF_ref,           nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_ref,           nbnxn_kernel_ElecRF_VdwLJEwCombLB_VF_ref            },
+    { nbnxn_kernel_ElecQSTab_VdwLJ_VF_ref,        nbnxn_kernel_ElecQSTab_VdwLJFsw_VF_ref,        nbnxn_kernel_ElecQSTab_VdwLJPsw_VF_ref,        nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_ref,        nbnxn_kernel_ElecQSTab_VdwLJEwCombLB_VF_ref         },
+    { nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_VF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_VF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_VF_ref  }
 };
 
 p_nbk_func_ener p_nbk_c_energrp[coultNR][vdwtNR] =
 {
-    { nbnxn_kernel_ElecRF_VdwLJ_VgrpF_ref,           nbnxn_kernel_ElecRF_VdwLJFsw_VgrpF_ref,           nbnxn_kernel_ElecRF_VdwLJPsw_VgrpF_ref           },
-    { nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_ref,        nbnxn_kernel_ElecQSTab_VdwLJFsw_VgrpF_ref,        nbnxn_kernel_ElecQSTab_VdwLJPsw_VgrpF_ref        },
-    { nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_VgrpF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_VgrpF_ref }
+    { nbnxn_kernel_ElecRF_VdwLJ_VgrpF_ref,           nbnxn_kernel_ElecRF_VdwLJFsw_VgrpF_ref,           nbnxn_kernel_ElecRF_VdwLJPsw_VgrpF_ref,           nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_ref,           nbnxn_kernel_ElecRF_VdwLJEwCombLB_VgrpF_ref           },
+    { nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_ref,        nbnxn_kernel_ElecQSTab_VdwLJFsw_VgrpF_ref,        nbnxn_kernel_ElecQSTab_VdwLJPsw_VgrpF_ref,        nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_ref,        nbnxn_kernel_ElecQSTab_VdwLJEwCombLB_VgrpF_ref        },
+    { nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_VgrpF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_VgrpF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_ref, nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_VgrpF_ref }
 };
 
 void
@@ -165,21 +202,41 @@ nbnxn_kernel_ref(const nbnxn_pairlist_set_t *nbl_list,
         }
     }
 
-    switch (ic->vdw_modifier)
+    if (ic->vdwtype == evdwCUT)
+    {
+        switch (ic->vdw_modifier)
+        {
+            case eintmodPOTSHIFT:
+            case eintmodNONE:
+                vdwt = vdwtCUT;
+                break;
+            case eintmodFORCESWITCH:
+                vdwt = vdwtFSWITCH;
+                break;
+            case eintmodPOTSWITCH:
+                vdwt = vdwtPSWITCH;
+                break;
+            default:
+                gmx_incons("Unsupported VdW modifier");
+                break;
+        }
+    }
+    else if (ic->vdwtype == evdwPME)
+    {
+        if (ic->ljpme_comb_rule == ljcrGEOM)
+        {
+            assert(nbat->comb_rule == ljcrGEOM);
+            vdwt = vdwtEWALDGEOM;
+        }
+        else
+        {
+            assert(nbat->comb_rule == ljcrLB);
+            vdwt = vdwtEWALDLB;
+        }
+    }
+    else
     {
-        case eintmodPOTSHIFT:
-        case eintmodNONE:
-            vdwt = vdwtCUT;
-            break;
-        case eintmodFORCESWITCH:
-            vdwt = vdwtFSWITCH;
-            break;
-        case eintmodPOTSWITCH:
-            vdwt = vdwtPSWITCH;
-            break;
-        default:
-            gmx_incons("Unsupported VdW modifier");
-            break;
+        gmx_incons("Unsupported vdwtype in nbnxn reference kernel");
     }
 
 #pragma omp parallel for schedule(static) num_threads(gmx_omp_nthreads_get(emntNonbonded))
index 6c9c89dec45c10843330b984ed1142bf319bf03a..d76f1e124fa15e63e8a9a59f72daa855fd133736 100644 (file)
@@ -36,7 +36,7 @@
 /* When calculating RF or Ewald interactions we calculate the electrostatic
  * forces and energies on excluded atom pairs here in the non-bonded loops.
  */
-#if defined CHECK_EXCLS && defined CALC_COULOMB
+#if defined CHECK_EXCLS && (defined CALC_COULOMB || defined LJ_EWALD)
 #define EXCL_FORCES
 #endif
 
@@ -70,7 +70,7 @@
             real rinvsq, rinvsix;
             real c6, c12;
             real FrLJ6 = 0, FrLJ12 = 0, frLJ = 0, VLJ = 0;
-#if defined VDW_FORCE_SWITCH || defined VDW_POT_SWITCH
+#if defined LJ_FORCE_SWITCH || defined LJ_POT_SWITCH
             real r, rsw;
 #endif
 
             if (i < UNROLLI/2)
 #endif
             {
-                rinvsix = interact*rinvsq*rinvsq*rinvsq;
-
                 c6      = nbfp[type_i_off+type[aj]*2  ];
                 c12     = nbfp[type_i_off+type[aj]*2+1];
+
+#if defined LJ_CUT || defined LJ_FORCE_SWITCH || defined LJ_POT_SWITCH
+                rinvsix = interact*rinvsq*rinvsq*rinvsq;
                 FrLJ6   = c6*rinvsix;
                 FrLJ12  = c12*rinvsix*rinvsix;
                 frLJ    = FrLJ12 - FrLJ6;
                 /* 7 flops for r^-2 + LJ force */
-#if defined CALC_ENERGIES || defined VDW_POT_SWITCH
+#if defined CALC_ENERGIES || defined LJ_POT_SWITCH
                 VLJ     = (FrLJ12 + c12*ic->repulsion_shift.cpot)/12 -
                     (FrLJ6 + c6*ic->dispersion_shift.cpot)/6;
                 /* 7 flops for LJ energy */
 #endif
+#endif
 
-#if defined VDW_FORCE_SWITCH || defined VDW_POT_SWITCH
+#if defined LJ_FORCE_SWITCH || defined LJ_POT_SWITCH
                 /* Force or potential switching from ic->rvdw_switch */
                 r       = rsq*rinv;
                 rsw     = r - ic->rvdw_switch;
                 rsw     = (rsw >= 0.0 ? rsw : 0.0);
 #endif
-#ifdef VDW_FORCE_SWITCH
+#ifdef LJ_FORCE_SWITCH
                 frLJ   +=
                     -c6*(ic->dispersion_shift.c2 + ic->dispersion_shift.c3*rsw)*rsw*rsw*r
                     + c12*(ic->repulsion_shift.c2 + ic->repulsion_shift.c3*rsw)*rsw*rsw*r;
 #endif
 #endif
 
-#if defined CALC_ENERGIES || defined VDW_POT_SWITCH
-                /* Masking shoule be done after force switching,
+#if defined CALC_ENERGIES || defined LJ_POT_SWITCH
+                /* Masking should be done after force switching,
                  * but before potential switching.
                  */
-                /* Need to zero the interaction if r >= rcut
-                 * or there should be exclusion. */
-                VLJ     = VLJ * skipmask * interact;
-                /* 2 more flops for LJ energy */
+                /* Need to zero the interaction if there should be exclusion. */
+                VLJ     = VLJ * interact;
 #endif
 
-#ifdef VDW_POT_SWITCH
+#ifdef LJ_POT_SWITCH
                 {
                     real sw, dsw;
 
                 }
 #endif
 
+#ifdef LJ_EWALD
+                {
+                    real c6grid, rinvsix_nm, cr2, expmcr2, poly, sh_mask;
+
+#ifdef LJ_EWALD_COMB_GEOM
+                    c6grid       = ljc[type[ai]*2]*ljc[type[aj]*2];
+#elif defined LJ_EWALD_COMB_LB
+                    {
+                        real sigma, sigma2, epsilon;
+
+                        /* These sigma and epsilon are scaled to give 6*C6 */
+                        sigma   = ljc[type[ai]*2] + ljc[type[aj]*2];
+                        epsilon = ljc[type[ai]*2+1]*ljc[type[aj]*2+1];
+
+                        sigma2  = sigma*sigma;
+                        c6grid  = epsilon*sigma2*sigma2*sigma2;
+                    }
+#else
+#error "No LJ Ewald combination rule defined"
+#endif
+
+#ifdef CHECK_EXCLS
+                    /* Recalculate rinvsix without exclusion mask */
+                    rinvsix_nm   = rinvsq*rinvsq*rinvsq;
+#else
+                    rinvsix_nm   = rinvsix;
+#endif
+                    cr2          = lje_coeff2*rsq;
+#ifdef GMX_DOUBLE
+                    expmcr2      = exp(-cr2);
+#else
+                    expmcr2      = expf(-cr2);
+#endif
+                    poly         = 1 + cr2 + 0.5*cr2*cr2;
+
+                    /* Subtract the grid force from the total LJ force */
+                    frLJ        += c6grid*(rinvsix_nm - expmcr2*(rinvsix_nm*poly + lje_coeff6_6));
+#ifdef CALC_ENERGIES
+                    /* Shift should only be applied to real LJ pairs */
+                    sh_mask      = lje_vc*interact;
+
+                    VLJ         += c6grid/6*(rinvsix_nm*(1 - expmcr2*poly) + sh_mask);
+#endif
+                }
+#endif          /* LJ_EWALD */
+
 #ifdef VDW_CUTOFF_CHECK
                 /* Mask for VdW cut-off shorter than Coulomb cut-off */
                 {
                     VLJ    *= skipmask_rvdw;
 #endif
                 }
+#else
+#if defined CALC_ENERGIES
+                /* Need to zero the interaction if r >= rcut */
+                VLJ     = VLJ * skipmask;
+                /* 1 more flop for LJ energy */
 #endif
+#endif          /* VDW_CUTOFF_CHECK */
+
 
 #ifdef CALC_ENERGIES
 #ifdef ENERGY_GROUPS
index e68a300d05b85bf5a4b0f788f694597487e11ed9..955e708fae8994866423b554059a97d028f615d9 100644 (file)
 #endif
 #endif
 
-#ifdef VDW_FORCE_SWITCH
+#if defined LJ_CUT && !defined LJ_EWALD
+#define NBK_FUNC_NAME(feg) NBK_FUNC_NAME2(_VdwLJ, feg)
+#elif defined LJ_FORCE_SWITCH
 #define NBK_FUNC_NAME(feg) NBK_FUNC_NAME2(_VdwLJFsw, feg)
-#else
-#ifdef VDW_POT_SWITCH
+#elif defined LJ_POT_SWITCH
 #define NBK_FUNC_NAME(feg) NBK_FUNC_NAME2(_VdwLJPsw, feg)
+#elif defined LJ_EWALD
+#ifdef LJ_EWALD_COMB_GEOM
+#define NBK_FUNC_NAME(feg) NBK_FUNC_NAME2(_VdwLJEwCombGeom, feg)
 #else
-#define NBK_FUNC_NAME(feg) NBK_FUNC_NAME2(_VdwLJ, feg)
+#define NBK_FUNC_NAME(feg) NBK_FUNC_NAME2(_VdwLJEwCombLB, feg)
 #endif
+#else
+#error "No VdW type defined"
 #endif
 
 static void
@@ -117,7 +123,7 @@ NBK_FUNC_NAME(_VgrpF)
     real               *nbfp_i;
     int                 n, ci, ci_sh;
     int                 ish, ishf;
-    gmx_bool            do_LJ, half_LJ, do_coul;
+    gmx_bool            do_LJ, half_LJ, do_coul, do_self;
     int                 cjind0, cjind1, cjind;
     int                 ip, jp;
 
@@ -134,10 +140,14 @@ NBK_FUNC_NAME(_VgrpF)
     int        egp_sh_i[UNROLLI];
 #endif
 #endif
-#ifdef VDW_POT_SWITCH
+#ifdef LJ_POT_SWITCH
     real       swV3, swV4, swV5;
     real       swF2, swF3, swF4;
 #endif
+#ifdef LJ_EWALD
+    real        lje_coeff2, lje_coeff6_6, lje_vc;
+    const real *ljc;
+#endif
 
 #ifdef CALC_COUL_RF
     real       k_rf2;
@@ -164,7 +174,7 @@ NBK_FUNC_NAME(_VgrpF)
     int npair = 0;
 #endif
 
-#ifdef VDW_POT_SWITCH
+#ifdef LJ_POT_SWITCH
     swV3 = ic->vdw_switch.c3;
     swV4 = ic->vdw_switch.c4;
     swV5 = ic->vdw_switch.c5;
@@ -173,6 +183,14 @@ NBK_FUNC_NAME(_VgrpF)
     swF4 = 5*ic->vdw_switch.c5;
 #endif
 
+#ifdef LJ_EWALD
+    lje_coeff2   = ic->ewaldcoeff_lj*ic->ewaldcoeff_lj;
+    lje_coeff6_6 = lje_coeff2*lje_coeff2*lje_coeff2/6.0;
+    lje_vc       = ic->sh_lj_ewald;
+
+    ljc          = nbat->nbfp_comb;
+#endif
+
 #ifdef CALC_COUL_RF
     k_rf2 = 2*ic->k_rf;
 #ifdef CALC_ENERGIES
@@ -239,6 +257,11 @@ NBK_FUNC_NAME(_VgrpF)
         do_LJ   = (nbln->shift & NBNXN_CI_DO_LJ(0));
         do_coul = (nbln->shift & NBNXN_CI_DO_COUL(0));
         half_LJ = ((nbln->shift & NBNXN_CI_HALF_LJ(0)) || !do_LJ) && do_coul;
+#ifdef LJ_EWALD
+        do_self = TRUE;
+#else
+        do_self = do_coul;
+#endif
 
 #ifdef CALC_ENERGIES
 #ifndef ENERGY_GROUPS
@@ -259,11 +282,13 @@ NBK_FUNC_NAME(_VgrpF)
                 xi[i*XI_STRIDE+d] = x[(ci*UNROLLI+i)*X_STRIDE+d] + shiftvec[ishf+d];
                 fi[i*FI_STRIDE+d] = 0;
             }
+
+            qi[i] = facel*q[ci*UNROLLI+i];
         }
 
-        if (do_coul)
-        {
 #ifdef CALC_ENERGIES
+        if (do_self)
+        {
             real Vc_sub_self;
 
 #ifdef CALC_COUL_RF
@@ -275,26 +300,29 @@ NBK_FUNC_NAME(_VgrpF)
 #else
             Vc_sub_self = 0.5*tab_coul_FDV0[2];
 #endif
-#endif
 #endif
 
-            for (i = 0; i < UNROLLI; i++)
+            if (l_cj[nbln->cj_ind_start].cj == ci_sh)
             {
-                qi[i] = facel*q[ci*UNROLLI+i];
-
-#ifdef CALC_ENERGIES
-                if (l_cj[nbln->cj_ind_start].cj == ci_sh)
+                for (i = 0; i < UNROLLI; i++)
                 {
+                    int egp_ind;
 #ifdef ENERGY_GROUPS
-                    Vc[egp_sh_i[i]+((nbat->energrp[ci]>>(i*nbat->neg_2log)) & egp_mask)]
+                    egp_ind = egp_sh_i[i] + ((nbat->energrp[ci]>>(i*nbat->neg_2log)) & egp_mask);
 #else
-                    Vc[0]
+                    egp_ind = 0;
 #endif
-                        -= qi[i]*q[ci*UNROLLI+i]*Vc_sub_self;
-                }
+                    /* Coulomb self interaction */
+                    Vc[egp_ind]   -= qi[i]*q[ci*UNROLLI+i]*Vc_sub_self;
+
+#ifdef LJ_EWALD
+                    /* LJ Ewald self interaction */
+                    Vvdw[egp_ind] += 0.5*nbat->nbfp[nbat->type[ci*UNROLLI+i]*(nbat->ntype + 1)*2]/6*lje_coeff6_6;
 #endif
+                }
             }
         }
+#endif  /* CALC_ENERGIES */
 
         cjind = cjind0;
         while (cjind < cjind1 && nbl->cj[cjind].excl != 0xffff)
index f7c004ad483b77b78383fe8b0f90bcd3591b8ed0..76b056ec75b53ff468020f59ca175407cc869932 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_GEOM
 /* Will not calculate energies */
 
index 4eb790ac543a3b05bc15cc38ec83127f31028cff..44671ee1adaff0cd4b3dfde54816156dd4b92a55 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 
index 9f681e18703cceb1b927406dc6db423977756fb1..7f1513fab6f55faa908cb7e238084bc69ac41fc1 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
index 90d0155000d1169eaf8b339d579477efdd15731c..369bfbfe28c61f1aeec5e777691c6a5a48d20e72 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_LB
 /* Will not calculate energies */
 
index 0081117f9486e48d55808ed84bb2bdbff74211eb..61d29bba951da9b974382dc6b5842b0af8771a28 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 
index 57237425ad7d77ca926682874c73e0d4ac4c50af..769037be60aae735f354f8a69b05cabed05177ff 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xnn.c
new file mode 100644 (file)
index 0000000..bb32524
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_EWALD
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                  const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                  const interaction_const_t gmx_unused *ic,
+                                                  rvec                      gmx_unused *shift_vec,
+                                                  real                      gmx_unused *f,
+                                                  real                      gmx_unused *fshift,
+                                                  real                      gmx_unused *Vvdw,
+                                                  real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                  const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                  const interaction_const_t gmx_unused *ic,
+                                                  rvec                      gmx_unused *shift_vec,
+                                                  real                      gmx_unused *f,
+                                                  real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xnn.c
new file mode 100644 (file)
index 0000000..5c53c28
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_EWALD
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                   const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                   const interaction_const_t gmx_unused *ic,
+                                                   rvec                      gmx_unused *shift_vec,
+                                                   real                      gmx_unused *f,
+                                                   real                      gmx_unused *fshift,
+                                                   real                      gmx_unused *Vvdw,
+                                                   real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                   const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                   const interaction_const_t gmx_unused *ic,
+                                                   rvec                      gmx_unused *shift_vec,
+                                                   real                      gmx_unused *f,
+                                                   real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xnn.c
new file mode 100644 (file)
index 0000000..df6ca90
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_EWALD
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                      const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                      const interaction_const_t gmx_unused *ic,
+                                                      rvec                      gmx_unused *shift_vec,
+                                                      real                      gmx_unused *f,
+                                                      real                      gmx_unused *fshift,
+                                                      real                      gmx_unused *Vvdw,
+                                                      real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                      const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                      const interaction_const_t gmx_unused *ic,
+                                                      rvec                      gmx_unused *shift_vec,
+                                                      real                      gmx_unused *f,
+                                                      real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
index 8895d918c7a86c141745becd3b3ae6bfa295caa1..dc919db9e1f9a0298fb7a6fa816d031cd8564268 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 85b35984455254d4f0d557b4b107c1266a6e82ec..42650bcfc85361ef8e4f99ff8ff6421c87bf0761 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index d91b063c278f2cf3609d108a2309382c070c5a11..3ba6f9595935c9892b7180939d70ab21ba64c7ed 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 82757f0f78664c19b6b2d905e851b8c25a1a5dd2..c1f0727b925971d9b3aa96dd35bdd4e7933b4248 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 24728fc6aec27ac88d4f8d200c3977eeb42cce42..c627bacf2c1ac0de814458bd6a0b2eb079cd9f46 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 28d416be280e44b3c78560681576a309c7efe391..c83c7a6549af857970ddff13eaf664732131f6a3 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 6f51d8b1f20c9ba4aad10cf3c69dd738622484e6..fe72d654c00eeaad3a8eeb9d40b1ba4e437be7cb 100644 (file)
@@ -48,7 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 3a207fab0689ca4e709575ba8ea3991f3f5057b7..d60902913c9be7dc1ce66fd023ebea086be7ef85 100644 (file)
@@ -48,7 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 465d5496eecb555e7e43089d0657113eff137eda..4d4db8b38297f09a949e2aa6c110c3df57d939d9 100644 (file)
@@ -48,7 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 86ae34335825bec9d51b2e79ac331c7a8c58d4d9..9a35731fc16527a85e99995d80814c55ece81f54 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
+#define LJ_CUT
 #define LJ_COMB_GEOM
 /* Will not calculate energies */
 
index 00f8513f9ba027dc2765975aa00b2bb5411e7969..92b0afbd10cbb424bc0be3d2e857ffc6cad70a5d 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 
index 3f84925291dad7f4d14ba2852e0d04133157f07b..26c75477df4e0b270c05e9b4bf242aa63d8d2992 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
index 716b4edacb186e1f42949d791ff9d85dcd42fad8..ea8cf655db2f95e36b8b68a3b571fbc3715b8751 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
+#define LJ_CUT
 #define LJ_COMB_LB
 /* Will not calculate energies */
 
index 7ce3508f9e24fd390b66b6daee9f3b98b268908a..ad64932b61b442330b3c46385b77b813cfc0bc9f 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 
index 9640186d8859ff66c51d82ee7e7c82680c228db4..ba3512160c56df8fccb7c0b09856071073f04cc0 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_2xnn.c
new file mode 100644 (file)
index 0000000..cb67816
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_EWALD
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                           const nbnxn_atomdata_t    gmx_unused *nbat,
+                                           const interaction_const_t gmx_unused *ic,
+                                           rvec                      gmx_unused *shift_vec,
+                                           real                      gmx_unused *f,
+                                           real                      gmx_unused *fshift,
+                                           real                      gmx_unused *Vvdw,
+                                           real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                           const nbnxn_atomdata_t    gmx_unused *nbat,
+                                           const interaction_const_t gmx_unused *ic,
+                                           rvec                      gmx_unused *shift_vec,
+                                           real                      gmx_unused *f,
+                                           real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_2xnn.c
new file mode 100644 (file)
index 0000000..f71bb45
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_EWALD
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                            const nbnxn_atomdata_t    gmx_unused *nbat,
+                                            const interaction_const_t gmx_unused *ic,
+                                            rvec                      gmx_unused *shift_vec,
+                                            real                      gmx_unused *f,
+                                            real                      gmx_unused *fshift,
+                                            real                      gmx_unused *Vvdw,
+                                            real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                            const nbnxn_atomdata_t    gmx_unused *nbat,
+                                            const interaction_const_t gmx_unused *ic,
+                                            rvec                      gmx_unused *shift_vec,
+                                            real                      gmx_unused *f,
+                                            real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xnn.c
new file mode 100644 (file)
index 0000000..a57df6e
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_EWALD
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                               const nbnxn_atomdata_t    gmx_unused *nbat,
+                                               const interaction_const_t gmx_unused *ic,
+                                               rvec                      gmx_unused *shift_vec,
+                                               real                      gmx_unused *f,
+                                               real                      gmx_unused *fshift,
+                                               real                      gmx_unused *Vvdw,
+                                               real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                               const nbnxn_atomdata_t    gmx_unused *nbat,
+                                               const interaction_const_t gmx_unused *ic,
+                                               rvec                      gmx_unused *shift_vec,
+                                               real                      gmx_unused *f,
+                                               real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
index f674e48c4414e8cd94907392ac5671c0e31fdd40..59f709a399b64c06cf8056fbbbc91e893f0a3100 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 804ea6d34a463eb2d297d52cbd9faf4b2800ca1a..c5c4c14ef6e806a9ec79718d013967bd450357b7 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 4f3f460fa0a09b2e27672e0c1f186d405127ef6d..885f4f4f282a9b04e6954c21ccef593d26696d39 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 2638c41d5f4743587c1bff713a5d1603d6eadd9c..4ff834e209134e0ccae72f587bc1222b6acd99b9 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index b82482b57cba641b778849514a7c47650b9e1fb0..926a8b6bbb67b82cd9b45a90ce749a7c71743e86 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index b2132351f65c0cc1b5fe2bdf17935b66a1a6b9a8..0997b57c5b85eadfb44282e5db7d21b5c29dab16 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index ddec21cc08562792ae903d30e6374a23cd5e0582..68aa2b3963efbc73aa2e62e6bae58ea96971cf7c 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 681ec8953b5996fc815a2dcac0920f7d97ebe1e3..71d77c125538dc82a4135522444b5c0686df62ec 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 0d768fb5c02b3b9caec3d501cd0fcc208a8074d0..a2e613257a5e0df7b011b01adacef1f8d971e821 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index e2e7597f2d71943d70246e8f96ea9675cc3ed7ec..16448b72ba29c612f899b0fbaab367fb0854ff77 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_GEOM
 /* Will not calculate energies */
 
index 4e824957e4efb8a889f037f38beb847c5908e1dc..22315ee3338035171c29bba6b4a2fb2bbcfa4ea8 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 
index 5d2aede12bf1899328350d36886ae0fadf3db052..64ce413cc9e47fcdb23c824641cd72e2fceb3c8a 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
index ec1fac3e2b9f8044fffe684d9059fe2ab4ef22ff..5c89c4fb3bb8909eab4f12c8986157680e768b17 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_LB
 /* Will not calculate energies */
 
index 59f6715d73ca310145a1aab3f77374c6523a9407..d4e17ecfdd2c8c1059518e4f11b2dd14e17074ad 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 
index 3b72339c7fcd3de319ef5480784f8fe507eb9bfb..3c75e0801b4bc75503bd3aa488e690aefbb0ea82 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xnn.c
new file mode 100644 (file)
index 0000000..ae5d693
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_TAB
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                     const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                     const interaction_const_t gmx_unused *ic,
+                                                     rvec                      gmx_unused *shift_vec,
+                                                     real                      gmx_unused *f,
+                                                     real                      gmx_unused *fshift,
+                                                     real                      gmx_unused *Vvdw,
+                                                     real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                     const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                     const interaction_const_t gmx_unused *ic,
+                                                     rvec                      gmx_unused *shift_vec,
+                                                     real                      gmx_unused *f,
+                                                     real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xnn.c
new file mode 100644 (file)
index 0000000..5d991b3
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_TAB
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                      const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                      const interaction_const_t gmx_unused *ic,
+                                                      rvec                      gmx_unused *shift_vec,
+                                                      real                      gmx_unused *f,
+                                                      real                      gmx_unused *fshift,
+                                                      real                      gmx_unused *Vvdw,
+                                                      real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                      const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                      const interaction_const_t gmx_unused *ic,
+                                                      rvec                      gmx_unused *shift_vec,
+                                                      real                      gmx_unused *f,
+                                                      real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xnn.c
new file mode 100644 (file)
index 0000000..bc09bbd
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_TAB
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                         const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                         const interaction_const_t gmx_unused *ic,
+                                                         rvec                      gmx_unused *shift_vec,
+                                                         real                      gmx_unused *f,
+                                                         real                      gmx_unused *fshift,
+                                                         real                      gmx_unused *Vvdw,
+                                                         real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                         const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                         const interaction_const_t gmx_unused *ic,
+                                                         rvec                      gmx_unused *shift_vec,
+                                                         real                      gmx_unused *f,
+                                                         real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
index 80ce35a2f23af3f88ebe27a14478b0963bc6f239..bd8436c676804bf5ffecef328b6ab8b762bde753 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index a4926d6b8ec7a288ec99729cf6fbb229a345e46b..28b27d3a8a20c7a5938c3b1c7aa9437becc91036 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index ab06e42f5e174504ab43e22396d8308e0f17fd15..2077c6dd0562802fec8e2205cfb378aecef09bb8 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 534ae93b08107c6251964290fb70d98e52592070..a6e4f45b44b401b099a86f717b210e3bd1afc770 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 1ac9b6d23ec0cf05c938944bc32552c7283be3cf..2972fcfe355552153468d0088d8bb29f7e8ef531 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index c556a73988e71caaa08fd6d7ac401bc9756a7a88..d267d8e678ec299c3493bb521d10c831490379e0 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 6eaddccdfcfe19fe547c90f46c5bdcbcf16832be..118dc553fb628bcc0688d3faf7e0735ac8f02770 100644 (file)
@@ -48,7 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 91a0ace2514666dc1e036cdcebf2c4ce201eaf57..e04c3d911e3ba7fac52c362e73eb8069adaece28 100644 (file)
@@ -48,7 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index c80763901b6caab4ccd4bd363ba1d4626fa0e6c1..e0af6c8177e3f8100eb0d9b11f6d4bb5ffd9038d 100644 (file)
@@ -48,7 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 1b52825a43cef0b4cc6eacd625685783559ec812..78ecf6966cf8e6a24961491676b2a6b5820e651c 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
+#define LJ_CUT
 #define LJ_COMB_GEOM
 /* Will not calculate energies */
 
index 563e1da1ea0821c8288986c470ae1ef54b918b22..f2136020bdc5a15283b1c20537c8f8fef519e6b1 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 
index 80a707326df94579503cc1a301fa1c220b0b4a75..2ddcb859b5f448cdcd29890b00a7ee524abb0ea4 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
index 373ebba108c2376599c7d6392705cf18ca81f1fc..0182f56c9531602dba7d78390076866aba0391fe 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
+#define LJ_CUT
 #define LJ_COMB_LB
 /* Will not calculate energies */
 
index 1d2c22646c021b400b4879548f098d8dc7efb634..23ed646115046953e0a6cd17621ac9f566e39598 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 
index e7ffea2082c38c626e0a77e31d2967c5fa3b4bb2..54c5d56a289dc865f8b04b31af16a1b4bc041df6 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xnn.c
new file mode 100644 (file)
index 0000000..2fa3ed9
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_TAB
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                              const nbnxn_atomdata_t    gmx_unused *nbat,
+                                              const interaction_const_t gmx_unused *ic,
+                                              rvec                      gmx_unused *shift_vec,
+                                              real                      gmx_unused *f,
+                                              real                      gmx_unused *fshift,
+                                              real                      gmx_unused *Vvdw,
+                                              real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                              const nbnxn_atomdata_t    gmx_unused *nbat,
+                                              const interaction_const_t gmx_unused *ic,
+                                              rvec                      gmx_unused *shift_vec,
+                                              real                      gmx_unused *f,
+                                              real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xnn.c
new file mode 100644 (file)
index 0000000..ba086c8
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_TAB
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                               const nbnxn_atomdata_t    gmx_unused *nbat,
+                                               const interaction_const_t gmx_unused *ic,
+                                               rvec                      gmx_unused *shift_vec,
+                                               real                      gmx_unused *f,
+                                               real                      gmx_unused *fshift,
+                                               real                      gmx_unused *Vvdw,
+                                               real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                               const nbnxn_atomdata_t    gmx_unused *nbat,
+                                               const interaction_const_t gmx_unused *ic,
+                                               rvec                      gmx_unused *shift_vec,
+                                               real                      gmx_unused *f,
+                                               real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xnn.c
new file mode 100644 (file)
index 0000000..7906b80
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_TAB
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                  const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                  const interaction_const_t gmx_unused *ic,
+                                                  rvec                      gmx_unused *shift_vec,
+                                                  real                      gmx_unused *f,
+                                                  real                      gmx_unused *fshift,
+                                                  real                      gmx_unused *Vvdw,
+                                                  real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                  const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                  const interaction_const_t gmx_unused *ic,
+                                                  rvec                      gmx_unused *shift_vec,
+                                                  real                      gmx_unused *f,
+                                                  real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
index 39a5862d8921218440623a81e99fd96b7bc0eccf..18f5ab376c7c0550795b28db92ad46d3a23b81fd 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 434336051cc203a291cae347df5ffd2becef3819..e61100d1023be8f43b99ce546e02e8fcad84f149 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 845bd4d8fd26b8f66006b12201f534ba7327fa2a..2276f91a5ce39c6937274a35fd80de3fd679b571 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 8bd93fffe7639e8771ab9bb88fc3af271c63f72a..ef13e59a2ebd312b0ca9d5de34d3cf1908a84258 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index bc4d92468447efc7bdafa6cdc971ae95f3c404ab..c7f15d611cd33d2546c1d1756d97a3b7b54ee92f 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 05999b60d6cb21996574ae5aa0c0ef74cfafdb59..c10f52cad3c71a720ee9065ce273822e68c06b97 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index b9b2a31df6e190348065a54c19f05cad551f612b..def30cfc19b0c37529e7b38385a1978141462488 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index a09db67a2e0157363e43a40904f7e0b9c671af76..a996b1a88595328199f21a56a48af87f96e39d8d 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 356f91b60a53a4e4e785f091d80c3b55f1948f12..459729abbd64632e87f3e016e2e0caf4f3671635 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index fb2313d28f2b84de667596295068f6d7b55b1262..42222b7bb77dae7644832fc648a807324ae1c596 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
+#define LJ_CUT
 #define LJ_COMB_GEOM
 /* Will not calculate energies */
 
index 7408d0776595ed645dbf9d02e1533a4436f0608c..f6e9e6fffcc522409e1000b744024883efb3a7c2 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 
index cd2046279dc366fc22550c5231591c1eba0db1a9..0d03367d1431b9aff94adc62111f931988a16cc6 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
index 907749b66823cb511e83a5dcf78395fd716f7aaa..7bd991cf80eca405b553a04850a91783f77087c2 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
+#define LJ_CUT
 #define LJ_COMB_LB
 /* Will not calculate energies */
 
index 3c502ef07c925c7dfda2b695fdd0e1b91487783a..8b7415b0e55c79beabe95ede74ff8f5713148d59 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 
index 32875e796a96dc3cbacd6e9583ca8ea0e417ddab..44cc1e9a15f4d5ff388c4fc71714875bf24e6371 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_2xnn.c
new file mode 100644 (file)
index 0000000..e220d69
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_RF
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                           const nbnxn_atomdata_t    gmx_unused *nbat,
+                                           const interaction_const_t gmx_unused *ic,
+                                           rvec                      gmx_unused *shift_vec,
+                                           real                      gmx_unused *f,
+                                           real                      gmx_unused *fshift,
+                                           real                      gmx_unused *Vvdw,
+                                           real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                           const nbnxn_atomdata_t    gmx_unused *nbat,
+                                           const interaction_const_t gmx_unused *ic,
+                                           rvec                      gmx_unused *shift_vec,
+                                           real                      gmx_unused *f,
+                                           real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_2xnn.c
new file mode 100644 (file)
index 0000000..630ec03
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_RF
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                            const nbnxn_atomdata_t    gmx_unused *nbat,
+                                            const interaction_const_t gmx_unused *ic,
+                                            rvec                      gmx_unused *shift_vec,
+                                            real                      gmx_unused *f,
+                                            real                      gmx_unused *fshift,
+                                            real                      gmx_unused *Vvdw,
+                                            real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                            const nbnxn_atomdata_t    gmx_unused *nbat,
+                                            const interaction_const_t gmx_unused *ic,
+                                            rvec                      gmx_unused *shift_vec,
+                                            real                      gmx_unused *f,
+                                            real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xnn.c
new file mode 100644 (file)
index 0000000..c18876d
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 2xnn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_2XNN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 2
+#include "nbnxn_kernel_simd_2xnn.h"
+
+#define CALC_COUL_RF
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_common.h"
+#endif /* GMX_NBNXN_SIMD_2XNN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                               const nbnxn_atomdata_t    gmx_unused *nbat,
+                                               const interaction_const_t gmx_unused *ic,
+                                               rvec                      gmx_unused *shift_vec,
+                                               real                      gmx_unused *f,
+                                               real                      gmx_unused *fshift,
+                                               real                      gmx_unused *Vvdw,
+                                               real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xnn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                               const nbnxn_atomdata_t    gmx_unused *nbat,
+                                               const interaction_const_t gmx_unused *ic,
+                                               rvec                      gmx_unused *shift_vec,
+                                               real                      gmx_unused *f,
+                                               real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_2XNN
+#include "nbnxn_kernel_simd_2xnn_outer.h"
+#else /* GMX_NBNXN_SIMD_2XNN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_2XNN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_2XNN */
index 52fecc8eb2ee79927f582a9dd64d9f7cadffdd4a..d6600ae047df4794267b3f5e2204da8b2f7d157c 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index af5acc0d101274223c6dd98c62a9cdfb4af51968..edf6fddfc0a334d7e0ddc1753ed59001a8a8f101 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index c3bfe09194c0f696e48e78686da651ef1f0f876c..e43052880dc8b01c394275aa00499f81ddeb7361 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 6d31b573b1e9ab93d12892294775581dbe0d40c6..198955942f4a72cd0b367390883bea5b550be11a 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index f79dc11822d27fbb428fdc5206259f6d3a36a8be..ccb52a8b1f4e891efb0d97cd337a4a672e52d116 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 636d393696b86647fa12c0401379d4c13e3aef59..bec4d4c39a762cc8bdd21708dc3b857787726364 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index a97714cb7249f8c2d052c8a01456db022421f536..9eec2b30325c836140bb60cffdfe1db11b5ac6a3 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index 354ac6f11b07332fdf4475256fd3370b2f8a2d28..46a2417fd392e07d5c1fc19709398fe06f8068df 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_2XNN
index ebe2a88d1c50ce7619f6e9e60710f0c4e73861c4..90b38d626398e97205cefc2c8ac52b4d6129a4cc 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_2xnn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 4bf21fa8249e965e3d1a580e45d5dfcef1ff9d8c..d8ec1d2edc4c3a863b8a9667ac4ea5c9cc8485eb 100644 (file)
 /*! \brief Kinds of electrostatic treatments in SIMD Verlet kernels
  */
 enum {
-    coultRF, coultTAB, coultTAB_TWIN, coultEWALD, coultEWALD_TWIN, coultNR
+    coulktRF, coulktTAB, coulktTAB_TWIN, coulktEWALD, coulktEWALD_TWIN, coulktNR
+};
+
+/*! \brief Kinds of Van der Waals treatments in SIMD Verlet kernels
+ */
+enum {
+    vdwktLJCUT_COMBGEOM, vdwktLJCUT_COMBLB, vdwktLJCUT_COMBNONE, vdwktLJFORCESWITCH, vdwktLJPOTSWITCH, vdwktLJEWALDCOMBGEOM, vdwktNR
 };
 
 /* Declare and define the kernel function pointer lookup tables.
  * The minor index of the array goes over both the LJ combination rules,
- * which is only supported by plain cut-off, and the LJ switch functions.
+ * which is only supported by plain cut-off, and the LJ switch/PME functions.
  */
-static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
+static p_nbk_func_noener p_nbk_noener[coulktNR][vdwktNR] =
 {
     {
         nbnxn_kernel_ElecRF_VdwLJCombGeom_F_2xnn,
@@ -79,6 +85,7 @@ static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecRF_VdwLJ_F_2xnn,
         nbnxn_kernel_ElecRF_VdwLJFSw_F_2xnn,
         nbnxn_kernel_ElecRF_VdwLJPSw_F_2xnn,
+        nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_2xnn,
     },
     {
         nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_2xnn,
@@ -86,6 +93,7 @@ static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecQSTab_VdwLJ_F_2xnn,
         nbnxn_kernel_ElecQSTab_VdwLJFSw_F_2xnn,
         nbnxn_kernel_ElecQSTab_VdwLJPSw_F_2xnn,
+        nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xnn,
     },
     {
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_2xnn,
@@ -93,6 +101,7 @@ static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_2xnn,
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_2xnn,
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_2xnn,
+        nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xnn,
     },
     {
         nbnxn_kernel_ElecEw_VdwLJCombGeom_F_2xnn,
@@ -100,6 +109,7 @@ static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecEw_VdwLJ_F_2xnn,
         nbnxn_kernel_ElecEw_VdwLJFSw_F_2xnn,
         nbnxn_kernel_ElecEw_VdwLJPSw_F_2xnn,
+        nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_2xnn,
     },
     {
         nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_2xnn,
@@ -107,10 +117,11 @@ static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_2xnn,
         nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_2xnn,
         nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_2xnn,
+        nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xnn,
     },
 };
 
-static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
+static p_nbk_func_ener p_nbk_ener[coulktNR][vdwktNR] =
 {
     {
         nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_2xnn,
@@ -118,6 +129,7 @@ static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecRF_VdwLJ_VF_2xnn,
         nbnxn_kernel_ElecRF_VdwLJFSw_VF_2xnn,
         nbnxn_kernel_ElecRF_VdwLJPSw_VF_2xnn,
+        nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_2xnn,
     },
     {
         nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_2xnn,
@@ -125,6 +137,7 @@ static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecQSTab_VdwLJ_VF_2xnn,
         nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_2xnn,
         nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_2xnn,
+        nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xnn,
     },
     {
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_2xnn,
@@ -132,6 +145,7 @@ static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_2xnn,
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_2xnn,
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_2xnn,
+        nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xnn,
     },
     {
         nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_2xnn,
@@ -139,6 +153,7 @@ static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecEw_VdwLJ_VF_2xnn,
         nbnxn_kernel_ElecEw_VdwLJFSw_VF_2xnn,
         nbnxn_kernel_ElecEw_VdwLJPSw_VF_2xnn,
+        nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_2xnn,
     },
     {
         nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_2xnn,
@@ -146,10 +161,11 @@ static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_2xnn,
         nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_2xnn,
         nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_2xnn,
+        nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xnn,
     },
 };
 
-static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
+static p_nbk_func_ener p_nbk_energrp[coulktNR][vdwktNR] =
 {
     {
         nbnxn_kernel_ElecRF_VdwLJCombGeom_VgrpF_2xnn,
@@ -157,6 +173,7 @@ static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecRF_VdwLJ_VgrpF_2xnn,
         nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_2xnn,
         nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_2xnn,
+        nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xnn,
     },
     {
         nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_2xnn,
@@ -164,6 +181,7 @@ static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_2xnn,
         nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_2xnn,
         nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_2xnn,
+        nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xnn,
     },
     {
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_2xnn,
@@ -171,6 +189,7 @@ static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_2xnn,
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_2xnn,
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_2xnn,
+        nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xnn,
     },
     {
         nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_2xnn,
@@ -178,6 +197,7 @@ static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecEw_VdwLJ_VgrpF_2xnn,
         nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_2xnn,
         nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_2xnn,
+        nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xnn,
     },
     {
         nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_2xnn,
@@ -185,6 +205,7 @@ static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_2xnn,
         nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_2xnn,
         nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_2xnn,
+        nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xnn,
     },
 };
 
@@ -250,7 +271,7 @@ nbnxn_kernel_simd_2xnn(nbnxn_pairlist_set_t      gmx_unused *nbl_list,
 {
     int                nnbl;
     nbnxn_pairlist_t **nbl;
-    int                coult, ljtreatment = 0;
+    int                coulkt, vdwkt = 0;
     int                nb;
 
     nnbl = nbl_list->nnbl;
@@ -258,7 +279,7 @@ nbnxn_kernel_simd_2xnn(nbnxn_pairlist_set_t      gmx_unused *nbl_list,
 
     if (EEL_RF(ic->eeltype) || ic->eeltype == eelCUT)
     {
-        coult = coultRF;
+        coulkt = coulktRF;
     }
     else
     {
@@ -266,41 +287,61 @@ nbnxn_kernel_simd_2xnn(nbnxn_pairlist_set_t      gmx_unused *nbl_list,
         {
             if (ic->rcoulomb == ic->rvdw)
             {
-                coult = coultTAB;
+                coulkt = coulktTAB;
             }
             else
             {
-                coult = coultTAB_TWIN;
+                coulkt = coulktTAB_TWIN;
             }
         }
         else
         {
             if (ic->rcoulomb == ic->rvdw)
             {
-                coult = coultEWALD;
+                coulkt = coulktEWALD;
             }
             else
             {
-                coult = coultEWALD_TWIN;
+                coulkt = coulktEWALD_TWIN;
             }
         }
     }
 
-    switch (ic->vdw_modifier)
+    if (ic->vdwtype == evdwCUT)
+    {
+        switch (ic->vdw_modifier)
+        {
+            case eintmodNONE:
+            case eintmodPOTSHIFT:
+                switch (nbat->comb_rule)
+                {
+                    case ljcrGEOM: vdwkt = vdwktLJCUT_COMBGEOM; break;
+                    case ljcrLB:   vdwkt = vdwktLJCUT_COMBLB;   break;
+                    case ljcrNONE: vdwkt = vdwktLJCUT_COMBNONE; break;
+                    default:       gmx_incons("Unknown combination rule");
+                }
+                break;
+            case eintmodFORCESWITCH:
+                vdwkt = vdwktLJFORCESWITCH;
+                break;
+            case eintmodPOTSWITCH:
+                vdwkt = vdwktLJPOTSWITCH;
+                break;
+            default:
+                gmx_incons("Unsupported VdW interaction modifier");
+        }
+    }
+    else if (ic->vdwtype == evdwPME)
+    {
+        if (ic->ljpme_comb_rule == eljpmeLB)
+        {
+            gmx_incons("The nbnxn SIMD kernels don't suport LJ-PME with LB");
+        }
+        vdwkt = vdwktLJEWALDCOMBGEOM;
+    }
+    else
     {
-        case eintmodNONE:
-        case eintmodPOTSHIFT:
-            ljtreatment = nbat->comb_rule;
-            break;
-        /* Switch functions follow after cut-off combination rule kernels */
-        case eintmodFORCESWITCH:
-            ljtreatment = ljcrNR;
-            break;
-        case eintmodPOTSWITCH:
-            ljtreatment = ljcrNR + 1;
-            break;
-        default:
-            gmx_incons("Unsupported VdW interaction modifier");
+        gmx_incons("Unsupported VdW interaction type");
     }
 
 #pragma omp parallel for schedule(static) num_threads(gmx_omp_nthreads_get(emntNonbonded))
@@ -333,11 +374,11 @@ nbnxn_kernel_simd_2xnn(nbnxn_pairlist_set_t      gmx_unused *nbl_list,
         if (!(force_flags & GMX_FORCE_ENERGY))
         {
             /* Don't calculate energies */
-            p_nbk_noener[coult][ljtreatment](nbl[nb], nbat,
-                                             ic,
-                                             shift_vec,
-                                             out->f,
-                                             fshift_p);
+            p_nbk_noener[coulkt][vdwkt](nbl[nb], nbat,
+                                        ic,
+                                        shift_vec,
+                                        out->f,
+                                        fshift_p);
         }
         else if (out->nV == 1)
         {
@@ -345,13 +386,13 @@ nbnxn_kernel_simd_2xnn(nbnxn_pairlist_set_t      gmx_unused *nbl_list,
             out->Vvdw[0] = 0;
             out->Vc[0]   = 0;
 
-            p_nbk_ener[coult][ljtreatment](nbl[nb], nbat,
-                                           ic,
-                                           shift_vec,
-                                           out->f,
-                                           fshift_p,
-                                           out->Vvdw,
-                                           out->Vc);
+            p_nbk_ener[coulkt][vdwkt](nbl[nb], nbat,
+                                      ic,
+                                      shift_vec,
+                                      out->f,
+                                      fshift_p,
+                                      out->Vvdw,
+                                      out->Vc);
         }
         else
         {
@@ -367,13 +408,13 @@ nbnxn_kernel_simd_2xnn(nbnxn_pairlist_set_t      gmx_unused *nbl_list,
                 out->VSc[i] = 0;
             }
 
-            p_nbk_energrp[coult][ljtreatment](nbl[nb], nbat,
-                                              ic,
-                                              shift_vec,
-                                              out->f,
-                                              fshift_p,
-                                              out->VSvdw,
-                                              out->VSc);
+            p_nbk_energrp[coulkt][vdwkt](nbl[nb], nbat,
+                                         ic,
+                                         shift_vec,
+                                         out->f,
+                                         fshift_p,
+                                         out->VSvdw,
+                                         out->VSc);
 
             reduce_group_energies(nbat->nenergrp, nbat->neg_2log,
                                   out->VSvdw, out->VSc,
index 9b84f84909a72343a9ff1f41c3170430d00820ef..58f1e768e01a4f9df9ac0412b1a7d6329016af3a 100644 (file)
@@ -88,78 +88,93 @@ nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJCombLB_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJ_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_2xnn;
+nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJCombLB_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_2xnn;
+nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_2xnn;
+nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJ_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_2xnn;
+nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_2xnn;
+nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xnn;
 
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJCombLB_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJ_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJFSw_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJPSw_VF_2xnn;
+nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJCombLB_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJ_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_2xnn;
+nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_2xnn;
+nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJCombLB_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJ_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJFSw_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJPSw_VF_2xnn;
+nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_2xnn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_2xnn;
+nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xnn;
 
 nbk_func_noener       nbnxn_kernel_ElecRF_VdwLJCombGeom_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecRF_VdwLJCombLB_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecRF_VdwLJ_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecRF_VdwLJFSw_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecRF_VdwLJPSw_F_2xnn;
+nbk_func_noener       nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecQSTab_VdwLJ_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecQSTab_VdwLJFSw_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecQSTab_VdwLJPSw_F_2xnn;
+nbk_func_noener       nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_2xnn;
+nbk_func_noener       nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecEw_VdwLJCombGeom_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecEw_VdwLJCombLB_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecEw_VdwLJ_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecEw_VdwLJFSw_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecEw_VdwLJPSw_F_2xnn;
+nbk_func_noener       nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_2xnn;
 nbk_func_noener       nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_2xnn;
+nbk_func_noener       nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xnn;
 
 
 
index d0182ac8b17ba306b4ee5c6b1b46350b0310469b..8c97de1c7ea26d2c2e98187ac098bb5ef5185ca4 100644 (file)
  */
 
 
-/* When calculating RF or Ewald interactions we calculate the electrostatic
+/* When calculating RF or Ewald interactions we calculate the electrostatic/LJ
  * forces on excluded atom pairs here in the non-bonded loops.
  * But when energies and/or virial is required we calculate them
  * separately to as then it is easier to separate the energy and virial
  * contributions.
  */
-#if defined CHECK_EXCLS && defined CALC_COULOMB
+#if defined CHECK_EXCLS && (defined CALC_COULOMB || defined LJ_EWALD_GEOM)
 #define EXCL_FORCES
 #endif
 
     gmx_simd_real_t  c6s_j_S, c12s_j_S;
 #endif
 
-#if defined LJ_COMB_GEOM || defined LJ_COMB_LB
+#if defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined LJ_EWALD_GEOM
     /* Index for loading LJ parameters, complicated when interleaving */
     int         aj2;
 #endif
 
     /* Atom indices (of the first atom in the cluster) */
     aj            = cj*UNROLLJ;
-#if defined CALC_LJ && (defined LJ_COMB_GEOM || defined LJ_COMB_LB)
+#if defined CALC_LJ && (defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined LJ_EWALD_GEOM)
 #if UNROLLJ == STRIDE
     aj2           = aj*2;
 #else
 #endif
 #endif
 
-#ifndef LJ_FORCE_SWITCH
-    /* We have plain LJ with simple C6/6 C12/12 coefficients */
+#if defined LJ_CUT || defined LJ_POT_SWITCH
+    /* We have plain LJ or LJ-PME with simple C6/6 C12/12 coefficients */
     FrLJ6_S0    = gmx_simd_mul_r(c6_S0, rinvsix_S0);
 #ifndef HALF_LJ
     FrLJ6_S2    = gmx_simd_mul_r(c6_S2, rinvsix_S2);
     frLJ_S2     = gmx_simd_sub_r(FrLJ12_S2, FrLJ6_S2);
 #endif
 
-#if defined CALC_ENERGIES && !defined LJ_POT_SWITCH
-#ifndef LJ_FORCE_SWITCH
+#if (defined LJ_CUT || defined LJ_FORCE_SWITCH) && defined CALC_ENERGIES
+
+#ifdef LJ_CUT
     /* Calculate the LJ energies, with constant potential shift */
     VLJ6_S0     = gmx_simd_mul_r(sixth_S, gmx_simd_fmadd_r(c6_S0, p6_cpot_S, FrLJ6_S0));
 #ifndef HALF_LJ
 #ifndef HALF_LJ
     VLJ12_S2    = gmx_simd_mul_r(twelveth_S, gmx_simd_fmadd_r(c12_S2, p12_cpot_S, FrLJ12_S2));
 #endif
-#else
+#endif /* LJ_CUT */
 
+#ifdef LJ_FORCE_SWITCH
 #define v_fswitch_pr(rsw, rsw2, c0, c3, c4) gmx_simd_fmadd_r(gmx_simd_fmadd_r(c4, rsw, c3), gmx_simd_mul_r(rsw2, rsw), c0)
 
     VLJ6_S0     = gmx_simd_mul_r(c6_S0, gmx_simd_fmadd_r(sixth_S, rinvsix_S0, v_fswitch_pr(rsw_S0, rsw2_S0, p6_6cpot_S, p6_vc3_S, p6_vc4_S)));
 #ifndef HALF_LJ
     VLJ_S2      = gmx_simd_sub_r(VLJ12_S2, VLJ6_S2);
 #endif
-#endif /* CALC_ENERGIES && !LJ_POT_SWITCH */
+
+#endif /* (LJ_CUT || LJ_FORCE_SWITCH) && CALC_ENERGIES */
 
 #ifdef LJ_POT_SWITCH
     /* We always need the potential, since it is needed for the force */
     }
 #endif /* LJ_POT_SWITCH */
 
+#if defined CALC_ENERGIES && defined CHECK_EXCLS
+    /* The potential shift should be removed for excluded pairs */
+    VLJ_S0      = gmx_simd_blendzero_r(VLJ_S0, interact_S0);
+#ifndef HALF_LJ
+    VLJ_S2      = gmx_simd_blendzero_r(VLJ_S2, interact_S2);
+#endif
+#endif
+
+#ifdef LJ_EWALD_GEOM
+    {
+        gmx_simd_real_t c6s_j_S;
+        gmx_simd_real_t c6grid_S0, rinvsix_nm_S0, cr2_S0, expmcr2_S0, poly_S0;
+#ifndef HALF_LJ
+        gmx_simd_real_t c6grid_S2, rinvsix_nm_S2, cr2_S2, expmcr2_S2, poly_S2;
+#endif
+#ifdef CALC_ENERGIES
+        gmx_simd_real_t sh_mask_S0;
+#ifndef HALF_LJ
+        gmx_simd_real_t sh_mask_S2;
+#endif
+#endif
+
+        /* Determine C6 for the grid using the geometric combination rule */
+        gmx_loaddh_pr(&c6s_j_S,  ljc+aj2+0);
+        c6grid_S0       = gmx_simd_mul_r(c6s_S0, c6s_j_S);
+#ifndef HALF_LJ
+        c6grid_S2       = gmx_simd_mul_r(c6s_S2, c6s_j_S);
+#endif
+
+#ifdef CHECK_EXCLS
+        /* Recalculate rinvsix without exclusion mask (compiler might optimize) */
+        rinvsix_nm_S0 = gmx_simd_mul_r(rinvsq_S0, gmx_simd_mul_r(rinvsq_S0, rinvsq_S0));
+#ifndef HALF_LJ
+        rinvsix_nm_S2 = gmx_simd_mul_r(rinvsq_S2, gmx_simd_mul_r(rinvsq_S2, rinvsq_S2));
+#endif
+#else
+        /* We didn't use a mask, so we can copy */
+        rinvsix_nm_S0 = rinvsix_S0;
+#ifndef HALF_LJ
+        rinvsix_nm_S2 = rinvsix_S2;
+#endif
+#endif
+
+        cr2_S0        = gmx_simd_mul_r(lje_c2_S, rsq_S0);
+#ifndef HALF_LJ
+        cr2_S2        = gmx_simd_mul_r(lje_c2_S, rsq_S2);
+#endif
+        expmcr2_S0    = gmx_simd_exp_r(gmx_simd_mul_r(mone_S, cr2_S0));
+#ifndef HALF_LJ
+        expmcr2_S2    = gmx_simd_exp_r(gmx_simd_mul_r(mone_S, cr2_S2));
+#endif
+
+        /* 1 + cr2 + 1/2*cr2^2 */
+        poly_S0       = gmx_simd_fmadd_r(gmx_simd_fmadd_r(half_S, cr2_S0, one_S), cr2_S0, one_S);
+#ifndef HALF_LJ
+        poly_S2       = gmx_simd_fmadd_r(gmx_simd_fmadd_r(half_S, cr2_S2, one_S), cr2_S2, one_S);
+#endif
+
+        /* We calculate LJ F*r = (6*C6)*(r^-6 - F_mesh/6), we use:
+         * r^-6*cexp*(1 + cr2 + cr2^2/2 + cr2^3/6) = cexp*(r^-6*poly + c^6/6)
+         */
+        frLJ_S0       = gmx_simd_fmadd_r(c6grid_S0, gmx_simd_fnmadd_r(expmcr2_S0, gmx_simd_fmadd_r(rinvsix_nm_S0, poly_S0, lje_c6_6_S), rinvsix_nm_S0), frLJ_S0);
+#ifndef HALF_LJ
+        frLJ_S2       = gmx_simd_fmadd_r(c6grid_S2, gmx_simd_fnmadd_r(expmcr2_S2, gmx_simd_fmadd_r(rinvsix_nm_S2, poly_S2, lje_c6_6_S), rinvsix_nm_S2), frLJ_S2);
+#endif
+
+#ifdef CALC_ENERGIES
+#ifdef CHECK_EXCLS
+        sh_mask_S0    = gmx_simd_blendzero_r(lje_vc_S, interact_S0);
+#ifndef HALF_LJ
+        sh_mask_S2    = gmx_simd_blendzero_r(lje_vc_S, interact_S2);
+#endif
+#else
+        sh_mask_S0    = lje_vc_S;
+#ifndef HALF_LJ
+        sh_mask_S2    = lje_vc_S;
+#endif
+#endif
+
+        VLJ_S0        = gmx_simd_fmadd_r(gmx_simd_mul_r(sixth_S, c6grid_S0), gmx_simd_fmadd_r(rinvsix_nm_S0, gmx_simd_fnmadd_r(expmcr2_S0, poly_S0, one_S), sh_mask_S0), VLJ_S0);
+#ifndef HALF_LJ
+        VLJ_S2        = gmx_simd_fmadd_r(gmx_simd_mul_r(sixth_S, c6grid_S2), gmx_simd_fmadd_r(rinvsix_nm_S2, gmx_simd_fnmadd_r(expmcr2_S2, poly_S2, one_S), sh_mask_S2), VLJ_S2);
+#endif
+#endif /* CALC_ENERGIES */
+    }
+#endif /* LJ_EWALD_GEOM */
+
 #if defined VDW_CUTOFF_CHECK
     /* frLJ is multiplied later by rinvsq, which is masked for the Coulomb
      * cut-off, but if the VdW cut-off is shorter, we need to mask with that.
 #endif
 #endif
 
-#if defined CALC_ENERGIES && defined CHECK_EXCLS
-    /* The potential shift should be removed for excluded pairs */
-    VLJ_S0      = gmx_simd_blendzero_r(VLJ_S0, interact_S0);
-#ifndef HALF_LJ
-    VLJ_S2      = gmx_simd_blendzero_r(VLJ_S2, interact_S2);
-#endif
-#endif
-
-
 #endif /* CALC_LJ */
 
 #ifdef CALC_ENERGIES
index 8f809e73532ec6d9e815d609eb005da5ca541d9f..38b0293872682a5b49ce30bc017b3eb3b37fad0c 100644 (file)
@@ -75,7 +75,7 @@
     real               *nbfp_ptr;
     int                 n, ci, ci_sh;
     int                 ish, ish3;
-    gmx_bool            do_LJ, half_LJ, do_coul;
+    gmx_bool            do_LJ, half_LJ, do_coul, do_self;
     int                 sci, scix, sciy, sciz, sci2;
     int                 cjind0, cjind1, cjind;
     int                 ip, jp;
@@ -98,7 +98,7 @@
     gmx_simd_real_t  fix_S2, fiy_S2, fiz_S2;
     /* We use an i-force SIMD register width of 4 */
     /* The pr4 stuff is defined in nbnxn_kernel_simd_utils.h */
-    gmx_mm_pr4       fix_S, fiy_S, fiz_S;
+    gmx_simd4_real_t fix_S, fiy_S, fiz_S;
 
     gmx_simd_real_t  diagonal_jmi_S;
 #if UNROLLI == UNROLLJ
     gmx_simd_real_t  sh_ewald_S;
 #endif
 
+#if defined LJ_CUT && defined CALC_ENERGIES
+    gmx_simd_real_t   p6_cpot_S, p12_cpot_S;
+#endif
 #ifdef LJ_POT_SWITCH
     gmx_simd_real_t   rswitch_S;
     gmx_simd_real_t   swV3_S, swV4_S, swV5_S;
     gmx_simd_real_t   swF2_S, swF3_S, swF4_S;
-#else
+#endif
 #ifdef LJ_FORCE_SWITCH
     gmx_simd_real_t   rswitch_S;
     gmx_simd_real_t   p6_fc2_S, p6_fc3_S;
     gmx_simd_real_t   p12_vc3_S, p12_vc4_S;
     gmx_simd_real_t   p6_6cpot_S, p12_12cpot_S;
 #endif
-#else
-#ifdef CALC_ENERGIES
-    gmx_simd_real_t  p6_cpot_S, p12_cpot_S;
-#endif
 #endif
+#ifdef LJ_EWALD_GEOM
+    real              lj_ewaldcoeff2, lj_ewaldcoeff6_6;
+    gmx_simd_real_t   mone_S, half_S, lje_c2_S, lje_c6_6_S, lje_vc_S;
 #endif
 
 #ifdef LJ_COMB_LB
     gmx_simd_real_t   c6_S2, c12_S2;
 #endif
 
-#ifdef LJ_COMB_GEOM
+#if defined LJ_COMB_GEOM || defined LJ_EWALD_GEOM
     const real       *ljc;
 
     gmx_simd_real_t   c6s_S0, c12s_S0;
-    gmx_simd_real_t   c6s_S1, c12s_S1;
     gmx_simd_real_t   c6s_S2  = gmx_simd_setzero_r();
     gmx_simd_real_t   c12s_S2 = gmx_simd_setzero_r();
-    gmx_simd_real_t   c6s_S3  = gmx_simd_setzero_r();
-    gmx_simd_real_t   c12s_S3 = gmx_simd_setzero_r();
 #endif
 #endif /* LJ_COMB_LB */
 
     int npair = 0;
 #endif
 
-#if defined LJ_COMB_GEOM || defined LJ_COMB_LB
+#if defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined LJ_EWALD_GEOM
     ljc = nbat->lj_comb;
-#else
+#endif
+#if !(defined LJ_COMB_GEOM || defined LJ_COMB_LB)
     /* No combination rule used */
     nbfp_ptr    = (4 == nbfp_stride) ? nbat->nbfp_s4 : nbat->nbfp;
 #endif
     twelveth_S   = gmx_simd_set1_r(1.0/12.0);
 #endif
 
+#if defined LJ_CUT && defined CALC_ENERGIES
+    /* We shift the potential by cpot, which can be zero */
+    p6_cpot_S    = gmx_simd_set1_r(ic->dispersion_shift.cpot);
+    p12_cpot_S   = gmx_simd_set1_r(ic->repulsion_shift.cpot);
+#endif
 #ifdef LJ_POT_SWITCH
     rswitch_S = gmx_simd_set1_r(ic->rvdw_switch);
     swV3_S    = gmx_simd_set1_r(ic->vdw_switch.c3);
     swF2_S    = gmx_simd_set1_r(3*ic->vdw_switch.c3);
     swF3_S    = gmx_simd_set1_r(4*ic->vdw_switch.c4);
     swF4_S    = gmx_simd_set1_r(5*ic->vdw_switch.c5);
-#else
-    sixth_S      = gmx_simd_set1_r(1.0/6.0);
-    twelveth_S   = gmx_simd_set1_r(1.0/12.0);
+#endif
 #ifdef LJ_FORCE_SWITCH
     rswitch_S = gmx_simd_set1_r(ic->rvdw_switch);
     p6_fc2_S  = gmx_simd_set1_r(ic->dispersion_shift.c2);
         p12_12cpot_S = gmx_simd_set1_r(ic->repulsion_shift.cpot/12);
     }
 #endif
-#else
-    /* Plain LJ cut-off, with potential shift cpot, which can be 0 */
-#ifdef CALC_ENERGIES
-    p6_cpot_S    = gmx_simd_set1_r(ic->dispersion_shift.cpot);
-    p12_cpot_S   = gmx_simd_set1_r(ic->repulsion_shift.cpot);
 #endif
+#ifdef LJ_EWALD_GEOM
+    mone_S           = gmx_simd_set1_r(-1.0);
+    half_S           = gmx_simd_set1_r(0.5);
+    lj_ewaldcoeff2   = ic->ewaldcoeff_lj*ic->ewaldcoeff_lj;
+    lj_ewaldcoeff6_6 = lj_ewaldcoeff2*lj_ewaldcoeff2*lj_ewaldcoeff2/6;
+    lje_c2_S         = gmx_simd_set1_r(lj_ewaldcoeff2);
+    lje_c6_6_S       = gmx_simd_set1_r(lj_ewaldcoeff6_6);
+    /* Determine the grid potential at the cut-off */
+    lje_vc_S         = gmx_simd_set1_r(ic->sh_lj_ewald);
 #endif
-#endif /* LJ_POT_SWITCH */
 
     /* The kernel either supports rcoulomb = rvdw or rcoulomb >= rvdw */
     rc2_S    = gmx_simd_set1_r(ic->rcoulomb*ic->rcoulomb);
         do_LJ   = (nbln->shift & NBNXN_CI_DO_LJ(0));
         do_coul = (nbln->shift & NBNXN_CI_DO_COUL(0));
         half_LJ = ((nbln->shift & NBNXN_CI_HALF_LJ(0)) || !do_LJ) && do_coul;
+#ifdef LJ_EWALD_GEOM
+        do_self = TRUE;
+#else
+        do_self = do_coul;
+#endif
 
 #ifdef ENERGY_GROUPS
         egps_i = nbat->energrp[ci];
             }
         }
 #endif
-#if defined CALC_ENERGIES
+
+#ifdef CALC_ENERGIES
 #if UNROLLJ == 4
-        if (do_coul && l_cj[nbln->cj_ind_start].cj == ci_sh)
+        if (do_self && l_cj[nbln->cj_ind_start].cj == ci_sh)
 #endif
 #if UNROLLJ == 8
-        if (do_coul && l_cj[nbln->cj_ind_start].cj == (ci_sh>>1))
+        if (do_self && l_cj[nbln->cj_ind_start].cj == (ci_sh>>1))
 #endif
         {
-            int  ia;
-            real Vc_sub_self;
+            if (do_coul)
+            {
+                real Vc_sub_self;
+                int  ia;
 
 #ifdef CALC_COUL_RF
-            Vc_sub_self = 0.5*ic->c_rf;
+                Vc_sub_self = 0.5*ic->c_rf;
 #endif
 #ifdef CALC_COUL_TAB
 #ifdef TAB_FDV0
-            Vc_sub_self = 0.5*tab_coul_F[2];
+                Vc_sub_self = 0.5*tab_coul_F[2];
 #else
-            Vc_sub_self = 0.5*tab_coul_V[0];
+                Vc_sub_self = 0.5*tab_coul_V[0];
 #endif
 #endif
 #ifdef CALC_COUL_EWALD
-            /* beta/sqrt(pi) */
-            Vc_sub_self = 0.5*ic->ewaldcoeff_q*M_2_SQRTPI;
+                /* beta/sqrt(pi) */
+                Vc_sub_self = 0.5*ic->ewaldcoeff_q*M_2_SQRTPI;
 #endif
 
-            for (ia = 0; ia < UNROLLI; ia++)
+                for (ia = 0; ia < UNROLLI; ia++)
+                {
+                    real qi;
+
+                    qi = q[sci+ia];
+#ifdef ENERGY_GROUPS
+                    vctp[ia][((egps_i>>(ia*egps_ishift)) & egps_imask)*egps_jstride]
+#else
+                    Vc[0]
+#endif
+                        -= facel*qi*qi*Vc_sub_self;
+                }
+            }
+
+#ifdef LJ_EWALD_GEOM
             {
-                real qi;
+                int  ia;
+
+                for (ia = 0; ia < UNROLLI; ia++)
+                {
+                    real c6_i;
 
-                qi = q[sci+ia];
+                    c6_i = nbat->nbfp[nbat->type[sci+ia]*(nbat->ntype + 1)*2]/6;
 #ifdef ENERGY_GROUPS
-                vctp[ia][((egps_i>>(ia*egps_ishift)) & egps_imask)*egps_jstride]
+                    vvdwtp[ia][((egps_i>>(ia*egps_ishift)) & egps_imask)*egps_jstride]
 #else
-                Vc[0]
+                    Vvdw[0]
 #endif
-                    -= facel*qi*qi*Vc_sub_self;
+                        += 0.5*c6_i*lj_ewaldcoeff6_6;
+                }
             }
+#endif      /* LJ_EWALD */
         }
 #endif
 
             nbfp3 = nbfp_ptr + type[sci+3]*nbat->ntype*nbfp_stride;
         }
 #endif
+#endif
+#ifdef LJ_EWALD_GEOM
+        /* We need the geometrically combined C6 for the PME grid correction */
+        gmx_load1p1_pr(&c6s_S0, ljc+sci2+0);
+        if (!half_LJ)
+        {
+            gmx_load1p1_pr(&c6s_S2, ljc+sci2+2);
+        }
 #endif
 
         /* Zero the potential energy for this list */
 
         /* Add accumulated i-forces to the force array */
         fix_S = gmx_mm_transpose_sum4h_pr(fix_S0, fix_S2);
-        gmx_simd4_store_r(f+scix, gmx_add_pr4(fix_S, gmx_load_pr4(f+scix)));
+        gmx_simd4_store_r(f+scix, gmx_add_pr4(fix_S, gmx_simd4_load_r(f+scix)));
 
         fiy_S = gmx_mm_transpose_sum4h_pr(fiy_S0, fiy_S2);
-        gmx_simd4_store_r(f+sciy, gmx_add_pr4(fiy_S, gmx_load_pr4(f+sciy)));
+        gmx_simd4_store_r(f+sciy, gmx_add_pr4(fiy_S, gmx_simd4_load_r(f+sciy)));
 
         fiz_S = gmx_mm_transpose_sum4h_pr(fiz_S0, fiz_S2);
-        gmx_simd4_store_r(f+sciz, gmx_add_pr4(fiz_S, gmx_load_pr4(f+sciz)));
+        gmx_simd4_store_r(f+sciz, gmx_add_pr4(fiz_S, gmx_simd4_load_r(f+sciz)));
 
 #ifdef CALC_SHIFTFORCES
         fshift[ish3+0] += gmx_sum_simd4(fix_S, shf);
         {
             *Vc += gmx_sum_simd(vctot_S, tmpsum);
         }
+
         *Vvdw += gmx_sum_simd(Vvdwtot_S, tmpsum);
 #endif
 
index e102dd51b8d03f6ab82ca622e3186da599a2c121..8e0ce5738527e173ab02ca8d76e608e8c2ae89db 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_GEOM
 /* Will not calculate energies */
 
index 73fe4a096a23a5be95b6f75b1c5bf1067de671df..e877eea0396841dbbf1db275a004d85b9ada4aa6 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 
index 8cf043d5be4ca6cfde1d4917a6c6ee4b3e53312c..079eba6952e8b413fa01bdbba8b451714e0e015d 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
index d4ddce8cc7264d43b060b56df9023a2c48a73810..6da840273a958250d095b61c50a8cbeee7cff411 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_LB
 /* Will not calculate energies */
 
index 2fd6943440272c722a3ec2d16666384d8b458c30..db2d2ebef95d2f74099a501cfce5a4c6217ba9f3 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 
index 2104429a91c3f34ddd3b9df3aa7004c6bc27a3eb..6ea91013e8595b9313728467a6a43ff5a26765d6 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xn.c
new file mode 100644 (file)
index 0000000..85d4cb9
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_EWALD
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                 const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                 const interaction_const_t gmx_unused *ic,
+                                                 rvec                      gmx_unused *shift_vec,
+                                                 real                      gmx_unused *f,
+                                                 real                      gmx_unused *fshift,
+                                                 real                      gmx_unused *Vvdw,
+                                                 real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                 const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                 const interaction_const_t gmx_unused *ic,
+                                                 rvec                      gmx_unused *shift_vec,
+                                                 real                      gmx_unused *f,
+                                                 real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xn.c
new file mode 100644 (file)
index 0000000..55fd27a
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_EWALD
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                  const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                  const interaction_const_t gmx_unused *ic,
+                                                  rvec                      gmx_unused *shift_vec,
+                                                  real                      gmx_unused *f,
+                                                  real                      gmx_unused *fshift,
+                                                  real                      gmx_unused *Vvdw,
+                                                  real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                  const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                  const interaction_const_t gmx_unused *ic,
+                                                  rvec                      gmx_unused *shift_vec,
+                                                  real                      gmx_unused *f,
+                                                  real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xn.c
new file mode 100644 (file)
index 0000000..fe173b3
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_EWALD
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                     const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                     const interaction_const_t gmx_unused *ic,
+                                                     rvec                      gmx_unused *shift_vec,
+                                                     real                      gmx_unused *f,
+                                                     real                      gmx_unused *fshift,
+                                                     real                      gmx_unused *Vvdw,
+                                                     real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                     const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                     const interaction_const_t gmx_unused *ic,
+                                                     rvec                      gmx_unused *shift_vec,
+                                                     real                      gmx_unused *f,
+                                                     real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
index ab1343ed6dbf4eb43f453585f3fb0a72a41d6641..199fb5c6239ebfd260cd39d6d8abb3d5220eae38 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 513b1c4589fe35f2679eb1773d3f872c3e75a2af..aefb1ae61a69dd4cd3e315e96d944069b60947e3 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 2d97d0890f5bf5305bf64bf7c19e32f032b2bd62..1f21e2613a409da9a1d9f507a83e123da9c3860b 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index b156e3621e8731a4663b1259ebb4b2c5931b7a10..8f95cb7e1a352e3429af8f04ccffc6a7c826652e 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 8fc7a7b437ba132ff083a88d2ed589cf4c696301..f7fb96448e04f92dfc1662ace0a6e77f11dbb504 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index ad083c0c5a0a0730e615885c3d2e6f48ce5a222d..bb9c907dd0d9bd113b2f16d23d2d265c7c70ce7e 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index a62b606a8d2abce6849923c87a41d3c70bcdaf7f..20ab0c5e14b6805f57e32659cd9dd673c289203a 100644 (file)
@@ -48,7 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index cf85a589e06406c23720be43bd3a03a32e74bf2e..5e982d5eb3726c577bc6494bda476ee53d24fdb9 100644 (file)
@@ -48,7 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 667b13b49288755a543330e68a7f83aae61f8a61..b68109cde37905a8570e171927cfe1df496c2618 100644 (file)
@@ -48,7 +48,8 @@
 
 #define CALC_COUL_EWALD
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 8acf55738601060742a3dda2755715b750776f7c..8c59343b3e174fa18e9f8c54c864572786a21b8d 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
+#define LJ_CUT
 #define LJ_COMB_GEOM
 /* Will not calculate energies */
 
index 4660845a02230ea4a9563c2ef9defac2dc9aad92..014a837702083320230ea214ff53f244ac0d1f45 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 
index 5feb79939e3b9c415f4734022d6d34f9df25d389..ae3950f048b6ae2c93462ac41a34ddb11628af96 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
index 30478d566ccb3a777d6c9e21e977425bcbabd5f9..9045ae46c9767e684ae4b41fbd9d76e0c758abdf 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
+#define LJ_CUT
 #define LJ_COMB_LB
 /* Will not calculate energies */
 
index b7aedd19a239b266fdd5ab0ead6517e6b0233078..9020fd4d0b5491272d01cb082a9409d74570d647 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 
index e024054af98b04d45fe70c1a70e5eee761b5068c..806e2592232370716b361790ef61a7362967e365 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_4xn.c
new file mode 100644 (file)
index 0000000..eb6df02
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_EWALD
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                          const nbnxn_atomdata_t    gmx_unused *nbat,
+                                          const interaction_const_t gmx_unused *ic,
+                                          rvec                      gmx_unused *shift_vec,
+                                          real                      gmx_unused *f,
+                                          real                      gmx_unused *fshift,
+                                          real                      gmx_unused *Vvdw,
+                                          real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                          const nbnxn_atomdata_t    gmx_unused *nbat,
+                                          const interaction_const_t gmx_unused *ic,
+                                          rvec                      gmx_unused *shift_vec,
+                                          real                      gmx_unused *f,
+                                          real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_4xn.c
new file mode 100644 (file)
index 0000000..db3f1cd
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_EWALD
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                           const nbnxn_atomdata_t    gmx_unused *nbat,
+                                           const interaction_const_t gmx_unused *ic,
+                                           rvec                      gmx_unused *shift_vec,
+                                           real                      gmx_unused *f,
+                                           real                      gmx_unused *fshift,
+                                           real                      gmx_unused *Vvdw,
+                                           real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                           const nbnxn_atomdata_t    gmx_unused *nbat,
+                                           const interaction_const_t gmx_unused *ic,
+                                           rvec                      gmx_unused *shift_vec,
+                                           real                      gmx_unused *f,
+                                           real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xn.c
new file mode 100644 (file)
index 0000000..487d768
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_EWALD
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                              const nbnxn_atomdata_t    gmx_unused *nbat,
+                                              const interaction_const_t gmx_unused *ic,
+                                              rvec                      gmx_unused *shift_vec,
+                                              real                      gmx_unused *f,
+                                              real                      gmx_unused *fshift,
+                                              real                      gmx_unused *Vvdw,
+                                              real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                              const nbnxn_atomdata_t    gmx_unused *nbat,
+                                              const interaction_const_t gmx_unused *ic,
+                                              rvec                      gmx_unused *shift_vec,
+                                              real                      gmx_unused *f,
+                                              real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
index 56ec7fe340379481221073aed555c2cae49d5cf8..ea145640cc13478393086325c6c1c4a337b5c814 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index bf88b72e38a29614e833f85510573cce9a3a42d1..16ed3130c324a9700024985bef70cf686a238022 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 733ddedf03fa8683e2e1d32e59526cfbf46e6527..e440224f0f79811402d9691430cd390fef1ff20d 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 0c28c692ac2df1a7a81f9c3bee66638dc8b053ee..ba18cfb1bed2a3d041dd784bf589cb42f860d194 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 456eea357893804a0aef4465ca0ef55e6ca84a4e..452bf4b9d0b60ecbfb8abc3257543601c1d7e8c7 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 8aea98b89eda51a5eb0a1cb96be9b14d979a6211..2a754765e08e10642c10cbc00db2ca39eb2ebbcc 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 8e50fafe956c5ef21797e48483b2920d87114a85..7f9dd0af81cfaa9b4ed6985ea66b2b11ff265c27 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index e4eb170a380f3d2cf0e463a0c665c5757673d94d..504e91db22067266f9b2cd5bcb1a77fabf26a3ad 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 5243174ea87d033de31aff4af7cc62f39d7c289c..71c5db2ba53934e6d1fb5bc8a4c9405ee1c1e7d9 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_EWALD
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 0760890529f9241417c30300baa375c9e115cd6e..fb90fe04061ae0e99f8045243de4b601f6636890 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_GEOM
 /* Will not calculate energies */
 
index b5e4504124dbbc9988d4ab0291b165f33ef4b835..0b18b0b573a7b437c90b446a494f5eb68220501b 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 
index 4ee1264925cc8741ede369c9ccbaf5aa04a5ce77..56b173331dd97ba557ad73e9cd180d03fa017089 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
index e605a3e21a912e308f3c0f13860c1d664e79b47c..94ca416349554bdc8e3a1577252315647ff23a13 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_LB
 /* Will not calculate energies */
 
index fa3c5629e69b05a284c146cf1e6908641a1dd6a9..7eded238af6d2370e4dbf0c60301dcf618a34cde 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 
index 57cd06863a330a4569f8d539875ac7873e090206..0657e0e4bf3360ced345283d558a8e26215dca20 100644 (file)
@@ -48,6 +48,7 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xn.c
new file mode 100644 (file)
index 0000000..58cebd8
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_TAB
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                    const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                    const interaction_const_t gmx_unused *ic,
+                                                    rvec                      gmx_unused *shift_vec,
+                                                    real                      gmx_unused *f,
+                                                    real                      gmx_unused *fshift,
+                                                    real                      gmx_unused *Vvdw,
+                                                    real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                    const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                    const interaction_const_t gmx_unused *ic,
+                                                    rvec                      gmx_unused *shift_vec,
+                                                    real                      gmx_unused *f,
+                                                    real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xn.c
new file mode 100644 (file)
index 0000000..1ff9cdd
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_TAB
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                     const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                     const interaction_const_t gmx_unused *ic,
+                                                     rvec                      gmx_unused *shift_vec,
+                                                     real                      gmx_unused *f,
+                                                     real                      gmx_unused *fshift,
+                                                     real                      gmx_unused *Vvdw,
+                                                     real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                     const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                     const interaction_const_t gmx_unused *ic,
+                                                     rvec                      gmx_unused *shift_vec,
+                                                     real                      gmx_unused *f,
+                                                     real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xn.c
new file mode 100644 (file)
index 0000000..9c211d4
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_TAB
+#define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                        const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                        const interaction_const_t gmx_unused *ic,
+                                                        rvec                      gmx_unused *shift_vec,
+                                                        real                      gmx_unused *f,
+                                                        real                      gmx_unused *fshift,
+                                                        real                      gmx_unused *Vvdw,
+                                                        real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                        const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                        const interaction_const_t gmx_unused *ic,
+                                                        rvec                      gmx_unused *shift_vec,
+                                                        real                      gmx_unused *f,
+                                                        real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
index 337c48d9f1ca73f6adf566e9bc5706ba606b63f6..f37b271857c46f974948b7657e08d5957c2a1af2 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 23ed6b7fca6d65b4696f020b0293d733f4646d28..22b395bfe73219060ccedcd8ca93d724519b21a4 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index a211d2248ed8945d1b5869fc56d2b0e19cb4f23e..faef66891c095369a52f806a767b321d61df2bf8 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 4b589147f2ee7ea9417697a05ef67284f97b3248..bd495ebcb8ecf9083777471116fdc0306d945882 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 332cbe16815fcd93ac608497509b73f506271ba5..ee2e69b9e74e6652e2b7a85da223220db7e54307 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 2f48effa698e0b7433859f4cebd5687fb4529260..8ce952c1cfa54df1d9fe0d30783528eb93991351 100644 (file)
@@ -48,8 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index c66d8108fa29c52f749894f0aa0c08c2a45a1ebe..eea95fb0bddd4da3bf4d123bf64961c64f25fd0d 100644 (file)
@@ -48,7 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 1350b512a9454d34564803123cab27486a6a224d..3c78488ab426aafc7bc2804c3fb9c627510af948 100644 (file)
@@ -48,7 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index e2d9c53fbe2fea6180221a2f45ef586628d270e0..f347e81186bad820f96e9bd244d28600a16fd9db 100644 (file)
@@ -48,7 +48,8 @@
 
 #define CALC_COUL_TAB
 #define VDW_CUTOFF_CHECK /* Use twin-range cut-off */
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index c716a94c9ee3cfee77ba2ff8bcdfadeea9a19533..0830a5d3d4bafb5e562008d5b5749cf1ec7d8cd0 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
+#define LJ_CUT
 #define LJ_COMB_GEOM
 /* Will not calculate energies */
 
index c99c7e51d9e8b33e420657e3e6f3b8d4c44e8fbd..45a166051282b6152b6e2af9942c1eb3a5575715 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 
index a07bb56374eaec910d57e81584567ade8d1baf0b..803070fca86bc03b45ee7fc5b0704ec35dbbd3c8 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
index 0f10b4d54764b7b31c80be7ff57297d1dc98694f..ed0d1b4cc0c3b7695473ed879bc2f9530c06e778 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
+#define LJ_CUT
 #define LJ_COMB_LB
 /* Will not calculate energies */
 
index aa5997a71c3a3e071b8c33d1edc0d8d678dcf0ee..3936c1e233a5f2c449af9ccec299f2ebc1edc2ab 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 
index 1cd5bebb370b58fc30f15705bf05acad20219d03..defe4535caa45f9cfa05994093f49ed1e22d778f 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xn.c
new file mode 100644 (file)
index 0000000..ce52c0e
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_TAB
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                             const nbnxn_atomdata_t    gmx_unused *nbat,
+                                             const interaction_const_t gmx_unused *ic,
+                                             rvec                      gmx_unused *shift_vec,
+                                             real                      gmx_unused *f,
+                                             real                      gmx_unused *fshift,
+                                             real                      gmx_unused *Vvdw,
+                                             real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                             const nbnxn_atomdata_t    gmx_unused *nbat,
+                                             const interaction_const_t gmx_unused *ic,
+                                             rvec                      gmx_unused *shift_vec,
+                                             real                      gmx_unused *f,
+                                             real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xn.c
new file mode 100644 (file)
index 0000000..ab580a8
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_TAB
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                              const nbnxn_atomdata_t    gmx_unused *nbat,
+                                              const interaction_const_t gmx_unused *ic,
+                                              rvec                      gmx_unused *shift_vec,
+                                              real                      gmx_unused *f,
+                                              real                      gmx_unused *fshift,
+                                              real                      gmx_unused *Vvdw,
+                                              real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                              const nbnxn_atomdata_t    gmx_unused *nbat,
+                                              const interaction_const_t gmx_unused *ic,
+                                              rvec                      gmx_unused *shift_vec,
+                                              real                      gmx_unused *f,
+                                              real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xn.c
new file mode 100644 (file)
index 0000000..d23c22e
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_TAB
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                 const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                 const interaction_const_t gmx_unused *ic,
+                                                 rvec                      gmx_unused *shift_vec,
+                                                 real                      gmx_unused *f,
+                                                 real                      gmx_unused *fshift,
+                                                 real                      gmx_unused *Vvdw,
+                                                 real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                                 const nbnxn_atomdata_t    gmx_unused *nbat,
+                                                 const interaction_const_t gmx_unused *ic,
+                                                 rvec                      gmx_unused *shift_vec,
+                                                 real                      gmx_unused *f,
+                                                 real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
index 04e3ffcadd574a38e9617d5d0530a6098a1829b7..2667a84575bec8652d0013d256804f36b6741898 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 6965f31e28dce7dcef6dd8ef9f70de9e81101bb0..9bb1c64890dc5cba262fafd5a3ef0294535c6489 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index c81681217a192cec757b6e65ea61ed961e365122..1568dd540d683e5f70ac9594ad2064b03ca9a218 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 4b9d360b366189082a9203f72cd8165d4a58f2ff..8f1ce9210f6573532627a53e8cf279f0a0659520 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index cc284d13e5da03d2178def8bfa600135e0d0d853..d1c7ea46976c4c9fee8f4fc70c692d6ed7b5d541 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 59e2c624ba6c6a69d6babdd7f7c99b7e97d044f8..472c06690f140c693cdeec9b02deb0e3498fb091 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index a33a35ac006bd4985fbdee6c0afa41634d988d67..2b604bb7fcdb3f64e29e8c7bf69f399faab3c7e4 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 72c53da0c10d75642003b9328beaf3fcbbaab75e..33e92d77a3ddd69cb6db93e3f67b48eee83c173d 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 0535579306e01eba0a15f08a6d58d7c057a4c17f..eafdb1615a0a7804835f164992866422db675929 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_TAB
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index a49d7694523b9561fda8ef130732b7fcf6c719f8..a77ee987a3fa2c6d25c34854ed6799507d7b2742 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
+#define LJ_CUT
 #define LJ_COMB_GEOM
 /* Will not calculate energies */
 
index 8ab2694b0d1dfd5c2943abc3f24833c69cceb15c..8b7c2e3396464b5bbcf96d2d8e8d22e0fbdf684f 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 
index e73120cd771e32d55c33c6e7392dd6513d587672..57e35f799705a2f24b30baef1bc699d9fbcf5b9b 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
+#define LJ_CUT
 #define LJ_COMB_GEOM
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
index 50025c00b6303be0e2da8acd8a8e58eb84936230..6b47f07dca9118f778c99fb4b566b16154b9b08c 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
+#define LJ_CUT
 #define LJ_COMB_LB
 /* Will not calculate energies */
 
index 49ae82cc5b9af29ce5fa4e7949da247edcb50616..41a404314c6b4400df75be90e29d6d66aa841d80 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 
index 66bac230ccbece9eca88c282a70bd3050976a143..9ccd2b7a53b2393774ab1fc0a2a7048592f43509 100644 (file)
@@ -47,6 +47,7 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
+#define LJ_CUT
 #define LJ_COMB_LB
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_4xn.c
new file mode 100644 (file)
index 0000000..0f3ac29
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_RF
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+/* Will not calculate energies */
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                          const nbnxn_atomdata_t    gmx_unused *nbat,
+                                          const interaction_const_t gmx_unused *ic,
+                                          rvec                      gmx_unused *shift_vec,
+                                          real                      gmx_unused *f,
+                                          real                      gmx_unused *fshift,
+                                          real                      gmx_unused *Vvdw,
+                                          real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                          const nbnxn_atomdata_t    gmx_unused *nbat,
+                                          const interaction_const_t gmx_unused *ic,
+                                          rvec                      gmx_unused *shift_vec,
+                                          real                      gmx_unused *f,
+                                          real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_4xn.c
new file mode 100644 (file)
index 0000000..c1403ce
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_RF
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                           const nbnxn_atomdata_t    gmx_unused *nbat,
+                                           const interaction_const_t gmx_unused *ic,
+                                           rvec                      gmx_unused *shift_vec,
+                                           real                      gmx_unused *f,
+                                           real                      gmx_unused *fshift,
+                                           real                      gmx_unused *Vvdw,
+                                           real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                           const nbnxn_atomdata_t    gmx_unused *nbat,
+                                           const interaction_const_t gmx_unused *ic,
+                                           rvec                      gmx_unused *shift_vec,
+                                           real                      gmx_unused *f,
+                                           real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xn.c
new file mode 100644 (file)
index 0000000..7d6e2fc
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*
+ * Note: this file was generated by the Verlet kernel generator for
+ * kernel type 4xn.
+ */
+
+/* Some target architectures compile kernels for only some NBNxN
+ * kernel flavours, but the code is generated before the target
+ * architecture is known. So compilation is conditional upon
+ * GMX_NBNXN_SIMD_4XN, so that this file reduces to a stub
+ * function definition when the kernel will never be called.
+ */
+#define GMX_SIMD_J_UNROLL_SIZE 1
+#include "nbnxn_kernel_simd_4xn.h"
+
+#define CALC_COUL_RF
+#define LJ_CUT
+#define LJ_EWALD_GEOM
+/* Use full LJ combination matrix + geometric rule for the grid correction */
+#define CALC_ENERGIES
+#define ENERGY_GROUPS
+
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_common.h"
+#endif /* GMX_NBNXN_SIMD_4XN */
+
+#ifdef CALC_ENERGIES
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                              const nbnxn_atomdata_t    gmx_unused *nbat,
+                                              const interaction_const_t gmx_unused *ic,
+                                              rvec                      gmx_unused *shift_vec,
+                                              real                      gmx_unused *f,
+                                              real                      gmx_unused *fshift,
+                                              real                      gmx_unused *Vvdw,
+                                              real                      gmx_unused *Vc)
+#else /* CALC_ENERGIES */
+void
+nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xn(const nbnxn_pairlist_t    gmx_unused *nbl,
+                                              const nbnxn_atomdata_t    gmx_unused *nbat,
+                                              const interaction_const_t gmx_unused *ic,
+                                              rvec                      gmx_unused *shift_vec,
+                                              real                      gmx_unused *f,
+                                              real                      gmx_unused *fshift)
+#endif /* CALC_ENERGIES */
+#ifdef GMX_NBNXN_SIMD_4XN
+#include "nbnxn_kernel_simd_4xn_outer.h"
+#else /* GMX_NBNXN_SIMD_4XN */
+{
+/* No need to call gmx_incons() here, because the only function
+ * that calls this one is also compiled conditionally. When
+ * GMX_NBNXN_SIMD_4XN is not defined, it will call no kernel functions and
+ * instead call gmx_incons().
+ */
+}
+#endif /* GMX_NBNXN_SIMD_4XN */
index 4332e9e5fa1b3c0d4f2a790d6801f57121ea38e7..bc1873f650279595ec331f629db7138c5a719acc 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 9add969f1642493c7a5c05ef71e25f35fbca2d64..16f30946087d54bee157b01b45e97bddd379d8d3 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 5ed58c0985ba287a816736b6d8d853d05094d507..7ee74d34ab79c3c1e01e59ff5319204df4cded60 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
 #define LJ_FORCE_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 76f8cef50195dfbb5f71ed03b41739f3893764e1..19213cc2f8baa4b646205fa3b347092223c6847e 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 1f042488e11fc1bde96752cb4bbdc6207e663884..2a11985b2f539fc10124e07bc22a4edc5a56e3d4 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 5280256c3164995816e89d9cd103b93e46bd57aa..9e0233f8417e02b6d28570d7017e915e6a341c25 100644 (file)
@@ -47,8 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
 #define LJ_POT_SWITCH
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index c42cf2648a394a7acc4c3266092a2ce93ddb122c..cdb8bbfd4b2d5d571880906f67923b6722870f8a 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 /* Will not calculate energies */
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 2a48e30a7ac38a37e90592c39b73d7e5f3a9b27e..0ea279ab33e592f0dc4d91eb657e766271388ef9 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 
 #ifdef GMX_NBNXN_SIMD_4XN
index 65f8e95606ed37fe3de9f6abc12e96b4ba27c1fc..21b243907e0c43ad45e11375978b31fbfe0ff475 100644 (file)
@@ -47,7 +47,8 @@
 #include "nbnxn_kernel_simd_4xn.h"
 
 #define CALC_COUL_RF
-/* Use no LJ combination rule */
+#define LJ_CUT
+/* Use full LJ combination matrix */
 #define CALC_ENERGIES
 #define ENERGY_GROUPS
 
index 5694d56ff7764a11f7c130fbb038990b3242b6b7..06d93601fd6bb01f3f88d17a433332e2e08d7468 100644 (file)
 /*! \brief Kinds of electrostatic treatments in SIMD Verlet kernels
  */
 enum {
-    coultRF, coultTAB, coultTAB_TWIN, coultEWALD, coultEWALD_TWIN, coultNR
+    coulktRF, coulktTAB, coulktTAB_TWIN, coulktEWALD, coulktEWALD_TWIN, coulktNR
+};
+
+/*! \brief Kinds of Van der Waals treatments in SIMD Verlet kernels
+ */
+enum {
+    vdwktLJCUT_COMBGEOM, vdwktLJCUT_COMBLB, vdwktLJCUT_COMBNONE, vdwktLJFORCESWITCH, vdwktLJPOTSWITCH, vdwktLJEWALDCOMBGEOM, vdwktNR
 };
 
 /* Declare and define the kernel function pointer lookup tables.
  * The minor index of the array goes over both the LJ combination rules,
- * which is only supported by plain cut-off, and the LJ switch functions.
+ * which is only supported by plain cut-off, and the LJ switch/PME functions.
  */
-static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
+static p_nbk_func_noener p_nbk_noener[coulktNR][vdwktNR] =
 {
     {
         nbnxn_kernel_ElecRF_VdwLJCombGeom_F_4xn,
@@ -80,6 +86,7 @@ static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecRF_VdwLJ_F_4xn,
         nbnxn_kernel_ElecRF_VdwLJFSw_F_4xn,
         nbnxn_kernel_ElecRF_VdwLJPSw_F_4xn,
+        nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_4xn,
     },
     {
         nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_4xn,
@@ -87,6 +94,7 @@ static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecQSTab_VdwLJ_F_4xn,
         nbnxn_kernel_ElecQSTab_VdwLJFSw_F_4xn,
         nbnxn_kernel_ElecQSTab_VdwLJPSw_F_4xn,
+        nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xn,
     },
     {
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_4xn,
@@ -94,6 +102,7 @@ static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_4xn,
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_4xn,
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_4xn,
+        nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xn,
     },
     {
         nbnxn_kernel_ElecEw_VdwLJCombGeom_F_4xn,
@@ -101,6 +110,7 @@ static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecEw_VdwLJ_F_4xn,
         nbnxn_kernel_ElecEw_VdwLJFSw_F_4xn,
         nbnxn_kernel_ElecEw_VdwLJPSw_F_4xn,
+        nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_4xn,
     },
     {
         nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_4xn,
@@ -108,10 +118,11 @@ static p_nbk_func_noener p_nbk_noener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_4xn,
         nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_4xn,
         nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_4xn,
+        nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xn,
     },
 };
 
-static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
+static p_nbk_func_ener p_nbk_ener[coulktNR][vdwktNR] =
 {
     {
         nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_4xn,
@@ -119,6 +130,7 @@ static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecRF_VdwLJ_VF_4xn,
         nbnxn_kernel_ElecRF_VdwLJFSw_VF_4xn,
         nbnxn_kernel_ElecRF_VdwLJPSw_VF_4xn,
+        nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_4xn,
     },
     {
         nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_4xn,
@@ -126,6 +138,7 @@ static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecQSTab_VdwLJ_VF_4xn,
         nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_4xn,
         nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_4xn,
+        nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xn,
     },
     {
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_4xn,
@@ -133,6 +146,7 @@ static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_4xn,
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_4xn,
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_4xn,
+        nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xn,
     },
     {
         nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_4xn,
@@ -140,6 +154,7 @@ static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecEw_VdwLJ_VF_4xn,
         nbnxn_kernel_ElecEw_VdwLJFSw_VF_4xn,
         nbnxn_kernel_ElecEw_VdwLJPSw_VF_4xn,
+        nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_4xn,
     },
     {
         nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_4xn,
@@ -147,10 +162,11 @@ static p_nbk_func_ener p_nbk_ener[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_4xn,
         nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_4xn,
         nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_4xn,
+        nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xn,
     },
 };
 
-static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
+static p_nbk_func_ener p_nbk_energrp[coulktNR][vdwktNR] =
 {
     {
         nbnxn_kernel_ElecRF_VdwLJCombGeom_VgrpF_4xn,
@@ -158,6 +174,7 @@ static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecRF_VdwLJ_VgrpF_4xn,
         nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_4xn,
         nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_4xn,
+        nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xn,
     },
     {
         nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_4xn,
@@ -165,6 +182,7 @@ static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_4xn,
         nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_4xn,
         nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_4xn,
+        nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xn,
     },
     {
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_4xn,
@@ -172,6 +190,7 @@ static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_4xn,
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_4xn,
         nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_4xn,
+        nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xn,
     },
     {
         nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_4xn,
@@ -179,6 +198,7 @@ static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecEw_VdwLJ_VgrpF_4xn,
         nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_4xn,
         nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_4xn,
+        nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xn,
     },
     {
         nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_4xn,
@@ -186,6 +206,7 @@ static p_nbk_func_ener p_nbk_energrp[coultNR][ljcrNR+2] =
         nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_4xn,
         nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_4xn,
         nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_4xn,
+        nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xn,
     },
 };
 
@@ -251,7 +272,7 @@ nbnxn_kernel_simd_4xn(nbnxn_pairlist_set_t      gmx_unused *nbl_list,
 {
     int                nnbl;
     nbnxn_pairlist_t **nbl;
-    int                coult, ljtreatment = 0;
+    int                coulkt, vdwkt = 0;
     int                nb;
 
     nnbl = nbl_list->nnbl;
@@ -259,7 +280,7 @@ nbnxn_kernel_simd_4xn(nbnxn_pairlist_set_t      gmx_unused *nbl_list,
 
     if (EEL_RF(ic->eeltype) || ic->eeltype == eelCUT)
     {
-        coult = coultRF;
+        coulkt = coulktRF;
     }
     else
     {
@@ -267,41 +288,61 @@ nbnxn_kernel_simd_4xn(nbnxn_pairlist_set_t      gmx_unused *nbl_list,
         {
             if (ic->rcoulomb == ic->rvdw)
             {
-                coult = coultTAB;
+                coulkt = coulktTAB;
             }
             else
             {
-                coult = coultTAB_TWIN;
+                coulkt = coulktTAB_TWIN;
             }
         }
         else
         {
             if (ic->rcoulomb == ic->rvdw)
             {
-                coult = coultEWALD;
+                coulkt = coulktEWALD;
             }
             else
             {
-                coult = coultEWALD_TWIN;
+                coulkt = coulktEWALD_TWIN;
             }
         }
     }
 
-    switch (ic->vdw_modifier)
+    if (ic->vdwtype == evdwCUT)
+    {
+        switch (ic->vdw_modifier)
+        {
+            case eintmodNONE:
+            case eintmodPOTSHIFT:
+                switch (nbat->comb_rule)
+                {
+                    case ljcrGEOM: vdwkt = vdwktLJCUT_COMBGEOM; break;
+                    case ljcrLB:   vdwkt = vdwktLJCUT_COMBLB;   break;
+                    case ljcrNONE: vdwkt = vdwktLJCUT_COMBNONE; break;
+                    default:       gmx_incons("Unknown combination rule");
+                }
+                break;
+            case eintmodFORCESWITCH:
+                vdwkt = vdwktLJFORCESWITCH;
+                break;
+            case eintmodPOTSWITCH:
+                vdwkt = vdwktLJPOTSWITCH;
+                break;
+            default:
+                gmx_incons("Unsupported VdW interaction modifier");
+        }
+    }
+    else if (ic->vdwtype == evdwPME)
+    {
+        if (ic->ljpme_comb_rule == eljpmeLB)
+        {
+            gmx_incons("The nbnxn SIMD kernels don't suport LJ-PME with LB");
+        }
+        vdwkt = vdwktLJEWALDCOMBGEOM;
+    }
+    else
     {
-        case eintmodNONE:
-        case eintmodPOTSHIFT:
-            ljtreatment = nbat->comb_rule;
-            break;
-        /* Switch functions follow after cut-off combination rule kernels */
-        case eintmodFORCESWITCH:
-            ljtreatment = ljcrNR;
-            break;
-        case eintmodPOTSWITCH:
-            ljtreatment = ljcrNR + 1;
-            break;
-        default:
-            gmx_incons("Unsupported VdW interaction modifier");
+        gmx_incons("Unsupported VdW interaction type");
     }
 
 #pragma omp parallel for schedule(static) num_threads(gmx_omp_nthreads_get(emntNonbonded))
@@ -334,11 +375,11 @@ nbnxn_kernel_simd_4xn(nbnxn_pairlist_set_t      gmx_unused *nbl_list,
         if (!(force_flags & GMX_FORCE_ENERGY))
         {
             /* Don't calculate energies */
-            p_nbk_noener[coult][ljtreatment](nbl[nb], nbat,
-                                             ic,
-                                             shift_vec,
-                                             out->f,
-                                             fshift_p);
+            p_nbk_noener[coulkt][vdwkt](nbl[nb], nbat,
+                                        ic,
+                                        shift_vec,
+                                        out->f,
+                                        fshift_p);
         }
         else if (out->nV == 1)
         {
@@ -346,13 +387,13 @@ nbnxn_kernel_simd_4xn(nbnxn_pairlist_set_t      gmx_unused *nbl_list,
             out->Vvdw[0] = 0;
             out->Vc[0]   = 0;
 
-            p_nbk_ener[coult][ljtreatment](nbl[nb], nbat,
-                                           ic,
-                                           shift_vec,
-                                           out->f,
-                                           fshift_p,
-                                           out->Vvdw,
-                                           out->Vc);
+            p_nbk_ener[coulkt][vdwkt](nbl[nb], nbat,
+                                      ic,
+                                      shift_vec,
+                                      out->f,
+                                      fshift_p,
+                                      out->Vvdw,
+                                      out->Vc);
         }
         else
         {
@@ -368,13 +409,13 @@ nbnxn_kernel_simd_4xn(nbnxn_pairlist_set_t      gmx_unused *nbl_list,
                 out->VSc[i] = 0;
             }
 
-            p_nbk_energrp[coult][ljtreatment](nbl[nb], nbat,
-                                              ic,
-                                              shift_vec,
-                                              out->f,
-                                              fshift_p,
-                                              out->VSvdw,
-                                              out->VSc);
+            p_nbk_energrp[coulkt][vdwkt](nbl[nb], nbat,
+                                         ic,
+                                         shift_vec,
+                                         out->f,
+                                         fshift_p,
+                                         out->VSvdw,
+                                         out->VSc);
 
             reduce_group_energies(nbat->nenergrp, nbat->neg_2log,
                                   out->VSvdw, out->VSc,
index 864f3e3f01c4bcadc30d1066816a640a4c5cca2b..80859119efcc2181a674b340aa6108506200b041 100644 (file)
@@ -88,78 +88,93 @@ nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJCombLB_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJ_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_4xn;
+nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJCombLB_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_4xn;
+nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_4xn;
+nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJ_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_4xn;
+nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_4xn;
+nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xn;
 
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJCombLB_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJ_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJFSw_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJPSw_VF_4xn;
+nbk_func_ener         nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJCombLB_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJ_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_4xn;
+nbk_func_ener         nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_4xn;
+nbk_func_ener         nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJCombLB_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJ_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJFSw_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJPSw_VF_4xn;
+nbk_func_ener         nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_4xn;
 nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_4xn;
+nbk_func_ener         nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xn;
 
 nbk_func_noener       nbnxn_kernel_ElecRF_VdwLJCombGeom_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecRF_VdwLJCombLB_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecRF_VdwLJ_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecRF_VdwLJFSw_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecRF_VdwLJPSw_F_4xn;
+nbk_func_noener       nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecQSTab_VdwLJ_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecQSTab_VdwLJFSw_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecQSTab_VdwLJPSw_F_4xn;
+nbk_func_noener       nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_4xn;
+nbk_func_noener       nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecEw_VdwLJCombGeom_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecEw_VdwLJCombLB_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecEw_VdwLJ_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecEw_VdwLJFSw_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecEw_VdwLJPSw_F_4xn;
+nbk_func_noener       nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_4xn;
 nbk_func_noener       nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_4xn;
+nbk_func_noener       nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xn;
 
 
 
index b7e54decdf9f01cdd8b57360936e5ca725fbaefe..758f8cd4f8d7ea5721a43bca75b37623d09d8934 100644 (file)
  */
 
 
-/* When calculating RF or Ewald interactions we calculate the electrostatic
+/* When calculating RF or Ewald interactions we calculate the electrostatic/LJ
  * forces on excluded atom pairs here in the non-bonded loops.
  * But when energies and/or virial is required we calculate them
  * separately to as then it is easier to separate the energy and virial
  * contributions.
  */
-#if defined CHECK_EXCLS && defined CALC_COULOMB
+#if defined CHECK_EXCLS && (defined CALC_COULOMB || defined LJ_EWALD_GEOM)
 #define EXCL_FORCES
 #endif
 
     gmx_simd_real_t  c6s_j_S, c12s_j_S;
 #endif
 
-#if defined LJ_COMB_GEOM || defined LJ_COMB_LB
+#if defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined LJ_EWALD_GEOM
     /* Index for loading LJ parameters, complicated when interleaving */
     int         aj2;
 #endif
 
     /* Atom indices (of the first atom in the cluster) */
     aj            = cj*UNROLLJ;
-#if defined CALC_LJ && (defined LJ_COMB_GEOM || defined LJ_COMB_LB)
+#if defined CALC_LJ && (defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined LJ_EWALD_GEOM)
 #if UNROLLJ == STRIDE
     aj2           = aj*2;
 #else
 #endif
 #endif
 
-#ifndef LJ_FORCE_SWITCH
-    /* We have plain LJ with simple C6/6 C12/12 coefficients */
+#if defined LJ_CUT || defined LJ_POT_SWITCH
+    /* We have plain LJ or LJ-PME with simple C6/6 C12/12 coefficients */
     FrLJ6_S0    = gmx_simd_mul_r(c6_S0, rinvsix_S0);
     FrLJ6_S1    = gmx_simd_mul_r(c6_S1, rinvsix_S1);
 #ifndef HALF_LJ
     frLJ_S3     = gmx_simd_sub_r(FrLJ12_S3, FrLJ6_S3);
 #endif
 
-#if defined CALC_ENERGIES && !defined LJ_POT_SWITCH
-#ifndef LJ_FORCE_SWITCH
+#if (defined LJ_CUT || defined LJ_FORCE_SWITCH) && defined CALC_ENERGIES
+
+#ifdef LJ_CUT
     /* Calculate the LJ energies, with constant potential shift */
     VLJ6_S0     = gmx_simd_mul_r(sixth_S, gmx_simd_fmadd_r(c6_S0, p6_cpot_S, FrLJ6_S0));
     VLJ6_S1     = gmx_simd_mul_r(sixth_S, gmx_simd_fmadd_r(c6_S1, p6_cpot_S, FrLJ6_S1));
     VLJ12_S2    = gmx_simd_mul_r(twelveth_S, gmx_simd_fmadd_r(c12_S2, p12_cpot_S, FrLJ12_S2));
     VLJ12_S3    = gmx_simd_mul_r(twelveth_S, gmx_simd_fmadd_r(c12_S3, p12_cpot_S, FrLJ12_S3));
 #endif
-#else
+#endif /* LJ_CUT */
 
+#ifdef LJ_FORCE_SWITCH
 #define v_fswitch_r(rsw, rsw2, c0, c3, c4) gmx_simd_fmadd_r(gmx_simd_fmadd_r(c4, rsw, c3), gmx_simd_mul_r(rsw2, rsw), c0)
 
     VLJ6_S0     = gmx_simd_mul_r(c6_S0, gmx_simd_fmadd_r(sixth_S, rinvsix_S0, v_fswitch_r(rsw_S0, rsw2_S0, p6_6cpot_S, p6_vc3_S, p6_vc4_S)));
     VLJ_S2      = gmx_simd_sub_r(VLJ12_S2, VLJ6_S2);
     VLJ_S3      = gmx_simd_sub_r(VLJ12_S3, VLJ6_S3);
 #endif
-#endif /* CALC_ENERGIES && !LJ_POT_SWITCH */
+
+#endif /* (LJ_CUT || LJ_FORCE_SWITCH) && CALC_ENERGIES */
 
 #ifdef LJ_POT_SWITCH
     /* We always need the potential, since it is needed for the force */
     }
 #endif /* LJ_POT_SWITCH */
 
+#if defined CALC_ENERGIES && defined CHECK_EXCLS
+    /* The potential shift should be removed for excluded pairs */
+    VLJ_S0      = gmx_simd_blendzero_r(VLJ_S0, interact_S0);
+    VLJ_S1      = gmx_simd_blendzero_r(VLJ_S1, interact_S1);
+#ifndef HALF_LJ
+    VLJ_S2      = gmx_simd_blendzero_r(VLJ_S2, interact_S2);
+    VLJ_S3      = gmx_simd_blendzero_r(VLJ_S3, interact_S3);
+#endif
+#endif
+
+#ifdef LJ_EWALD_GEOM
+    {
+        gmx_simd_real_t c6s_j_S;
+        gmx_simd_real_t c6grid_S0, rinvsix_nm_S0, cr2_S0, expmcr2_S0, poly_S0;
+        gmx_simd_real_t c6grid_S1, rinvsix_nm_S1, cr2_S1, expmcr2_S1, poly_S1;
+#ifndef HALF_LJ
+        gmx_simd_real_t c6grid_S2, rinvsix_nm_S2, cr2_S2, expmcr2_S2, poly_S2;
+        gmx_simd_real_t c6grid_S3, rinvsix_nm_S3, cr2_S3, expmcr2_S3, poly_S3;
+#endif
+#ifdef CALC_ENERGIES
+        gmx_simd_real_t sh_mask_S0;
+        gmx_simd_real_t sh_mask_S1;
+#ifndef HALF_LJ
+        gmx_simd_real_t sh_mask_S2;
+        gmx_simd_real_t sh_mask_S3;
+#endif
+#endif
+
+        /* Determine C6 for the grid using the geometric combination rule */
+        c6s_j_S         = gmx_simd_load_r(ljc+aj2+0);
+        c6grid_S0       = gmx_simd_mul_r(c6s_S0, c6s_j_S);
+        c6grid_S1       = gmx_simd_mul_r(c6s_S1, c6s_j_S);
+#ifndef HALF_LJ
+        c6grid_S2       = gmx_simd_mul_r(c6s_S2, c6s_j_S);
+        c6grid_S3       = gmx_simd_mul_r(c6s_S3, c6s_j_S);
+#endif
+
+#ifdef CHECK_EXCLS
+        /* Recalculate rinvsix without exclusion mask (compiler might optimize) */
+        rinvsix_nm_S0 = gmx_simd_mul_r(rinvsq_S0, gmx_simd_mul_r(rinvsq_S0, rinvsq_S0));
+        rinvsix_nm_S1 = gmx_simd_mul_r(rinvsq_S1, gmx_simd_mul_r(rinvsq_S1, rinvsq_S1));
+#ifndef HALF_LJ
+        rinvsix_nm_S2 = gmx_simd_mul_r(rinvsq_S2, gmx_simd_mul_r(rinvsq_S2, rinvsq_S2));
+        rinvsix_nm_S3 = gmx_simd_mul_r(rinvsq_S3, gmx_simd_mul_r(rinvsq_S3, rinvsq_S3));
+#endif
+#else
+        /* We didn't use a mask, so we can copy */
+        rinvsix_nm_S0 = rinvsix_S0;
+        rinvsix_nm_S1 = rinvsix_S1;
+#ifndef HALF_LJ
+        rinvsix_nm_S2 = rinvsix_S2;
+        rinvsix_nm_S3 = rinvsix_S3;
+#endif
+#endif
+
+        cr2_S0        = gmx_simd_mul_r(lje_c2_S, rsq_S0);
+        cr2_S1        = gmx_simd_mul_r(lje_c2_S, rsq_S1);
+#ifndef HALF_LJ
+        cr2_S2        = gmx_simd_mul_r(lje_c2_S, rsq_S2);
+        cr2_S3        = gmx_simd_mul_r(lje_c2_S, rsq_S3);
+#endif
+        expmcr2_S0    = gmx_simd_exp_r(gmx_simd_mul_r(mone_S, cr2_S0));
+        expmcr2_S1    = gmx_simd_exp_r(gmx_simd_mul_r(mone_S, cr2_S1));
+#ifndef HALF_LJ
+        expmcr2_S2    = gmx_simd_exp_r(gmx_simd_mul_r(mone_S, cr2_S2));
+        expmcr2_S3    = gmx_simd_exp_r(gmx_simd_mul_r(mone_S, cr2_S3));
+#endif
+
+        /* 1 + cr2 + 1/2*cr2^2 */
+        poly_S0       = gmx_simd_fmadd_r(gmx_simd_fmadd_r(half_S, cr2_S0, one_S), cr2_S0, one_S);
+        poly_S1       = gmx_simd_fmadd_r(gmx_simd_fmadd_r(half_S, cr2_S1, one_S), cr2_S1, one_S);
+#ifndef HALF_LJ
+        poly_S2       = gmx_simd_fmadd_r(gmx_simd_fmadd_r(half_S, cr2_S2, one_S), cr2_S2, one_S);
+        poly_S3       = gmx_simd_fmadd_r(gmx_simd_fmadd_r(half_S, cr2_S3, one_S), cr2_S3, one_S);
+#endif
+
+        /* We calculate LJ F*r = (6*C6)*(r^-6 - F_mesh/6), we use:
+         * r^-6*cexp*(1 + cr2 + cr2^2/2 + cr2^3/6) = cexp*(r^-6*poly + c^6/6)
+         */
+        frLJ_S0       = gmx_simd_fmadd_r(c6grid_S0, gmx_simd_fnmadd_r(expmcr2_S0, gmx_simd_fmadd_r(rinvsix_nm_S0, poly_S0, lje_c6_6_S), rinvsix_nm_S0), frLJ_S0);
+        frLJ_S1       = gmx_simd_fmadd_r(c6grid_S1, gmx_simd_fnmadd_r(expmcr2_S1, gmx_simd_fmadd_r(rinvsix_nm_S1, poly_S1, lje_c6_6_S), rinvsix_nm_S1), frLJ_S1);
+#ifndef HALF_LJ
+        frLJ_S2       = gmx_simd_fmadd_r(c6grid_S2, gmx_simd_fnmadd_r(expmcr2_S2, gmx_simd_fmadd_r(rinvsix_nm_S2, poly_S2, lje_c6_6_S), rinvsix_nm_S2), frLJ_S2);
+        frLJ_S3       = gmx_simd_fmadd_r(c6grid_S3, gmx_simd_fnmadd_r(expmcr2_S3, gmx_simd_fmadd_r(rinvsix_nm_S3, poly_S3, lje_c6_6_S), rinvsix_nm_S3), frLJ_S3);
+#endif
+
+#ifdef CALC_ENERGIES
+#ifdef CHECK_EXCLS
+        sh_mask_S0    = gmx_simd_blendzero_r(lje_vc_S, interact_S0);
+        sh_mask_S1    = gmx_simd_blendzero_r(lje_vc_S, interact_S1);
+#ifndef HALF_LJ
+        sh_mask_S2    = gmx_simd_blendzero_r(lje_vc_S, interact_S2);
+        sh_mask_S3    = gmx_simd_blendzero_r(lje_vc_S, interact_S3);
+#endif
+#else
+        sh_mask_S0    = lje_vc_S;
+        sh_mask_S1    = lje_vc_S;
+#ifndef HALF_LJ
+        sh_mask_S2    = lje_vc_S;
+        sh_mask_S3    = lje_vc_S;
+#endif
+#endif
+
+        VLJ_S0        = gmx_simd_fmadd_r(gmx_simd_mul_r(sixth_S, c6grid_S0), gmx_simd_fmadd_r(rinvsix_nm_S0, gmx_simd_fnmadd_r(expmcr2_S0, poly_S0, one_S), sh_mask_S0), VLJ_S0);
+        VLJ_S1        = gmx_simd_fmadd_r(gmx_simd_mul_r(sixth_S, c6grid_S1), gmx_simd_fmadd_r(rinvsix_nm_S1, gmx_simd_fnmadd_r(expmcr2_S1, poly_S1, one_S), sh_mask_S1), VLJ_S1);
+#ifndef HALF_LJ
+        VLJ_S2        = gmx_simd_fmadd_r(gmx_simd_mul_r(sixth_S, c6grid_S2), gmx_simd_fmadd_r(rinvsix_nm_S2, gmx_simd_fnmadd_r(expmcr2_S2, poly_S2, one_S), sh_mask_S2), VLJ_S2);
+        VLJ_S3        = gmx_simd_fmadd_r(gmx_simd_mul_r(sixth_S, c6grid_S3), gmx_simd_fmadd_r(rinvsix_nm_S3, gmx_simd_fnmadd_r(expmcr2_S3, poly_S3, one_S), sh_mask_S3), VLJ_S3);
+#endif
+#endif /* CALC_ENERGIES */
+    }
+#endif /* LJ_EWALD_GEOM */
+
 #if defined VDW_CUTOFF_CHECK
     /* frLJ is multiplied later by rinvsq, which is masked for the Coulomb
      * cut-off, but if the VdW cut-off is shorter, we need to mask with that.
 #endif
 #endif
 
-#if defined CALC_ENERGIES && defined CHECK_EXCLS
-    /* The potential shift should be removed for excluded pairs */
-    VLJ_S0      = gmx_simd_blendzero_r(VLJ_S0, interact_S0);
-    VLJ_S1      = gmx_simd_blendzero_r(VLJ_S1, interact_S1);
-#ifndef HALF_LJ
-    VLJ_S2      = gmx_simd_blendzero_r(VLJ_S2, interact_S2);
-    VLJ_S3      = gmx_simd_blendzero_r(VLJ_S3, interact_S3);
-#endif
-#endif
-
-
 #endif /* CALC_LJ */
 
 #ifdef CALC_ENERGIES
index 43c045c8bd4a1e72cdf7cb0a9900376e7d863fb4..7a636b5cd61f0ac98e64798445d0af316c8ce440 100644 (file)
@@ -46,7 +46,7 @@
     real               *nbfp_ptr;
     int                 n, ci, ci_sh;
     int                 ish, ish3;
-    gmx_bool            do_LJ, half_LJ, do_coul;
+    gmx_bool            do_LJ, half_LJ, do_coul, do_self;
     int                 sci, scix, sciy, sciz, sci2;
     int                 cjind0, cjind1, cjind;
     int                 ip, jp;
     gmx_simd_real_t  sh_ewald_S;
 #endif
 
+#if defined LJ_CUT && defined CALC_ENERGIES
+    gmx_simd_real_t   p6_cpot_S, p12_cpot_S;
+#endif
 #ifdef LJ_POT_SWITCH
     gmx_simd_real_t   rswitch_S;
     gmx_simd_real_t   swV3_S, swV4_S, swV5_S;
     gmx_simd_real_t   swF2_S, swF3_S, swF4_S;
-#else
+#endif
 #ifdef LJ_FORCE_SWITCH
     gmx_simd_real_t   rswitch_S;
     gmx_simd_real_t   p6_fc2_S, p6_fc3_S;
     gmx_simd_real_t   p12_vc3_S, p12_vc4_S;
     gmx_simd_real_t   p6_6cpot_S, p12_12cpot_S;
 #endif
-#else
-#ifdef CALC_ENERGIES
-    gmx_simd_real_t  p6_cpot_S, p12_cpot_S;
-#endif
 #endif
+#ifdef LJ_EWALD_GEOM
+    real              lj_ewaldcoeff2, lj_ewaldcoeff6_6;
+    gmx_simd_real_t   mone_S, half_S, lje_c2_S, lje_c6_6_S, lje_vc_S;
 #endif
 
 #ifdef LJ_COMB_LB
     gmx_simd_real_t   c6_S3, c12_S3;
 #endif
 
-#ifdef LJ_COMB_GEOM
+#if defined LJ_COMB_GEOM || defined LJ_EWALD_GEOM
     const real       *ljc;
 
     gmx_simd_real_t   c6s_S0, c12s_S0;
     int npair = 0;
 #endif
 
-#if defined LJ_COMB_GEOM || defined LJ_COMB_LB
+#if defined LJ_COMB_GEOM || defined LJ_COMB_LB || defined LJ_EWALD_GEOM
     ljc = nbat->lj_comb;
-#else
+#endif
+#if !(defined LJ_COMB_GEOM || defined LJ_COMB_LB)
     /* No combination rule used */
     nbfp_ptr    = (4 == nbfp_stride) ? nbat->nbfp_s4 : nbat->nbfp;
 #endif
     twelveth_S   = gmx_simd_set1_r(1.0/12.0);
 #endif
 
+#if defined LJ_CUT && defined CALC_ENERGIES
+    /* We shift the potential by cpot, which can be zero */
+    p6_cpot_S    = gmx_simd_set1_r(ic->dispersion_shift.cpot);
+    p12_cpot_S   = gmx_simd_set1_r(ic->repulsion_shift.cpot);
+#endif
 #ifdef LJ_POT_SWITCH
     rswitch_S = gmx_simd_set1_r(ic->rvdw_switch);
     swV3_S    = gmx_simd_set1_r(ic->vdw_switch.c3);
     swF2_S    = gmx_simd_set1_r(3*ic->vdw_switch.c3);
     swF3_S    = gmx_simd_set1_r(4*ic->vdw_switch.c4);
     swF4_S    = gmx_simd_set1_r(5*ic->vdw_switch.c5);
-#else
-    sixth_S      = gmx_simd_set1_r(1.0/6.0);
-    twelveth_S   = gmx_simd_set1_r(1.0/12.0);
+#endif
 #ifdef LJ_FORCE_SWITCH
     rswitch_S = gmx_simd_set1_r(ic->rvdw_switch);
     p6_fc2_S  = gmx_simd_set1_r(ic->dispersion_shift.c2);
         p12_12cpot_S = gmx_simd_set1_r(ic->repulsion_shift.cpot/12);
     }
 #endif
-#else
-    /* Plain LJ cut-off, with potential shift cpot, which can be 0 */
-#ifdef CALC_ENERGIES
-    p6_cpot_S    = gmx_simd_set1_r(ic->dispersion_shift.cpot);
-    p12_cpot_S   = gmx_simd_set1_r(ic->repulsion_shift.cpot);
 #endif
+#ifdef LJ_EWALD_GEOM
+    mone_S           = gmx_simd_set1_r(-1.0);
+    half_S           = gmx_simd_set1_r(0.5);
+    lj_ewaldcoeff2   = ic->ewaldcoeff_lj*ic->ewaldcoeff_lj;
+    lj_ewaldcoeff6_6 = lj_ewaldcoeff2*lj_ewaldcoeff2*lj_ewaldcoeff2/6;
+    lje_c2_S         = gmx_simd_set1_r(lj_ewaldcoeff2);
+    lje_c6_6_S       = gmx_simd_set1_r(lj_ewaldcoeff6_6);
+    /* Determine the grid potential at the cut-off */
+    lje_vc_S         = gmx_simd_set1_r(ic->sh_lj_ewald);
 #endif
-#endif /* LJ_POT_SWITCH */
 
     /* The kernel either supports rcoulomb = rvdw or rcoulomb >= rvdw */
     rc2_S    = gmx_simd_set1_r(ic->rcoulomb*ic->rcoulomb);
         do_LJ   = (nbln->shift & NBNXN_CI_DO_LJ(0));
         do_coul = (nbln->shift & NBNXN_CI_DO_COUL(0));
         half_LJ = ((nbln->shift & NBNXN_CI_HALF_LJ(0)) || !do_LJ) && do_coul;
+#ifdef LJ_EWALD_GEOM
+        do_self = TRUE;
+#else
+        do_self = do_coul;
+#endif
 
 #ifdef ENERGY_GROUPS
         egps_i = nbat->energrp[ci];
             }
         }
 #endif
-#if defined CALC_ENERGIES
+
+#ifdef CALC_ENERGIES
 #if UNROLLJ == 4
-        if (do_coul && l_cj[nbln->cj_ind_start].cj == ci_sh)
+        if (do_self && l_cj[nbln->cj_ind_start].cj == ci_sh)
 #endif
 #if UNROLLJ == 2
-        if (do_coul && l_cj[nbln->cj_ind_start].cj == (ci_sh<<1))
+        if (do_self && l_cj[nbln->cj_ind_start].cj == (ci_sh<<1))
 #endif
 #if UNROLLJ == 8
-        if (do_coul && l_cj[nbln->cj_ind_start].cj == (ci_sh>>1))
+        if (do_self && l_cj[nbln->cj_ind_start].cj == (ci_sh>>1))
 #endif
         {
-            int  ia;
-            real Vc_sub_self;
+            if (do_coul)
+            {
+                real Vc_sub_self;
+                int  ia;
 
 #ifdef CALC_COUL_RF
-            Vc_sub_self = 0.5*ic->c_rf;
+                Vc_sub_self = 0.5*ic->c_rf;
 #endif
 #ifdef CALC_COUL_TAB
 #ifdef TAB_FDV0
-            Vc_sub_self = 0.5*tab_coul_F[2];
+                Vc_sub_self = 0.5*tab_coul_F[2];
 #else
-            Vc_sub_self = 0.5*tab_coul_V[0];
+                Vc_sub_self = 0.5*tab_coul_V[0];
 #endif
 #endif
 #ifdef CALC_COUL_EWALD
-            /* beta/sqrt(pi) */
-            Vc_sub_self = 0.5*ic->ewaldcoeff_q*M_2_SQRTPI;
+                /* beta/sqrt(pi) */
+                Vc_sub_self = 0.5*ic->ewaldcoeff_q*M_2_SQRTPI;
 #endif
 
-            for (ia = 0; ia < UNROLLI; ia++)
+                for (ia = 0; ia < UNROLLI; ia++)
+                {
+                    real qi;
+
+                    qi = q[sci+ia];
+#ifdef ENERGY_GROUPS
+                    vctp[ia][((egps_i>>(ia*egps_ishift)) & egps_imask)*egps_jstride]
+#else
+                    Vc[0]
+#endif
+                        -= facel*qi*qi*Vc_sub_self;
+                }
+            }
+
+#ifdef LJ_EWALD_GEOM
             {
-                real qi;
+                int  ia;
+
+                for (ia = 0; ia < UNROLLI; ia++)
+                {
+                    real c6_i;
 
-                qi = q[sci+ia];
+                    c6_i = nbat->nbfp[nbat->type[sci+ia]*(nbat->ntype + 1)*2]/6;
 #ifdef ENERGY_GROUPS
-                vctp[ia][((egps_i>>(ia*egps_ishift)) & egps_imask)*egps_jstride]
+                    vvdwtp[ia][((egps_i>>(ia*egps_ishift)) & egps_imask)*egps_jstride]
 #else
-                Vc[0]
+                    Vvdw[0]
 #endif
-                    -= facel*qi*qi*Vc_sub_self;
+                        += 0.5*c6_i*lj_ewaldcoeff6_6;
+                }
             }
+#endif      /* LJ_EWALD_GEOM */
         }
 #endif
 
             nbfp3 = nbfp_ptr + type[sci+3]*nbat->ntype*nbfp_stride;
         }
 #endif
+#endif
+#ifdef LJ_EWALD_GEOM
+        /* We need the geometrically combined C6 for the PME grid correction */
+        c6s_S0 = gmx_simd_load1_r(ljc+sci2+0);
+        c6s_S1 = gmx_simd_load1_r(ljc+sci2+1);
+        if (!half_LJ)
+        {
+            c6s_S2 = gmx_simd_load1_r(ljc+sci2+2);
+            c6s_S3 = gmx_simd_load1_r(ljc+sci2+3);
+        }
 #endif
 
         /* Zero the potential energy for this list */
         /* Add accumulated i-forces to the force array */
 #if UNROLLJ >= 4
         fix_S = gmx_mm_transpose_sum4_pr(fix_S0, fix_S1, fix_S2, fix_S3);
-        gmx_simd4_store_r(f+scix, gmx_add_pr4(fix_S, gmx_load_pr4(f+scix)));
+        gmx_simd4_store_r(f+scix, gmx_simd4_add_r(fix_S, gmx_simd4_load_r(f+scix)));
 
         fiy_S = gmx_mm_transpose_sum4_pr(fiy_S0, fiy_S1, fiy_S2, fiy_S3);
-        gmx_simd4_store_r(f+sciy, gmx_add_pr4(fiy_S, gmx_load_pr4(f+sciy)));
+        gmx_simd4_store_r(f+sciy, gmx_simd4_add_r(fiy_S, gmx_simd4_load_r(f+sciy)));
 
         fiz_S = gmx_mm_transpose_sum4_pr(fiz_S0, fiz_S1, fiz_S2, fiz_S3);
-        gmx_simd4_store_r(f+sciz, gmx_add_pr4(fiz_S, gmx_load_pr4(f+sciz)));
+        gmx_simd4_store_r(f+sciz, gmx_simd4_add_r(fiz_S, gmx_simd4_load_r(f+sciz)));
 
 #ifdef CALC_SHIFTFORCES
         fshift[ish3+0] += gmx_sum_simd4(fix_S, shf);
index 1251f0c4e253cff3e5b39d434c2337c8e737c684..df0e1922c8e8a4623ee88b00af9f64ba437838dd 100644 (file)
@@ -670,13 +670,19 @@ static void do_nb_verlet(t_forcerec *fr,
     if (ic->vdw_modifier == eintmodFORCESWITCH)
     {
         /* We add up the switch cost separately */
-        inc_nrnb(nrnb, eNR_NBNXN_LJ_FSW+((flags & GMX_FORCE_ENERGY) ? 1 : 0),
+        inc_nrnb(nrnb, eNR_NBNXN_ADD_LJ_FSW+((flags & GMX_FORCE_ENERGY) ? 1 : 0),
                  nbvg->nbl_lists.natpair_ljq + nbvg->nbl_lists.natpair_lj);
     }
     if (ic->vdw_modifier == eintmodPOTSWITCH)
     {
         /* We add up the switch cost separately */
-        inc_nrnb(nrnb, eNR_NBNXN_LJ_PSW+((flags & GMX_FORCE_ENERGY) ? 1 : 0),
+        inc_nrnb(nrnb, eNR_NBNXN_ADD_LJ_PSW+((flags & GMX_FORCE_ENERGY) ? 1 : 0),
+                 nbvg->nbl_lists.natpair_ljq + nbvg->nbl_lists.natpair_lj);
+    }
+    if (ic->vdwtype == evdwPME)
+    {
+        /* We add up the LJ Ewald cost separately */
+        inc_nrnb(nrnb, eNR_NBNXN_ADD_LJ_EWALD+((flags & GMX_FORCE_ENERGY) ? 1 : 0),
                  nbvg->nbl_lists.natpair_ljq + nbvg->nbl_lists.natpair_lj);
     }
 }
@@ -2197,40 +2203,23 @@ void calc_enervirdiff(FILE *fplog, int eDispCorr, t_forcerec *fr)
             virs[0]  +=  8.0*M_PI/rc3;
             virs[1]  += -16.0*M_PI/(3.0*rc9);
         }
-        else if (EVDW_PME(fr->vdwtype))
-        {
-            scale  = fr->nblists[0].table_vdw.scale;
-            vdwtab = fr->nblists[0].table_vdw.data;
-
-            ri0  = floor(fr->rvdw_switch*scale);
-            ri1  = ceil(fr->rvdw*scale);
-            r0   = ri0/scale;
-            r1   = ri1/scale;
-            rc3  = r0*r0*r0;
-            rc9  = rc3*rc3*rc3;
-
-            /* Calculate self-interaction coefficient (assuming that
-             * the reciprocal-space contribution is constant in the
-             * region that contributes to the self-interaction).
-             */
-            fr->enershiftsix = pow(fr->ewaldcoeff_lj, 6) / 6.0;
-
-            /* Add analytical corrections, C6 for the whole range, C12
-             * from rvdw_switch to infinity.
-             */
-
-            eners[0] += -pow(sqrt(M_PI)*fr->ewaldcoeff_lj, 3)/3.0;
-            eners[1] +=  4.0*M_PI/(9.0*rc9);
-            virs[0]  +=  pow(sqrt(M_PI)*fr->ewaldcoeff_lj, 3);
-            virs[1]  += -16.0*M_PI/(3.0*rc9);
-        }
-        else if ((fr->vdwtype == evdwCUT) || (fr->vdwtype == evdwUSER))
+        else if (fr->vdwtype == evdwCUT ||
+                 EVDW_PME(fr->vdwtype) ||
+                 fr->vdwtype == evdwUSER)
         {
             if (fr->vdwtype == evdwUSER && fplog)
             {
                 fprintf(fplog,
                         "WARNING: using dispersion correction with user tables\n");
             }
+
+            /* Note that with LJ-PME, the dispersion correction is multiplied
+             * by the difference between the actual C6 and the value of C6
+             * that would produce the combination rule.
+             * This means the normal energy and virial difference formulas
+             * can be used here.
+             */
+
             rc3  = fr->rvdw*fr->rvdw*fr->rvdw;
             rc9  = rc3*rc3*rc3;
             /* Contribution beyond the cut-off */
@@ -2252,6 +2241,23 @@ void calc_enervirdiff(FILE *fplog, int eDispCorr, t_forcerec *fr)
                       "Dispersion correction is not implemented for vdw-type = %s",
                       evdw_names[fr->vdwtype]);
         }
+
+        /* TODO: remove this code once we have group LJ-PME kernels
+         * that calculate the exact, full LJ param C6/r^6 within the cut-off,
+         * as the current nbnxn kernels do.
+         */
+        if (fr->vdwtype == evdwPME && fr->cutoff_scheme == ecutsGROUP)
+        {
+            /* Calculate self-interaction coefficient (assuming that
+             * the reciprocal-space contribution is constant in the
+             * region that contributes to the self-interaction).
+             */
+            fr->enershiftsix = pow(fr->ewaldcoeff_lj, 6) / 6.0;
+
+            eners[0] += -pow(sqrt(M_PI)*fr->ewaldcoeff_lj, 3)/3.0;
+            virs[0]  +=  pow(sqrt(M_PI)*fr->ewaldcoeff_lj, 3);
+        }
+
         fr->enerdiffsix    = eners[0];
         fr->enerdifftwelve = eners[1];
         /* The 0.5 is due to the Gromacs definition of the virial */
index 464f82ac3bb74283c3b420622f4ed7b5273502f8..5c2391ea5c542c1f0770615e913e8724afb7f852 100644 (file)
@@ -1163,9 +1163,10 @@ static void set_table_type(int tabsel[], const t_forcerec *fr, gmx_bool b14only)
 
         if (!b14only && fr->vdw_modifier != eintmodNONE)
         {
-            if (fr->vdwtype != evdwCUT)
+            if (fr->vdw_modifier != eintmodPOTSHIFT &&
+                fr->vdwtype != evdwCUT)
             {
-                gmx_incons("Potential modifiers only implemented for LJ cut-off");
+                gmx_incons("Potential modifiers other than potential-shift are only implemented for LJ cut-off");
             }
 
             switch (fr->vdw_modifier)
index c900adf90c884a4fba7a544ebf3280c6346b7b1c..4606f735cc18e72751509d980a2fd135d9a501b5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -662,6 +662,10 @@ gmx_bool pme_load_balance(pme_load_balancing_t pme_lb,
     ic->rlistlong    = set->rlistlong;
     ir->nstcalclr    = set->nstcalclr;
     ic->ewaldcoeff_q = set->ewaldcoeff_q;
+    if (ic->coulomb_modifier == eintmodPOTSHIFT)
+    {
+        ic->sh_ewald = gmx_erfc(ic->ewaldcoeff_q*ic->rcoulomb);
+    }
 
     bUsesSimpleTables = uses_simple_tables(ir->cutoff_scheme, nbv, 0);
     if (pme_lb->cutoff_scheme == ecutsVERLET &&
index cf51f5c375bc8dbe5cc29ae291c409b349a764bd..57792ae2a7df34f2c7bd45c6b6e0d30cba663207 100644 (file)
@@ -1148,10 +1148,19 @@ int mdrunner(gmx_hw_opt_t *hw_opt,
             bUseGPU = (hwinfo->gpu_info.ncuda_dev_compatible > 0 ||
                        getenv("GMX_EMULATE_GPU") != NULL);
 
-            if (bUseGPU && (inputrec->vdw_modifier == eintmodFORCESWITCH ||
-                            inputrec->vdw_modifier == eintmodPOTSWITCH))
+            /* TODO add GPU kernels for this and replace this check by:
+             * (bUseGPU && (ir->vdwtype == evdwPME &&
+             *               ir->ljpme_combination_rule == eljpmeLB))
+             * update the message text and the content of nbnxn_acceleration_supported.
+             */
+            if (bUseGPU &&
+                !nbnxn_acceleration_supported(fplog, cr, inputrec, bUseGPU))
             {
-                md_print_warn(cr, fplog, "LJ switch functions are not yet supported on the GPU, falling back to CPU-only");
+                /* Fallback message printed by nbnxn_acceleration_supported */
+                if (bForceUseGPU)
+                {
+                    gmx_fatal(FARGS, "GPU acceleration requested, but not supported with the given input settings");
+                }
                 bUseGPU = FALSE;
             }