From de6fdc74b1e7e6b6f7f1f3dd576b50eb74c21e37 Mon Sep 17 00:00:00 2001 From: Teemu Murtola Date: Sat, 24 May 2014 06:41:51 +0300 Subject: [PATCH] Move types/ishift.h to pbcutil/ - Remove the include from typedefs.h, and add it to files that are using it. Change-Id: I752648c73ba767eff30c113c84aabd5c7d7494ac --- src/gromacs/gmxana/gmx_disre.c | 1 + src/gromacs/gmxlib/bondfree.c | 12 +++++++----- src/gromacs/gmxlib/disre.c | 1 + src/gromacs/gmxlib/nonbonded/nonbonded.c | 3 ++- src/gromacs/gmxlib/orires.c | 1 + src/gromacs/gmxpreprocess/insert-molecules.cpp | 16 ++++++++-------- src/gromacs/legacyheaders/typedefs.h | 1 - src/gromacs/legacyheaders/vsite.h | 2 ++ src/gromacs/mdlib/calcvir.c | 1 + src/gromacs/mdlib/csettle.c | 7 +++++-- src/gromacs/mdlib/domdec.c | 7 ++++--- src/gromacs/mdlib/domdec_con.c | 3 ++- src/gromacs/mdlib/force.c | 5 +++-- src/gromacs/mdlib/forcerec.c | 11 +++++++---- src/gromacs/mdlib/genborn.c | 3 ++- src/gromacs/mdlib/nbnxn_atomdata.c | 1 + src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu | 2 +- src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu | 1 + src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel.cuh | 1 + src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_common.c | 4 +++- src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_gpu_ref.c | 7 +++++-- src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.c | 7 +++++-- .../simd_2xnn/nbnxn_kernel_simd_2xnn_common.h | 1 + .../simd_4xn/nbnxn_kernel_simd_4xn_common.h | 1 + src/gromacs/mdlib/nbnxn_search.c | 6 +++--- src/gromacs/mdlib/ns.c | 7 ++++--- src/gromacs/mdlib/qmmm.c | 14 ++++++++------ src/gromacs/mdlib/rf_util.c | 3 ++- src/gromacs/mdlib/sim_util.c | 5 +++-- src/gromacs/mdlib/vsite.c | 7 ++++--- src/gromacs/pbcutil/CMakeLists.txt | 1 + src/gromacs/{legacyheaders/types => pbcutil}/ishift.h | 14 +++----------- src/gromacs/pbcutil/pbc.c | 1 + 33 files changed, 94 insertions(+), 63 deletions(-) rename src/gromacs/{legacyheaders/types => pbcutil}/ishift.h (93%) diff --git a/src/gromacs/gmxana/gmx_disre.c b/src/gromacs/gmxana/gmx_disre.c index 44cb518879..1b06a6aba4 100644 --- a/src/gromacs/gmxana/gmx_disre.c +++ b/src/gromacs/gmxana/gmx_disre.c @@ -67,6 +67,7 @@ #include "gromacs/fileio/xvgr.h" #include "gromacs/math/do_fit.h" #include "gromacs/math/vec.h" +#include "gromacs/pbcutil/ishift.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/pbcutil/rmpbc.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/gmxlib/bondfree.c b/src/gromacs/gmxlib/bondfree.c index 9cd603913d..d4834aa3ac 100644 --- a/src/gromacs/gmxlib/bondfree.c +++ b/src/gromacs/gmxlib/bondfree.c @@ -38,29 +38,31 @@ #include #endif -#include #include +#include + #include "gromacs/math/units.h" #include "gromacs/math/vec.h" #include "gromacs/math/utilities.h" #include "txtdump.h" #include "bondf.h" -#include "gromacs/utility/smalloc.h" -#include "gromacs/pbcutil/pbc.h" #include "ns.h" #include "macros.h" #include "names.h" -#include "gromacs/utility/fatalerror.h" -#include "gromacs/pbcutil/mshift.h" #include "disre.h" #include "orires.h" #include "force.h" #include "nonbonded.h" #include "restcbt.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/pbcutil/mshift.h" +#include "gromacs/pbcutil/pbc.h" #include "gromacs/simd/simd.h" #include "gromacs/simd/simd_math.h" #include "gromacs/simd/vector_operations.h" +#include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/smalloc.h" /* Find a better place for this? */ const int cmap_coeff_matrix[] = { diff --git a/src/gromacs/gmxlib/disre.c b/src/gromacs/gmxlib/disre.c index df70ce0fbb..695719b230 100644 --- a/src/gromacs/gmxlib/disre.c +++ b/src/gromacs/gmxlib/disre.c @@ -53,6 +53,7 @@ #include "mtop_util.h" #include "gromacs/math/vec.h" +#include "gromacs/pbcutil/ishift.h" #include "gromacs/pbcutil/mshift.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/gmxlib/nonbonded/nonbonded.c b/src/gromacs/gmxlib/nonbonded/nonbonded.c index 946c01cebf..eefd0e992a 100644 --- a/src/gromacs/gmxlib/nonbonded/nonbonded.c +++ b/src/gromacs/gmxlib/nonbonded/nonbonded.c @@ -49,7 +49,6 @@ #include "gromacs/math/vec.h" #include "gromacs/math/utilities.h" #include "macros.h" -#include "gromacs/utility/cstringutil.h" #include "force.h" #include "names.h" #include "force.h" @@ -58,8 +57,10 @@ #include "nonbonded.h" #include "gromacs/simd/simd.h" +#include "gromacs/pbcutil/ishift.h" #include "gromacs/pbcutil/mshift.h" #include "gromacs/pbcutil/pbc.h" +#include "gromacs/utility/cstringutil.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/smalloc.h" diff --git a/src/gromacs/gmxlib/orires.c b/src/gromacs/gmxlib/orires.c index e8b0b5c0d3..4e0c70f086 100644 --- a/src/gromacs/gmxlib/orires.c +++ b/src/gromacs/gmxlib/orires.c @@ -50,6 +50,7 @@ #include "gromacs/linearalgebra/nrjac.h" #include "gromacs/math/do_fit.h" #include "gromacs/math/vec.h" +#include "gromacs/pbcutil/ishift.h" #include "gromacs/pbcutil/mshift.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/smalloc.h" diff --git a/src/gromacs/gmxpreprocess/insert-molecules.cpp b/src/gromacs/gmxpreprocess/insert-molecules.cpp index d444521fd5..a69ad76497 100644 --- a/src/gromacs/gmxpreprocess/insert-molecules.cpp +++ b/src/gromacs/gmxpreprocess/insert-molecules.cpp @@ -40,26 +40,26 @@ #include #endif - #include "typedefs.h" -#include "gromacs/utility/smalloc.h" #include "gromacs/math/utilities.h" #include "gromacs/fileio/confio.h" #include "macros.h" -#include "gromacs/random/random.h" -#include "gromacs/utility/futil.h" #include "atomprop.h" #include "names.h" #include "gromacs/math/vec.h" -#include "gromacs/utility/fatalerror.h" -#include "gromacs/commandline/pargs.h" #include "gromacs/gmxlib/conformation-utilities.h" #include "addconf.h" #include "read-conformation.h" -#include "gromacs/pbcutil/pbc.h" -#include "gromacs/fileio/xvgr.h" +#include "gromacs/commandline/pargs.h" +#include "gromacs/fileio/xvgr.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/pbcutil/pbc.h" +#include "gromacs/random/random.h" #include "gromacs/utility/cstringutil.h" +#include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/futil.h" +#include "gromacs/utility/smalloc.h" static gmx_bool in_box(t_pbc *pbc, rvec x) { diff --git a/src/gromacs/legacyheaders/typedefs.h b/src/gromacs/legacyheaders/typedefs.h index b7566f13b2..3579427edb 100644 --- a/src/gromacs/legacyheaders/typedefs.h +++ b/src/gromacs/legacyheaders/typedefs.h @@ -52,7 +52,6 @@ #include "types/topology.h" #include "types/energy.h" #include "types/inputrec.h" -#include "types/ishift.h" #include "types/nrnb.h" #include "types/nblist.h" #include "types/nbnxn_pairlist.h" diff --git a/src/gromacs/legacyheaders/vsite.h b/src/gromacs/legacyheaders/vsite.h index a30ec2b734..f507f8bd04 100644 --- a/src/gromacs/legacyheaders/vsite.h +++ b/src/gromacs/legacyheaders/vsite.h @@ -39,7 +39,9 @@ #define _vsite_h #include + #include "typedefs.h" +#include "../pbcutil/ishift.h" #ifdef __cplusplus extern "C" { diff --git a/src/gromacs/mdlib/calcvir.c b/src/gromacs/mdlib/calcvir.c index ebbb8b2940..35254d587c 100644 --- a/src/gromacs/mdlib/calcvir.c +++ b/src/gromacs/mdlib/calcvir.c @@ -43,6 +43,7 @@ #include "macros.h" #include "gromacs/math/vectypes.h" +#include "gromacs/pbcutil/ishift.h" #include "gromacs/pbcutil/mshift.h" #include "gromacs/pbcutil/pbc.h" diff --git a/src/gromacs/mdlib/csettle.c b/src/gromacs/mdlib/csettle.c index 85011ff6d2..396cd93cfa 100644 --- a/src/gromacs/mdlib/csettle.c +++ b/src/gromacs/mdlib/csettle.c @@ -40,11 +40,14 @@ #include #include -#include "gromacs/math/vec.h" + #include "constr.h" + +#include "gromacs/math/vec.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/pbcutil/pbc.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/smalloc.h" -#include "gromacs/pbcutil/pbc.h" typedef struct { diff --git a/src/gromacs/mdlib/domdec.c b/src/gromacs/mdlib/domdec.c index 4cbaecda08..369257f9d1 100644 --- a/src/gromacs/mdlib/domdec.c +++ b/src/gromacs/mdlib/domdec.c @@ -45,14 +45,11 @@ #include #include "typedefs.h" -#include "gromacs/utility/smalloc.h" -#include "gromacs/utility/fatalerror.h" #include "network.h" #include "gromacs/math/vec.h" #include "domdec.h" #include "domdec_network.h" #include "nrnb.h" -#include "gromacs/pbcutil/pbc.h" #include "chargegroup.h" #include "constr.h" #include "mdatoms.h" @@ -74,13 +71,17 @@ #include "gromacs/fileio/gmxfio.h" #include "gromacs/fileio/pdbio.h" #include "gromacs/imd/imd.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/pbcutil/pbc.h" #include "gromacs/pulling/pull.h" #include "gromacs/pulling/pull_rotation.h" #include "gromacs/swap/swapcoords.h" #include "gromacs/timing/wallcycle.h" #include "gromacs/utility/basenetwork.h" +#include "gromacs/utility/fatalerror.h" #include "gromacs/utility/gmxmpi.h" #include "gromacs/utility/qsort_threadsafe.h" +#include "gromacs/utility/smalloc.h" #define DDRANK(dd, rank) (rank) #define DDMASTERRANK(dd) (dd->masterrank) diff --git a/src/gromacs/mdlib/domdec_con.c b/src/gromacs/mdlib/domdec_con.c index 288ea8de3f..78015c9088 100644 --- a/src/gromacs/mdlib/domdec_con.c +++ b/src/gromacs/mdlib/domdec_con.c @@ -38,7 +38,6 @@ #endif #include -#include "gromacs/utility/smalloc.h" #include "gromacs/math/vec.h" #include "constr.h" #include "types/commrec.h" @@ -50,7 +49,9 @@ #include "gmx_omp_nthreads.h" #include "macros.h" +#include "gromacs/pbcutil/ishift.h" #include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/smalloc.h" typedef struct { int nsend; diff --git a/src/gromacs/mdlib/force.c b/src/gromacs/mdlib/force.c index 48e0be45d4..61d6948449 100644 --- a/src/gromacs/mdlib/force.c +++ b/src/gromacs/mdlib/force.c @@ -48,11 +48,9 @@ #include "nonbonded.h" #include "names.h" #include "network.h" -#include "gromacs/pbcutil/pbc.h" #include "ns.h" #include "nrnb.h" #include "bondf.h" -#include "gromacs/pbcutil/mshift.h" #include "txtdump.h" #include "coulomb.h" #include "pme.h" @@ -63,6 +61,9 @@ #include "gromacs/legacyheaders/types/commrec.h" #include "gromacs/math/vec.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/pbcutil/mshift.h" +#include "gromacs/pbcutil/pbc.h" #include "gromacs/timing/wallcycle.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/smalloc.h" diff --git a/src/gromacs/mdlib/forcerec.c b/src/gromacs/mdlib/forcerec.c index b05d7a970e..c999e40914 100644 --- a/src/gromacs/mdlib/forcerec.c +++ b/src/gromacs/mdlib/forcerec.c @@ -38,24 +38,22 @@ #include #endif +#include #include #include -#include + #include "typedefs.h" #include "types/commrec.h" #include "gromacs/math/vec.h" #include "gromacs/math/utilities.h" #include "macros.h" -#include "gromacs/utility/smalloc.h" #include "macros.h" -#include "gromacs/utility/fatalerror.h" #include "gromacs/math/units.h" #include "force.h" #include "tables.h" #include "nonbonded.h" #include "names.h" #include "network.h" -#include "gromacs/pbcutil/pbc.h" #include "ns.h" #include "txtdump.h" #include "coulomb.h" @@ -73,6 +71,11 @@ #include "gmx_detect_hardware.h" #include "inputrec.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/pbcutil/pbc.h" +#include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/smalloc.h" + #include "types/nbnxn_cuda_types_ext.h" #include "gpu_utils.h" #include "nbnxn_cuda_data_mgmt.h" diff --git a/src/gromacs/mdlib/genborn.c b/src/gromacs/mdlib/genborn.c index a5eaa86a80..4aa032448b 100644 --- a/src/gromacs/mdlib/genborn.c +++ b/src/gromacs/mdlib/genborn.c @@ -51,12 +51,13 @@ #include "domdec.h" #include "network.h" #include "mtop_util.h" -#include "gromacs/pbcutil/pbc.h" #include "nrnb.h" #include "bondf.h" #include "gromacs/math/vec.h" +#include "gromacs/pbcutil/ishift.h" #include "gromacs/pbcutil/mshift.h" +#include "gromacs/pbcutil/pbc.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/gmxmpi.h" #include "gromacs/utility/smalloc.h" diff --git a/src/gromacs/mdlib/nbnxn_atomdata.c b/src/gromacs/mdlib/nbnxn_atomdata.c index dc632c5fbf..f80ab2ea63 100644 --- a/src/gromacs/mdlib/nbnxn_atomdata.c +++ b/src/gromacs/mdlib/nbnxn_atomdata.c @@ -51,6 +51,7 @@ #include "gmx_omp_nthreads.h" #include "thread_mpi/atomic.h" +#include "gromacs/pbcutil/ishift.h" #include "gromacs/utility/gmxomp.h" #include "gromacs/utility/smalloc.h" diff --git a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu index fe19707ddd..6bb1e3ad8d 100644 --- a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu +++ b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu @@ -48,7 +48,6 @@ #include "types/simple.h" #include "types/nbnxn_pairlist.h" #include "types/nb_verlet.h" -#include "types/ishift.h" #include "types/force_flags.h" #include "../nbnxn_consts.h" @@ -61,6 +60,7 @@ #include "nbnxn_cuda.h" #include "nbnxn_cuda_data_mgmt.h" +#include "gromacs/pbcutil/ishift.h" #include "gromacs/utility/cstringutil.h" #if defined TEXOBJ_SUPPORTED && __CUDA_ARCH__ >= 300 diff --git a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu index f2886e625f..119079675f 100644 --- a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu +++ b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu @@ -58,6 +58,7 @@ #include "pmalloc_cuda.h" #include "gpu_utils.h" +#include "gromacs/pbcutil/ishift.h" #include "gromacs/utility/common.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel.cuh b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel.cuh index 84634d5e7e..43ebddb034 100644 --- a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel.cuh +++ b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel.cuh @@ -34,6 +34,7 @@ */ #include "gromacs/math/utilities.h" +#include "gromacs/pbcutil/ishift.h" /* Note that floating-point constants in CUDA code should be suffixed * with f (e.g. 0.5f), to stop the compiler producing intermediate * code that is in double precision. diff --git a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_common.c b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_common.c index 7ce061ff21..43a1da735d 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_common.c +++ b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_common.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. @@ -36,6 +36,8 @@ #include #endif +#include "gromacs/pbcutil/ishift.h" + #include "nbnxn_kernel_common.h" static void diff --git a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_gpu_ref.c b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_gpu_ref.c index f0b7df70be..451c0f40ea 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_gpu_ref.c +++ b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_gpu_ref.c @@ -39,10 +39,13 @@ #include #include "types/simple.h" -#include "gromacs/math/utilities.h" -#include "gromacs/math/vec.h" #include "typedefs.h" #include "force.h" + +#include "gromacs/math/utilities.h" +#include "gromacs/math/vec.h" +#include "gromacs/pbcutil/ishift.h" + #include "nbnxn_kernel_gpu_ref.h" #include "../nbnxn_consts.h" #include "nbnxn_kernel_common.h" diff --git a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.c b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.c index 14c620c9b1..2fe3dc93f9 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.c +++ b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.c @@ -40,10 +40,13 @@ #include #include "typedefs.h" -#include "gromacs/math/vec.h" -#include "gromacs/utility/smalloc.h" #include "force.h" #include "gmx_omp_nthreads.h" + +#include "gromacs/math/vec.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/utility/smalloc.h" + #include "nbnxn_kernel_ref.h" #include "../nbnxn_consts.h" #include "nbnxn_kernel_common.h" diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_common.h b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_common.h index 01d8090765..89310bd7dc 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_common.h +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_common.h @@ -32,6 +32,7 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ +#include "gromacs/pbcutil/ishift.h" #include "gromacs/simd/simd.h" #include "gromacs/simd/simd_math.h" #include "gromacs/simd/vector_operations.h" diff --git a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_common.h b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_common.h index 4f9626f4ba..1bf915712b 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_common.h +++ b/src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_common.h @@ -32,6 +32,7 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ +#include "gromacs/pbcutil/ishift.h" #include "gromacs/simd/simd.h" #include "gromacs/simd/simd_math.h" #include "gromacs/simd/vector_operations.h" diff --git a/src/gromacs/mdlib/nbnxn_search.c b/src/gromacs/mdlib/nbnxn_search.c index 0da2f8c225..cc70013ba0 100644 --- a/src/gromacs/mdlib/nbnxn_search.c +++ b/src/gromacs/mdlib/nbnxn_search.c @@ -41,12 +41,10 @@ #include #include -#include "gromacs/utility/smalloc.h" #include "types/commrec.h" #include "macros.h" #include "gromacs/math/utilities.h" #include "gromacs/math/vec.h" -#include "gromacs/pbcutil/pbc.h" #include "nbnxn_consts.h" /* nbnxn_internal.h included gromacs/simd/macros.h */ #include "nbnxn_internal.h" @@ -59,7 +57,9 @@ #include "nrnb.h" #include "ns.h" -#include "gromacs/fileio/gmxfio.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/pbcutil/pbc.h" +#include "gromacs/utility/smalloc.h" #ifdef NBNXN_SEARCH_BB_SIMD4 /* Always use 4-wide SIMD for bounding box calculations */ diff --git a/src/gromacs/mdlib/ns.c b/src/gromacs/mdlib/ns.c index 22aa90c4bb..141989b0fc 100644 --- a/src/gromacs/mdlib/ns.c +++ b/src/gromacs/mdlib/ns.c @@ -42,7 +42,6 @@ #include #include -#include "gromacs/utility/smalloc.h" #include "macros.h" #include "gromacs/math/utilities.h" #include "gromacs/math/vec.h" @@ -52,9 +51,7 @@ #include "force.h" #include "nonbonded.h" #include "ns.h" -#include "gromacs/pbcutil/pbc.h" #include "names.h" -#include "gromacs/utility/fatalerror.h" #include "nrnb.h" #include "txtdump.h" #include "mtop_util.h" @@ -62,6 +59,10 @@ #include "domdec.h" #include "adress.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/pbcutil/pbc.h" +#include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/smalloc.h" /* * E X C L U S I O N H A N D L I N G diff --git a/src/gromacs/mdlib/qmmm.c b/src/gromacs/mdlib/qmmm.c index d19a715403..0421838385 100644 --- a/src/gromacs/mdlib/qmmm.c +++ b/src/gromacs/mdlib/qmmm.c @@ -39,10 +39,13 @@ #endif #include +#include +#include +#include + #include "typedefs.h" #include "types/commrec.h" #include "macros.h" -#include "gromacs/utility/smalloc.h" #include "gromacs/math/units.h" #include "macros.h" #include "gromacs/math/vec.h" @@ -50,19 +53,18 @@ #include "gromacs/fileio/confio.h" #include "names.h" #include "network.h" -#include "gromacs/pbcutil/pbc.h" #include "ns.h" #include "nrnb.h" #include "bondf.h" #include "txtdump.h" #include "qmmm.h" -#include -#include -#include "gromacs/utility/fatalerror.h" #include "typedefs.h" -#include #include "mtop_util.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/pbcutil/pbc.h" +#include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/smalloc.h" /* declarations of the interfaces to the QM packages. The _SH indicate * the QM interfaces can be used for Surface Hopping simulations diff --git a/src/gromacs/mdlib/rf_util.c b/src/gromacs/mdlib/rf_util.c index 3e7037febc..6b92694a15 100644 --- a/src/gromacs/mdlib/rf_util.c +++ b/src/gromacs/mdlib/rf_util.c @@ -42,9 +42,10 @@ #include "force.h" #include "names.h" #include "copyrite.h" -#include "gromacs/pbcutil/pbc.h" +#include "gromacs/pbcutil/ishift.h" #include "gromacs/pbcutil/mshift.h" +#include "gromacs/pbcutil/pbc.h" #include "gromacs/math/units.h" #include "gromacs/math/vec.h" diff --git a/src/gromacs/mdlib/sim_util.c b/src/gromacs/mdlib/sim_util.c index e2e3b08302..9fa881613d 100644 --- a/src/gromacs/mdlib/sim_util.c +++ b/src/gromacs/mdlib/sim_util.c @@ -48,14 +48,12 @@ #include "typedefs.h" #include "gromacs/utility/cstringutil.h" -#include "gromacs/utility/smalloc.h" #include "names.h" #include "txtdump.h" #include "gromacs/pbcutil/pbc.h" #include "chargegroup.h" #include "gromacs/math/vec.h" #include "nrnb.h" -#include "gromacs/pbcutil/mshift.h" #include "mdrun.h" #include "sim_util.h" #include "update.h" @@ -83,9 +81,12 @@ #include "../gmxlib/nonbonded/nb_free_energy.h" #include "gromacs/legacyheaders/types/commrec.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/pbcutil/mshift.h" #include "gromacs/timing/wallcycle.h" #include "gromacs/timing/walltime_accounting.h" #include "gromacs/utility/gmxmpi.h" +#include "gromacs/utility/smalloc.h" #include "gromacs/essentialdynamics/edsam.h" #include "gromacs/pulling/pull.h" #include "gromacs/pulling/pull_rotation.h" diff --git a/src/gromacs/mdlib/vsite.c b/src/gromacs/mdlib/vsite.c index bf3d2e0ec4..5f66b0c772 100644 --- a/src/gromacs/mdlib/vsite.c +++ b/src/gromacs/mdlib/vsite.c @@ -44,17 +44,18 @@ #include "types/commrec.h" #include "vsite.h" #include "macros.h" -#include "gromacs/utility/smalloc.h" #include "nrnb.h" #include "gromacs/math/vec.h" #include "network.h" -#include "gromacs/pbcutil/mshift.h" -#include "gromacs/pbcutil/pbc.h" #include "domdec.h" #include "mtop_util.h" #include "gmx_omp_nthreads.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/pbcutil/mshift.h" +#include "gromacs/pbcutil/pbc.h" #include "gromacs/utility/gmxomp.h" +#include "gromacs/utility/smalloc.h" /* Routines to send/recieve coordinates and force * of constructing atoms. diff --git a/src/gromacs/pbcutil/CMakeLists.txt b/src/gromacs/pbcutil/CMakeLists.txt index 1df0b1064c..0366753a1b 100644 --- a/src/gromacs/pbcutil/CMakeLists.txt +++ b/src/gromacs/pbcutil/CMakeLists.txt @@ -36,6 +36,7 @@ file(GLOB PBCUTIL_SOURCES *.cpp *.c) set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${PBCUTIL_SOURCES} PARENT_SCOPE) set(PBCUTIL_PUBLIC_HEADERS + ishift.h pbc.h rmpbc.h) diff --git a/src/gromacs/legacyheaders/types/ishift.h b/src/gromacs/pbcutil/ishift.h similarity index 93% rename from src/gromacs/legacyheaders/types/ishift.h rename to src/gromacs/pbcutil/ishift.h index 4c44dfe92e..464f3c0139 100644 --- a/src/gromacs/legacyheaders/types/ishift.h +++ b/src/gromacs/pbcutil/ishift.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2010, by the GROMACS development team, led by + * Copyright (c) 2010,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. @@ -34,13 +34,8 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ - - -/* not really neccesary, right now: */ -#ifdef __cplusplus -extern "C" { -#endif - +#ifndef GMX_PBCUTIL_ISHIFT_H +#define GMX_PBCUTIL_ISHIFT_H #define D_BOX_Z 1 #define D_BOX_Y 1 @@ -58,7 +53,4 @@ extern "C" { #define IS2Y(iv) ((((iv) / N_BOX_X) % N_BOX_Y) - D_BOX_Y) #define IS2Z(iv) ((iv) / (N_BOX_X*N_BOX_Y) - D_BOX_Z) - -#ifdef __cplusplus -} #endif diff --git a/src/gromacs/pbcutil/pbc.c b/src/gromacs/pbcutil/pbc.c index 68381ae102..d2ebf4f8f8 100644 --- a/src/gromacs/pbcutil/pbc.c +++ b/src/gromacs/pbcutil/pbc.c @@ -52,6 +52,7 @@ #include "gromacs/math/utilities.h" #include "gromacs/math/vec.h" +#include "gromacs/pbcutil/ishift.h" #include "gromacs/pbcutil/mshift.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/smalloc.h" -- 2.11.4.GIT