From 99029df2c0e845b1cdf4675d6d9ca5d64f890235 Mon Sep 17 00:00:00 2001 From: Berk Hess Date: Thu, 5 Dec 2013 10:27:59 +0100 Subject: [PATCH] Implemented LJ-PME nbnxn kernels 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 --- manual/forcefield.tex | 10 +- src/gromacs/gmxlib/ewald_util.c | 4 +- src/gromacs/gmxlib/nrnb.c | 10 +- src/gromacs/gmxpreprocess/grompp.c | 5 - src/gromacs/gmxpreprocess/readir.c | 41 ++--- src/gromacs/legacyheaders/force.h | 11 ++ .../legacyheaders/types/interaction_const.h | 6 +- src/gromacs/legacyheaders/types/mdatom.h | 3 +- src/gromacs/legacyheaders/types/nrnb.h | 19 +-- src/gromacs/mdlib/domdec.c | 2 +- src/gromacs/mdlib/force.c | 14 +- src/gromacs/mdlib/forcerec.c | 130 ++++++++++++---- src/gromacs/mdlib/mdatom.c | 70 +++++---- src/gromacs/mdlib/nbnxn_atomdata.c | 112 +++++++------ src/gromacs/mdlib/nbnxn_atomdata.h | 7 +- .../make_verlet_simd_kernel_files.py | 11 +- .../nbnxn_kernel_simd_template.c.pre | 114 ++++++++------ .../mdlib/nbnxn_kernels/nbnxn_kernel_ref.c | 129 ++++++++++----- .../nbnxn_kernels/nbnxn_kernel_ref_inner.h | 81 ++++++++-- .../nbnxn_kernels/nbnxn_kernel_ref_outer.h | 66 +++++--- ...ernel_ElecEwTwinCut_VdwLJCombGeom_F_2xnn.c | 1 + ...rnel_ElecEwTwinCut_VdwLJCombGeom_VF_2xnn.c | 1 + ...l_ElecEwTwinCut_VdwLJCombGeom_VgrpF_2xnn.c | 1 + ..._kernel_ElecEwTwinCut_VdwLJCombLB_F_2xnn.c | 1 + ...kernel_ElecEwTwinCut_VdwLJCombLB_VF_2xnn.c | 1 + ...nel_ElecEwTwinCut_VdwLJCombLB_VgrpF_2xnn.c | 1 + ...nel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xnn.c | 89 +++++++++++ ...el_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xnn.c | 89 +++++++++++ ...ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xnn.c | 90 +++++++++++ ...nxn_kernel_ElecEwTwinCut_VdwLJFSw_F_2xnn.c | 2 +- ...xn_kernel_ElecEwTwinCut_VdwLJFSw_VF_2xnn.c | 2 +- ...kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_2xnn.c | 2 +- ...nxn_kernel_ElecEwTwinCut_VdwLJPSw_F_2xnn.c | 2 +- ...xn_kernel_ElecEwTwinCut_VdwLJPSw_VF_2xnn.c | 2 +- ...kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_2xnn.c | 2 +- .../nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_2xnn.c | 3 +- ...nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_2xnn.c | 3 +- ...xn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_2xnn.c | 3 +- ...nbnxn_kernel_ElecEw_VdwLJCombGeom_F_2xnn.c | 1 + ...bnxn_kernel_ElecEw_VdwLJCombGeom_VF_2xnn.c | 1 + ...n_kernel_ElecEw_VdwLJCombGeom_VgrpF_2xnn.c | 1 + .../nbnxn_kernel_ElecEw_VdwLJCombLB_F_2xnn.c | 1 + .../nbnxn_kernel_ElecEw_VdwLJCombLB_VF_2xnn.c | 1 + ...nxn_kernel_ElecEw_VdwLJCombLB_VgrpF_2xnn.c | 1 + ...nxn_kernel_ElecEw_VdwLJEwCombGeom_F_2xnn.c | 88 +++++++++++ ...xn_kernel_ElecEw_VdwLJEwCombGeom_VF_2xnn.c | 88 +++++++++++ ...kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xnn.c | 89 +++++++++++ .../nbnxn_kernel_ElecEw_VdwLJFSw_F_2xnn.c | 2 +- .../nbnxn_kernel_ElecEw_VdwLJFSw_VF_2xnn.c | 2 +- .../nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_2xnn.c | 2 +- .../nbnxn_kernel_ElecEw_VdwLJPSw_F_2xnn.c | 2 +- .../nbnxn_kernel_ElecEw_VdwLJPSw_VF_2xnn.c | 2 +- .../nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_2xnn.c | 2 +- .../nbnxn_kernel_ElecEw_VdwLJ_F_2xnn.c | 3 +- .../nbnxn_kernel_ElecEw_VdwLJ_VF_2xnn.c | 3 +- .../nbnxn_kernel_ElecEw_VdwLJ_VgrpF_2xnn.c | 3 +- ...el_ElecQSTabTwinCut_VdwLJCombGeom_F_2xnn.c | 1 + ...l_ElecQSTabTwinCut_VdwLJCombGeom_VF_2xnn.c | 1 + ...lecQSTabTwinCut_VdwLJCombGeom_VgrpF_2xnn.c | 1 + ...rnel_ElecQSTabTwinCut_VdwLJCombLB_F_2xnn.c | 1 + ...nel_ElecQSTabTwinCut_VdwLJCombLB_VF_2xnn.c | 1 + ..._ElecQSTabTwinCut_VdwLJCombLB_VgrpF_2xnn.c | 1 + ..._ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xnn.c | 89 +++++++++++ ...ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xnn.c | 89 +++++++++++ ...cQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xnn.c | 90 +++++++++++ ..._kernel_ElecQSTabTwinCut_VdwLJFSw_F_2xnn.c | 2 +- ...kernel_ElecQSTabTwinCut_VdwLJFSw_VF_2xnn.c | 2 +- ...nel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_2xnn.c | 2 +- ..._kernel_ElecQSTabTwinCut_VdwLJPSw_F_2xnn.c | 2 +- ...kernel_ElecQSTabTwinCut_VdwLJPSw_VF_2xnn.c | 2 +- ...nel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_2xnn.c | 2 +- ...nxn_kernel_ElecQSTabTwinCut_VdwLJ_F_2xnn.c | 3 +- ...xn_kernel_ElecQSTabTwinCut_VdwLJ_VF_2xnn.c | 3 +- ...kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_2xnn.c | 3 +- ...xn_kernel_ElecQSTab_VdwLJCombGeom_F_2xnn.c | 1 + ...n_kernel_ElecQSTab_VdwLJCombGeom_VF_2xnn.c | 1 + ...ernel_ElecQSTab_VdwLJCombGeom_VgrpF_2xnn.c | 1 + ...bnxn_kernel_ElecQSTab_VdwLJCombLB_F_2xnn.c | 1 + ...nxn_kernel_ElecQSTab_VdwLJCombLB_VF_2xnn.c | 1 + ..._kernel_ElecQSTab_VdwLJCombLB_VgrpF_2xnn.c | 1 + ..._kernel_ElecQSTab_VdwLJEwCombGeom_F_2xnn.c | 88 +++++++++++ ...kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xnn.c | 88 +++++++++++ ...nel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xnn.c | 89 +++++++++++ .../nbnxn_kernel_ElecQSTab_VdwLJFSw_F_2xnn.c | 2 +- .../nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_2xnn.c | 2 +- ...nxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_2xnn.c | 2 +- .../nbnxn_kernel_ElecQSTab_VdwLJPSw_F_2xnn.c | 2 +- .../nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_2xnn.c | 2 +- ...nxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_2xnn.c | 2 +- .../nbnxn_kernel_ElecQSTab_VdwLJ_F_2xnn.c | 3 +- .../nbnxn_kernel_ElecQSTab_VdwLJ_VF_2xnn.c | 3 +- .../nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_2xnn.c | 3 +- ...nbnxn_kernel_ElecRF_VdwLJCombGeom_F_2xnn.c | 1 + ...bnxn_kernel_ElecRF_VdwLJCombGeom_VF_2xnn.c | 1 + ...n_kernel_ElecRF_VdwLJCombGeom_VgrpF_2xnn.c | 1 + .../nbnxn_kernel_ElecRF_VdwLJCombLB_F_2xnn.c | 1 + .../nbnxn_kernel_ElecRF_VdwLJCombLB_VF_2xnn.c | 1 + ...nxn_kernel_ElecRF_VdwLJCombLB_VgrpF_2xnn.c | 1 + ...nxn_kernel_ElecRF_VdwLJEwCombGeom_F_2xnn.c | 88 +++++++++++ ...xn_kernel_ElecRF_VdwLJEwCombGeom_VF_2xnn.c | 88 +++++++++++ ...kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xnn.c | 89 +++++++++++ .../nbnxn_kernel_ElecRF_VdwLJFSw_F_2xnn.c | 2 +- .../nbnxn_kernel_ElecRF_VdwLJFSw_VF_2xnn.c | 2 +- .../nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_2xnn.c | 2 +- .../nbnxn_kernel_ElecRF_VdwLJPSw_F_2xnn.c | 2 +- .../nbnxn_kernel_ElecRF_VdwLJPSw_VF_2xnn.c | 2 +- .../nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_2xnn.c | 2 +- .../nbnxn_kernel_ElecRF_VdwLJ_F_2xnn.c | 3 +- .../nbnxn_kernel_ElecRF_VdwLJ_VF_2xnn.c | 3 +- .../nbnxn_kernel_ElecRF_VdwLJ_VgrpF_2xnn.c | 3 +- .../simd_2xnn/nbnxn_kernel_simd_2xnn.c | 129 +++++++++------ .../simd_2xnn/nbnxn_kernel_simd_2xnn.h | 15 ++ .../simd_2xnn/nbnxn_kernel_simd_2xnn_inner.h | 119 +++++++++++--- .../simd_2xnn/nbnxn_kernel_simd_2xnn_outer.h | 125 ++++++++++----- ...kernel_ElecEwTwinCut_VdwLJCombGeom_F_4xn.c | 1 + ...ernel_ElecEwTwinCut_VdwLJCombGeom_VF_4xn.c | 1 + ...el_ElecEwTwinCut_VdwLJCombGeom_VgrpF_4xn.c | 1 + ...n_kernel_ElecEwTwinCut_VdwLJCombLB_F_4xn.c | 1 + ..._kernel_ElecEwTwinCut_VdwLJCombLB_VF_4xn.c | 1 + ...rnel_ElecEwTwinCut_VdwLJCombLB_VgrpF_4xn.c | 1 + ...rnel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xn.c | 89 +++++++++++ ...nel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xn.c | 89 +++++++++++ ..._ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xn.c | 90 +++++++++++ ...bnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_4xn.c | 2 +- ...nxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_4xn.c | 2 +- ..._kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_4xn.c | 2 +- ...bnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_4xn.c | 2 +- ...nxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_4xn.c | 2 +- ..._kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_4xn.c | 2 +- .../nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_4xn.c | 3 +- .../nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_4xn.c | 3 +- ...nxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_4xn.c | 3 +- .../nbnxn_kernel_ElecEw_VdwLJCombGeom_F_4xn.c | 1 + ...nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_4xn.c | 1 + ...xn_kernel_ElecEw_VdwLJCombGeom_VgrpF_4xn.c | 1 + .../nbnxn_kernel_ElecEw_VdwLJCombLB_F_4xn.c | 1 + .../nbnxn_kernel_ElecEw_VdwLJCombLB_VF_4xn.c | 1 + ...bnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_4xn.c | 1 + ...bnxn_kernel_ElecEw_VdwLJEwCombGeom_F_4xn.c | 88 +++++++++++ ...nxn_kernel_ElecEw_VdwLJEwCombGeom_VF_4xn.c | 88 +++++++++++ ..._kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xn.c | 89 +++++++++++ .../nbnxn_kernel_ElecEw_VdwLJFSw_F_4xn.c | 2 +- .../nbnxn_kernel_ElecEw_VdwLJFSw_VF_4xn.c | 2 +- .../nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_4xn.c | 2 +- .../nbnxn_kernel_ElecEw_VdwLJPSw_F_4xn.c | 2 +- .../nbnxn_kernel_ElecEw_VdwLJPSw_VF_4xn.c | 2 +- .../nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_4xn.c | 2 +- .../nbnxn_kernel_ElecEw_VdwLJ_F_4xn.c | 3 +- .../nbnxn_kernel_ElecEw_VdwLJ_VF_4xn.c | 3 +- .../nbnxn_kernel_ElecEw_VdwLJ_VgrpF_4xn.c | 3 +- ...nel_ElecQSTabTwinCut_VdwLJCombGeom_F_4xn.c | 1 + ...el_ElecQSTabTwinCut_VdwLJCombGeom_VF_4xn.c | 1 + ...ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_4xn.c | 1 + ...ernel_ElecQSTabTwinCut_VdwLJCombLB_F_4xn.c | 1 + ...rnel_ElecQSTabTwinCut_VdwLJCombLB_VF_4xn.c | 1 + ...l_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_4xn.c | 1 + ...l_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xn.c | 89 +++++++++++ ..._ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xn.c | 89 +++++++++++ ...ecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xn.c | 90 +++++++++++ ...n_kernel_ElecQSTabTwinCut_VdwLJFSw_F_4xn.c | 2 +- ..._kernel_ElecQSTabTwinCut_VdwLJFSw_VF_4xn.c | 2 +- ...rnel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_4xn.c | 2 +- ...n_kernel_ElecQSTabTwinCut_VdwLJPSw_F_4xn.c | 2 +- ..._kernel_ElecQSTabTwinCut_VdwLJPSw_VF_4xn.c | 2 +- ...rnel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_4xn.c | 2 +- ...bnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_4xn.c | 3 +- ...nxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_4xn.c | 3 +- ..._kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_4xn.c | 3 +- ...nxn_kernel_ElecQSTab_VdwLJCombGeom_F_4xn.c | 1 + ...xn_kernel_ElecQSTab_VdwLJCombGeom_VF_4xn.c | 1 + ...kernel_ElecQSTab_VdwLJCombGeom_VgrpF_4xn.c | 1 + ...nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_4xn.c | 1 + ...bnxn_kernel_ElecQSTab_VdwLJCombLB_VF_4xn.c | 1 + ...n_kernel_ElecQSTab_VdwLJCombLB_VgrpF_4xn.c | 1 + ...n_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xn.c | 88 +++++++++++ ..._kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xn.c | 88 +++++++++++ ...rnel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xn.c | 89 +++++++++++ .../nbnxn_kernel_ElecQSTab_VdwLJFSw_F_4xn.c | 2 +- .../nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_4xn.c | 2 +- ...bnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_4xn.c | 2 +- .../nbnxn_kernel_ElecQSTab_VdwLJPSw_F_4xn.c | 2 +- .../nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_4xn.c | 2 +- ...bnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_4xn.c | 2 +- .../nbnxn_kernel_ElecQSTab_VdwLJ_F_4xn.c | 3 +- .../nbnxn_kernel_ElecQSTab_VdwLJ_VF_4xn.c | 3 +- .../nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_4xn.c | 3 +- .../nbnxn_kernel_ElecRF_VdwLJCombGeom_F_4xn.c | 1 + ...nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_4xn.c | 1 + ...xn_kernel_ElecRF_VdwLJCombGeom_VgrpF_4xn.c | 1 + .../nbnxn_kernel_ElecRF_VdwLJCombLB_F_4xn.c | 1 + .../nbnxn_kernel_ElecRF_VdwLJCombLB_VF_4xn.c | 1 + ...bnxn_kernel_ElecRF_VdwLJCombLB_VgrpF_4xn.c | 1 + ...bnxn_kernel_ElecRF_VdwLJEwCombGeom_F_4xn.c | 88 +++++++++++ ...nxn_kernel_ElecRF_VdwLJEwCombGeom_VF_4xn.c | 88 +++++++++++ ..._kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xn.c | 89 +++++++++++ .../nbnxn_kernel_ElecRF_VdwLJFSw_F_4xn.c | 2 +- .../nbnxn_kernel_ElecRF_VdwLJFSw_VF_4xn.c | 2 +- .../nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_4xn.c | 2 +- .../nbnxn_kernel_ElecRF_VdwLJPSw_F_4xn.c | 2 +- .../nbnxn_kernel_ElecRF_VdwLJPSw_VF_4xn.c | 2 +- .../nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_4xn.c | 2 +- .../nbnxn_kernel_ElecRF_VdwLJ_F_4xn.c | 3 +- .../nbnxn_kernel_ElecRF_VdwLJ_VF_4xn.c | 3 +- .../nbnxn_kernel_ElecRF_VdwLJ_VgrpF_4xn.c | 3 +- .../simd_4xn/nbnxn_kernel_simd_4xn.c | 129 +++++++++------ .../simd_4xn/nbnxn_kernel_simd_4xn.h | 15 ++ .../simd_4xn/nbnxn_kernel_simd_4xn_inner.h | 147 +++++++++++++++--- .../simd_4xn/nbnxn_kernel_simd_4xn_outer.h | 123 ++++++++++----- src/gromacs/mdlib/sim_util.c | 66 ++++---- src/gromacs/mdlib/tables.c | 5 +- src/programs/mdrun/pme_loadbal.c | 6 +- src/programs/mdrun/runner.c | 15 +- 212 files changed, 4045 insertions(+), 626 deletions(-) create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xnn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_4xn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_4xn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_4xn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_4xn.c create mode 100644 src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xn.c diff --git a/manual/forcefield.tex b/manual/forcefield.tex index 829106091a..7fe2cd0293 100644 --- a/manual/forcefield.tex +++ b/manual/forcefield.tex @@ -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}} diff --git a/src/gromacs/gmxlib/ewald_util.c b/src/gromacs/gmxlib/ewald_util.c index 2cbf504392..99e57148cc 100644 --- a/src/gromacs/gmxlib/ewald_util.c +++ b/src/gromacs/gmxlib/ewald_util.c @@ -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; } } diff --git a/src/gromacs/gmxlib/nrnb.c b/src/gromacs/gmxlib/nrnb.c index 2f818ff252..9fd76c22d7 100644 --- a/src/gromacs/gmxlib/nrnb.c +++ b/src/gromacs/gmxlib/nrnb.c @@ -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; diff --git a/src/gromacs/gmxpreprocess/grompp.c b/src/gromacs/gmxpreprocess/grompp.c index d604b1fb29..5c20e5d4c8 100644 --- a/src/gromacs/gmxpreprocess/grompp.c +++ b/src/gromacs/gmxpreprocess/grompp.c @@ -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)) diff --git a/src/gromacs/gmxpreprocess/readir.c b/src/gromacs/gmxpreprocess/readir.c index 22bc4b0835..63b5e8f4b4 100644 --- a/src/gromacs/gmxpreprocess/readir.c +++ b/src/gromacs/gmxpreprocess/readir.c @@ -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."); } } } diff --git a/src/gromacs/legacyheaders/force.h b/src/gromacs/legacyheaders/force.h index 80b3f7012a..e053a0de33 100644 --- a/src/gromacs/legacyheaders/force.h +++ b/src/gromacs/legacyheaders/force.h @@ -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); diff --git a/src/gromacs/legacyheaders/types/interaction_const.h b/src/gromacs/legacyheaders/types/interaction_const.h index 2f82b4956b..b5f6e79055 100644 --- a/src/gromacs/legacyheaders/types/interaction_const.h +++ b/src/gromacs/legacyheaders/types/interaction_const.h @@ -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; diff --git a/src/gromacs/legacyheaders/types/mdatom.h b/src/gromacs/legacyheaders/types/mdatom.h index 30f46ee166..08a2ff5490 100644 --- a/src/gromacs/legacyheaders/types/mdatom.h +++ b/src/gromacs/legacyheaders/types/mdatom.h @@ -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; diff --git a/src/gromacs/legacyheaders/types/nrnb.h b/src/gromacs/legacyheaders/types/nrnb.h index cd504aa273..8830f3113d 100644 --- a/src/gromacs/legacyheaders/types/nrnb.h +++ b/src/gromacs/legacyheaders/types/nrnb.h @@ -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, diff --git a/src/gromacs/mdlib/domdec.c b/src/gromacs/mdlib/domdec.c index 37b40d309b..0d5a51049a 100644 --- a/src/gromacs/mdlib/domdec.c +++ b/src/gromacs/mdlib/domdec.c @@ -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)); } diff --git a/src/gromacs/mdlib/force.c b/src/gromacs/mdlib/force.c index bd6fa62f41..93a9d06936 100644 --- a/src/gromacs/mdlib/force.c +++ b/src/gromacs/mdlib/force.c @@ -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; diff --git a/src/gromacs/mdlib/forcerec.c b/src/gromacs/mdlib/forcerec.c index 4f4e5495c0..64fef1f839 100644 --- a/src/gromacs/mdlib/forcerec.c +++ b/src/gromacs/mdlib/forcerec.c @@ -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) { diff --git a/src/gromacs/mdlib/mdatom.c b/src/gromacs/mdlib/mdatom.c index eb41eb1c9d..b3d6475c53 100644 --- a/src/gromacs/mdlib/mdatom.c +++ b/src/gromacs/mdlib/mdatom.c @@ -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) diff --git a/src/gromacs/mdlib/nbnxn_atomdata.c b/src/gromacs/mdlib/nbnxn_atomdata.c index 157f788e3f..2d9e10559d 100644 --- a/src/gromacs/mdlib/nbnxn_atomdata.c +++ b/src/gromacs/mdlib/nbnxn_atomdata.c @@ -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) diff --git a/src/gromacs/mdlib/nbnxn_atomdata.h b/src/gromacs/mdlib/nbnxn_atomdata.h index 989bd4b127..5855e5b50d 100644 --- a/src/gromacs/mdlib/nbnxn_atomdata.h +++ b/src/gromacs/mdlib/nbnxn_atomdata.h @@ -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, diff --git a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/make_verlet_simd_kernel_files.py b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/make_verlet_simd_kernel_files.py index 68d9085079..76a1c5d4ab 100755 --- a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/make_verlet_simd_kernel_files.py +++ b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/make_verlet_simd_kernel_files.py @@ -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 = { diff --git a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/nbnxn_kernel_simd_template.c.pre b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/nbnxn_kernel_simd_template.c.pre index bbc8188528..1ac1bf5419 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/nbnxn_kernel_simd_template.c.pre +++ b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/nbnxn_kernel_simd_template.c.pre @@ -54,18 +54,24 @@ /*! \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, diff --git a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.c b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.c index e659e5a262..3a04cb5753 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.c +++ b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.c @@ -37,6 +37,7 @@ #endif #include +#include #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)) diff --git a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref_inner.h b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref_inner.h index 6c9c89dec4..d76f1e124f 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref_inner.h +++ b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref_inner.h @@ -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 @@ -151,27 +151,29 @@ 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; @@ -182,17 +184,15 @@ #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; @@ -204,6 +204,52 @@ } #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 */ { @@ -215,7 +261,14 @@ 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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref_outer.h b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref_outer.h index e68a300d05..955e708fae 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref_outer.h +++ b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref_outer.h @@ -63,14 +63,20 @@ #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) diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_2xnn.c index f7c004ad48..76b056ec75 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_2xnn.c index 4eb790ac54..44671ee1ad 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_2xnn.c index 9f681e1870..7f1513fab6 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_F_2xnn.c index 90d0155000..369bfbfe28 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_F_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VF_2xnn.c index 0081117f94..61d29bba95 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_2xnn.c index 57237425ad..769037be60 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_2xnn.c @@ -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 index 0000000000..bb32524cb1 --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xnn.c @@ -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 index 0000000000..5c53c287bb --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xnn.c @@ -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 index 0000000000..df6ca901bb --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_2xnn.c index 8895d918c7..dc919db9e1 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_2xnn.c index 85b3598445..42650bcfc8 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_2xnn.c index d91b063c27..3ba6f95959 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_2xnn.c index 82757f0f78..c1f0727b92 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_2xnn.c index 24728fc6ae..c627bacf2c 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_2xnn.c index 28d416be28..c83c7a6549 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_2xnn.c index 6f51d8b1f2..fe72d654c0 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_2xnn.c index 3a207fab06..d60902913c 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_2xnn.c index 465d5496ee..4d4db8b382 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_F_2xnn.c index 86ae343358..9a35731fc1 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_F_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_2xnn.c index 00f8513f9b..92b0afbd10 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_2xnn.c @@ -47,6 +47,7 @@ #include "nbnxn_kernel_simd_2xnn.h" #define CALC_COUL_EWALD +#define LJ_CUT #define LJ_COMB_GEOM #define CALC_ENERGIES diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_2xnn.c index 3f84925291..26c75477df 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_F_2xnn.c index 716b4edacb..ea8cf655db 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_F_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_VF_2xnn.c index 7ce3508f9e..ad64932b61 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_VF_2xnn.c @@ -47,6 +47,7 @@ #include "nbnxn_kernel_simd_2xnn.h" #define CALC_COUL_EWALD +#define LJ_CUT #define LJ_COMB_LB #define CALC_ENERGIES diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_2xnn.c index 9640186d88..ba3512160c 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_2xnn.c @@ -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 index 0000000000..cb67816b7e --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_2xnn.c @@ -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 index 0000000000..f71bb45808 --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_2xnn.c @@ -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 index 0000000000..a57df6e663 --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_F_2xnn.c index f674e48c44..59f709a399 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_VF_2xnn.c index 804ea6d34a..c5c4c14ef6 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_2xnn.c index 4f3f460fa0..885f4f4f28 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_F_2xnn.c index 2638c41d5f..4ff834e209 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_VF_2xnn.c index b82482b57c..926a8b6bbb 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_2xnn.c index b2132351f6..0997b57c5b 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_F_2xnn.c index ddec21cc08..68aa2b3963 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_VF_2xnn.c index 681ec8953b..71d77c1255 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_VgrpF_2xnn.c index 0d768fb5c0..a2e613257a 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecEw_VdwLJ_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_2xnn.c index e2e7597f2d..16448b72ba 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_2xnn.c index 4e824957e4..22315ee333 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_2xnn.c index 5d2aede12b..64ce413cc9 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_2xnn.c index ec1fac3e2b..5c89c4fb3b 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_2xnn.c index 59f6715d73..d4e17ecfdd 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_2xnn.c index 3b72339c7f..3c75e0801b 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_2xnn.c @@ -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 index 0000000000..ae5d693ffc --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xnn.c @@ -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 index 0000000000..5d991b37e6 --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xnn.c @@ -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 index 0000000000..bc09bbddab --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_2xnn.c index 80ce35a2f2..bd8436c676 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_2xnn.c index a4926d6b8e..28b27d3a8a 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_2xnn.c index ab06e42f5e..2077c6dd05 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_2xnn.c index 534ae93b08..a6e4f45b44 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_2xnn.c index 1ac9b6d23e..2972fcfe35 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_2xnn.c index c556a73988..d267d8e678 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_2xnn.c index 6eaddccdfc..118dc553fb 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_2xnn.c index 91a0ace251..e04c3d911e 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_2xnn.c index c80763901b..e0af6c8177 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_2xnn.c index 1b52825a43..78ecf6966c 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_2xnn.c index 563e1da1ea..f2136020bd 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_2xnn.c @@ -47,6 +47,7 @@ #include "nbnxn_kernel_simd_2xnn.h" #define CALC_COUL_TAB +#define LJ_CUT #define LJ_COMB_GEOM #define CALC_ENERGIES diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_2xnn.c index 80a707326d..2ddcb859b5 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_2xnn.c index 373ebba108..0182f56c95 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VF_2xnn.c index 1d2c22646c..23ed646115 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VF_2xnn.c @@ -47,6 +47,7 @@ #include "nbnxn_kernel_simd_2xnn.h" #define CALC_COUL_TAB +#define LJ_CUT #define LJ_COMB_LB #define CALC_ENERGIES diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VgrpF_2xnn.c index e7ffea2082..54c5d56a28 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VgrpF_2xnn.c @@ -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 index 0000000000..2fa3ed90af --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xnn.c @@ -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 index 0000000000..ba086c8a92 --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xnn.c @@ -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 index 0000000000..7906b80fe1 --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_F_2xnn.c index 39a5862d89..18f5ab376c 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_2xnn.c index 434336051c..e61100d102 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_2xnn.c index 845bd4d8fd..2276f91a5c 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_F_2xnn.c index 8bd93fffe7..ef13e59a2e 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_2xnn.c index bc4d924684..c7f15d611c 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_2xnn.c index 05999b60d6..c10f52cad3 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_F_2xnn.c index b9b2a31df6..def30cfc19 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_VF_2xnn.c index a09db67a2e..a996b1a885 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_2xnn.c index 356f91b60a..459729abbd 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_F_2xnn.c index fb2313d28f..42222b7bb7 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_F_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_2xnn.c index 7408d07765..f6e9e6fffc 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_2xnn.c @@ -47,6 +47,7 @@ #include "nbnxn_kernel_simd_2xnn.h" #define CALC_COUL_RF +#define LJ_CUT #define LJ_COMB_GEOM #define CALC_ENERGIES diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VgrpF_2xnn.c index cd2046279d..0d03367d14 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_F_2xnn.c index 907749b668..7bd991cf80 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_F_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_VF_2xnn.c index 3c502ef07c..8b7415b0e5 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_VF_2xnn.c @@ -47,6 +47,7 @@ #include "nbnxn_kernel_simd_2xnn.h" #define CALC_COUL_RF +#define LJ_CUT #define LJ_COMB_LB #define CALC_ENERGIES diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_VgrpF_2xnn.c index 32875e796a..44cc1e9a15 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJCombLB_VgrpF_2xnn.c @@ -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 index 0000000000..e220d69377 --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_2xnn.c @@ -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 index 0000000000..630ec030dd --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_2xnn.c @@ -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 index 0000000000..c18876d614 --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xnn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_F_2xnn.c index 52fecc8eb2..d6600ae047 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_VF_2xnn.c index af5acc0d10..edf6fddfc0 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_2xnn.c index c3bfe09194..e43052880d 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_F_2xnn.c index 6d31b573b1..198955942f 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_VF_2xnn.c index f79dc11822..ccb52a8b1f 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_2xnn.c index 636d393696..bec4d4c39a 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_F_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_F_2xnn.c index a97714cb72..9eec2b3032 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_F_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_F_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_VF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_VF_2xnn.c index 354ac6f11b..46a2417fd3 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_VF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_VF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_VgrpF_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_VgrpF_2xnn.c index ebe2a88d1c..90b38d6263 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_VgrpF_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_ElecRF_VdwLJ_VgrpF_2xnn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.c index 4bf21fa824..d8ec1d2edc 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.c @@ -64,14 +64,20 @@ /*! \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, diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.h b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.h index 9b84f84909..58f1e768e0 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.h +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.h @@ -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; diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_inner.h b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_inner.h index d0182ac8b1..8c97de1c7e 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_inner.h +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_inner.h @@ -52,13 +52,13 @@ */ -/* 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 @@ -200,7 +200,7 @@ 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 @@ -246,7 +246,7 @@ /* 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 @@ -555,8 +555,8 @@ #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); @@ -658,8 +658,9 @@ 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 @@ -669,8 +670,9 @@ #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))); @@ -689,7 +691,8 @@ #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 */ @@ -729,6 +732,93 @@ } #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. @@ -747,15 +837,6 @@ #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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_outer.h b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_outer.h index 8f809e7353..38b0293872 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_outer.h +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_outer.h @@ -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 @@ -147,11 +147,14 @@ 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; @@ -161,11 +164,10 @@ 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 @@ -181,15 +183,12 @@ 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 */ @@ -217,9 +216,10 @@ 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 @@ -307,6 +307,11 @@ 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); @@ -315,9 +320,7 @@ 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); @@ -337,14 +340,17 @@ 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); @@ -442,6 +448,11 @@ 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]; @@ -456,44 +467,67 @@ } } #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 @@ -551,6 +585,14 @@ 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 */ @@ -625,13 +667,13 @@ /* 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); @@ -644,6 +686,7 @@ { *Vc += gmx_sum_simd(vctot_S, tmpsum); } + *Vvdw += gmx_sum_simd(Vvdwtot_S, tmpsum); #endif diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_4xn.c index e102dd51b8..8e0ce57385 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_F_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_4xn.c index 73fe4a096a..e877eea039 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_4xn.c index 8cf043d5be..079eba6952 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_F_4xn.c index d4ddce8cc7..6da840273a 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_F_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VF_4xn.c index 2fd6943440..db2d2ebef9 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_4xn.c index 2104429a91..6ea91013e8 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_4xn.c @@ -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 index 0000000000..85d4cb9689 --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xn.c @@ -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 index 0000000000..55fd27a07a --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xn.c @@ -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 index 0000000000..fe173b32a0 --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_4xn.c index ab1343ed6d..199fb5c623 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_4xn.c index 513b1c4589..aefb1ae61a 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_4xn.c index 2d97d0890f..1f21e2613a 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_4xn.c index b156e3621e..8f95cb7e1a 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_4xn.c index 8fc7a7b437..f7fb96448e 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_4xn.c index ad083c0c5a..bb9c907dd0 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_4xn.c index a62b606a8d..20ab0c5e14 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_4xn.c index cf85a589e0..5e982d5eb3 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_4xn.c index 667b13b492..b68109cde3 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEwTwinCut_VdwLJ_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_F_4xn.c index 8acf557386..8c59343b3e 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_F_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_4xn.c index 4660845a02..014a837702 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VF_4xn.c @@ -47,6 +47,7 @@ #include "nbnxn_kernel_simd_4xn.h" #define CALC_COUL_EWALD +#define LJ_CUT #define LJ_COMB_GEOM #define CALC_ENERGIES diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_4xn.c index 5feb79939e..ae3950f048 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombGeom_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_F_4xn.c index 30478d566c..9045ae46c9 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_F_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_VF_4xn.c index b7aedd19a2..9020fd4d0b 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_VF_4xn.c @@ -47,6 +47,7 @@ #include "nbnxn_kernel_simd_4xn.h" #define CALC_COUL_EWALD +#define LJ_CUT #define LJ_COMB_LB #define CALC_ENERGIES diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_4xn.c index e024054af9..806e259223 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJCombLB_VgrpF_4xn.c @@ -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 index 0000000000..eb6df02565 --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_F_4xn.c @@ -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 index 0000000000..db3f1cd84b --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VF_4xn.c @@ -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 index 0000000000..487d76842e --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_F_4xn.c index 56ec7fe340..ea145640cc 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_VF_4xn.c index bf88b72e38..16ed3130c3 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_4xn.c index 733ddedf03..e440224f0f 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJFSw_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_F_4xn.c index 0c28c692ac..ba18cfb1be 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_VF_4xn.c index 456eea3578..452bf4b9d0 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_4xn.c index 8aea98b89e..2a754765e0 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJPSw_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_F_4xn.c index 8e50fafe95..7f9dd0af81 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_VF_4xn.c index e4eb170a38..504e91db22 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_VgrpF_4xn.c index 5243174ea8..71c5db2ba5 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecEw_VdwLJ_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_4xn.c index 0760890529..fb90fe0406 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_4xn.c index b5e4504124..0b18b0b573 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_4xn.c index 4ee1264925..56b173331d 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_4xn.c index e605a3e21a..94ca416349 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_4xn.c index fa3c5629e6..7eded238af 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_4xn.c index 57cd06863a..0657e0e4bf 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_4xn.c @@ -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 index 0000000000..58cebd8fed --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xn.c @@ -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 index 0000000000..1ff9cddc5b --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xn.c @@ -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 index 0000000000..9c211d4950 --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_4xn.c index 337c48d9f1..f37b271857 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_4xn.c index 23ed6b7fca..22b395bfe7 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_4xn.c index a211d2248e..faef66891c 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_4xn.c index 4b589147f2..bd495ebcb8 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_4xn.c index 332cbe1681..ee2e69b9e7 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_4xn.c index 2f48effa69..8ce952c1cf 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_4xn.c index c66d8108fa..eea95fb0bd 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_4xn.c index 1350b512a9..3c78488ab4 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_4xn.c index e2d9c53fbe..f347e81186 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_4xn.c index c716a94c9e..0830a5d3d4 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_F_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_4xn.c index c99c7e51d9..45a1660512 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VF_4xn.c @@ -47,6 +47,7 @@ #include "nbnxn_kernel_simd_4xn.h" #define CALC_COUL_TAB +#define LJ_CUT #define LJ_COMB_GEOM #define CALC_ENERGIES diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_4xn.c index a07bb56374..803070fca8 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_4xn.c index 0f10b4d547..ed0d1b4cc0 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_F_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VF_4xn.c index aa5997a71c..3936c1e233 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VF_4xn.c @@ -47,6 +47,7 @@ #include "nbnxn_kernel_simd_4xn.h" #define CALC_COUL_TAB +#define LJ_CUT #define LJ_COMB_LB #define CALC_ENERGIES diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VgrpF_4xn.c index 1cd5bebb37..defe4535ca 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJCombLB_VgrpF_4xn.c @@ -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 index 0000000000..ce52c0e291 --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xn.c @@ -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 index 0000000000..ab580a8b51 --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xn.c @@ -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 index 0000000000..d23c22e43a --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_F_4xn.c index 04e3ffcadd..2667a84575 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_4xn.c index 6965f31e28..9bb1c64890 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_4xn.c index c81681217a..1568dd540d 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJFSw_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_F_4xn.c index 4b9d360b36..8f1ce9210f 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_4xn.c index cc284d13e5..d1c7ea4697 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_4xn.c index 59e2c624ba..472c06690f 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJPSw_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_F_4xn.c index a33a35ac00..2b604bb7fc 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_VF_4xn.c index 72c53da0c1..33e92d77a3 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_4xn.c index 0535579306..eafdb1615a 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_F_4xn.c index a49d769452..a77ee987a3 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_F_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_4xn.c index 8ab2694b0d..8b7c2e3396 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VF_4xn.c @@ -47,6 +47,7 @@ #include "nbnxn_kernel_simd_4xn.h" #define CALC_COUL_RF +#define LJ_CUT #define LJ_COMB_GEOM #define CALC_ENERGIES diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VgrpF_4xn.c index e73120cd77..57e35f7997 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombGeom_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_F_4xn.c index 50025c00b6..6b47f07dca 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_F_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_VF_4xn.c index 49ae82cc5b..41a404314c 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_VF_4xn.c @@ -47,6 +47,7 @@ #include "nbnxn_kernel_simd_4xn.h" #define CALC_COUL_RF +#define LJ_CUT #define LJ_COMB_LB #define CALC_ENERGIES diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_VgrpF_4xn.c index 66bac230cc..9ccd2b7a53 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJCombLB_VgrpF_4xn.c @@ -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 index 0000000000..0f3ac29b4a --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_4xn.c @@ -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 index 0000000000..c1403ce23c --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_4xn.c @@ -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 index 0000000000..7d6e2fc64d --- /dev/null +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xn.c @@ -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 */ diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_F_4xn.c index 4332e9e5fa..bc1873f650 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_VF_4xn.c index 9add969f16..16f3094608 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_4xn.c index 5ed58c0985..7ee74d34ab 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJFSw_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_F_4xn.c index 76f8cef501..19213cc2f8 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_VF_4xn.c index 1f042488e1..2a11985b2f 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_4xn.c index 5280256c31..9e0233f841 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJPSw_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_F_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_F_4xn.c index c42cf2648a..cdb8bbfd4b 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_F_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_F_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_VF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_VF_4xn.c index 2a48e30a7a..0ea279ab33 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_VF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_VF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_VgrpF_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_VgrpF_4xn.c index 65f8e95606..21b243907e 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_VgrpF_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_ElecRF_VdwLJ_VgrpF_4xn.c @@ -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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.c b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.c index 5694d56ff7..06d93601fd 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.c +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.c @@ -65,14 +65,20 @@ /*! \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, diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.h b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.h index 864f3e3f01..80859119ef 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.h +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.h @@ -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; diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_inner.h b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_inner.h index b7e54decdf..758f8cd4f8 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_inner.h +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_inner.h @@ -39,13 +39,13 @@ */ -/* 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 @@ -228,7 +228,7 @@ 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 @@ -282,7 +282,7 @@ /* 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 @@ -720,8 +720,8 @@ #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 @@ -863,8 +863,9 @@ 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)); @@ -878,8 +879,9 @@ 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))); @@ -904,7 +906,8 @@ 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 */ @@ -956,6 +959,119 @@ } #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. @@ -978,17 +1094,6 @@ #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 diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_outer.h b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_outer.h index 43c045c8bd..7a636b5cd6 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_outer.h +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_outer.h @@ -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; @@ -131,11 +131,14 @@ 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; @@ -145,11 +148,10 @@ 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 @@ -169,7 +171,7 @@ 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; @@ -205,9 +207,10 @@ 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 @@ -313,6 +316,11 @@ 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); @@ -321,9 +329,7 @@ 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); @@ -343,14 +349,17 @@ 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); @@ -448,6 +457,11 @@ 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]; @@ -462,47 +476,70 @@ } } #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 @@ -564,6 +601,16 @@ 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 */ @@ -645,13 +692,13 @@ /* 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); diff --git a/src/gromacs/mdlib/sim_util.c b/src/gromacs/mdlib/sim_util.c index 1251f0c4e2..df0e1922c8 100644 --- a/src/gromacs/mdlib/sim_util.c +++ b/src/gromacs/mdlib/sim_util.c @@ -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 */ diff --git a/src/gromacs/mdlib/tables.c b/src/gromacs/mdlib/tables.c index 464f82ac3b..5c2391ea5c 100644 --- a/src/gromacs/mdlib/tables.c +++ b/src/gromacs/mdlib/tables.c @@ -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) diff --git a/src/programs/mdrun/pme_loadbal.c b/src/programs/mdrun/pme_loadbal.c index c900adf90c..4606f735cc 100644 --- a/src/programs/mdrun/pme_loadbal.c +++ b/src/programs/mdrun/pme_loadbal.c @@ -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 && diff --git a/src/programs/mdrun/runner.c b/src/programs/mdrun/runner.c index cf51f5c375..57792ae2a7 100644 --- a/src/programs/mdrun/runner.c +++ b/src/programs/mdrun/runner.c @@ -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; } -- 2.22.0