t_topology *top_pdb;
snew(top_pdb, 1);
/* Read coordinates twice */
- read_tps_conf(opt2fn("-q", NFILE, fnm), top_pdb, NULL, NULL, NULL, pdbbox, FALSE);
+ read_tps_conf(opt2fn("-q", NFILE, fnm), top_pdb, nullptr, nullptr, nullptr, pdbbox, FALSE);
snew(pdbatoms, 1);
*pdbatoms = top_pdb->atoms;
- read_tps_conf(opt2fn("-q", NFILE, fnm), top_pdb, NULL, &pdbx, NULL, pdbbox, FALSE);
+ read_tps_conf(opt2fn("-q", NFILE, fnm), top_pdb, nullptr, &pdbx, nullptr, pdbbox, FALSE);
+ /* TODO Should this assert that top_pdb->atoms.nr == top.atoms.nr?
+ * See discussion at https://gerrit.gromacs.org/#/c/6430/1 */
title = *top_pdb->name;
snew(refatoms, 1);
*refatoms = top_pdb->atoms;
/* Write a .pdb file with B-factors and optionally anisou records */
for (i = 0; i < isize; i++)
{
- rvec_inc(xref[index[i]], xcm);
+ rvec_inc(pdbx[index[i]], xcm);
}
write_sto_conf_indexed(opt2fn("-oq", NFILE, fnm), title, pdbatoms, pdbx,
- NULL, ePBC, pdbbox, isize, index);
+ nullptr, ePBC, pdbbox, isize, index);
}
if (opt2bSet("-ox", NFILE, fnm))
{
}
}
/* Write a .pdb file with B-factors and optionally anisou records */
- write_sto_conf_indexed(opt2fn("-ox", NFILE, fnm), title, pdbatoms, xref, nullptr,
- write_sto_conf_indexed(opt2fn("-ox", NFILE, fnm), title, pdbatoms, bFactorX, NULL,
++ write_sto_conf_indexed(opt2fn("-ox", NFILE, fnm), title, pdbatoms, bFactorX, nullptr,
ePBC, pdbbox, isize, index);
+ sfree(bFactorX);
}
if (bAniso)
{
gmx_int64_t value);
void rerun_parallel_comm(t_commrec *cr, t_trxframe *fr,
- gmx_bool *bNotLastFrame);
+ gmx_bool *bLastStep);
-/* get the conserved energy associated with the ensemble type*/
-real compute_conserved_from_auxiliary(t_inputrec *ir, t_state *state,
- t_extmass *MassQ);
-
/* set the lambda values at each step of mdrun when they change */
void set_current_lambdas(gmx_int64_t step, t_lambda *fepvals, gmx_bool bRerunMD,
t_trxframe *rerun_fr, t_state *state_global, t_state *state, double lam0[]);
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/gmxmpi.h"
++#include "gromacs/utility/logger.h"
#include "gromacs/utility/pleasecite.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/utility/sysinfo.h"
elapsed_time_over_all_threads,
elapsed_time_over_all_threads_over_all_ranks;
- md_print_warn(cr, fplog,
- "Simulation ended prematurely, no performance report will be written.");
+ if (!walltime_accounting_get_valid_finish(walltime_accounting))
+ {
++ GMX_LOG(mdlog.warning).asParagraph().appendText("Simulation ended prematurely, no performance report will be written.");
+ return;
+ }
+
if (cr->nnodes > 1)
{
snew(nrnb_tot, 1);