Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / selection / sm_distance.cpp
index 8390c46ce621219776fc3589f5ab67c4a42baefe..636d28c1124a042945426a1dcbb3be9267c6ec9a 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/pbc.h"
-#include "gromacs/legacyheaders/vec.h"
+#include "gmxpre.h"
 
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/math/vec.h"
 #include "gromacs/selection/nbsearch.h"
 #include "gromacs/selection/position.h"
-#include "gromacs/selection/selmethod.h"
 #include "gromacs/utility/exceptions.h"
 
+#include "selmethod.h"
+
 /*! \internal
  * \brief
  * Data structure for distance-based selection method.
@@ -173,7 +174,7 @@ static const char *help_distance[] = {
     "returned as equal to the cutoff.",
 };
 
-/** \internal Selection method data for the \p distance method. */
+/** Selection method data for the \p distance method. */
 gmx_ana_selmethod_t sm_distance = {
     "distance", REAL_VALUE, SMETH_DYNAMIC,
     asize(smparams_distance), smparams_distance,
@@ -188,7 +189,7 @@ gmx_ana_selmethod_t sm_distance = {
     {"distance from POS [cutoff REAL]", asize(help_distance), help_distance},
 };
 
-/** \internal Selection method data for the \p distance method. */
+/** Selection method data for the \p distance method. */
 gmx_ana_selmethod_t sm_mindistance = {
     "mindistance", REAL_VALUE, SMETH_DYNAMIC,
     asize(smparams_mindistance), smparams_mindistance,
@@ -203,7 +204,7 @@ gmx_ana_selmethod_t sm_mindistance = {
     {"mindistance from POS_EXPR [cutoff REAL]", asize(help_distance), help_distance},
 };
 
-/** \internal Selection method data for the \p within method. */
+/** Selection method data for the \p within method. */
 gmx_ana_selmethod_t sm_within = {
     "within", GROUP_VALUE, SMETH_DYNAMIC,
     asize(smparams_within), smparams_within,
@@ -230,7 +231,7 @@ init_data_common(int /* npar */, gmx_ana_selparam_t *param)
 static void
 init_common(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t *param, void *data)
 {
-    t_methoddata_distance *d = (t_methoddata_distance *)data;
+    t_methoddata_distance *d = static_cast<t_methoddata_distance *>(data);
 
     if ((param[0].flags & SPAR_SET) && d->cutoff <= 0)
     {
@@ -254,7 +255,7 @@ free_data_common(void *data)
 static void
 init_frame_common(t_topology * /* top */, t_trxframe * /* fr */, t_pbc *pbc, void *data)
 {
-    t_methoddata_distance *d = (t_methoddata_distance *)data;
+    t_methoddata_distance *d = static_cast<t_methoddata_distance *>(data);
 
     d->nbsearch.reset();
     gmx::AnalysisNeighborhoodPositions pos(d->p.x, d->p.count());
@@ -272,7 +273,7 @@ static void
 evaluate_distance(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                   gmx_ana_pos_t *pos, gmx_ana_selvalue_t *out, void *data)
 {
-    t_methoddata_distance *d = (t_methoddata_distance *)data;
+    t_methoddata_distance *d = static_cast<t_methoddata_distance *>(data);
 
     out->nr = pos->m.mapb.nra;
     for (int b = 0; b < pos->count(); ++b)
@@ -296,7 +297,7 @@ static void
 evaluate_within(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                 gmx_ana_pos_t *pos, gmx_ana_selvalue_t *out, void *data)
 {
-    t_methoddata_distance *d = (t_methoddata_distance *)data;
+    t_methoddata_distance *d = static_cast<t_methoddata_distance *>(data);
 
     out->u.g->isize = 0;
     for (int b = 0; b < pos->count(); ++b)