*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016, 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.
#include "gromacs/mdlib/nbnxn_util.h"
#include "gromacs/mdlib/ns.h"
#include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/fcdata.h"
#include "gromacs/mdtypes/group.h"
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016, 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.
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/mdrun_signalling.h"
+#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/tgroup.h"
+#include "gromacs/mdlib/update.h"
#include "gromacs/mdlib/vcm.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/df_history.h"
/* TODO Specialize this routine into init-time and loop-time versions?
e.g. bReadEkin is only true when restoring from checkpoint */
-void compute_globals(FILE *fplog, gmx_global_stat_t gstat, t_commrec *cr, t_inputrec *ir,
+void compute_globals(FILE *fplog, gmx_global_stat *gstat, t_commrec *cr, t_inputrec *ir,
t_forcerec *fr, gmx_ekindata_t *ekind,
t_state *state, t_mdatoms *mdatoms,
t_nrnb *nrnb, t_vcm *vcm, gmx_wallcycle_t wcycle,
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016, 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.
#ifndef GMX_MDLIB_MD_SUPPORT_H
#define GMX_MDLIB_MD_SUPPORT_H
-#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/vcm.h"
#include "gromacs/timing/wallcycle.h"
struct gmx_constr;
+struct gmx_ekindata_t;
+struct gmx_enerdata_t;
+struct gmx_global_stat;
struct gmx_multisim_t;
struct gmx_signalling_t;
+struct t_extmass;
+struct t_forcerec;
+struct t_grpopts;
+struct t_lambda;
+struct t_nrnb;
+struct t_state;
struct t_trxframe;
/* Define a number of flags to better control the information
gmx_ekindata_t *ekinda, gmx_ekindata_t *ekindb, t_grpopts* opts);
/* Copy stuff from state A to state B */
-void compute_globals(FILE *fplog, gmx_global_stat_t gstat, t_commrec *cr, t_inputrec *ir,
+void compute_globals(FILE *fplog, gmx_global_stat *gstat, t_commrec *cr, t_inputrec *ir,
t_forcerec *fr, gmx_ekindata_t *ekind,
t_state *state, t_mdatoms *mdatoms,
t_nrnb *nrnb, t_vcm *vcm, gmx_wallcycle_t wcycle,
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016, 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.
double *t, double *t0,
real *lambda, int *fep_state, double *lam0,
t_nrnb *nrnb, gmx_mtop_t *mtop,
- gmx_update_t *upd,
+ gmx_update_t **upd,
int nfile, const t_filenm fnm[],
gmx_mdoutf_t *outf, t_mdebin **mdebin,
tensor force_vir, tensor shake_vir, rvec mu_tot,
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016, 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.
#include "gromacs/fileio/enxio.h"
#include "gromacs/mdlib/mdebin.h"
#include "gromacs/mdlib/mdoutf.h"
-#include "gromacs/mdlib/update.h"
#include "gromacs/mdlib/vcm.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/timing/walltime_accounting.h"
struct gmx_constr;
struct gmx_localtop_t;
struct gmx_output_env_t;
+struct gmx_update_t;
struct nonbonded_verlet_t;
struct t_graph;
struct t_mdatoms;
double *t, double *t0,
real *lambda, int *fep_state, double *lam0,
t_nrnb *nrnb, gmx_mtop_t *mtop,
- gmx_update_t *upd,
+ gmx_update_t **upd,
int nfile, const t_filenm fnm[],
gmx_mdoutf_t *outf, t_mdebin **mdebin,
tensor force_vir, tensor shake_vir,
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016, 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.
#include "gromacs/mdlib/mdoutf.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
+#include "gromacs/mdlib/update.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/energyhistory.h"
#include "gromacs/mdtypes/inputrec.h"
real *boltzfac;
} gmx_stochd_t;
-typedef struct gmx_update
+struct gmx_update_t
{
gmx_stochd_t *sd;
/* xprime for constraint algorithms */
/* Variables for the deform algorithm */
gmx_int64_t deformref_step;
matrix deformref_box;
-} t_gmx_update;
+};
static void do_update_md(int start, int nrend, double dt,
return sd;
}
-gmx_update_t init_update(t_inputrec *ir)
+gmx_update_t *init_update(t_inputrec *ir)
{
- t_gmx_update *upd;
+ gmx_update_t *upd;
snew(upd, 1);
}
}
-void set_deform_reference_box(gmx_update_t upd, gmx_int64_t step, matrix box)
+void set_deform_reference_box(gmx_update_t *upd, gmx_int64_t step, matrix box)
{
upd->deformref_step = step;
copy_mat(box, upd->deformref_box);
}
-static void deform(gmx_update_t upd,
+static void deform(gmx_update_t *upd,
int start, int homenr, rvec x[], matrix box,
const t_inputrec *ir, gmx_int64_t step)
{
}
}
-static rvec *get_xprime(const t_state *state, gmx_update_t upd)
+static rvec *get_xprime(const t_state *state, gmx_update_t *upd)
{
if (state->nalloc > upd->xp_nalloc)
{
t_commrec *cr,
t_nrnb *nrnb,
gmx_wallcycle_t wcycle,
- gmx_update_t upd,
+ gmx_update_t *upd,
gmx_constr_t constr,
gmx_bool bFirstHalf,
gmx_bool bCalcVir)
rvec force[], /* forces on home particles */
matrix pcoupl_mu,
t_nrnb *nrnb,
- gmx_update_t upd)
+ gmx_update_t *upd)
{
double dt;
int start, homenr, i, n, m;
t_fcdata *fcd,
gmx_ekindata_t *ekind,
matrix M,
- gmx_update_t upd,
+ gmx_update_t *upd,
int UpdatePart,
t_commrec *cr, /* these shouldn't be here -- need to think about it */
gmx_constr_t constr)
}
extern gmx_bool update_randomize_velocities(t_inputrec *ir, gmx_int64_t step, const t_commrec *cr,
- t_mdatoms *md, t_state *state, gmx_update_t upd, gmx_constr_t constr)
+ t_mdatoms *md, t_state *state, gmx_update_t *upd, gmx_constr_t constr)
{
real rate = (ir->delta_t)/ir->opts.tau_t[0];
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016, 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.
struct t_nrnb;
struct t_state;
-/* Abstract type for stochastic dynamics */
-typedef struct gmx_update *gmx_update_t;
+/* Abstract type for update */
+struct gmx_update_t;
/* Initialize the stochastic dynamics struct */
-gmx_update_t init_update(t_inputrec *ir);
-
-/* Store the random state from sd in state */
-void get_stochd_state(gmx_update_t sd, t_state *state);
-
-/* Set the random in sd from state */
-void set_stochd_state(gmx_update_t sd, t_state *state);
+gmx_update_t *init_update(t_inputrec *ir);
/* Store the box at step step
* as a reference state for simulations with box deformation.
*/
-void set_deform_reference_box(gmx_update_t upd,
+void set_deform_reference_box(gmx_update_t *upd,
gmx_int64_t step, matrix box);
void update_tcouple(gmx_int64_t step,
t_fcdata *fcd,
gmx_ekindata_t *ekind,
matrix M,
- gmx_update_t upd,
+ gmx_update_t *upd,
int bUpdatePart,
t_commrec *cr, /* these shouldn't be here -- need to think about it */
gmx_constr *constr);
/* Return TRUE if OK, FALSE in case of Shake Error */
-extern gmx_bool update_randomize_velocities(t_inputrec *ir, gmx_int64_t step, const t_commrec *cr, t_mdatoms *md, t_state *state, gmx_update_t upd, gmx_constr *constr);
+extern gmx_bool update_randomize_velocities(t_inputrec *ir, gmx_int64_t step, const t_commrec *cr, t_mdatoms *md, t_state *state, gmx_update_t *upd, gmx_constr *constr);
void update_constraints(FILE *fplog,
gmx_int64_t step,
t_commrec *cr,
t_nrnb *nrnb,
gmx_wallcycle_t wcycle,
- gmx_update_t upd,
+ gmx_update_t *upd,
gmx_constr *constr,
gmx_bool bFirstHalf,
gmx_bool bCalcVir);
rvec force[], /* forces on home particles */
matrix pcoupl_mu,
t_nrnb *nrnb,
- gmx_update_t upd);
+ gmx_update_t *upd);
/* Return TRUE if OK, FALSE in case of Shake Error */
void calc_ke_part(t_state *state, t_grpopts *opts, t_mdatoms *md,
gmx_enerdata_t *enerd;
rvec *f = NULL;
gmx_global_stat_t gstat;
- gmx_update_t upd = NULL;
+ gmx_update_t *upd = NULL;
t_graph *graph = NULL;
gmx_signalling_t gs;
gmx_groups_t *groups;
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2011,2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2013,2014,2015,2016, 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.
#include "gromacs/mdlib/nbnxn_search.h"
#include "gromacs/mdlib/qmmm.h"
#include "gromacs/mdlib/sighandler.h"
+#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/tpi.h"
#include "gromacs/mdrunutility/threadaffinity.h"
#include "gromacs/mdtypes/inputrec.h"