Move code to what will become the ewald module
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 2 Oct 2014 13:30:38 +0000 (15:30 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Fri, 17 Oct 2014 15:06:39 +0000 (17:06 +0200)
Moved PME implementation, PME load-balancing code and basic Ewald code
into new module.  PME is the major component, but they share a little
bit of infrastructure and might one day pass the same tests (or test
each other) so there's some value to being together.

Moved legacyheaders/pme.h to module, split it into pme.h and
pme-internal.h, and moved the definition of splinevec into the only
source file that used it. pme-internal.h is intended as a temporary
measure - a place to put details that are internal to the module -
while developing some internal structure with more normal
module/file.{cpp,h} layout.

Moved legacyheaders/coulomb.h to the new module and named it
ewald/ewald-util.h, since it pretty much declares functions defined in
the former ewald-util.c (now ewald/ewald-util.c). Both files will
disappear in future clean up, though.

The internal structure of this module is still messy, but some
clean-up will follow. Then C++ conversion and Doxygen.

Renamed files to use '-' rather than '_', because I like using fewer
keystrokes.

Removed a useless extern on calc_ewaldcoeff_lj() declaration.

Introduced new cyclic dependency (and doc-check suppression) on mdlib,
because the PME-PP load-balancing needs to let mdlib/nbnxn_cuda know
about the changed parameters. It also uses some functions that are
currently declared in pme-internal.h, so there's no single-step
solution, even if nxn was already a module. In the long term, a PME
load-balancing module that talks to the ewald and nxn modules through
their library interfaces makes good sense, but we can't do that right
now.

Change-Id: I6ddd5579b6e52812d8fb110b4950a207b159ea4a

26 files changed:
docs/doxygen/cycle-suppressions.txt
src/gromacs/CMakeLists.txt
src/gromacs/ewald/CMakeLists.txt [new file with mode: 0644]
src/gromacs/ewald/ewald-util.c [moved from src/gromacs/gmxlib/ewald_util.c with 99% similarity]
src/gromacs/ewald/ewald-util.h [moved from src/gromacs/legacyheaders/coulomb.h with 97% similarity]
src/gromacs/ewald/ewald.c [moved from src/gromacs/mdlib/ewald.c with 99% similarity]
src/gromacs/ewald/pme-internal.h [new file with mode: 0644]
src/gromacs/ewald/pme-load-balancing.c [moved from src/programs/mdrun/pme_loadbal.c with 99% similarity]
src/gromacs/ewald/pme-load-balancing.h [moved from src/programs/mdrun/pme_loadbal.h with 98% similarity]
src/gromacs/ewald/pme-pp.c [moved from src/gromacs/mdlib/pme_pp.c with 99% similarity]
src/gromacs/ewald/pme-simd4.h [moved from src/gromacs/mdlib/pme_simd4.h with 100% similarity]
src/gromacs/ewald/pme.c [moved from src/gromacs/mdlib/pme.c with 99% similarity]
src/gromacs/ewald/pme.h [moved from src/gromacs/legacyheaders/pme.h with 65% similarity]
src/gromacs/gmxana/gmx_clustsize.c
src/gromacs/gmxana/gmx_pme_error.cpp
src/gromacs/gmxana/gmx_rdf.c
src/gromacs/gmxpreprocess/calc_verletbuf.c
src/gromacs/mdlib/domdec.cpp
src/gromacs/mdlib/expanded.c
src/gromacs/mdlib/force.cpp
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/minimize.c
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdlib/tpi.c
src/programs/mdrun/md.cpp
src/programs/mdrun/runner.cpp

index b87e5469ca3b3bd6fa646e5e23d9d5aec3eb0b4a..6c5a216da423ba8265c4973febaca1422c9ea9b9 100644 (file)
@@ -1,5 +1,6 @@
 mdlib -> essentialdynamics
 mdlib -> imd
+mdlib -> ewald
 mdlib -> pulling
 mdlib -> swap
 legacyheaders -> swap
index bd597d68d82d179e491cf38cb38647490dbefc55..fc0d89da60f7efc791bd4852ae18b1f402b8d57d 100644 (file)
@@ -94,6 +94,7 @@ add_subdirectory(mdlib)
 add_subdirectory(gmxpreprocess)
 add_subdirectory(listed-forces)
 add_subdirectory(commandline)
+add_subdirectory(ewald)
 add_subdirectory(fft)
 add_subdirectory(linearalgebra)
 add_subdirectory(math)
diff --git a/src/gromacs/ewald/CMakeLists.txt b/src/gromacs/ewald/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b6c515e
--- /dev/null
@@ -0,0 +1,40 @@
+#
+# This file is part of the GROMACS molecular simulation package.
+#
+# Copyright (c) 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.
+
+file(GLOB EWALD_SOURCES *.c)
+set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${EWALD_SOURCES} PARENT_SCOPE)
+
+if (BUILD_TESTING)
+#    add_subdirectory(tests)
+endif()
similarity index 99%
rename from src/gromacs/gmxlib/ewald_util.c
rename to src/gromacs/ewald/ewald-util.c
index d3bb07b6e3fe65539870db6af2e5a01bdebd333c..83445f4642278826ffef19c7acb93c8c6aa427df 100644 (file)
  */
 #include "gmxpre.h"
 
