3 * This source code is part of
7 * GROningen MAchine for Chemical Simulations
9 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
10 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
11 * Copyright (c) 2001-2009, The GROMACS development team,
12 * check out http://www.gromacs.org for more information.
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * If you want to redistribute modifications, please consider that
20 * scientific software is very special. Version control is crucial -
21 * bugs must be traceable. We will be happy to consider code for
22 * inclusion in the official distribution, but derived work must not
23 * be called official GROMACS. Details are found in the README & COPYING
24 * files - if they are missing, get the official version at www.gromacs.org.
26 * To help us fund GROMACS development, we humbly ask that you cite
27 * the papers on the package - you can find them in the top README file.
29 * For more info, check our website at http://www.gromacs.org
32 * \brief Definitions of generic keyword evaluation structures.
34 * This is an implementation header: there should be no need to use it outside
37 #ifndef SELECTION_KEYWORDS_H
38 #define SELECTION_KEYWORDS_H
40 struct gmx_ana_selmethod_t
;
42 struct t_selexpr_param
;
44 /** Selection method data for comparison expression evaluation. */
45 extern struct gmx_ana_selmethod_t sm_compare
;
47 /** Selection method data for integer keyword evaluation. */
48 extern struct gmx_ana_selmethod_t sm_keyword_int
;
49 /** Selection method data for real keyword evaluation. */
50 extern struct gmx_ana_selmethod_t sm_keyword_real
;
51 /** Selection method data for string keyword evaluation. */
52 extern struct gmx_ana_selmethod_t sm_keyword_str
;
53 /** Selection method data for position keyword evaluation. */
54 extern struct gmx_ana_selmethod_t sm_keyword_pos
;
56 /** Prints information about a comparison expression. */
58 _gmx_selelem_print_compare_info(FILE *fp
, void *data
);
60 /** Sets the position type for position keyword evaluation. */
62 _gmx_selelem_set_kwpos_type(struct t_selelem
*sel
, const char *type
);
63 /** Sets the flags for position keyword evaluation. */
65 _gmx_selelem_set_kwpos_flags(struct t_selelem
*sel
, int flags
);
67 /** Does custom processing for parameters of the \c same selection method. */
69 _gmx_selelem_custom_init_same(struct gmx_ana_selmethod_t
**method
,
70 struct t_selexpr_param
*params
, void *scanner
);
72 /** Initializes a selection element for evaluating a keyword in a given group. */
74 _gmx_sel_init_keyword_evaluator(struct t_selelem
**sel
,
75 struct gmx_ana_selmethod_t
*method
,
76 struct t_selexpr_param
*param
, void *scanner
);