Clean up force.h and its use
authorMark Abraham <mark.j.abraham@gmail.com>
Fri, 25 May 2018 01:07:41 +0000 (03:07 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Fri, 25 May 2018 01:16:24 +0000 (03:16 +0200)
Reduced use of transitive inclusion of headers, along with unnecessary
inclusion of force.h, and broke it up into its parts.

Change-Id: Ic75795e98e010bd2d36093cdce28d101343a5645

27 files changed:
src/gromacs/domdec/domdec.cpp
src/gromacs/domdec/domdec_topology.cpp
src/gromacs/mdlib/calcvir.cpp
src/gromacs/mdlib/calcvir.h [new file with mode: 0644]
src/gromacs/mdlib/expanded.cpp
src/gromacs/mdlib/force.cpp
src/gromacs/mdlib/force.h
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/forcerec.h
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_gpu_ref.cpp
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.cpp
src/gromacs/mdlib/ns.cpp
src/gromacs/mdlib/qm_gamess.cpp
src/gromacs/mdlib/qm_mopac.cpp
src/gromacs/mdlib/qm_orca.cpp
src/gromacs/mdlib/qmmm.cpp
src/gromacs/mdlib/rf_util.cpp
src/gromacs/mdlib/rf_util.h [new file with mode: 0644]
src/gromacs/mdlib/shellfc.cpp
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdlib/stat.cpp
src/gromacs/mdlib/update.cpp
src/gromacs/mdlib/wall.cpp
src/gromacs/mdlib/wall.h [new file with mode: 0644]
src/gromacs/mdlib/wnblist.cpp
src/gromacs/mdrun/runner.cpp
src/gromacs/mdrun/tpi.cpp

index a294879ebdd3c85953310486f6653e0fde256094..f4a1e633fbece2b5e49d2646a6f254389701d651 100644 (file)
@@ -50,6 +50,7 @@
 #include <algorithm>
 
 #include "gromacs/domdec/collect.h"
+#include "gromacs/domdec/dlbtiming.h"
 #include "gromacs/domdec/domdec_network.h"
 #include "gromacs/domdec/ga2la.h"
 #include "gromacs/ewald/pme.h"
@@ -67,7 +68,6 @@
 #include "gromacs/math/vectypes.h"
 #include "gromacs/mdlib/constr.h"
 #include "gromacs/mdlib/constraintrange.h"
-#include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/forcerec.h"
 #include "gromacs/mdlib/gmx_omp_nthreads.h"
 #include "gromacs/mdlib/lincs.h"
index e8880dc9505d925a305903a3410c8977cb8d42a8..e6fe90fc8cae6213d916a566dc76920301bf8f42 100644 (file)
@@ -60,7 +60,6 @@
 #include "gromacs/gmxlib/chargegroup.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/math/vec.h"
-#include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/forcerec.h"
 #include "gromacs/mdlib/gmx_omp_nthreads.h"
 #include "gromacs/mdlib/vsite.h"
index 380ebfb8b78b5eed9ececac39a7eb343b98fd931..641b116682a93849f915eca91e9f14e3333afb93 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2018, 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.
 /* This file is completely threadsafe - keep it that way! */
 #include "gmxpre.h"
 
+#include "calcvir.h"
+
 #include "config.h" /* for GMX_MAX_OPENMP_THREADS */
 
 #include <algorithm>
 
 #include "gromacs/math/vec.h"
 #include "gromacs/math/vectypes.h"
-#include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/gmx_omp_nthreads.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/mshift.h"
@@ -102,7 +103,7 @@ static void calc_x_times_f(int nxf, const rvec x[], const rvec f[],
 }
 
 void calc_vir(int nxf, rvec x[], rvec f[], tensor vir,
-              gmx_bool bScrewPBC, matrix box)
+              bool bScrewPBC, matrix box)
 {
     matrix x_times_f;
 
diff --git a/src/gromacs/mdlib/calcvir.h b/src/gromacs/mdlib/calcvir.h
new file mode 100644 (file)
index 0000000..896b134
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2018, 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.
+ */
+#ifndef GMX_MDLIB_CALCVIR_H
+#define GMX_MDLIB_CALCVIR_H
+
+#include "gromacs/math/vectypes.h"
+
+struct t_graph;
+struct t_pbc;
+
+void calc_vir(int nxf, rvec x[], rvec f[], tensor vir,
+              bool bScrewPBC, matrix box);
+/* Calculate virial for nxf atoms, and add it to vir */
+
+void f_calc_vir(int i0, int i1, rvec x[], rvec f[], tensor vir,
+                t_graph *g, rvec shift_vec[]);
+/* Calculate virial taking periodicity into account */
+
+#endif
index e4330ed5ba89302638569e3e9194713f49af9226..22a76aadff6c56e80245d5a73493f7f82a3021e6 100644 (file)
@@ -58,6 +58,7 @@
 #include "gromacs/mdlib/constr.h"
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/update.h"
+#include "gromacs/mdtypes/forcerec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/mdatom.h"
index 205b065f5312d438757993257098e12763b7a7e9..3e07b81f1311cd5a2692719bd3ac2d4bb91f89a0 100644 (file)
 #include "gromacs/listed-forces/listed-forces.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/math/vecdump.h"
+#include "gromacs/mdlib/force_flags.h"
 #include "gromacs/mdlib/forcerec-threading.h"
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdlib/ns.h"
 #include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdlib/rf_util.h"
+#include "gromacs/mdlib/wall.h"
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/mdtypes/forceoutput.h"
 #include "gromacs/mdtypes/inputrec.h"
index 793eab2b85d3b4bee5e80c2eedf29f437a91e231..60c26a6365330dc963a3b2e74531b290f870122f 100644 (file)
 #define GMX_MDLIB_FORCE_H
 
 #include "gromacs/domdec/dlbtiming.h"
-#include "gromacs/mdlib/force_flags.h"
-#include "gromacs/mdlib/vsite.h"
-#include "gromacs/mdtypes/fcdata.h"
-#include "gromacs/mdtypes/forcerec.h"
-#include "gromacs/timing/wallcycle.h"
+#include "gromacs/math/paddedvector.h"
+#include "gromacs/math/vectypes.h"
 #include "gromacs/utility/arrayref.h"
 
-struct gmx_device_info_t;
 struct gmx_edsam;
-struct gmx_gpu_info_t;
+struct gmx_enerdata_t;
 struct gmx_groups_t;
+struct gmx_grppairener_t;
+struct gmx_localtop_t;
 struct gmx_multisim_t;
 struct gmx_vsite_t;
+struct gmx_wallcycle;
 class history_t;
-struct nonbonded_verlet_t;
 struct t_blocka;
 struct t_commrec;
 struct t_fcdata;
+struct t_forcerec;
 struct t_graph;
-struct t_grpopts;
+struct t_idef;
 struct t_inputrec;
 struct t_lambda;
 struct t_mdatoms;
 struct t_nrnb;
-struct t_pbc;
 
 namespace gmx
 {
 class ForceWithVirial;
 class MDLogger;
-class PhysicalNodeCommunicator;
 }
 
-void calc_vir(int nxf, rvec x[], rvec f[], tensor vir,
-              gmx_bool bScrewPBC, matrix box);
-/* Calculate virial for nxf atoms, and add it to vir */
-
-void f_calc_vir(int i0, int i1, rvec x[], rvec f[], tensor vir,
-                t_graph *g, rvec shift_vec[]);
-/* Calculate virial taking periodicity into account */
-
-real RF_excl_correction(const t_forcerec *fr,
-                        const t_graph    *g,
-                        const t_mdatoms  *mdatoms,
-                        const t_blocka   *excl,
-                        bool              usingDomainDecomposition,
-                        rvec              x[],
-                        rvec              f[],
-                        rvec             *fshift,
-                        const t_pbc      *pbc,
-                        real              lambda,
-                        real             *dvdlambda);
-/* Calculate the reaction-field energy correction for this node:
- * epsfac q_i q_j (k_rf r_ij^2 - c_rf)
- * and force correction for all excluded pairs, including self pairs.
- */
-
-void calc_rffac(FILE *fplog, int eel, real eps_r, real eps_rf,
-                real Rc, real Temp,
-                real zsq, matrix box,
-                real *krf, real *crf);
-/* Determine the reaction-field constants */
-
-void init_generalized_rf(FILE *fplog,
-                         const gmx_mtop_t *mtop, const t_inputrec *ir,
-                         t_forcerec *fr);
-/* Initialize the generalized reaction field parameters */
-
-
-/* In wall.c */
-void make_wall_tables(FILE *fplog,
-                      const t_inputrec *ir, const char *tabfn,
-                      const gmx_groups_t *groups,
-                      t_forcerec *fr);
-
-real do_walls(const t_inputrec *ir,
-              t_forcerec       *fr,
-              matrix            box,
-              const t_mdatoms  *md,
-              const rvec        x[],
-              rvec              f[],
-              real              lambda,
-              real              Vlj[],
-              t_nrnb           *nrnb);
-
-gmx_bool can_use_allvsall(const t_inputrec *ir,
-                          gmx_bool bPrintNote, const t_commrec *cr, FILE *fp);
-/* Returns if we can use all-vs-all loops.
- * If bPrintNote==TRUE, prints a note, if necessary, to stderr
- * and fp (if !=NULL) on the master node.
- */
-
-gmx_bool nbnxn_simd_supported(const gmx::MDLogger &mdlog,
-                              const t_inputrec    *ir);
-/* Return if CPU SIMD support exists for the given inputrec
- * 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);
-/* Returns whether simple tables (i.e. not for use with GPUs) are used
- * with the type of kernel indicated.
- */
-
 void init_enerdata(int ngener, int n_lambda, gmx_enerdata_t *enerd);
 /* Intializes the energy storage struct */
 
@@ -162,17 +86,13 @@ void sum_epot(gmx_grppairener_t *grpp, real *epot);
 void sum_dhdl(gmx_enerdata_t *enerd, gmx::ArrayRef<const real> lambda, t_lambda *fepvals);
 /* Sum the free energy contributions */
 
-/* Compute the average C6 and C12 params for LJ corrections */
-void set_avcsixtwelve(FILE *fplog, t_forcerec *fr,
-                      const gmx_mtop_t *mtop);
-
 void do_force(FILE                                     *log,
               const t_commrec                          *cr,
               const gmx_multisim_t                     *ms,
               const t_inputrec                         *inputrec,
               gmx_int64_t                               step,
               t_nrnb                                   *nrnb,
-              gmx_wallcycle_t                           wcycle,
+              gmx_wallcycle                            *wcycle,
               // TODO top can be const when the group scheme no longer
               // builds exclusions during neighbor searching within
               // do_force_cutsGROUP.
@@ -223,7 +143,7 @@ void do_force_lowlevel(t_forcerec   *fr,
                        const t_commrec *cr,
                        const gmx_multisim_t *ms,
                        t_nrnb       *nrnb,
-                       gmx_wallcycle_t wcycle,
+                       gmx_wallcycle *wcycle,
                        const t_mdatoms *md,
                        rvec         x[],
                        history_t    *hist,
@@ -241,7 +161,4 @@ void do_force_lowlevel(t_forcerec   *fr,
                        float        *cycles_pme);
 /* Call all the force routines */
 
-void free_gpu_resources(const t_forcerec                    *fr,
-                        const gmx::PhysicalNodeCommunicator &physicalNodeCommunicator);
-
 #endif
index e6a4c8e73aa90b897a35e26db13ca7f771004f52..569ff867f7237dc719afd861ab586d169a7f9455 100644 (file)
@@ -79,7 +79,9 @@
 #include "gromacs/mdlib/nbnxn_util.h"
 #include "gromacs/mdlib/ns.h"
 #include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdlib/rf_util.h"
 #include "gromacs/mdlib/sim_util.h"
+#include "gromacs/mdlib/wall.h"
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/mdtypes/fcdata.h"
 #include "gromacs/mdtypes/group.h"
index c9b9308d5c26cfb407ce661afe29a0bbbe2ac9ce..4d36ba7395ce2551d90d28e13c5b829e885f72ec 100644 (file)
@@ -54,6 +54,7 @@ struct t_inputrec;
 namespace gmx
 {
 class MDLogger;
+class PhysicalNodeCommunicator;
 }
 
 /*! \brief Create a new forcerec structure */
@@ -150,4 +151,32 @@ void forcerec_set_excl_load(t_forcerec           *fr,
  */
 void update_forcerec(t_forcerec *fr, matrix box);
 
+gmx_bool uses_simple_tables(int                 cutoff_scheme,
+                            nonbonded_verlet_t *nbv,
+                            int                 group);
+/* Returns whether simple tables (i.e. not for use with GPUs) are used
+ * with the type of kernel indicated.
+ */
+
+gmx_bool can_use_allvsall(const t_inputrec *ir,
+                          gmx_bool bPrintNote, const t_commrec *cr, FILE *fp);
+/* Returns if we can use all-vs-all loops.
+ * If bPrintNote==TRUE, prints a note, if necessary, to stderr
+ * and fp (if !=NULL) on the master node.
+ */
+
+gmx_bool nbnxn_simd_supported(const gmx::MDLogger &mdlog,
+                              const t_inputrec    *ir);
+/* Return if CPU SIMD support exists for the given inputrec
+ * If the return value is FALSE and fplog/cr != NULL, prints a fallback
+ * message to fplog/stderr.
+ */
+
+/* Compute the average C6 and C12 params for LJ corrections */
+void set_avcsixtwelve(FILE *fplog, t_forcerec *fr,
+                      const gmx_mtop_t *mtop);
+
+void free_gpu_resources(const t_forcerec                    *fr,
+                        const gmx::PhysicalNodeCommunicator &physicalNodeCommunicator);
+
 #endif
index 9ccd46a4ebb788e9e1f4ecd31c4b41e34fc8f22f..5e1973482d25668582e5b8542bff68d48b761bb1 100644 (file)
@@ -45,7 +45,7 @@
 #include "gromacs/math/functions.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
-#include "gromacs/mdlib/force.h"
+#include "gromacs/mdlib/force_flags.h"
 #include "gromacs/mdlib/nb_verlet.h"
 #include "gromacs/mdlib/nbnxn_consts.h"
 #include "gromacs/mdtypes/md_enums.h"
index cc13cbc67abbaff0cf8f153922d4da96267ffb41..66584a2300b6c8629f815830a1afb06a27f178e7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, 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.
 
 #include "gromacs/math/functions.h"
 #include "gromacs/math/vec.h"
-#include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/gmx_omp_nthreads.h"
 #include "gromacs/mdlib/nb_verlet.h"
 #include "gromacs/mdlib/nbnxn_consts.h"
+#include "gromacs/mdtypes/interaction_const.h"
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/utility/fatalerror.h"
index ad8f04fec21877aa20c2f35794184aa58c3718f4..fd9c8b99b9df117c8bd97c8d6ddd68d49367610e 100644 (file)
@@ -54,7 +54,6 @@
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/math/vecdump.h"
-#include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/nsgrid.h"
 #include "gromacs/mdlib/qmmm.h"
 #include "gromacs/mdtypes/commrec.h"
index 4ceb4646cae8d5440862c7de64345bc3215949db..a2b069dc6a621c5c7006b4fecbf6c796e487800f 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018, 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.
@@ -51,7 +51,6 @@
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
-#include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/ns.h"
 #include "gromacs/mdlib/qmmm.h"
 #include "gromacs/mdtypes/commrec.h"
index 204332af4be837cd30807e168f51fd6fb4af1f6b..ed585cdaaa7fe8dd1fdb8c29430fdcee871b0426 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018, 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.
@@ -51,7 +51,6 @@
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
-#include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/ns.h"
 #include "gromacs/mdlib/qmmm.h"
 #include "gromacs/mdtypes/md_enums.h"
index 1f23624de85f0f481c896ff5fffd56c1101bec6f..287c97b64ac0ce5f7a5625a75b55e2bf55e1c874 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018, 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.
@@ -49,9 +49,9 @@
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
-#include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/ns.h"
 #include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdtypes/forcerec.h"
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
index 062c1ebf0213de8409c221f3fae0175c93412f7c..1cf2fc63a030d5adbb9d6145f925895d923b7c9f 100644 (file)
@@ -55,9 +55,9 @@
 #include "gromacs/math/functions.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
-#include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/ns.h"
 #include "gromacs/mdtypes/commrec.h"
+#include "gromacs/mdtypes/forcerec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/mdatom.h"
index dd99949e6bf86b3cd4919f0fddf632175993d962..705a6bcbb5fdacba1f197fe604df4b8cbbeba808 100644 (file)
  */
 #include "gmxpre.h"
 
+#include "rf_util.h"
+
 #include <cmath>
 
 #include "gromacs/math/functions.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
-#include "gromacs/mdlib/force.h"
+#include "gromacs/mdtypes/forcerec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/mdatom.h"
diff --git a/src/gromacs/mdlib/rf_util.h b/src/gromacs/mdlib/rf_util.h
new file mode 100644 (file)
index 0000000..336163a
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2018, 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.
+ */
+#ifndef GMX_MDLIB_RF_UTIL_H
+#define GMX_MDLIB_RF_UTIL_H
+
+#include <cstdio>
+
+#include "gromacs/math/vectypes.h"
+#include "gromacs/utility/real.h"
+
+struct gmx_mtop_t;
+struct t_blocka;
+struct t_forcerec;
+struct t_graph;
+struct t_inputrec;
+struct t_mdatoms;
+struct t_pbc;
+
+real RF_excl_correction(const t_forcerec *fr,
+                        const t_graph    *g,
+                        const t_mdatoms  *mdatoms,
+                        const t_blocka   *excl,
+                        bool              usingDomainDecomposition,
+                        rvec              x[],
+                        rvec              f[],
+                        rvec             *fshift,
+                        const t_pbc      *pbc,
+                        real              lambda,
+                        real             *dvdlambda);
+/* Calculate the reaction-field energy correction for this node:
+ * epsfac q_i q_j (k_rf r_ij^2 - c_rf)
+ * and force correction for all excluded pairs, including self pairs.
+ */
+
+void calc_rffac(FILE *fplog, int eel, real eps_r, real eps_rf,
+                real Rc, real Temp,
+                real zsq, matrix box,
+                real *krf, real *crf);
+/* Determine the reaction-field constants */
+
+void init_generalized_rf(FILE *fplog,
+                         const gmx_mtop_t *mtop, const t_inputrec *ir,
+                         t_forcerec *fr);
+/* Initialize the generalized reaction field parameters */
+
+
+#endif
index 58f6f50bf9c1415f2be3a8eb12d0362ef0347708..3958321029479c1b0a9410299f78749382761cb4 100644 (file)
@@ -57,6 +57,7 @@
 #include "gromacs/math/vecdump.h"
 #include "gromacs/mdlib/constr.h"
 #include "gromacs/mdlib/force.h"
+#include "gromacs/mdlib/force_flags.h"
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdlib/sim_util.h"
 #include "gromacs/mdlib/vsite.h"
index e3cff865845d1b60f785fc4f4b8d2ca2227e0ee4..a6e94301e1c50c6227da8d2465aa27492cf2ca44 100644 (file)
@@ -70,6 +70,7 @@
 #include "gromacs/math/vec.h"
 #include "gromacs/math/vecdump.h"
 #include "gromacs/mdlib/calcmu.h"
+#include "gromacs/mdlib/calcvir.h"
 #include "gromacs/mdlib/constr.h"
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/forcerec.h"
index f1e7bd7f2028ffe649fe2c5e1510d7425360c11c..8f2941f74fe15d7c7128a055ea0767f148f8983f 100644 (file)
@@ -47,7 +47,6 @@
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/constr.h"
-#include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/md_support.h"
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdlib/rbin.h"
index 5313e8fd57b260703a473a1b67e51ff9f3f51eba..0cb0063dcafaf56e7bd4d9c60a85839064a138bc 100644 (file)
@@ -57,7 +57,6 @@
 #include "gromacs/math/vec.h"
 #include "gromacs/math/vecdump.h"
 #include "gromacs/mdlib/constr.h"
-#include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/gmx_omp_nthreads.h"
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdlib/sim_util.h"
index 4be749be23d52837cceb16e53589bba8706517c4..c99a879175182f489488c0af7218497ce6d5c18e 100644 (file)
@@ -37,6 +37,8 @@
 
 #include "gmxpre.h"
 
+#include "wall.h"
+
 #include <string.h>
 
 #include <algorithm>
@@ -45,7 +47,6 @@
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
-#include "gromacs/mdlib/force.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/mdatom.h"
diff --git a/src/gromacs/mdlib/wall.h b/src/gromacs/mdlib/wall.h
new file mode 100644 (file)
index 0000000..2120d64
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2018, 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.
+ */
+#ifndef GMX_MDLIB_WALLS_H
+#define GMX_MDLIB_WALLS_H
+
+#include <cstdio>
+
+#include "gromacs/math/vectypes.h"
+
+struct gmx_groups_t;
+struct t_forcerec;
+struct t_idef;
+struct t_inputrec;
+struct t_mdatoms;
+struct t_nrnb;
+
+void make_wall_tables(FILE *fplog,
+                      const t_inputrec *ir, const char *tabfn,
+                      const gmx_groups_t *groups,
+                      t_forcerec *fr);
+
+real do_walls(const t_inputrec *ir,
+              t_forcerec       *fr,
+              matrix            box,
+              const t_mdatoms  *md,
+              const rvec        x[],
+              rvec              f[],
+              real              lambda,
+              real              Vlj[],
+              t_nrnb           *nrnb);
+
+#endif
index 37c1ae4af5f9355e637d286905ac1efb2396c3cd..2ef86fbc165329769ef13807d53de6c76de4761d 100644 (file)
@@ -46,9 +46,9 @@
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/ns.h"
 #include "gromacs/mdtypes/commrec.h"
+#include "gromacs/mdtypes/forcerec.h"
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/nblist.h"
 #include "gromacs/utility/fatalerror.h"
index 96a179990ed71754d2753694dd191b757199971d..b08c74bc1e0b7697a71bcb3818db22ad43538ea5 100644 (file)
@@ -76,7 +76,6 @@
 #include "gromacs/mdlib/calc_verletbuf.h"
 #include "gromacs/mdlib/constr.h"
 #include "gromacs/mdlib/deform.h"
-#include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/forcerec.h"
 #include "gromacs/mdlib/gmx_omp_nthreads.h"
 #include "gromacs/mdlib/main.h"
@@ -95,6 +94,7 @@
 #include "gromacs/mdrunutility/mdmodules.h"
 #include "gromacs/mdrunutility/threadaffinity.h"
 #include "gromacs/mdtypes/commrec.h"
+#include "gromacs/mdtypes/fcdata.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/observableshistory.h"
index dd4fd7d3291df8f2479d1422f77af9927484f024..5c8e3aff078b95064f684d79decd5b1e128e5080 100644 (file)
@@ -64,6 +64,7 @@
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/constr.h"
 #include "gromacs/mdlib/force.h"
+#include "gromacs/mdlib/force_flags.h"
 #include "gromacs/mdlib/mdatoms.h"
 #include "gromacs/mdlib/mdebin.h"
 #include "gromacs/mdlib/mdrun.h"