/*
* 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.
"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,
{"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,
{"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,
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)
{
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());
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)
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)