/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2011,2012,2013, by the GROMACS development team, led by
+ * 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.
* \author Teemu Murtola <teemu.murtola@gmail.com>
* \ingroup module_selection
*/
-#include "gromacs/legacyheaders/macros.h"
-#include "gromacs/legacyheaders/smalloc.h"
-#include "gromacs/legacyheaders/string2.h"
+#include "gmxpre.h"
+#include "gromacs/legacyheaders/macros.h"
#include "gromacs/selection/indexutil.h"
-#include "gromacs/selection/poscalc.h"
#include "gromacs/selection/position.h"
-#include "gromacs/selection/selmethod.h"
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/smalloc.h"
#include "keywords.h"
+#include "poscalc.h"
#include "selelem.h"
+#include "selmethod.h"
/*! \internal \brief
* Data structure for position keyword evaluation.
*/
static void
init_kwpos(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
-/*! Initializes the \p cog selection method.
+/*! \brief
+ * Initializes the \p cog selection method.
*
* \param[in] top Topology data structure.
* \param[in] npar Not used.
{"pbc", {NO_VALUE, 0, {NULL}}, NULL, 0},
};
-/** \internal Selection method data for position keyword evaluation. */
+/** Selection method data for position keyword evaluation. */
gmx_ana_selmethod_t sm_keyword_pos = {
- "kw_pos", POS_VALUE, SMETH_DYNAMIC | SMETH_VARNUMVAL,
+ "kw_pos", POS_VALUE, SMETH_DYNAMIC | SMETH_VARNUMVAL | SMETH_ALLOW_UNSORTED,
asize(smparams_keyword_pos), smparams_keyword_pos,
&init_data_pos,
&set_poscoll_pos,
{NULL, 0, NULL},
};
-/** \internal Selection method data for the \p cog method. */
+/** Selection method data for the \p cog method. */
gmx_ana_selmethod_t sm_cog = {
"cog", POS_VALUE, SMETH_DYNAMIC | SMETH_SINGLEVAL,
asize(smparams_com), smparams_com,
{"cog of ATOM_EXPR [pbc]", 0, NULL},
};
-/** \internal Selection method data for the \p com method. */
+/** Selection method data for the \p com method. */
gmx_ana_selmethod_t sm_com = {
"com", POS_VALUE, SMETH_REQTOP | SMETH_DYNAMIC | SMETH_SINGLEVAL,
asize(smparams_com), smparams_com,
}
if (!d->type && type)
{
- d->type = strdup(type);
+ d->type = gmx_strdup(type);
/* FIXME: It would be better not to have the string here hardcoded. */
if (type[0] != 'a')
{