+#include "ewald-util.h"
+
 #include <math.h>
 #include <stdio.h>
 
-#include "gromacs/legacyheaders/coulomb.h"
 #include "gromacs/legacyheaders/macros.h"
 #include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/txtdump.h"
similarity index 97%
rename from src/gromacs/legacyheaders/coulomb.h
rename to src/gromacs/ewald/ewald-util.h
index 0b1f63040832406eb3cf376ba3c172feb61e410f..e37709136368dfa9e31a24e4db7165e0379f4f3a 100644 (file)
@@ -35,8 +35,8 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _coulomb_h
-#define _coulomb_h
+#ifndef GMX_EWALD_EWALD_UTIL_H
+#define GMX_EWALD_EWALD_UTIL_H
 
 #include <stdio.h>
 
@@ -57,7 +57,7 @@ real
 calc_ewaldcoeff_q(real rc, real dtol);
 /* Determines the Ewald parameter, both for Ewald and PME */
 
-extern real calc_ewaldcoeff_lj(real rc, real dtol);
+real calc_ewaldcoeff_lj(real rc, real dtol);
 /* Determines the Ewald parameters for LJ-PME */
 
 real
similarity index 99%
rename from src/gromacs/mdlib/ewald.c
rename to src/gromacs/ewald/ewald.c
index 97d0962f3993610753dd47a181115aae8ba6be44..dee78cbf74ebc2278491034b0438ff6ba26dd94d 100644 (file)
@@ -40,7 +40,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "gromacs/legacyheaders/coulomb.h"
+#include "gromacs/ewald/ewald-util.h"
 #include "gromacs/legacyheaders/macros.h"
 #include "gromacs/legacyheaders/typedefs.h"
 #include "gromacs/legacyheaders/types/commrec.h"
