Merge branch release-5-0
[alexxy/gromacs.git] / src / gromacs / domdec / domdec_box.cpp
similarity index 91%
rename from src/gromacs/mdlib/domdec_box.c
rename to src/gromacs/domdec/domdec_box.cpp
index b38900e581347fb603755be8d3da9be6bac19b86..170e36b97621577895ef910d82cb3c966474102d 100644 (file)
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+/*! \internal \file
+ *
+ * \brief This file defines functions used by the domdec module
+ * for (bounding) box and pbc information generation.
+ *
+ * \author Berk Hess <hess@kth.se>
+ * \ingroup module_domdec
+ */
 
-#include "typedefs.h"
-#include "vec.h"
-#include "pbc.h"
-#include "types/commrec.h"
-#include "domdec.h"
-#include "domdec_network.h"
-#include "nsgrid.h"
-#include "network.h"
+#include "gmxpre.h"
 
-#include "gmx_fatal.h"
+#include "gromacs/domdec/domdec.h"
+#include "gromacs/domdec/domdec_network.h"
+#include "gromacs/legacyheaders/network.h"
+#include "gromacs/legacyheaders/nsgrid.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/pbc.h"
+#include "gromacs/utility/fatalerror.h"
 
+/*! \brief Calculates the average and standard deviation in 3D of n charge groups */
 static void calc_cgcm_av_stddev(t_block *cgs, int n, rvec *x, rvec av, rvec stddev,
                                 t_commrec *cr_sum)
 {
@@ -119,6 +126,7 @@ static void calc_cgcm_av_stddev(t_block *cgs, int n, rvec *x, rvec av, rvec stdd
     }
 }
 
+/*! \brief Determines if dimensions require triclinic treatment and stores this info in ddbox */
 static void set_tric_dir(ivec *dd_nc, gmx_ddbox_t *ddbox, matrix box)
 {
     int   npbcdim, d, i, j;
@@ -228,6 +236,7 @@ static void set_tric_dir(ivec *dd_nc, gmx_ddbox_t *ddbox, matrix box)
     }
 }
 
+/*! \brief This function calculates and bounding box and pbc infor and populates ddbox */
 static void low_set_ddbox(t_inputrec *ir, ivec *dd_nc, matrix box,
                           gmx_bool bCalcUnboundedSize, int ncg, t_block *cgs, rvec *x,
                           t_commrec *cr_sum,