Move disre.* and orires.* to listed-forces/
authorTeemu Murtola <teemu.murtola@gmail.com>
Fri, 11 Dec 2015 07:21:49 +0000 (09:21 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Sat, 12 Dec 2015 04:32:05 +0000 (05:32 +0100)
This removes topology -> gmxlib dependency, and moves code out of gmxlib
to a more appropriate location.

Convert existing comments to very rudimentary Doxygen documentation to
avoid Doxygen warnings.

Part of #1854.

Change-Id: I1aa56dd8f14eff90e035f1c69d59bb19a8dcb7ed

14 files changed:
docs/doxygen/cycle-suppressions.txt
src/gromacs/gmxana/gmx_disre.cpp
src/gromacs/gmxana/gmx_eneconv.cpp
src/gromacs/listed-forces/disre.cpp [moved from src/gromacs/gmxlib/disre.cpp with 100% similarity]
src/gromacs/listed-forces/disre.h [moved from src/gromacs/gmxlib/disre.h with 79% similarity]
src/gromacs/listed-forces/listed-forces.cpp
src/gromacs/listed-forces/orires.cpp [moved from src/gromacs/gmxlib/orires.cpp with 100% similarity]
src/gromacs/listed-forces/orires.h [moved from src/gromacs/gmxlib/orires.h with 78% similarity]
src/gromacs/mdlib/expanded.cpp
src/gromacs/mdlib/mdebin.cpp
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdlib/update.cpp
src/gromacs/topology/ifunc.cpp
src/programs/mdrun/runner.cpp

index 638d706ff5d67748ebbcf3fabd92d42ce63989c7..7b9de94cc087d4be8e9c18a7837f24991b32902e 100644 (file)
@@ -12,7 +12,6 @@ mdlib -> essentialdynamics
 mdlib -> imd
 mdlib -> ewald
 mdlib -> pulling
-topology -> gmxlib
 topology -> listed-forces
 pbcutil -> fileio
 pbcutil -> mdtypes
index c8fedca8ae63eebe7d8addbfc9b641a86853f8f0..37101cf22a9c4544a83a5442db34b8f5cd27094f 100644 (file)
@@ -52,9 +52,9 @@
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/gmxana/gstat.h"
-#include "gromacs/gmxlib/disre.h"
 #include "gromacs/gmxlib/main.h"
 #include "gromacs/gmxlib/nrnb.h"
+#include "gromacs/listed-forces/disre.h"
 #include "gromacs/math/do_fit.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/force.h"
index 3b151381cd31675ae9ee5f2616f9b1649313901a..b4b6dd314693188655287a0df3f0eef9fc252a40 100644 (file)
@@ -46,7 +46,7 @@
 #include "gromacs/fileio/enxio.h"
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/gmxlib/disre.h"
+#include "gromacs/listed-forces/disre.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/arraysize.h"
similarity index 79%
rename from src/gromacs/gmxlib/disre.h
rename to src/gromacs/listed-forces/disre.h
index 4b462b3a98c4ccdcd1860d72331b1c3ba4d241e3..d328409a6f1c61cb496bc7e108b0bef0004f0690 100644 (file)
  * 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_GMXLIB_DISRE_H
-#define GMX_GMXLIB_DISRE_H
+/*! \libinternal \file
+ * \brief
+ * Declares functions for handling distance restraints.
+ *
+ * \inlibraryapi
+ * \ingroup module_listed-forces
+ */
+#ifndef GMX_LISTED_FORCES_DISRE_H
+#define GMX_LISTED_FORCES_DISRE_H
 
-#include <stdio.h>
+#include <cstdio>
 
 #include "gromacs/topology/ifunc.h"
 #include "gromacs/utility/basedefinitions.h"
@@ -46,41 +53,35 @@ struct gmx_mtop_t;
 struct history_t;
 struct t_commrec;
 struct t_inputrec;
-struct t_state;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct t_commrec;
 struct t_pbc;
+struct t_state;
 
-void init_disres(FILE *fplog, const struct gmx_mtop_t *mtop,
-                 t_inputrec *ir, const struct t_commrec *cr,
-                 t_fcdata *fcd, t_state *state, gmx_bool bIsREMD);
-/* Initiate *fcd data, must be called once, nbonds is the number
+/*! \brief
+ * Initiates *fcd data.
+ *
+ * Must be called once, nbonds is the number
  * of iatoms in the ilist of the idef struct.
  * When time averaging is used, the history is initialized in state,
  * unless it was read before from a checkpoint file.
  * The implementation of distance restraints with -multi
  * must differ according to whether REMD is active.
  */
+void init_disres(FILE *fplog, const gmx_mtop_t *mtop,
+                 t_inputrec *ir, const t_commrec *cr,
+                 t_fcdata *fcd, t_state *state, gmx_bool bIsREMD);
 
-void calc_disres_R_6(int nfa, const t_iatom *fa, const t_iparams ip[],
-                     const rvec *x, const struct t_pbc *pbc,
-                     t_fcdata *fcd, history_t *hist);
-/* Calculates r and r^-3 (inst. and time averaged) for all pairs
+/*! \brief
+ * Calculates r and r^-3 (inst. and time averaged) for all pairs
  * and the ensemble averaged r^-6 (inst. and time averaged) for all restraints
  */
+void calc_disres_R_6(int nfa, const t_iatom *fa, const t_iparams ip[],
+                     const rvec *x, const t_pbc *pbc,
+                     t_fcdata *fcd, history_t *hist);
 
+//! Calculates the distance restraint forces, return the potential.
 t_ifunc ta_disres;
-/* Calculate the distance restraint forces, return the potential */
 
+//! Copies the new time averages that have been calculated in calc_disres_R_6.
 void update_disres_history(t_fcdata *fcd, history_t *hist);
-/* Copy the new time averages that have been calculated in calc_disres_R_6 */
 
-#ifdef __cplusplus
-}
 #endif
