}
char **read_pullparams(int *ninp_p, t_inpfile **inp_p,
- t_pull *pull,
+ pull_params_t *pull,
warninp_t wi)
{
int ninp, i, nchar, nscan, m, idum;
return grpbuf;
}
-void make_pull_groups(t_pull *pull,
+void make_pull_groups(pull_params_t *pull,
char **pgnames,
const t_blocka *grps, char **gnames)
{
}
}
-void make_pull_coords(t_pull *pull)
+void make_pull_coords(pull_params_t *pull)
{
int c, d;
t_pull_coord *pcrd;
void set_pull_init(t_inputrec *ir, gmx_mtop_t *mtop, rvec *x, matrix box, real lambda,
const output_env_t oenv)
{
- t_mdatoms *md;
- t_pull *pull;
- t_pbc pbc;
- int c;
- double t_start;
-
- init_pull(NULL, ir, 0, NULL, mtop, NULL, oenv, lambda, FALSE, 0);
- md = init_mdatoms(NULL, mtop, ir->efep);
+ pull_params_t *pull;
+ struct pull_t *pull_work;
+ t_mdatoms *md;
+ t_pbc pbc;
+ int c;
+ double t_start;
+
+ pull = ir->pull;
+ pull_work = init_pull(NULL, pull, ir, 0, NULL, mtop, NULL, oenv, lambda, FALSE, 0);
+ md = init_mdatoms(NULL, mtop, ir->efep);
atoms2md(mtop, ir, 0, NULL, mtop->natoms, md);
if (ir->efep)
{
update_mdatoms(md, lambda);
}
- pull = ir->pull;
set_pbc(&pbc, ir->ePBC, box);
t_start = ir->init_t + ir->init_step*ir->delta_t;
- pull_calc_coms(NULL, pull, md, &pbc, t_start, x, NULL);
+ pull_calc_coms(NULL, pull_work, md, &pbc, t_start, x, NULL);
fprintf(stderr, "Pull group natoms pbc atom distance at start reference at t=0\n");
for (c = 0; c < pull->ncoord; c++)
pcrd->init = 0;
}
- get_pull_coord_value(pull, c, &pbc, &value);
+ get_pull_coord_value(pull_work, c, &pbc, &value);
fprintf(stderr, " %10.3f nm", value);
if (pcrd->bStart)
}
fprintf(stderr, " %10.3f nm\n", pcrd->init);
}
+
+ finish_pull(pull_work);
}