gmx::ImdSession* imdSession,
pull_t* pull_work,
t_state* state_global,
- const gmx_mtop_t* top_global,
+ const gmx_mtop_t& top_global,
em_state_t* ems,
gmx_localtop_t* top,
t_nrnb* nrnb,
TRUE,
1,
state_global,
- *top_global,
+ top_global,
*ir,
imdSession,
pull_work,
state_change_natoms(&ems->s, ems->s.natoms);
mdAlgorithmsSetupAtomData(
- cr, *ir, *top_global, top, fr, &ems->f, mdAtoms, constr, vsite, shellfc ? *shellfc : nullptr);
+ cr, *ir, top_global, top, fr, &ems->f, mdAtoms, constr, vsite, shellfc ? *shellfc : nullptr);
}
update_mdatoms(mdAtoms->mdatoms(), ems->s.lambda[FreeEnergyPerturbationCouplingType::Mass]);
gmx_bool bX,
gmx_bool bF,
const char* confout,
- const gmx_mtop_t* top_global,
+ const gmx_mtop_t& top_global,
const t_inputrec* ir,
int64_t step,
em_state_t* state,
cr,
outf,
mdof_flags,
- top_global->natoms,
+ top_global.natoms,
step,
static_cast<double>(step),
&state->s,
if (ir->pbcType != PbcType::No && !ir->bPeriodicMols && DOMAINDECOMP(cr))
{
/* Make molecules whole only for confout writing */
- do_pbc_mtop(ir->pbcType, state->s.box, top_global, state_global->x.rvec_array());
+ do_pbc_mtop(ir->pbcType, state->s.box, &top_global, state_global->x.rvec_array());
}
write_sto_conf_mtop(confout,
- *top_global->name,
+ *top_global.name,
top_global,
state_global->x.rvec_array(),
nullptr,
const gmx::MDLogger& mdlog,
int step,
const t_commrec* cr,
- const gmx_mtop_t* top_global,
+ const gmx_mtop_t& top_global,
const t_inputrec* ir,
gmx::ImdSession* imdSession,
pull_t* pull_work,
FALSE,
1,
nullptr,
- *top_global,
+ top_global,
*ir,
imdSession,
pull_work,
//! Coordinates multi-simulations.
const gmx_multisim_t* ms;
//! Holds the simulation topology.
- const gmx_mtop_t* top_global;
+ const gmx_mtop_t& top_global;
//! Holds the domain topology.
gmx_localtop_t* top;
//! User input options.
//! Parallel utility summing energies and forces
static double reorder_partsum(const t_commrec* cr,
const t_grpopts* opts,
- const gmx_mtop_t* top_global,
+ const gmx_mtop_t& top_global,
const em_state_t* s_min,
const em_state_t* s_b)
{
* This conflicts with the spirit of domain decomposition,
* but to fully optimize this a much more complicated algorithm is required.
*/
- const int natoms = top_global->natoms;
+ const int natoms = top_global.natoms;
rvec* fmg;
snew(fmg, natoms);
copy_rvec(fm[i], fmg[a]);
i++;
}
- gmx_sum(top_global->natoms * 3, fmg[0], cr);
+ gmx_sum(top_global.natoms * 3, fmg[0], cr);
/* Now we will determine the part of the sum for the cgs in state s_b */
gmx::ArrayRef<const int> indicesB = s_b->s.cg_gl;
i = 0;
int gf = 0;
gmx::ArrayRef<const unsigned char> grpnrFREEZE =
- top_global->groups.groupNumbers[SimulationAtomGroupType::Freeze];
+ top_global.groups.groupNumbers[SimulationAtomGroupType::Freeze];
for (int a : indicesB)
{
if (!grpnrFREEZE.empty())
static real pr_beta(const t_commrec* cr,
const t_grpopts* opts,
t_mdatoms* mdatoms,
- const gmx_mtop_t* top_global,
+ const gmx_mtop_t& top_global,
const em_state_t* s_min,
const em_state_t* s_b)
{
{
const char* CG = "Polak-Ribiere Conjugate Gradients";
- gmx_localtop_t top(top_global->ffparams);
+ gmx_localtop_t top(top_global.ffparams);
gmx_global_stat_t gstat;
double tmp, minstep;
real stepsize;
simulationsShareState,
ms);
gmx::EnergyOutput energyOutput(mdoutf_get_fp_ene(outf),
- *top_global,
+ top_global,
*inputrec,
pull_work,
nullptr,
gmx_sumd(1, &minstep, cr);
}
- minstep = GMX_REAL_EPS / sqrt(minstep / (3 * top_global->natoms));
+ minstep = GMX_REAL_EPS / sqrt(minstep / (3 * top_global.natoms));
if (stepsize < minstep)
{
{
static const char* LBFGS = "Low-Memory BFGS Minimizer";
em_state_t ems;
- gmx_localtop_t top(top_global->ffparams);
+ gmx_localtop_t top(top_global.ffparams);
gmx_global_stat_t gstat;
int ncorr, nmaxcorr, point, cp, neval, nminstep;
double stepsize, step_taken, gpa, gpb, gpc, tmp, minstep;
simulationsShareState,
ms);
gmx::EnergyOutput energyOutput(mdoutf_get_fp_ene(outf),
- *top_global,
+ top_global,
*inputrec,
pull_work,
nullptr,
cr,
outf,
mdof_flags,
- top_global->natoms,
+ top_global.natoms,
step,
static_cast<real>(step),
&ems.s,
void LegacySimulator::do_steep()
{
const char* SD = "Steepest Descents";
- gmx_localtop_t top(top_global->ffparams);
+ gmx_localtop_t top(top_global.ffparams);
gmx_global_stat_t gstat;
real stepsize;
real ustep;
simulationsShareState,
ms);
gmx::EnergyOutput energyOutput(mdoutf_get_fp_ene(outf),
- *top_global,
+ top_global,
*inputrec,
pull_work,
nullptr,
{
const char* NM = "Normal Mode Analysis";
int nnodes;
- gmx_localtop_t top(top_global->ffparams);
+ gmx_localtop_t top(top_global.ffparams);
gmx_global_stat_t gstat;
tensor vir, pres;
rvec mu_tot = { 0 };
{
fprintf(stderr,
"starting normal mode calculation '%s'\n%" PRId64 " steps.\n\n",
- *(top_global->name),
+ *(top_global.name),
inputrec->nsteps);
}