-
-#endif  /* _disre_h */
index 2ab43be407965d091e9f6f1cf9f9d78b5b7abec1..634755496383ea259389b6df77adaa24b2b2c099 100644 (file)
 
 #include <algorithm>
 
-#include "gromacs/gmxlib/disre.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/gmxlib/orires.h"
 #include "gromacs/listed-forces/bonded.h"
+#include "gromacs/listed-forces/disre.h"
+#include "gromacs/listed-forces/orires.h"
 #include "gromacs/listed-forces/position-restraints.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/force.h"
similarity index 78%
rename from src/gromacs/gmxlib/orires.h
rename to src/gromacs/listed-forces/orires.h
index c982256254b3299efd711d9f93088327840e5c7d..c245898f054880e17e5e3231cf9a8bea64d6bd29 100644 (file)
  * 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_GMXLIB_ORIRES_H
-#define GMX_GMXLIB_ORIRES_H
+/*! \libinternal \file
+ * \brief
+ * Declares functions for handling orientation restraints.
+ *
+ * \inlibraryapi
+ * \ingroup module_listed-forces
+ */
+#ifndef GMX_LISTED_FORCES_ORIRES_H
+#define GMX_LISTED_FORCES_ORIRES_H
 
-#include <stdio.h>
+#include <cstdio>
 
 #include "gromacs/topology/ifunc.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct gmx_mtop_t;
 struct gmx_multisim_t;
 struct history_t;
@@ -55,42 +58,42 @@ struct t_fcdata;
 struct t_oriresdata;
 struct t_state;
 
+/*! \brief
+ * Decides whether orientation restraints can work, and initializes
+ * all the orientation restraint stuff in *od (and assumes *od is
+ * already allocated.
+ */
 void init_orires(FILE *fplog, const gmx_mtop_t *mtop,
                  rvec x[],
                  const t_inputrec *ir,
-                 const struct t_commrec *cr, t_oriresdata *od,
+                 const t_commrec *cr, t_oriresdata *od,
                  t_state *state);
-/* Decides whether orientation restraints can work, and initializes
-   all the orientation restraint stuff in *od (and assumes *od is
-   already allocated. */
 
-real calc_orires_dev(const struct gmx_multisim_t *ms,
-                     int nfa, const t_iatom fa[], const t_iparams ip[],
-                     const t_mdatoms *md, const rvec x[],
-                     const struct t_pbc *pbc, t_fcdata *fcd, history_t *hist);
-/*
+/*! \brief
  * Calculates the time averaged D matrices, the S matrix for each experiment.
+ *
  * Returns the weighted RMS deviation of the orientation restraints.
  */
+real calc_orires_dev(const gmx_multisim_t *ms,
+                     int nfa, const t_iatom fa[], const t_iparams ip[],
+                     const t_mdatoms *md, const rvec x[],
+                     const t_pbc *pbc, t_fcdata *fcd, history_t *hist);
 
-void diagonalize_orires_tensors(t_oriresdata *od);
-/*
+/*! \brief
  * Diagonalizes the order tensor(s) of the orienation restraints.
+ *
  * For each experiment eig containts first 3 eigenvalues and then
  * the 3 eigenvectors. The eigenvalues are ordered on magnitude.
  */
+void diagonalize_orires_tensors(t_oriresdata *od);
 
