Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / selection / sm_merge.cpp
index b015667ebf133b911be0f35d96acafb8b601b719..9c8d2e3041d188cb7d6936a48bf825b7f1b52446 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2013, by the GROMACS development team, led by
- * David van der Spoel, Berk Hess, Erik Lindahl, and including many
- * others, as listed in the AUTHORS file in the top-level source
- * directory and at http://www.gromacs.org.
+ * Copyright (c) 2009,2010,2011,2012,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
  * \author Teemu Murtola <teemu.murtola@gmail.com>
  * \ingroup module_selection
  */
-#include "gromacs/legacyheaders/macros.h"
-#include "gromacs/legacyheaders/smalloc.h"
-#include "gromacs/legacyheaders/vec.h"
+#include "gmxpre.h"
 
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/math/vec.h"
 #include "gromacs/selection/position.h"
-#include "gromacs/selection/selmethod.h"
+#include "gromacs/utility/common.h"
 #include "gromacs/utility/exceptions.h"
+#include "gromacs/utility/smalloc.h"
+
+#include "selmethod.h"
 
 /*! \internal \brief
  * Data structure for the merging selection modifiers.
@@ -63,7 +66,15 @@ typedef struct
 /** Allocates data for the merging selection modifiers. */
 static void *
 init_data_merge(int npar, gmx_ana_selparam_t *param);
-/** Initializes data for the merging selection modifiers. */
+/*! \brief
+ * Initializes data for the merging selection modifiers.
+ *
+ * \param[in] top   Not used.
+ * \param[in] npar  Not used (should be 2 or 3).
+ * \param[in] param Method parameters (should point to \ref smparams_merge).
+ * \param[in] data  Should point to a \p t_methoddata_merge.
+ * \returns   0 if everything is successful, -1 on error.
+ */
 static void
 init_merge(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
 /** Initializes output for the \p merge selection modifier. */
@@ -75,14 +86,32 @@ init_output_plus(t_topology *top, gmx_ana_selvalue_t *out, void *data);
 /** Frees the memory allocated for the merging selection modifiers. */
 static void
 free_data_merge(void *data);
-/** Evaluates the \p merge selection modifier. */
+/*! \brief
+ * Evaluates the \p merge selection modifier.
+ *
+ * \param[in]  top   Not used.
+ * \param[in]  fr    Not used.
+ * \param[in]  pbc   Not used.
+ * \param[in]  p     Positions to merge (should point to \p data->p1).
+ * \param[out] out   Output data structure (\p out->u.p is used).
+ * \param[in]  data  Should point to a \p t_methoddata_merge.
+ */
 static void
 evaluate_merge(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-               gmx_ana_pos_t *p, gmx_ana_selvalue_t *out, void *data);
-/** Evaluates the \p plus selection modifier. */
+               gmx_ana_pos_t * p, gmx_ana_selvalue_t *out, void *data);
+/*! \brief
+ * Evaluates the \p plus selection modifier.
+ *
+ * \param[in]  top   Not used.
+ * \param[in]  fr    Not used.
+ * \param[in]  pbc   Not used.
+ * \param[in]  p     Positions to merge (should point to \p data->p1).
+ * \param[out] out   Output data structure (\p out->u.p is used).
+ * \param[in]  data  Should point to a \p t_methoddata_merge.
+ */
 static void
 evaluate_plus(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-              gmx_ana_pos_t *p, gmx_ana_selvalue_t *out, void *data);
+              gmx_ana_pos_t * p, gmx_ana_selvalue_t *out, void *data);
 
 /** Parameters for the merging selection modifiers. */
 static gmx_ana_selparam_t smparams_merge[] = {
@@ -117,7 +146,7 @@ static const char *help_merge[] = {
     "subexpressions.",
 };
 
-/** \internal Selection method data for the \p plus modifier. */
+/** Selection method data for the \p plus modifier. */
 gmx_ana_selmethod_t sm_merge = {
     "merge", POS_VALUE, SMETH_MODIFIER,
     asize(smparams_merge), smparams_merge,
@@ -132,7 +161,7 @@ gmx_ana_selmethod_t sm_merge = {
     {"merge POSEXPR", asize(help_merge), help_merge},
 };
 
-/** \internal Selection method data for the \p plus modifier. */
+/** Selection method data for the \p plus modifier. */
 gmx_ana_selmethod_t sm_plus = {
     "plus", POS_VALUE, SMETH_MODIFIER,
     asize(smparams_merge)-1, smparams_merge,
@@ -169,15 +198,8 @@ init_data_merge(int npar, gmx_ana_selparam_t *param)
     return data;
 }
 
-/*!
- * \param[in] top   Not used.
- * \param[in] npar  Not used (should be 2 or 3).
- * \param[in] param Method parameters (should point to \ref smparams_merge).
- * \param[in] data  Should point to a \p t_methoddata_merge.
- * \returns   0 if everything is successful, -1 on error.
- */
 static void
-init_merge(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_merge(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t * /* param */, void *data)
 {
     t_methoddata_merge *d = (t_methoddata_merge *)data;
 
@@ -208,6 +230,7 @@ init_output_common(t_topology *top, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_merge *d = (t_methoddata_merge *)data;
 
+    GMX_UNUSED_VALUE(top);
     if (d->p1.m.type != d->p2.m.type)
     {
         /* TODO: Maybe we could pick something else here? */
@@ -279,17 +302,9 @@ free_data_merge(void *data)
     delete d;
 }
 
-/*!
- * \param[in]  top   Not used.
- * \param[in]  fr    Not used.
- * \param[in]  pbc   Not used.
- * \param[in]  p     Positions to merge (should point to \p data->p1).
- * \param[out] out   Output data structure (\p out->u.p is used).
- * \param[in]  data  Should point to a \p t_methoddata_merge.
- */
 static void
-evaluate_merge(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-               gmx_ana_pos_t *p, gmx_ana_selvalue_t *out, void *data)
+evaluate_merge(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
+               gmx_ana_pos_t * /* p */, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_merge *d = (t_methoddata_merge *)data;
     int                 i, j;
@@ -317,17 +332,9 @@ evaluate_merge(t_topology *top, t_trxframe *fr, t_pbc *pbc,
     gmx_ana_pos_append_finish(out->u.p);
 }
 
-/*!
- * \param[in]  top   Not used.
- * \param[in]  fr    Not used.
- * \param[in]  pbc   Not used.
- * \param[in]  p     Positions to merge (should point to \p data->p1).
- * \param[out] out   Output data structure (\p out->u.p is used).
- * \param[in]  data  Should point to a \p t_methoddata_merge.
- */
 static void
-evaluate_plus(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-              gmx_ana_pos_t *p, gmx_ana_selvalue_t *out, void *data)
+evaluate_plus(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
+              gmx_ana_pos_t * /* p */, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_merge *d = (t_methoddata_merge *)data;
     int                 i;