diff --git a/src/gromacs/ewald/pme-internal.h b/src/gromacs/ewald/pme-internal.h
new file mode 100644 (file)
index 0000000..b6d2bdd
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * 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.
+ *
+ * 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.
+ */
+
+/* TODO This file is a temporary holding area for stuff local to the
+ * PME code, before it acquires some more normal ewald/file.c and
+ * ewald/file.h structure.  In future clean up, get rid of this file,
+ * to build more normal. */
+
+#ifndef GMX_EWALD_PME_INTERNAL_H
+#define GMX_EWALD_PME_INTERNAL_H
+
+#include <stdio.h>
+
+#include "gromacs/legacyheaders/network.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/math/gmxcomplex.h"
+#include "gromacs/timing/wallcycle.h"
+#include "gromacs/timing/walltime_accounting.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int gmx_pme_reinit(gmx_pme_t *         pmedata,
+                   t_commrec *         cr,
+                   gmx_pme_t           pme_src,
+                   const t_inputrec *  ir,
+                   ivec                grid_size);
+/* As gmx_pme_init, but takes most settings, except the grid, from pme_src */
+
+/* The following three routines are for PME/PP node splitting in pme_pp.c */
+
+/* Abstract type for PME <-> PP communication */
+typedef struct gmx_pme_pp *gmx_pme_pp_t;
+
+void gmx_pme_check_restrictions(int pme_order,
+                                int nkx, int nky, int nkz,
+                                int nnodes_major,
+                                int nnodes_minor,
+                                gmx_bool bUseThreads,
+                                gmx_bool bFatal,
+                                gmx_bool *bValidSettings);
+/* Check restrictions on pme_order and the PME grid nkx,nky,nkz.
+ * With bFatal=TRUE, a fatal error is generated on violation,
+ * bValidSettings=NULL can be passed.
+ * With bFatal=FALSE, *bValidSettings reports the validity of the settings.
+ * bUseThreads tells if any MPI rank doing PME uses more than 1 threads.
+ * If at calling you bUseThreads is unknown, pass TRUE for conservative
+ * checking.
+ */
+
+gmx_pme_pp_t gmx_pme_pp_init(t_commrec *cr);
+/* Initialize the PME-only side of the PME <-> PP communication */
+
+void gmx_pme_send_switchgrid(t_commrec *cr, ivec grid_size, real ewaldcoeff_q, real ewaldcoeff_lj);
+/* Tell our PME-only node to switch to a new grid size */
+
+/* Return values for gmx_pme_recv_q_x */
+enum {
+    pmerecvqxX,            /* calculate PME mesh interactions for new x    */
+    pmerecvqxFINISH,       /* the simulation should finish, we should quit */
+    pmerecvqxSWITCHGRID,   /* change the PME grid size                     */
+    pmerecvqxRESETCOUNTERS /* reset the cycle and flop counters            */
+};
+
+int gmx_pme_recv_coeffs_coords(gmx_pme_pp_t pme_pp,
+                               int *natoms,
+                               real **chargeA, real **chargeB,
+                               real **sqrt_c6A, real **sqrt_c6B,
+                               real **sigmaA, real **sigmaB,
+                               matrix box, rvec **x, rvec **f,
+                               int *maxshift_x, int *maxshift_y,
+                               gmx_bool *bFreeEnergy_q, gmx_bool *bFreeEnergy_lj,
+                               real *lambda_q, real *lambda_lj,
+                               gmx_bool *bEnerVir, int *pme_flags,
+                               gmx_int64_t *step,
+                               ivec grid_size, real *ewaldcoeff_q, real *ewaldcoeff_lj);
+;
+/* With return value:
+ * pmerecvqxX:             all parameters set, chargeA and chargeB can be NULL
+ * pmerecvqxFINISH:        no parameters set
+ * pmerecvqxSWITCHGRID:    only grid_size and *ewaldcoeff are set
+ * pmerecvqxRESETCOUNTERS: *step is set
+ */
+
+void gmx_pme_send_force_vir_ener(gmx_pme_pp_t pme_pp,
+                                 rvec *f, matrix vir_q, real energy_q,
+                                 matrix vir_lj, real energy_lj,
+                                 real dvdlambda_q, real dvdlambda_lj,
+                                 float cycles);
+/* Send the PME mesh force, virial and energy to the PP-only nodes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
similarity index 99%
rename from src/programs/mdrun/pme_loadbal.c
rename to src/gromacs/ewald/pme-load-balancing.c
index dd2cd1a2e9f049b01ff6de90078d249f925c0cf7..1b25c2d4af6218a3fefca5823027c75cd457f930 100644 (file)
  */
 #include "gmxpre.h"
 
-#include "pme_loadbal.h"
+#include "pme-load-balancing.h"
 
 #include "config.h"
 
+#include "gromacs/ewald/pme-internal.h"
 #include "gromacs/legacyheaders/calcgrid.h"
 #include "gromacs/legacyheaders/domdec.h"
 #include "gromacs/legacyheaders/force.h"
 #include "gromacs/legacyheaders/macros.h"
 #include "gromacs/legacyheaders/md_logging.h"
 #include "gromacs/legacyheaders/network.h"
-#include "gromacs/legacyheaders/pme.h"
 #include "gromacs/legacyheaders/sim_util.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/vec.h"