+//! Prints order parameter, eigenvalues and eigenvectors to the log file.
 void print_orires_log(FILE *log, t_oriresdata *od);
-/* Print order parameter, eigenvalues and eigenvectors to the log file */
 
+//! Calculates the orientation restraint forces.
 t_ifunc orires;
-/* Does only the orientation restraint force calculation */
 
+//! Copies the new time averages that have been calculated in calc_orires_dev.
 void update_orires_history(t_fcdata *fcd, history_t *hist);
-/* Copy the new time averages that have been calculated in calc_orires_dev */
 
-#ifdef __cplusplus
-}
 #endif
-
-#endif  /* _orires_h */
index f79f9f375599b6dd039a6cc6c6f0a0201d92e30a..ae0d905520635f96d56ea98083ab5a41185a18fc 100644 (file)
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/xtcio.h"
 #include "gromacs/gmxlib/chargegroup.h"
-#include "gromacs/gmxlib/disre.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/gmxlib/orires.h"
+#include "gromacs/listed-forces/disre.h"
+#include "gromacs/listed-forces/orires.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/calcmu.h"
index 96ccee6327e3bd9c4634f888cf5f1390415bf59e..7d54751c4ed3d6103fbf70960b8d36c136d500a0 100644 (file)
@@ -45,9 +45,9 @@
 #include "gromacs/fileio/enxio.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/xvgr.h"
-#include "gromacs/gmxlib/disre.h"
 #include "gromacs/gmxlib/network.h"
-#include "gromacs/gmxlib/orires.h"
+#include "gromacs/listed-forces/disre.h"
+#include "gromacs/listed-forces/orires.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/constr.h"
index 99bcf2ac2b93414eb4a8703737be5a23d19da39f..5a235a43fde72c84609b3fe3b77a648183740ab0 100644 (file)
 #include "gromacs/essentialdynamics/edsam.h"
 #include "gromacs/ewald/pme.h"
 #include "gromacs/gmxlib/chargegroup.h"
-#include "gromacs/gmxlib/disre.h"
 #include "gromacs/gmxlib/gmx_omp_nthreads.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/gmxlib/orires.h"
 #include "gromacs/gmxlib/nonbonded/nb_free_energy.h"
 #include "gromacs/gmxlib/nonbonded/nb_kernel.h"
 #include "gromacs/gmxlib/nonbonded/nonbonded.h"
 #include "gromacs/imd/imd.h"
 #include "gromacs/listed-forces/bonded.h"
+#include "gromacs/listed-forces/disre.h"
+#include "gromacs/listed-forces/orires.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/math/vecdump.h"
index 34eac69ef4367123f199142e1254f9ea3881614d..5b57a4d49d3f3db4f524e8878e1ec591134e6aef 100644 (file)
 
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/gmxlib/disre.h"
 #include "gromacs/gmxlib/gmx_omp_nthreads.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/gmxlib/orires.h"
+#include "gromacs/listed-forces/disre.h"
+#include "gromacs/listed-forces/orires.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/math/vecdump.h"
index 25d811bef9d0e4b38ee6bc1c4c7106bb4aa326fc..b5de6c87148fd066de32f5dcdd9a434c18c7e105 100644 (file)
@@ -39,9 +39,9 @@
 
 #include "ifunc.h"
 
-#include "gromacs/gmxlib/disre.h"
-#include "gromacs/gmxlib/orires.h"
 #include "gromacs/listed-forces/bonded.h"
+#include "gromacs/listed-forces/disre.h"
+#include "gromacs/listed-forces/orires.h"
 
 #define  def_bonded(str, lstr, nra, nrpa, nrpb, ind, func) \
     {str, lstr, (nra), (nrpa), (nrpb), IF_BOND,                        (ind), (func)}
index 025b57da1e9d474e6d9ff4ba7efbdb2243ba1553..19785df5a49eae76ade5196c9781bf370f261185 100644 (file)
 #include "gromacs/fileio/oenv.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/trx.h"
-#include "gromacs/gmxlib/disre.h"
 #include "gromacs/gmxlib/gmx_detect_hardware.h"
 #include "gromacs/gmxlib/gmx_omp_nthreads.h"
 #include "gromacs/gmxlib/main.h"
 #include "gromacs/gmxlib/md_logging.h"
 #include "gromacs/gmxlib/network.h"
-#include "gromacs/gmxlib/orires.h"
 #include "gromacs/gmxlib/sighandler.h"
 #include "gromacs/gmxlib/thread_affinity.h"
 #include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
+#include "gromacs/listed-forces/disre.h"
+#include "gromacs/listed-forces/orires.h"
 #include "gromacs/math/calculate-ewald-splitting-coefficient.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/calc_verletbuf.h"