static void dd_distribute_state(gmx_domdec_t *dd,
const t_state *state, t_state *state_local,
- PaddedVector<gmx::RVec> *f)
+ PaddedHostVector<gmx::RVec> *f)
{
int nh = state_local->nhchainlength;
}
}
-void distributeState(const gmx::MDLogger &mdlog,
- gmx_domdec_t *dd,
- const gmx_mtop_t &mtop,
- t_state *state_global,
- const gmx_ddbox_t &ddbox,
- t_state *state_local,
- PaddedVector<gmx::RVec> *f)
+void distributeState(const gmx::MDLogger &mdlog,
+ gmx_domdec_t *dd,
+ const gmx_mtop_t &mtop,
+ t_state *state_global,
+ const gmx_ddbox_t &ddbox,
+ t_state *state_local,
+ PaddedHostVector<gmx::RVec> *f)
{
rvec *xGlobal = (DDMASTER(dd) ? state_global->x.rvec_array() : nullptr);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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_DOMDEC_DOMDEC_DISTRIBUTE_H
#define GMX_DOMDEC_DOMDEC_DISTRIBUTE_H
-#include "gromacs/math/paddedvector.h"
+#include "gromacs/gpu_utils/hostallocator.h"
#include "gromacs/utility/basedefinitions.h"
struct gmx_ddbox_t;
}
/*! \brief Distributes the state from the master rank to all DD ranks */
-void distributeState(const gmx::MDLogger &mdlog,
- gmx_domdec_t *dd,
- const gmx_mtop_t &mtop,
- t_state *state_global,
- const gmx_ddbox_t &ddbox,
- t_state *state_local,
- PaddedVector<gmx::RVec> *f);
+void distributeState(const gmx::MDLogger &mdlog,
+ gmx_domdec_t *dd,
+ const gmx_mtop_t &mtop,
+ t_state *state_global,
+ const gmx_ddbox_t &ddbox,
+ t_state *state_local,
+ gmx::PaddedHostVector<gmx::RVec> *f);
#endif
matrix box, gmx_ddbox_t *ddbox,
t_forcerec *fr,
t_state *state,
- PaddedVector<gmx::RVec> *f)
+ PaddedHostVector<gmx::RVec> *f)
{
int dim_ind, dim, dim0, dim1, dim2, dimd, nat_tot;
int nzone, nzone_send, zone, zonei, cg0, cg1;
}
}
-// TODO Remove fplog when group scheme and charge groups are gone
-void dd_partition_system(FILE *fplog,
- const gmx::MDLogger &mdlog,
- int64_t step,
- const t_commrec *cr,
- gmx_bool bMasterState,
- int nstglobalcomm,
- t_state *state_global,
- const gmx_mtop_t &top_global,
- const t_inputrec *ir,
- gmx::ImdSession *imdSession,
- pull_t *pull_work,
- t_state *state_local,
- PaddedVector<gmx::RVec> *f,
- gmx::MDAtoms *mdAtoms,
- gmx_localtop_t *top_local,
- t_forcerec *fr,
- gmx_vsite_t *vsite,
- gmx::Constraints *constr,
- t_nrnb *nrnb,
- gmx_wallcycle *wcycle,
- gmx_bool bVerbose)
+//!\brief TODO Remove fplog when group scheme and charge groups are gone
+void dd_partition_system(FILE *fplog,
+ const gmx::MDLogger &mdlog,
+ int64_t step,
+ const t_commrec *cr,
+ gmx_bool bMasterState,
+ int nstglobalcomm,
+ t_state *state_global,
+ const gmx_mtop_t &top_global,
+ const t_inputrec *ir,
+ gmx::ImdSession *imdSession,
+ pull_t *pull_work,
+ t_state *state_local,
+ PaddedHostVector<gmx::RVec> *f,
+ gmx::MDAtoms *mdAtoms,
+ gmx_localtop_t *top_local,
+ t_forcerec *fr,
+ gmx_vsite_t *vsite,
+ gmx::Constraints *constr,
+ t_nrnb *nrnb,
+ gmx_wallcycle *wcycle,
+ gmx_bool bVerbose)
{
gmx_domdec_t *dd;
gmx_domdec_comm_t *comm;
#ifndef GMX_DOMDEC_PARTITION_H
#define GMX_DOMDEC_PARTITION_H
-#include "gromacs/math/paddedvector.h"
+#include "gromacs/gpu_utils/hostallocator.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
* If bMasterState==TRUE then state_global from the master node is used,
* else state_local is redistributed between the nodes.
* When f!=NULL, *f will be reallocated to the size of state_local.
+ *
+ * \param[in] fplog Pointer to the log file
+ * \param[in] mdlog MD file logger
+ * \param[in] step Current step
+ * \param[in] cr Communication record
+ * \param[in] bMasterState Is it a master state
+ * \param[in] nstglobalcomm Will globals be computed on this step
+ * \param[in] state_global Global state
+ * \param[in] top_global Global topology
+ * \param[in] ir Input record
+ * \param[in] imdSession IMD handle
+ * \param[in] pull_work Pulling data
+ * \param[in] state_local Local state
+ * \param[in] f Force buffer
+ * \param[in] mdatoms MD atoms
+ * \param[in] top_local Local topology
+ * \param[in] fr Force record
+ * \param[in] vsite Virtual sites
+ * \param[in] constr Constraints
+ * \param[in] nrnb Cycle counters
+ * \param[in] wcycle Timers
+ * \param[in] bVerbose Be verbose
*/
-void dd_partition_system(FILE *fplog,
- const gmx::MDLogger &mdlog,
- int64_t step,
- const t_commrec *cr,
- gmx_bool bMasterState,
- int nstglobalcomm,
- t_state *state_global,
- const gmx_mtop_t &top_global,
- const t_inputrec *ir,
- gmx::ImdSession *imdSession,
- pull_t *pull_work,
- t_state *state_local,
- PaddedVector<gmx::RVec> *f,
- gmx::MDAtoms *mdatoms,
- gmx_localtop_t *top_local,
- t_forcerec *fr,
- gmx_vsite_t *vsite,
- gmx::Constraints *constr,
- t_nrnb *nrnb,
- gmx_wallcycle *wcycle,
- gmx_bool bVerbose);
+void dd_partition_system(FILE *fplog,
+ const gmx::MDLogger &mdlog,
+ int64_t step,
+ const t_commrec *cr,
+ gmx_bool bMasterState,
+ int nstglobalcomm,
+ t_state *state_global,
+ const gmx_mtop_t &top_global,
+ const t_inputrec *ir,
+ gmx::ImdSession *imdSession,
+ pull_t *pull_work,
+ t_state *state_local,
+ gmx::PaddedHostVector<gmx::RVec> *f,
+ gmx::MDAtoms *mdatoms,
+ gmx_localtop_t *top_local,
+ t_forcerec *fr,
+ gmx_vsite_t *vsite,
+ gmx::Constraints *constr,
+ t_nrnb *nrnb,
+ gmx_wallcycle *wcycle,
+ gmx_bool bVerbose);
/*! \brief Check whether bonded interactions are missing, if appropriate
*
void dd_redistribute_cg(FILE *fplog, int64_t step,
gmx_domdec_t *dd, ivec tric_dir,
t_state *state,
- PaddedVector<gmx::RVec> *f,
+ PaddedHostVector<gmx::RVec> *f,
t_forcerec *fr,
t_nrnb *nrnb,
int *ncg_moved)
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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 <cstdio>
-#include "gromacs/math/paddedvector.h"
+#include "gromacs/gpu_utils/hostallocator.h"
#include "gromacs/utility/basedefinitions.h"
struct gmx_domdec_t;
class t_state;
/*! \brief Redistribute the atoms to their, new, local domains */
-void dd_redistribute_cg(FILE *fplog,
- int64_t step,
- gmx_domdec_t *dd,
- ivec tric_dir,
- t_state *state,
- PaddedVector<gmx::RVec> *f,
- t_forcerec *fr,
- t_nrnb *nrnb,
- int *ncg_moved);
+void dd_redistribute_cg(FILE *fplog,
+ int64_t step,
+ gmx_domdec_t *dd,
+ ivec tric_dir,
+ t_state *state,
+ gmx::PaddedHostVector<gmx::RVec> *f,
+ t_forcerec *fr,
+ t_nrnb *nrnb,
+ int *ncg_moved);
#endif
gmx_fatal(FARGS, "pbc=screw with non-zero box_zy is not supported");
}
}
-
-void dd_resize_state(t_state *state,
- PaddedVector<gmx::RVec> *f,
- int natoms)
+/*! \brief Resize the state and f*/
+void dd_resize_state(t_state *state,
+ PaddedHostVector<gmx::RVec> *f,
+ int natoms)
{
if (debug)
{
}
}
-void dd_check_alloc_ncg(t_forcerec *fr,
- t_state *state,
- PaddedVector<gmx::RVec> *f,
- int numChargeGroups)
+/*! \brief Enrsure fr, state and f, if != nullptr, can hold numChargeGroups
+ * atoms for the Verlet scheme and charge groups for the group scheme.
+ */
+void dd_check_alloc_ncg(t_forcerec *fr,
+ t_state *state,
+ PaddedHostVector<gmx::RVec> *f,
+ int numChargeGroups)
{
fr->cginfo.resize(numChargeGroups);
#ifndef GMX_DOMDEC_DOMDEC_UTILITY_H
#define GMX_DOMDEC_DOMDEC_UTILITY_H
-#include "gromacs/math/paddedvector.h"
+#include "gromacs/gpu_utils/hostallocator.h"
#include "gromacs/mdtypes/forcerec.h"
#include "domdec_internal.h"
return (comm->ddSettings.eFlop ? comm->flop_n : comm->cycl_n[ddCyclF]);
}
-/*! \brief Resize the state and f, if !=nullptr, to natoms */
-void dd_resize_state(t_state *state,
- PaddedVector<gmx::RVec> *f,
- int natoms);
+/*! \brief Resize the state and f, if !=nullptr, to natoms
+ *
+ * \param[in] state Current state
+ * \param[in] f The vector of forces to be resized
+ * \param[out] natoms New number of atoms to accommodate
+ */
+void dd_resize_state(t_state *state,
+ gmx::PaddedHostVector<gmx::RVec> *f,
+ int natoms);
-/*! \brief Enrsure fr, state and f, if != nullptr, can hold numChargeGroups atoms for the Verlet scheme and charge groups for the group scheme */
-void dd_check_alloc_ncg(t_forcerec *fr,
- t_state *state,
- PaddedVector<gmx::RVec> *f,
- int numChargeGroups);
+/*! \brief Enrsure fr, state and f, if != nullptr, can hold numChargeGroups atoms for the Verlet scheme and charge groups for the group scheme
+ *
+ * \param[in] fr Force record
+ * \param[in] state Current state
+ * \param[in] f The force buffer
+ * \param[out] numChargeGroups Number of charged groups
+ */
+void dd_check_alloc_ncg(t_forcerec *fr,
+ t_state *state,
+ gmx::PaddedHostVector<gmx::RVec> *f,
+ int numChargeGroups);
/*! \brief Returns a domain-to-domain cutoff distance given an atom-to-atom cutoff */
static inline real
// alias to avoid a large ripple of nearly useless changes.
// t_inputrec is being replaced by IMdpOptionsProvider, so this
// will go away eventually.
- t_inputrec *ir = inputrec;
- int64_t step, step_rel;
- double t, t0 = ir->init_t, lam0[efptNR];
- gmx_bool bGStatEveryStep, bGStat, bCalcVir, bCalcEnerStep, bCalcEner;
- gmx_bool bNS, bNStList, bStopCM,
- bFirstStep, bInitStep, bLastStep = FALSE;
- gmx_bool bDoDHDL = FALSE, bDoFEP = FALSE, bDoExpanded = FALSE;
- gmx_bool do_ene, do_log, do_verbose;
- gmx_bool bMasterState;
- unsigned int force_flags;
- tensor force_vir = {{0}}, shake_vir = {{0}}, total_vir = {{0}},
- tmp_vir = {{0}}, pres = {{0}};
- int i, m;
- rvec mu_tot;
- matrix parrinellorahmanMu, M;
- gmx_repl_ex_t repl_ex = nullptr;
- gmx_localtop_t top;
- PaddedVector<gmx::RVec> f {};
- gmx_global_stat_t gstat;
- t_graph *graph = nullptr;
- gmx_shellfc_t *shellfc;
- gmx_bool bSumEkinhOld, bDoReplEx, bExchanged, bNeedRepartition;
- gmx_bool bTemp, bPres, bTrotter;
- real dvdl_constr;
- std::vector<RVec> cbuf;
- matrix lastbox;
- int lamnew = 0;
+ t_inputrec *ir = inputrec;
+ int64_t step, step_rel;
+ double t, t0 = ir->init_t, lam0[efptNR];
+ gmx_bool bGStatEveryStep, bGStat, bCalcVir, bCalcEnerStep, bCalcEner;
+ gmx_bool bNS, bNStList, bStopCM,
+ bFirstStep, bInitStep, bLastStep = FALSE;
+ gmx_bool bDoDHDL = FALSE, bDoFEP = FALSE, bDoExpanded = FALSE;
+ gmx_bool do_ene, do_log, do_verbose;
+ gmx_bool bMasterState;
+ unsigned int force_flags;
+ tensor force_vir = {{0}}, shake_vir = {{0}}, total_vir = {{0}},
+ tmp_vir = {{0}}, pres = {{0}};
+ int i, m;
+ rvec mu_tot;
+ matrix parrinellorahmanMu, M;
+ gmx_repl_ex_t repl_ex = nullptr;
+ gmx_localtop_t top;
+ PaddedHostVector<gmx::RVec> f {};
+ gmx_global_stat_t gstat;
+ t_graph *graph = nullptr;
+ gmx_shellfc_t *shellfc;
+ gmx_bool bSumEkinhOld, bDoReplEx, bExchanged, bNeedRepartition;
+ gmx_bool bTemp, bPres, bTrotter;
+ real dvdl_constr;
+ std::vector<RVec> cbuf;
+ matrix lastbox;
+ int lamnew = 0;
/* for FEP */
- int nstfep = 0;
- double cycles;
- real saved_conserved_quantity = 0;
- real last_ekin = 0;
- t_extmass MassQ;
- char sbuf[STEPSTRSIZE], sbuf2[STEPSTRSIZE];
+ int nstfep = 0;
+ double cycles;
+ real saved_conserved_quantity = 0;
+ real last_ekin = 0;
+ t_extmass MassQ;
+ char sbuf[STEPSTRSIZE], sbuf2[STEPSTRSIZE];
/* PME load balancing data for GPU kernels */
gmx_bool bPMETune = FALSE;
void gmx::LegacySimulator::do_mimic()
{
- t_inputrec *ir = inputrec;
- int64_t step, step_rel;
- double t, lam0[efptNR];
- bool isLastStep = false;
- bool doFreeEnergyPerturbation = false;
- unsigned int force_flags;
- tensor force_vir, shake_vir, total_vir, pres;
- rvec mu_tot;
- gmx_localtop_t top;
- PaddedVector<gmx::RVec> f {};
- gmx_global_stat_t gstat;
- t_graph *graph = nullptr;
- gmx_shellfc_t *shellfc;
-
- double cycles;
+ t_inputrec *ir = inputrec;
+ int64_t step, step_rel;
+ double t, lam0[efptNR];
+ bool isLastStep = false;
+ bool doFreeEnergyPerturbation = false;
+ unsigned int force_flags;
+ tensor force_vir, shake_vir, total_vir, pres;
+ rvec mu_tot;
+ gmx_localtop_t top;
+ PaddedHostVector<gmx::RVec> f {};
+ gmx_global_stat_t gstat;
+ t_graph *graph = nullptr;
+ gmx_shellfc_t *shellfc;
+
+ double cycles;
/* Domain decomposition could incorrectly miss a bonded
interaction, but checking for that requires a global
//! Utility structure for manipulating states during EM
typedef struct {
//! Copy of the global state
- t_state s;
+ t_state s;
//! Force array
- PaddedVector<gmx::RVec> f;
+ PaddedHostVector<gmx::RVec> f;
//! Potential energy
- real epot;
+ real epot;
//! Norm of the force
- real fnorm;
+ real fnorm;
//! Maximum force
- real fmax;
+ real fmax;
//! Direction
- int a_fmax;
+ int a_fmax;
} em_state_t;
//! Print the EM starting conditions
// \returns true when the step succeeded, false when a constraint error occurred
static bool do_em_step(const t_commrec *cr,
t_inputrec *ir, t_mdatoms *md,
- em_state_t *ems1, real a, const PaddedVector<gmx::RVec> *force,
+ em_state_t *ems1, real a, const PaddedHostVector<gmx::RVec> *force,
em_state_t *ems2,
gmx::Constraints *constr,
int64_t count)
// alias to avoid a large ripple of nearly useless changes.
// t_inputrec is being replaced by IMdpOptionsProvider, so this
// will go away eventually.
- t_inputrec *ir = inputrec;
- int64_t step, step_rel;
- double t, lam0[efptNR];
- bool isLastStep = false;
- bool doFreeEnergyPerturbation = false;
- unsigned int force_flags;
- tensor force_vir, shake_vir, total_vir, pres;
- t_trxstatus *status = nullptr;
- rvec mu_tot;
- t_trxframe rerun_fr;
- gmx_localtop_t top;
- PaddedVector<gmx::RVec> f {};
- gmx_global_stat_t gstat;
- t_graph *graph = nullptr;
- gmx_shellfc_t *shellfc;
-
- double cycles;
+ t_inputrec *ir = inputrec;
+ int64_t step, step_rel;
+ double t, lam0[efptNR];
+ bool isLastStep = false;
+ bool doFreeEnergyPerturbation = false;
+ unsigned int force_flags;
+ tensor force_vir, shake_vir, total_vir, pres;
+ t_trxstatus *status = nullptr;
+ rvec mu_tot;
+ t_trxframe rerun_fr;
+ gmx_localtop_t top;
+ PaddedHostVector<gmx::RVec> f {};
+ gmx_global_stat_t gstat;
+ t_graph *graph = nullptr;
+ gmx_shellfc_t *shellfc;
+
+ double cycles;
/* Domain decomposition could incorrectly miss a bonded
interaction, but checking for that requires a global
int nflexcon; /* The number of flexible constraints */
/* Temporary arrays, should be fixed size 2 when fully converted to C++ */
- PaddedVector<gmx::RVec> *x; /* Array for iterative minimization */
- PaddedVector<gmx::RVec> *f; /* Array for iterative minimization */
+ PaddedHostVector<gmx::RVec> *x; /* Array for iterative minimization */
+ PaddedHostVector<gmx::RVec> *f; /* Array for iterative minimization */
/* Flexible constraint working data */
rvec *acc_dir; /* Acceleration direction for flexcon */
}
snew(shfc, 1);
- shfc->x = new PaddedVector<gmx::RVec>[2] {};
- shfc->f = new PaddedVector<gmx::RVec>[2] {};
+ shfc->x = new PaddedHostVector<gmx::RVec>[2] {};
+ shfc->f = new PaddedHostVector<gmx::RVec>[2] {};
shfc->nflexcon = nflexcon;
if (nshell == 0)
{
GMX_RELEASE_ASSERT(gmx_omp_nthreads_get(emntDefault) == 1, "TPI does not support OpenMP");
- gmx_localtop_t top;
- PaddedVector<gmx::RVec> f {};
- real lambda, t, temp, beta, drmax, epot;
- double embU, sum_embU, *sum_UgembU, V, V_all, VembU_all;
- t_trxstatus *status;
- t_trxframe rerun_fr;
- gmx_bool bDispCorr, bCharge, bRFExcl, bNotLastFrame, bStateChanged, bNS;
- tensor force_vir, shake_vir, vir, pres;
- int a_tp0, a_tp1, ngid, gid_tp, nener, e;
- rvec *x_mol;
- rvec mu_tot, x_init, dx;
- int nnodes, frame;
- int64_t frame_step_prev, frame_step;
- int64_t nsteps, stepblocksize = 0, step;
- int64_t seed;
- int i;
- FILE *fp_tpi = nullptr;
- char *ptr, *dump_pdb, **leg, str[STRLEN], str2[STRLEN];
- double dbl, dump_ener;
- gmx_bool bCavity;
- int nat_cavity = 0, d;
- real *mass_cavity = nullptr, mass_tot;
- int nbin;
- double invbinw, *bin, refvolshift, logV, bUlogV;
- gmx_bool bEnergyOutOfBounds;
- const char *tpid_leg[2] = {"direct", "reweighted"};
- auto mdatoms = mdAtoms->mdatoms();
+ gmx_localtop_t top;
+ PaddedHostVector<gmx::RVec> f {};
+ real lambda, t, temp, beta, drmax, epot;
+ double embU, sum_embU, *sum_UgembU, V, V_all, VembU_all;
+ t_trxstatus *status;
+ t_trxframe rerun_fr;
+ gmx_bool bDispCorr, bCharge, bRFExcl, bNotLastFrame, bStateChanged, bNS;
+ tensor force_vir, shake_vir, vir, pres;
+ int a_tp0, a_tp1, ngid, gid_tp, nener, e;
+ rvec *x_mol;
+ rvec mu_tot, x_init, dx;
+ int nnodes, frame;
+ int64_t frame_step_prev, frame_step;
+ int64_t nsteps, stepblocksize = 0, step;
+ int64_t seed;
+ int i;
+ FILE *fp_tpi = nullptr;
+ char *ptr, *dump_pdb, **leg, str[STRLEN], str2[STRLEN];
+ double dbl, dump_ener;
+ gmx_bool bCavity;
+ int nat_cavity = 0, d;
+ real *mass_cavity = nullptr, mass_tot;
+ int nbin;
+ double invbinw, *bin, refvolshift, logV, bUlogV;
+ gmx_bool bEnergyOutOfBounds;
+ const char *tpid_leg[2] = {"direct", "reweighted"};
+ auto mdatoms = mdAtoms->mdatoms();
GMX_UNUSED_VALUE(outputProvider);
t_state();
// All things public
- int natoms; //!< Number of atoms, local + non-local; this is the size of \p x, \p v and \p cg_p, when used
- int ngtc; //!< The number of temperature coupling groups
- int nnhpres; //!< The NH-chain length for the MTTK barostat
- int nhchainlength; //!< The NH-chain length for temperature coupling
- int flags; //!< Set of bit-flags telling which entries are present, see enum at the top of the file
- int fep_state; //!< indicates which of the alchemical states we are in
- std::array<real, efptNR> lambda; //!< Free-energy lambda vector
- matrix box; //!< Matrix of box vectors
- matrix box_rel; //!< Relative box vectors to preserve box shape
- matrix boxv; //!< Box velocities for Parrinello-Rahman P-coupling
- matrix pres_prev; //!< Pressure of the previous step for pcoupl
- matrix svir_prev; //!< Shake virial for previous step for pcoupl
- matrix fvir_prev; //!< Force virial of the previous step for pcoupl
- std::vector<double> nosehoover_xi; //!< Nose-Hoover coordinates (ngtc)
- std::vector<double> nosehoover_vxi; //!< Nose-Hoover velocities (ngtc)
- std::vector<double> nhpres_xi; //!< Pressure Nose-Hoover coordinates
- std::vector<double> nhpres_vxi; //!< Pressure Nose-Hoover velocities
- std::vector<double> therm_integral; //!< Work exterted N-H/V-rescale T-coupling (ngtc)
- double baros_integral; //!< For Berendsen P-coupling conserved quantity
- real veta; //!< Trotter based isotropic P-coupling
- real vol0; //!< Initial volume,required for computing MTTK conserved quantity
- PaddedHostVector<gmx::RVec> x; //!< The coordinates (natoms)
- PaddedVector<gmx::RVec> v; //!< The velocities (natoms)
- PaddedVector<gmx::RVec> cg_p; //!< p vector for conjugate gradient minimization
-
- ekinstate_t ekinstate; //!< The state of the kinetic energy
+ int natoms; //!< Number of atoms, local + non-local; this is the size of \p x, \p v and \p cg_p, when used
+ int ngtc; //!< The number of temperature coupling groups
+ int nnhpres; //!< The NH-chain length for the MTTK barostat
+ int nhchainlength; //!< The NH-chain length for temperature coupling
+ int flags; //!< Set of bit-flags telling which entries are present, see enum at the top of the file
+ int fep_state; //!< indicates which of the alchemical states we are in
+ std::array<real, efptNR> lambda; //!< Free-energy lambda vector
+ matrix box; //!< Matrix of box vectors
+ matrix box_rel; //!< Relative box vectors to preserve box shape
+ matrix boxv; //!< Box velocities for Parrinello-Rahman P-coupling
+ matrix pres_prev; //!< Pressure of the previous step for pcoupl
+ matrix svir_prev; //!< Shake virial for previous step for pcoupl
+ matrix fvir_prev; //!< Force virial of the previous step for pcoupl
+ std::vector<double> nosehoover_xi; //!< Nose-Hoover coordinates (ngtc)
+ std::vector<double> nosehoover_vxi; //!< Nose-Hoover velocities (ngtc)
+ std::vector<double> nhpres_xi; //!< Pressure Nose-Hoover coordinates
+ std::vector<double> nhpres_vxi; //!< Pressure Nose-Hoover velocities
+ std::vector<double> therm_integral; //!< Work exterted N-H/V-rescale T-coupling (ngtc)
+ double baros_integral; //!< For Berendsen P-coupling conserved quantity
+ real veta; //!< Trotter based isotropic P-coupling
+ real vol0; //!< Initial volume,required for computing MTTK conserved quantity
+ PaddedHostVector<gmx::RVec> x; //!< The coordinates (natoms)
+ PaddedHostVector<gmx::RVec> v; //!< The velocities (natoms)
+ PaddedHostVector<gmx::RVec> cg_p; //!< p vector for conjugate gradient minimization
+
+ ekinstate_t ekinstate; //!< The state of the kinetic energy
/* History for special algorithms, should be moved to a history struct */
history_t hist; //!< Time history for restraints
{
std::unique_ptr<t_state> localState = statePropagatorData_->localState();
t_state *globalState = statePropagatorData_->globalState();
- PaddedVector<RVec> *forcePointer = statePropagatorData_->forcePointer();
+ PaddedHostVector<RVec> *forcePointer = statePropagatorData_->forcePointer();
// constant choices for this call to dd_partition_system
const bool verbose = false;
}
std::unique_ptr<t_state> localState = statePropagatorData_->localState();
t_state *globalState = statePropagatorData_->globalState();
- PaddedVector<RVec> *forcePointer = statePropagatorData_->forcePointer();
+ PaddedHostVector<RVec> *forcePointer = statePropagatorData_->forcePointer();
// constant choices for this call to dd_partition_system
const bool verbose =
return globalState_;
}
-PaddedVector<RVec>* StatePropagatorData::forcePointer()
+PaddedHostVector<RVec>* StatePropagatorData::forcePointer()
{
return &f_;
}
int nstxout_compressed_;
//! The local number of atoms
- int localNAtoms_;
+ int localNAtoms_;
//! The position vector
- PaddedHostVector<RVec> x_;
+ PaddedHostVector<RVec> x_;
//! The position vector of the previous step
- PaddedVector<RVec> previousX_;
+ PaddedHostVector<RVec> previousX_;
//! The velocity vector
- PaddedVector<RVec> v_;
+ PaddedHostVector<RVec> v_;
//! The force vector
- PaddedVector<RVec> f_;
+ PaddedHostVector<RVec> f_;
//! The box matrix
- matrix box_;
+ matrix box_;
//! The box matrix of the previous step
- matrix previousBox_;
+ matrix previousBox_;
//! The DD partitioning count for legacy t_state compatibility
- int ddpCount_;
+ int ddpCount_;
//! Move x_ to previousX_
void copyPosition();
//! Get a pointer to the global state
t_state *globalState();
//! Get a force pointer
- PaddedVector<gmx::RVec> *forcePointer();
+ PaddedHostVector<gmx::RVec> *forcePointer();
//! Pointer to keep a backup of the state for later writeout
std::unique_ptr<t_state> localStateBackup_;
void write(gmx_mdoutf *outf, Step step, Time time);
//! Whether we're doing VV and need to reset velocities after the first half step
- bool vvResetVelocities_;
+ bool vvResetVelocities_;
//! Velocities backup for VV
- PaddedVector<RVec> velocityBackup_;
+ PaddedHostVector<RVec> velocityBackup_;
//! Function resetting the velocities
void resetVelocities();