similarity index 98%
rename from src/programs/mdrun/pme_loadbal.h
rename to src/gromacs/ewald/pme-load-balancing.h
index db68beb1abd6bdbac04907698d6362a3e33525c4..423b32b1c0886a05d57f9d1500bdf99830a9a286 100644 (file)
@@ -33,8 +33,8 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _pme_loadbal_h
-#define _pme_loadbal_h
+#ifndef GMX_EWALD_PME_LOAD_BALANCING_H
+#define GMX_EWALD_PME_LOAD_BALANCING_H
 
 #ifdef __cplusplus
 extern "C" {
@@ -90,4 +90,4 @@ void pme_loadbal_done(pme_load_balancing_t pme_lb,
 }
 #endif
 
-#endif /* _pme_loadbal_h */
+#endif
similarity index 99%
rename from src/gromacs/mdlib/pme_pp.c
rename to src/gromacs/ewald/pme-pp.c
index f00d242ae766acdc1b170c774f329b0046818485..af0f6830dbabee23d5ae9b9ca6a0119e793beec2 100644 (file)
 #include <stdio.h>
 #include <string.h>
 
+#include "gromacs/ewald/pme-internal.h"
+#include "gromacs/ewald/pme.h"
 #include "gromacs/legacyheaders/domdec.h"
 #include "gromacs/legacyheaders/network.h"
-#include "gromacs/legacyheaders/pme.h"
 #include "gromacs/legacyheaders/sighandler.h"
 #include "gromacs/legacyheaders/typedefs.h"
 #include "gromacs/legacyheaders/types/commrec.h"
similarity index 99%
rename from src/gromacs/mdlib/pme.c
rename to src/gromacs/ewald/pme.c
index 67a12ab58db8d0a8f5b4dc4a2f53f75214da1568..76344ea75eb2e0a91ee4e31d78ee502834e7a06e 100644 (file)
@@ -59,7 +59,7 @@
 
 #include "gmxpre.h"
 
-#include "gromacs/legacyheaders/pme.h"
+#include "pme.h"
 
 #include "config.h"
 
@@ -69,9 +69,9 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "gromacs/ewald/pme-internal.h"
 #include "gromacs/fft/parallel_3dfft.h"
 #include "gromacs/fileio/pdbio.h"
-#include "gromacs/legacyheaders/coulomb.h"
 #include "gromacs/legacyheaders/macros.h"
 #include "gromacs/legacyheaders/network.h"
 #include "gromacs/legacyheaders/nrnb.h"
@@ -168,6 +168,8 @@ typedef struct {
     int recv_size;   /* Receive buffer width, used with OpenMP */
 } pme_grid_comm_t;
 
+typedef real *splinevec[DIM];
+
 typedef struct {
 #ifdef GMX_MPI
     MPI_Comm         mpi_comm;
@@ -1436,7 +1438,7 @@ static void spread_coefficients_bsplines_thread(pmegrid_t                    *pm
 #define PME_SPREAD_SIMD4_ALIGNED
 #define PME_ORDER 4
 #endif
-#include "gromacs/mdlib/pme_simd4.h"
+#include "gromacs/ewald/pme-simd4.h"
 #else
                     DO_BSPLINE(4);
 #endif
@@ -1445,7 +1447,7 @@ static void spread_coefficients_bsplines_thread(pmegrid_t                    *pm
 #ifdef PME_SIMD4_SPREAD_GATHER
 #define PME_SPREAD_SIMD4_ALIGNED
 #define PME_ORDER 5
-#include "gromacs/mdlib/pme_simd4.h"
+#include "gromacs/ewald/pme-simd4.h"
 #else
                     DO_BSPLINE(5);
 #endif
@@ -2599,7 +2601,7 @@ static void gather_f_bsplines(gmx_pme_t pme, real *grid,
 #define PME_GATHER_F_SIMD4_ALIGNED
 #define PME_ORDER 4
 #endif
-#include "gromacs/mdlib/pme_simd4.h"
+#include "gromacs/ewald/pme-simd4.h"
 #else
                     DO_FSPLINE(4);
 #endif
@@ -2608,7 +2610,7 @@ static void gather_f_bsplines(gmx_pme_t pme, real *grid,
 #ifdef PME_SIMD4_SPREAD_GATHER
 #define PME_GATHER_F_SIMD4_ALIGNED
 #define PME_ORDER 5
-#include "gromacs/mdlib/pme_simd4.h"
+#include "gromacs/ewald/pme-simd4.h"
 #else
                     DO_FSPLINE(5);
 #endif
similarity index 65%
rename from src/gromacs/legacyheaders/pme.h
rename to src/gromacs/ewald/pme.h
index f71f6f51b2dd0df4a109c31146cad028484994f3..f22341e10205e2a4cd5112608169e970129699f3 100644 (file)
@@ -35,8 +35,8 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _pme_h
-#define _pme_h
+#ifndef GMX_EWALD_PME_H
+#define GMX_EWALD_PME_H
 
 #include <stdio.h>
 
@@ -50,8 +50,6 @@
 extern "C" {
 #endif
 
-typedef real *splinevec[DIM];
-
 enum {
     GMX_SUM_GRID_FORWARD, GMX_SUM_GRID_BACKWARD
 };
@@ -65,13 +63,6 @@ int gmx_pme_init(gmx_pme_t *pmedata, t_commrec *cr,
  * Return value 0 indicates all well, non zero is an error code.
  */
 
-int gmx_pme_reinit(gmx_pme_t *         pmedata,
-                   t_commrec *         cr,
-                   gmx_pme_t           pme_src,
-                   const t_inputrec *  ir,
-                   ivec                grid_size);
-/* As gmx_pme_init, but takes most settings, except the grid, from pme_src */
-
 int gmx_pme_destroy(FILE *log, gmx_pme_t *pmedata);
 /* Destroy the pme data structures resepectively.
  * Return value 0 indicates all well, non zero is an error code.
@@ -129,30 +120,6 @@ void gmx_pme_calc_energy(gmx_pme_t pme, int n, rvec *x, real *q, real *V);
  * Currently does not work in parallel or with free energy.
  */
 
-/* The following three routines are for PME/PP node splitting in pme_pp.c */
-
-/* Abstract type for PME <-> PP communication */
-typedef struct gmx_pme_pp *gmx_pme_pp_t;
-
-void gmx_pme_check_restrictions(int pme_order,
-                                int nkx, int nky, int nkz,
-                                int nnodes_major,
-                                int nnodes_minor,
-                                gmx_bool bUseThreads,
-                                gmx_bool bFatal,
-                                gmx_bool *bValidSettings);
-/* Check restrictions on pme_order and the PME grid nkx,nky,nkz.
- * With bFatal=TRUE, a fatal error is generated on violation,
- * bValidSettings=NULL can be passed.
- * With bFatal=FALSE, *bValidSettings reports the validity of the settings.
- * bUseThreads tells if any MPI rank doing PME uses more than 1 threads.
- * If at calling you bUseThreads is unknown, pass TRUE for conservative
- * checking.
- */
-
-gmx_pme_pp_t gmx_pme_pp_init(t_commrec *cr);
-/* Initialize the PME-only side of the PME <-> PP communication */
-
 void gmx_pme_send_parameters(t_commrec *cr,
                              const interaction_const_t *ic,
                              gmx_bool bFreeEnergy_q, gmx_bool bFreeEnergy_lj,
@@ -172,9 +139,6 @@ void gmx_pme_send_coordinates(t_commrec *cr, matrix box, rvec *x,
 void gmx_pme_send_finish(t_commrec *cr);
 /* Tell our PME-only node to finish */
 
-void gmx_pme_send_switchgrid(t_commrec *cr, ivec grid_size, real ewaldcoeff_q, real ewaldcoeff_lj);
-/* Tell our PME-only node to switch to a new grid size */
-
 void gmx_pme_send_resetcounters(t_commrec *cr, gmx_int64_t step);
 /* Tell our PME-only node to reset all cycle and flop counters */
 
@@ -185,41 +149,6 @@ void gmx_pme_receive_f(t_commrec *cr,
                        float *pme_cycles);
 /* PP nodes receive the long range forces from the PME nodes */
 
-/* Return values for gmx_pme_recv_q_x */
-enum {
-    pmerecvqxX,            /* calculate PME mesh interactions for new x    */
-    pmerecvqxFINISH,       /* the simulation should finish, we should quit */
-    pmerecvqxSWITCHGRID,   /* change the PME grid size                     */
-    pmerecvqxRESETCOUNTERS /* reset the cycle and flop counters            */
-};
-
-int gmx_pme_recv_coeffs_coords(gmx_pme_pp_t pme_pp,
-                               int *natoms,
-                               real **chargeA, real **chargeB,
-                               real **sqrt_c6A, real **sqrt_c6B,
-                               real **sigmaA, real **sigmaB,
-                               matrix box, rvec **x, rvec **f,
-                               int *maxshift_x, int *maxshift_y,
-                               gmx_bool *bFreeEnergy_q, gmx_bool *bFreeEnergy_lj,
-                               real *lambda_q, real *lambda_lj,
-                               gmx_bool *bEnerVir, int *pme_flags,
-                               gmx_int64_t *step,
-                               ivec grid_size, real *ewaldcoeff_q, real *ewaldcoeff_lj);
-;
-/* With return value:
- * pmerecvqxX:             all parameters set, chargeA and chargeB can be NULL
- * pmerecvqxFINISH:        no parameters set
- * pmerecvqxSWITCHGRID:    only grid_size and *ewaldcoeff are set
- * pmerecvqxRESETCOUNTERS: *step is set
- */
-
-void gmx_pme_send_force_vir_ener(gmx_pme_pp_t pme_pp,
-                                 rvec *f, matrix vir_q, real energy_q,
-                                 matrix vir_lj, real energy_lj,
-                                 real dvdlambda_q, real dvdlambda_lj,
-                                 float cycles);
-/* Send the PME mesh force, virial and energy to the PP-only nodes */
-
 #ifdef __cplusplus
 }
 #endif
index 2f9d219d7d7a489a0e0bcbcc73b1958d0b0ea806..0a2351a110d876a1abeec03f176c9ce992abd6d9 100644 (file)
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/gmxana/gstat.h"
-#include "gromacs/legacyheaders/coulomb.h"
 #include "gromacs/legacyheaders/macros.h"
 #include "gromacs/legacyheaders/nrnb.h"
-#include "gromacs/legacyheaders/pme.h"
 #include "gromacs/legacyheaders/typedefs.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
index 66b8e2876244f080d58fac8f92638053babe8a63..70ae7bf1d4513708d27b8e090a8ee044fee2d018 100644 (file)
 #include <algorithm>
 
 #include "gromacs/commandline/pargs.h"
+#include "gromacs/ewald/ewald-util.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/legacyheaders/calcgrid.h"
 #include "gromacs/legacyheaders/checkpoint.h"
 #include "gromacs/legacyheaders/copyrite.h"
-#include "gromacs/legacyheaders/coulomb.h"
 #include "gromacs/legacyheaders/macros.h"
 #include "gromacs/legacyheaders/main.h"
 #include "gromacs/legacyheaders/mdatoms.h"
index 4dda9da2ff3e07afa08b545938b9db4e928664ef..067483bf44feee098cebc7eda540ce12cc651924 100644 (file)
@@ -46,7 +46,6 @@
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/gmxana/gstat.h"
-#include "gromacs/legacyheaders/coulomb.h"
 #include "gromacs/legacyheaders/macros.h"
 #include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/nrnb.h"
index dbdcab9074edab4ed3344c9c91c022a5b266756e..676c8c09d183edf975fd49d496e78ab9392bfeab 100644 (file)
@@ -42,7 +42,7 @@
 
 #include <sys/types.h>
 
-#include "gromacs/legacyheaders/coulomb.h"
+#include "gromacs/ewald/ewald-util.h"
 #include "gromacs/legacyheaders/macros.h"
 #include "gromacs/legacyheaders/typedefs.h"
 #include "gromacs/math/units.h"
index 06f2602916cdedd2b27728612b90bd533f09eadb..e3a05a5dd521200dda3cb2d3356cefaac81baf01 100644 (file)
@@ -48,6 +48,7 @@
 
 #include <algorithm>
 
+#include "gromacs/ewald/pme.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/pdbio.h"
 #include "gromacs/imd/imd.h"
@@ -66,7 +67,6 @@
 #include "gromacs/legacyheaders/network.h"
 #include "gromacs/legacyheaders/nrnb.h"
 #include "gromacs/legacyheaders/nsgrid.h"
-#include "gromacs/legacyheaders/pme.h"
 #include "gromacs/legacyheaders/shellfc.h"
 #include "gromacs/legacyheaders/typedefs.h"
 #include "gromacs/listed-forces/bonded.h"
index 4996f51371992bc647458d34e5183dcb3405804c..a559996caf79b223e33607448dea1efa03e414dc 100644 (file)
@@ -54,7 +54,6 @@
 #include "gromacs/legacyheaders/network.h"
 #include "gromacs/legacyheaders/nrnb.h"
 #include "gromacs/legacyheaders/orires.h"
-#include "gromacs/legacyheaders/pme.h"
 #include "gromacs/legacyheaders/txtdump.h"
 #include "gromacs/legacyheaders/typedefs.h"
 #include "gromacs/legacyheaders/update.h"
index 4490ad3143377ebdb31e55728fbb524da9545157..87b47645091a11ca38f2b1954f23a3e7878b8fde 100644 (file)
@@ -44,7 +44,8 @@
 #include <math.h>
 #include <string.h>
 
-#include "gromacs/legacyheaders/coulomb.h"
+#include "gromacs/ewald/ewald-util.h"
+#include "gromacs/ewald/pme.h"
 #include "gromacs/legacyheaders/domdec.h"
 #include "gromacs/legacyheaders/gmx_omp_nthreads.h"
 #include "gromacs/legacyheaders/macros.h"
@@ -54,7 +55,6 @@
 #include "gromacs/legacyheaders/nonbonded.h"
 #include "gromacs/legacyheaders/nrnb.h"
 #include "gromacs/legacyheaders/ns.h"
-#include "gromacs/legacyheaders/pme.h"
 #include "gromacs/legacyheaders/qmmm.h"
 #include "gromacs/legacyheaders/txtdump.h"
 #include "gromacs/legacyheaders/typedefs.h"
index 4057e89a90d84a6aefb41225bddc09da9dc73ff7..879491e7c0c12717d82e353d53642b44586ac979 100644 (file)
@@ -42,8 +42,8 @@
 #include <math.h>
 #include <string.h>
 
+#include "gromacs/ewald/ewald-util.h"
 #include "gromacs/legacyheaders/copyrite.h"
-#include "gromacs/legacyheaders/coulomb.h"
 #include "gromacs/legacyheaders/domdec.h"
 #include "gromacs/legacyheaders/force.h"
 #include "gromacs/legacyheaders/gmx_detect_hardware.h"
index 5255d544d146f0fa3cea26efe922ef5f8665a302..12008653de79aa74281287ee07ccec961046ba1f 100644 (file)
@@ -42,6 +42,7 @@
 #include <string.h>
 #include <time.h>
 
+#include "gromacs/ewald/pme.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/mtxio.h"
 #include "gromacs/fileio/trajectory_writing.h"
@@ -61,7 +62,6 @@
 #include "gromacs/legacyheaders/network.h"
 #include "gromacs/legacyheaders/nrnb.h"
 #include "gromacs/legacyheaders/ns.h"
-#include "gromacs/legacyheaders/pme.h"
 #include "gromacs/legacyheaders/sim_util.h"
 #include "gromacs/legacyheaders/tgroup.h"
 #include "gromacs/legacyheaders/txtdump.h"
index f7c17ee72818b579e221961af33a01a8e13d3c7a..723223d7d121e91af9d5918684930c32de6a2ed4 100644 (file)
@@ -50,6 +50,7 @@
 #endif
 
 #include "gromacs/essentialdynamics/edsam.h"
+#include "gromacs/ewald/pme.h"
 #include "gromacs/gmxlib/nonbonded/nb_free_energy.h"
 #include "gromacs/gmxlib/nonbonded/nb_kernel.h"
 #include "gromacs/imd/imd.h"
@@ -69,7 +70,6 @@
 #include "gromacs/legacyheaders/nonbonded.h"
 #include "gromacs/legacyheaders/nrnb.h"
 #include "gromacs/legacyheaders/orires.h"
-#include "gromacs/legacyheaders/pme.h"
 #include "gromacs/legacyheaders/qmmm.h"
 #include "gromacs/legacyheaders/txtdump.h"
 #include "gromacs/legacyheaders/typedefs.h"
index 7da23c74c3e055bb264fdf343c0a0bace19bf8f6..23c0e4b8245697947bfe051a40f2d1141bed8c90 100644 (file)
@@ -41,6 +41,7 @@
 #include <string.h>
 #include <time.h>
 
+#include "gromacs/ewald/pme.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/trxio.h"
@@ -58,7 +59,6 @@
 #include "gromacs/legacyheaders/network.h"
 #include "gromacs/legacyheaders/nrnb.h"
 #include "gromacs/legacyheaders/ns.h"
-#include "gromacs/legacyheaders/pme.h"
 #include "gromacs/legacyheaders/tgroup.h"
 #include "gromacs/legacyheaders/txtdump.h"
 #include "gromacs/legacyheaders/typedefs.h"
index 0504150c008e23e09337d2774f24662f049a6474..3b5ab113af8fac191727d64d2706759e830c6e06 100644 (file)
@@ -40,6 +40,8 @@
 
 #include <stdlib.h>
 
+#include "gromacs/ewald/pme-load-balancing.h"
+#include "gromacs/ewald/pme.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/mdoutf.h"
 #include "gromacs/fileio/trajectory_writing.h"
@@ -52,7 +54,6 @@
 #include "gromacs/legacyheaders/calcmu.h"
 #include "gromacs/legacyheaders/checkpoint.h"
 #include "gromacs/legacyheaders/constr.h"
-#include "gromacs/legacyheaders/coulomb.h"
 #include "gromacs/legacyheaders/disre.h"
 #include "gromacs/legacyheaders/domdec.h"
 #include "gromacs/legacyheaders/domdec_network.h"
@@ -67,7 +68,6 @@
 #include "gromacs/legacyheaders/nrnb.h"
 #include "gromacs/legacyheaders/ns.h"
 #include "gromacs/legacyheaders/orires.h"
-#include "gromacs/legacyheaders/pme.h"
 #include "gromacs/legacyheaders/qmmm.h"
 #include "gromacs/legacyheaders/shellfc.h"
 #include "gromacs/legacyheaders/sighandler.h"
@@ -93,7 +93,6 @@
 
 #include "deform.h"
 #include "membed.h"
-#include "pme_loadbal.h"
 #include "repl_ex.h"
 
 #ifdef GMX_FAHCORE
index 47e8fd7ea15d1df00b6b6a5f44dbc39d80518bd7..054b4fbd5b7bb350e2633d3a199ba359ef5f4655 100644 (file)
 #endif
 
 #include "gromacs/essentialdynamics/edsam.h"
+#include "gromacs/ewald/ewald-util.h"
+#include "gromacs/ewald/pme.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/gmxpreprocess/calc_verletbuf.h"
 #include "gromacs/legacyheaders/checkpoint.h"
 #include "gromacs/legacyheaders/constr.h"
-#include "gromacs/legacyheaders/coulomb.h"
 #include "gromacs/legacyheaders/disre.h"
 #include "gromacs/legacyheaders/domdec.h"
 #include "gromacs/legacyheaders/force.h"
@@ -71,7 +72,6 @@
 #include "gromacs/legacyheaders/network.h"
 #include "gromacs/legacyheaders/oenv.h"
 #include "gromacs/legacyheaders/orires.h"
-#include "gromacs/legacyheaders/pme.h"
 #include "gromacs/legacyheaders/qmmm.h"
 #include "gromacs/legacyheaders/sighandler.h"
 #include "gromacs/legacyheaders/txtdump.h"