* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "gromacs/legacyheaders/nonbonded.h"
+
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include "thread_mpi/threads.h"
-#include "typedefs.h"
-#include "txtdump.h"
-#include "gromacs/utility/smalloc.h"
-#include "ns.h"
-#include "vec.h"
+#include "gromacs/gmxlib/nonbonded/nb_free_energy.h"
+#include "gromacs/gmxlib/nonbonded/nb_generic.h"
+#include "gromacs/gmxlib/nonbonded/nb_generic_adress.h"
+#include "gromacs/gmxlib/nonbonded/nb_generic_cg.h"
+#include "gromacs/gmxlib/nonbonded/nb_kernel.h"
+#include "gromacs/legacyheaders/force.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/nrnb.h"
+#include "gromacs/legacyheaders/ns.h"
+#include "gromacs/legacyheaders/txtdump.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/listed-forces/bonded.h"
#include "gromacs/math/utilities.h"
-#include "macros.h"
-#include "gromacs/utility/cstringutil.h"
-#include "force.h"
-#include "names.h"
-#include "main.h"
-#include "xvgr.h"
-#include "gmx_fatal.h"
-#include "physics.h"
-#include "force.h"
-#include "bondf.h"
-#include "nrnb.h"
-#include "nonbonded.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/ishift.h"
+#include "gromacs/pbcutil/mshift.h"
+#include "gromacs/pbcutil/pbc.h"
#include "gromacs/simd/simd.h"
-
-#include "nb_kernel.h"
-#include "nb_free_energy.h"
-#include "nb_generic.h"
-#include "nb_generic_cg.h"
-#include "nb_generic_adress.h"
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
/* Different default (c) and SIMD instructions interaction-specific kernels */
-#include "nb_kernel_c/nb_kernel_c.h"
+#include "gromacs/gmxlib/nonbonded/nb_kernel_c/nb_kernel_c.h"
#if (defined GMX_SIMD_X86_SSE2) && !(defined GMX_DOUBLE)
-# include "nb_kernel_sse2_single/nb_kernel_sse2_single.h"
+# include "gromacs/gmxlib/nonbonded/nb_kernel_sse2_single/nb_kernel_sse2_single.h"
#endif
#if (defined GMX_SIMD_X86_SSE4_1) && !(defined GMX_DOUBLE)
-# include "nb_kernel_sse4_1_single/nb_kernel_sse4_1_single.h"
+# include "gromacs/gmxlib/nonbonded/nb_kernel_sse4_1_single/nb_kernel_sse4_1_single.h"
#endif
#if (defined GMX_SIMD_X86_AVX_128_FMA) && !(defined GMX_DOUBLE)
-# include "nb_kernel_avx_128_fma_single/nb_kernel_avx_128_fma_single.h"
+# include "gromacs/gmxlib/nonbonded/nb_kernel_avx_128_fma_single/nb_kernel_avx_128_fma_single.h"
#endif
#if (defined GMX_SIMD_X86_AVX_256_OR_HIGHER) && !(defined GMX_DOUBLE)
-# include "nb_kernel_avx_256_single/nb_kernel_avx_256_single.h"
+# include "gromacs/gmxlib/nonbonded/nb_kernel_avx_256_single/nb_kernel_avx_256_single.h"
#endif
#if (defined GMX_SIMD_X86_SSE2 && defined GMX_DOUBLE)
-# include "nb_kernel_sse2_double/nb_kernel_sse2_double.h"
+# include "gromacs/gmxlib/nonbonded/nb_kernel_sse2_double/nb_kernel_sse2_double.h"
#endif
#if (defined GMX_SIMD_X86_SSE4_1 && defined GMX_DOUBLE)
-# include "nb_kernel_sse4_1_double/nb_kernel_sse4_1_double.h"
+# include "gromacs/gmxlib/nonbonded/nb_kernel_sse4_1_double/nb_kernel_sse4_1_double.h"
#endif
#if (defined GMX_SIMD_X86_AVX_128_FMA && defined GMX_DOUBLE)
-# include "nb_kernel_avx_128_fma_double/nb_kernel_avx_128_fma_double.h"
+# include "gromacs/gmxlib/nonbonded/nb_kernel_avx_128_fma_double/nb_kernel_avx_128_fma_double.h"
#endif
#if (defined GMX_SIMD_X86_AVX_256_OR_HIGHER && defined GMX_DOUBLE)
-# include "nb_kernel_avx_256_double/nb_kernel_avx_256_double.h"
+# include "gromacs/gmxlib/nonbonded/nb_kernel_avx_256_double/nb_kernel_avx_256_double.h"
#endif
#if (defined GMX_SIMD_SPARC64_HPC_ACE && defined GMX_DOUBLE)
-# include "nb_kernel_sparc64_hpc_ace_double/nb_kernel_sparc64_hpc_ace_double.h"
+# include "gromacs/gmxlib/nonbonded/nb_kernel_sparc64_hpc_ace_double/nb_kernel_sparc64_hpc_ace_double.h"
#endif
nlist = nblists->nlist_sr;
f = f_shortrange;
}
- else if (range == 1)
+ else
{
/* Long-range */
if (!(flags & GMX_NONBONDED_DO_LR))
if (r2 >= fr->tab14.r*fr->tab14.r)
{
+ /* This check isn't race free. But it doesn't matter because if a race occurs the only
+ * disadvantage is that the warning is printed twice */
if (warned_rlimit == FALSE)
{
nb_listed_warning_rlimit(x, ai, aj, global_atom_index, sqrt(r2), fr->tab14.r);