*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 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.
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifndef _readir_h
-#define _readir_h
+#ifndef GMX_GMXPREPROCESS_READIR_H
+#define GMX_GMXPREPROCESS_READIR_H
-#include "typedefs.h"
-#include "string2.h"
-#include "readinp.h"
-#include "grompp.h"
+#include "gromacs/gmxpreprocess/grompp-impl.h"
+#include "gromacs/legacyheaders/readinp.h"
+#include "gromacs/legacyheaders/typedefs.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
enum {
eshNONE, eshHBONDS, eshALLBONDS, eshHANGLES, eshALLANGLES, eshNR
gmx_bool bCoupleIntra;
} t_gromppopts;
+/*! \brief Initialise object to hold strings parsed from an .mdp file */
+void init_inputrec_strings();
+
+/*! \brief Clean up object that holds strings parsed from an .mdp file */
+void done_inputrec_strings();
-extern void init_ir(t_inputrec *ir, t_gromppopts *opts);
+void init_ir(t_inputrec *ir, t_gromppopts *opts);
/* Initiate stuff */
-extern void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
- warninp_t wi);
+void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
+ warninp_t wi);
/* Validate inputrec data.
* Fatal errors will be added to nerror.
*/
-extern int search_string(const char *s, int ng, char *gn[]);
+int search_string(const char *s, int ng, char *gn[]);
/* Returns the index of string s in the index groups */
-extern void double_check(t_inputrec *ir, matrix box, gmx_bool bConstr,
- warninp_t wi);
+void double_check(t_inputrec *ir, matrix box, gmx_bool bConstr,
+ warninp_t wi);
/* Do more checks */
-extern void triple_check(const char *mdparin, t_inputrec *ir, gmx_mtop_t *sys,
- warninp_t wi);
+void triple_check(const char *mdparin, t_inputrec *ir, gmx_mtop_t *sys,
+ warninp_t wi);
/* Do even more checks */
-extern void check_chargegroup_radii(const gmx_mtop_t *mtop, const t_inputrec *ir,
- rvec *x,
- warninp_t wi);
+void check_chargegroup_radii(const gmx_mtop_t *mtop, const t_inputrec *ir,
+ rvec *x,
+ warninp_t wi);
/* Even more checks, charge group radii vs. cut-off's only. */
-extern void get_ir(const char *mdparin, const char *mdparout,
- t_inputrec *ir, t_gromppopts *opts,
- warninp_t wi);
+void get_ir(const char *mdparin, const char *mdparout,
+ t_inputrec *ir, t_gromppopts *opts,
+ warninp_t wi);
/* Read the input file, and retrieve data for inputrec.
* More data are read, but the are only evaluated when the next
* function is called. Also prints the input file back to mdparout.
*/
-extern void do_index(const char* mdparin,
- const char *ndx,
- gmx_mtop_t *mtop,
- gmx_bool bVerbose,
- t_inputrec *ir,
- rvec *v,
- warninp_t wi);
+void do_index(const char* mdparin,
+ const char *ndx,
+ gmx_mtop_t *mtop,
+ gmx_bool bVerbose,
+ t_inputrec *ir,
+ rvec *v,
+ warninp_t wi);
/* Read the index file and assign grp numbers to atoms.
* If v is not NULL, the velocities will be scaled to the correct number
* of degrees of freedom.
/* Routines In readpull.c */
-extern char **read_pullparams(int *ninp_p, t_inpfile **inp,
- t_pull *pull, gmx_bool *bStart,
- warninp_t wi);
+char **read_pullparams(int *ninp_p, t_inpfile **inp,
+ t_pull *pull, gmx_bool *bStart,
+ warninp_t wi);
/* Reads the pull parameters, returns a list of the pull group names */
-extern void make_pull_groups(t_pull *pull,
- char **pgnames,
- const t_blocka *grps, char **gnames);
+void make_pull_groups(t_pull *pull,
+ char **pgnames,
+ const t_blocka *grps, char **gnames);
/* Process the pull group parameters after reading the index groups */
-extern void make_pull_coords(t_pull *pull);
+void make_pull_coords(t_pull *pull);
/* Process the pull coordinates after reading the pull groups */
-extern void set_pull_init(t_inputrec *ir, gmx_mtop_t *mtop, rvec *x, matrix box, real lambda,
- const output_env_t oenv, gmx_bool bStart);
+void set_pull_init(t_inputrec *ir, gmx_mtop_t *mtop, rvec *x, matrix box, real lambda,
+ const output_env_t oenv, gmx_bool bStart);
/* Prints the initial pull group distances in x.
* If bStart adds the distance to the initial reference location.
*/
-extern int str_nelem(const char *str, int maxptr, char *ptr[]);
+int str_nelem(const char *str, int maxptr, char *ptr[]);
/* helper function from readir.c to convert strings */
-extern void read_adressparams(int *ninp_p, t_inpfile **inp_p, t_adress *adress, warninp_t wi);
+void read_adressparams(int *ninp_p, t_inpfile **inp_p, t_adress *adress, warninp_t wi);
/* Reads in AdResS related parameters */
-extern void do_adress_index(t_adress *adress, gmx_groups_t *groups, char **gnames, t_grpopts *opts, warninp_t wi);
+void do_adress_index(t_adress *adress, gmx_groups_t *groups, char **gnames, t_grpopts *opts, warninp_t wi);
/* Generate adress groups */
-extern char **read_rotparams(int *ninp_p, t_inpfile **inp, t_rot *rot, warninp_t wi);
+char **read_rotparams(int *ninp_p, t_inpfile **inp, t_rot *rot, warninp_t wi);
/* Reads enforced rotation parameters, returns a list of the rot group names */
-extern void make_rotation_groups(t_rot *rot, char **rotgnames,
- t_blocka *grps, char **gnames);
+void make_rotation_groups(t_rot *rot, char **rotgnames,
+ t_blocka *grps, char **gnames);
/* Process the rotation parameters after reading the index groups */
-extern void set_reference_positions(t_rot *rot, rvec *x, matrix box,
- const char *fn, gmx_bool bSet, warninp_t wi);
+void set_reference_positions(t_rot *rot, rvec *x, matrix box,
+ const char *fn, gmx_bool bSet, warninp_t wi);
+
+#ifdef __cplusplus
+}
+#endif
-#endif /* _readir_h */
+#endif