Fix segfault in pull reading
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / readir.h
index c4f0434e435fad7100b8af67f8dbc3a8b700c709..65050546ff4003ed05215ab1662986c553a95a47 100644 (file)
@@ -43,6 +43,7 @@
 
 #include "gromacs/fileio/readinp.h"
 #include "gromacs/math/vectypes.h"
+#include "gromacs/utility/arrayref.h"
 #include "gromacs/utility/real.h"
 
 namespace gmx
@@ -59,6 +60,8 @@ struct t_blocka;
 struct t_grpopts;
 struct t_inpfile;
 struct t_inputrec;
+struct t_pull_group;
+struct t_pull_coord;
 struct t_rot;
 struct warninp;
 typedef warninp* warninp_t;
@@ -152,14 +155,14 @@ void do_index(const char*                   mdparin,
 
 std::vector<std::string> read_pullparams(std::vector<t_inpfile>* inp, pull_params_t* pull, warninp_t wi);
 /* Reads the pull parameters, returns a list of the pull group names */
-
-void make_pull_groups(pull_params_t*                   pull,
-                      gmx::ArrayRef<const std::string> pullGroupNames,
-                      const t_blocka*                  grps,
-                      char**                           gnames);
+void process_pull_groups(gmx::ArrayRef<t_pull_group>      pullGroups,
+                         gmx::ArrayRef<const std::string> pullGroupNames,
+                         const t_blocka*                  grps,
+                         char**                           gnames);
 /* Process the pull group parameters after reading the index groups */
 
-void make_pull_coords(pull_params_t* pull);
+void checkPullCoords(gmx::ArrayRef<const t_pull_group> pullGroups,
+                     gmx::ArrayRef<const t_pull_coord> pullCoords);
 /* Process the pull coordinates after reading the pull groups */
 
 pull_t* set_pull_init(t_inputrec* ir, const gmx_mtop_t* mtop, rvec* x, matrix box, real lambda, warninp_t wi);