Change some listed-forces headers to be library-only
authorMark Abraham <mark.j.abraham@gmail.com>
Mon, 19 Jan 2015 11:20:28 +0000 (12:20 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Fri, 23 Jan 2015 16:59:26 +0000 (17:59 +0100)
Some analysis tools call functions declared here, so they can't be
module-only (yet). Clients of libgromacs should only use functions
from listed-forces.h.

Moved ftype_is_bonded_potential() accordingly.

This will also make it easier to re-instate SIMD support for angles
and dihedrals, because there has to be an intra-module header that
declares the SIMD versions of those functions, and it cannot also be
an installed header if it depends on simd.h.

Refs #1673

Change-Id: Ia2815b57f712fbeb1e294dbea3231c6c9bfc32dc

src/gromacs/listed-forces/CMakeLists.txt
src/gromacs/listed-forces/bonded.cpp
src/gromacs/listed-forces/bonded.h
src/gromacs/listed-forces/listed-forces.cpp
src/gromacs/listed-forces/listed-forces.h
src/gromacs/listed-forces/manage-threading.cpp
src/gromacs/listed-forces/position-restraints.h

index e9719e2ea4d4622be5eb41b09960bcb5abacc08b..f56c61cb81c9e4d161b427546d5d3a8453289573 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2014, by the GROMACS development team, led by
+# Copyright (c) 2014,2015, 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.
 file(GLOB LISTED_FORCES_SOURCES *.cpp)
 set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${LISTED_FORCES_SOURCES} PARENT_SCOPE)
 
-gmx_install_headers(
-    bonded.h
-    listed-forces.h
-    position-restraints.h)
+gmx_install_headers(listed-forces.h)
 
 if (BUILD_TESTING)
 #    add_subdirectory(tests)
index e0a6aaecf72c9940d55ddd6858b1cfb5394f3308..7e4619e82b60b9a59e7f4f0bd8aa6ee9faf540e4 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, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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.
@@ -3970,12 +3970,3 @@ real tab_dihs(int nbonds,
 }
 
 //! \endcond
-
-gmx_bool
-ftype_is_bonded_potential(int ftype)
-{
-    return
-        (interaction_function[ftype].flags & IF_BOND) &&
-        !(ftype == F_CONNBONDS || ftype == F_POSRES || ftype == F_FBPOSRES) &&
-        (ftype < F_GB12 || ftype > F_GB14);
-}
index a916865a9de7eee0dcdea2b9a1fa4e95f0635c48..b8abfdd0c6fc1d53faad19424e4d28e488ba8509 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, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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.
  * 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
+/*! \libinternal \file
  *
  * \brief This file contains declarations necessary for low-level
  * functions for computing energies and forces for bonded interactions.
  *
  * \author Mark Abraham <mark.j.abraham@gmail.com>
- * \inpublicapi
+ * \inlibraryapi
  * \ingroup module_listed-forces
  */
 
@@ -67,15 +67,6 @@ struct gmx_wallcycle;
 struct t_graph;
 struct t_pbc;
 
-/*! \brief Return whether this is an interaction that actually
- * calculates a potential and works on multiple atoms (not e.g. a
- * connection or a position restraint).
- *
- * \todo This function could go away when idef is not a big bucket of
- * everything. */
-gmx_bool
-ftype_is_bonded_potential(int ftype);
-
 /*! \brief Calculate bond-angle. No PBC is taken into account (use mol-shift) */
 real bond_angle(const rvec xi, const rvec xj, const rvec xk,
                 const struct t_pbc *pbc,
index e23f348065e279059330ce70ccdcabe13e570152..8e6a50656d305e9e6ed14d7296f90f4e27d52f37 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015, 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.
@@ -343,6 +343,15 @@ calc_one_bond(int thread,
 
 } // namespace
 
+gmx_bool
+ftype_is_bonded_potential(int ftype)
+{
+    return
+        (interaction_function[ftype].flags & IF_BOND) &&
+        !(ftype == F_CONNBONDS || ftype == F_POSRES || ftype == F_FBPOSRES) &&
+        (ftype < F_GB12 || ftype > F_GB14);
+}
+
 void calc_listed(const gmx_multisim_t *ms,
                  const t_idef *idef,
                  const rvec x[], history_t *hist,
index 3c40c6961ac478fbff64e8131057e4abb7cb201b..6bf953af6fb4dba8f09fee309e3683261b323a74 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015, 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.
@@ -55,6 +55,9 @@
  * \brief This file contains declarations of high-level functions used
  * by mdrun to compute energies and forces for listed interactions.
  *
+ * Clients of libgromacs that want to evaluate listed interactions
+ * should call functions declared here.
+ *
  * \author Mark Abraham <mark.j.abraham@gmail.com>
  *
  * \inpublicapi
 extern "C" {
 #endif
 
+/*! \brief Return whether this is an interaction that actually
+ * calculates a potential and works on multiple atoms (not e.g. a
+ * connection or a position restraint).
+ *
+ * \todo This function could go away when idef is not a big bucket of
+ * everything. */
+gmx_bool
+ftype_is_bonded_potential(int ftype);
+
 /*! \brief Calculates all listed force interactions.
  *
  * Note that pbc_full is used only for position restraints, and is
index c63110e33c0097eb74a47ecf26a18299a6885eb2..01bed0bffa3adee552088498ce9e589d0ba8e7eb 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, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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,7 +49,7 @@
 
 #include <algorithm>
 
-#include "gromacs/listed-forces/bonded.h"
+#include "gromacs/listed-forces/listed-forces.h"
 #include "gromacs/mdlib/forcerec-threading.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
index 79b8c386433af31d3abfa2947d53807a5a008bc7..fea4890ca909a360f7d8fe7b7259cfca8aed3c0c 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, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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.
  * 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
+/*! \libinternal \file
  *
  * \brief This file contains declarations necessary for low-level
  * functions for computing energies and forces for position
  * restraints.
  *
  * \author Mark Abraham <mark.j.abraham@gmail.com>
- * \inpublicapi
+ * \inlibraryapi
  * \ingroup module_listed-forces
  */