}
}
-static real calc_one_bond(FILE *fplog, int thread,
+static real calc_one_bond(int thread,
int ftype, const t_idef *idef,
rvec x[], rvec f[], rvec fshift[],
t_forcerec *fr,
real *lambda, real *dvdl,
const t_mdatoms *md, t_fcdata *fcd,
gmx_bool bCalcEnerVir,
- int *global_atom_index, gmx_bool bPrintSepPot)
+ int *global_atom_index)
{
int nat1, nbonds, efptFTYPE;
real v = 0;
pbc, g, lambda[efptFTYPE], &(dvdl[efptFTYPE]),
md, fcd, global_atom_index);
}
- if (bPrintSepPot)
- {
- fprintf(fplog, " %-23s #%4d V %12.5e dVdl %12.5e\n",
- interaction_function[ftype].longname,
- nbonds, v, lambda[efptFTYPE]);
- }
}
else
{
v = do_nonbonded_listed(ftype, nbn, iatoms+nb0, idef->iparams, (const rvec*)x, f, fshift,
pbc, g, lambda, dvdl, md, fr, grpp, global_atom_index);
-
- if (bPrintSepPot)
- {
- fprintf(fplog, " %-5s + %-15s #%4d dVdl %12.5e\n",
- interaction_function[ftype].longname,
- interaction_function[F_LJ14].longname, nbonds, dvdl[efptVDW]);
- fprintf(fplog, " %-5s + %-15s #%4d dVdl %12.5e\n",
- interaction_function[ftype].longname,
- interaction_function[F_COUL14].longname, nbonds, dvdl[efptCOUL]);
- }
}
if (thread == 0)
return v;
}
-void calc_bonds(FILE *fplog, const gmx_multisim_t *ms,
+void calc_bonds(const gmx_multisim_t *ms,
const t_idef *idef,
rvec x[], history_t *hist,
rvec f[], t_forcerec *fr,
const t_mdatoms *md,
t_fcdata *fcd, int *global_atom_index,
t_atomtypes gmx_unused *atype, gmx_genborn_t gmx_unused *born,
- int force_flags,
- gmx_bool bPrintSepPot, gmx_int64_t step)
+ int force_flags)
{
gmx_bool bCalcEnerVir;
int i;
{
pbc_null = NULL;
}
- if (bPrintSepPot)
- {
- fprintf(fplog, "Step %s: bonded V and dVdl for this rank\n",
- gmx_step_str(step, buf));
- }
#ifdef DEBUG
if (g && debug)
{
if (idef->il[ftype].nr > 0 && ftype_is_bonded_potential(ftype))
{
- v = calc_one_bond(fplog, thread, ftype, idef, x,
+ v = calc_one_bond(thread, ftype, idef, x,
ft, fshift, fr, pbc_null, g, grpp,
nrnb, lambda, dvdlt,
md, fcd, bCalcEnerVir,
- global_atom_index, bPrintSepPot);
+ global_atom_index);
epot[ftype] += v;
}
}
}
}
-void calc_bonds_lambda(FILE *fplog,
- const t_idef *idef,
+void calc_bonds_lambda(const t_idef *idef,
rvec x[],
t_forcerec *fr,
const t_pbc *pbc, const t_graph *g,
if (nr - nr_nonperturbed > 0)
{
- v = calc_one_bond(fplog, 0, ftype, &idef_fe,
+ v = calc_one_bond(0, ftype, &idef_fe,
x, f, fshift, fr, pbc_null, g,
grpp, nrnb, lambda, dvdl_dum,
md, fcd, TRUE,
- global_atom_index, FALSE);
+ global_atom_index);
epot[ftype] += v;
}
}
}
-void gmx_log_open(const char *lognm, const t_commrec *cr, gmx_bool bMasterOnly,
+void gmx_log_open(const char *lognm, const t_commrec *cr,
gmx_bool bAppendFiles, FILE** fplog)
{
- int len, pid;
- char buf[256], host[256];
+ int pid;
+ char host[256];
time_t t;
char timebuf[STRLEN];
FILE *fp = *fplog;
- char *tmpnm;
debug_gmx();
- /* Communicate the filename for logfile */
- if (cr->nnodes > 1 && !bMasterOnly
-#ifdef GMX_THREAD_MPI
- /* With thread MPI the non-master log files are opened later
- * when the files names are already known on all nodes.
- */
- && FALSE
-#endif
- )
- {
- if (MASTER(cr))
- {
- len = strlen(lognm) + 1;
- }
- gmx_bcast(sizeof(len), &len, cr);
- if (!MASTER(cr))
- {
- snew(tmpnm, len+8);
- }
- else
- {
- tmpnm = gmx_strdup(lognm);
- }
- gmx_bcast(len*sizeof(*tmpnm), tmpnm, cr);
- }
- else
+ if (!bAppendFiles)
{
- tmpnm = gmx_strdup(lognm);
+ fp = gmx_fio_fopen(lognm, bAppendFiles ? "a+" : "w+" );
}
- debug_gmx();
-
- if (!bMasterOnly && !MASTER(cr))
- {
- /* Since log always ends with '.log' let's use this info */
- par_fn(tmpnm, efLOG, cr, FALSE, !bMasterOnly, buf, 255);
- fp = gmx_fio_fopen(buf, bAppendFiles ? "a+" : "w+" );
- }
- else if (!bAppendFiles)
- {
- fp = gmx_fio_fopen(tmpnm, bAppendFiles ? "a+" : "w+" );
- }
-
- sfree(tmpnm);
-
gmx_fatal_set_log_file(fp);
/* Get some machine parameters */
* When global_atom_index=NULL returns i+1.
*/
-void calc_bonds(FILE *fplog, const gmx_multisim_t *ms,
+void calc_bonds(const gmx_multisim_t *ms,
const t_idef *idef,
rvec x[], history_t *hist,
rvec f[], t_forcerec *fr,
const t_mdatoms *md,
t_fcdata *fcd, int *ddgatindex,
t_atomtypes *atype, gmx_genborn_t *born,
- int force_flags,
- gmx_bool bPrintSepPot, gmx_int64_t step);
+ int force_flags);
/*
* The function calc_bonds() calculates all bonded force interactions.
* The "bonds" are specified as follows:
* total potential energy split up over the function types.
* int *ddgatindex
* global atom number indices, should be NULL when not using DD.
- * gmx_bool bPrintSepPot
- * if TRUE print local potential and dVdlambda for each bonded type.
- * int step
- * used with bPrintSepPot
* return value:
* the total potential energy (sum over epot).
*/
-void calc_bonds_lambda(FILE *fplog,
- const t_idef *idef,
+void calc_bonds_lambda(const t_idef *idef,
rvec x[],
t_forcerec *fr,
const struct t_pbc *pbc, const struct t_graph *g,
struct t_graph;
struct t_pbc;
-void gmx_print_sepdvdl(FILE *fplog, const char *s, real v, real dvdlambda);
-
void calc_vir(int nxf, rvec x[], rvec f[], tensor vir,
gmx_bool bScrewPBC, matrix box);
/* Calculate virial for nxf atoms, and add it to vir */
gmx_bool bDoLongRangeNS);
/* Call the neighborsearcher */
-extern void do_force_lowlevel(FILE *fplog,
- gmx_int64_t step,
- t_forcerec *fr,
+extern void do_force_lowlevel(t_forcerec *fr,
t_inputrec *ir,
t_idef *idef,
t_commrec *cr,
#endif
void gmx_log_open(const char *fn, const t_commrec *cr,
- gmx_bool bMasterOnly, gmx_bool bAppendFiles, FILE**);
+ gmx_bool bAppendFiles, FILE**);
/* Open the log file, if necessary (nprocs > 1) the logfile name is
* communicated around the ring.
*/
#define MD_POLARISE (1<<2)
#define MD_RERUN (1<<4)
#define MD_RERUN_VSITE (1<<5)
-#define MD_SEPPOT (1<<7)
#define MD_DDBONDCHECK (1<<10)
#define MD_DDBONDCOMM (1<<11)
#define MD_CONFOUT (1<<12)
void calc_enervirdiff(FILE *fplog, int eDispCorr, t_forcerec *fr);
-void calc_dispcorr(FILE *fplog, t_inputrec *ir, t_forcerec *fr,
- gmx_int64_t step, int natoms,
+void calc_dispcorr(t_inputrec *ir, t_forcerec *fr,
+ int natoms,
matrix box, real lambda, tensor pres, tensor virial,
real *prescorr, real *enercorr, real *dvdlcorr);
real sc_r_power;
real sc_sigma6_def;
real sc_sigma6_min;
- gmx_bool bSepDVDL;
/* NS Stuff */
int eeltype;
}
}
-void gmx_print_sepdvdl(FILE *fplog, const char *s, real v, real dvdlambda)
-{
- fprintf(fplog, " %-30s V %12.5e dVdl %12.5e\n", s, v, dvdlambda);
-}
-
-void do_force_lowlevel(FILE *fplog, gmx_int64_t step,
- t_forcerec *fr, t_inputrec *ir,
+void do_force_lowlevel(t_forcerec *fr, t_inputrec *ir,
t_idef *idef, t_commrec *cr,
t_nrnb *nrnb, gmx_wallcycle_t wcycle,
t_mdatoms *md,
{
int i, j;
int donb_flags;
- gmx_bool bDoEpot, bSepDVDL, bSB;
+ gmx_bool bDoEpot, bSB;
int pme_flags;
matrix boxs;
rvec box_size;
double t0 = 0.0, t1, t2, t3; /* time measurement for coarse load balancing */
#endif
-#define PRINT_SEPDVDL(s, v, dvdlambda) if (bSepDVDL) { gmx_print_sepdvdl(fplog, s, v, dvdlambda); }
-
set_pbc(&pbc, fr->ePBC, box);
/* reset free energy components */
box_size[i] = box[i][i];
}
- bSepDVDL = (fr->bSepDVDL && do_per_step(step, ir->nstlog));
debug_gmx();
/* do QMMM first if requested */
enerd->term[F_EQM] = calculate_QMMM(cr, x, f, fr);
}
- if (bSepDVDL)
- {
- fprintf(fplog, "Step %s: non-bonded V and dVdl for rank %d:\n",
- gmx_step_str(step, buf), cr->nodeid);
- }
-
/* Call the short range functions all in one go. */
#ifdef GMX_MPI
/* foreign lambda component for walls */
real dvdl_walls = do_walls(ir, fr, box, md, x, f, lambda[efptVDW],
enerd->grpp.ener[egLJSR], nrnb);
- PRINT_SEPDVDL("Walls", 0.0, dvdl_walls);
enerd->dvdl_lin[efptVDW] += dvdl_walls;
}
enerd->dvdl_lin[efptCOUL] += dvdl_nb[efptCOUL];
}
- if (bSepDVDL)
- {
- real V_short_range = 0;
- real dvdl_short_range = 0;
-
- for (i = 0; i < enerd->grpp.nener; i++)
- {
- V_short_range +=
- (fr->bBHAM ?
- enerd->grpp.ener[egBHAMSR][i] :
- enerd->grpp.ener[egLJSR][i])
- + enerd->grpp.ener[egCOULSR][i] + enerd->grpp.ener[egGB][i];
- }
- dvdl_short_range = dvdl_nb[efptVDW] + dvdl_nb[efptCOUL];
- PRINT_SEPDVDL("VdW and Coulomb SR particle-p.",
- V_short_range,
- dvdl_short_range);
- }
debug_gmx();
if (flags & GMX_FORCE_BONDED)
{
wallcycle_sub_start(wcycle, ewcsBONDED);
- calc_bonds(fplog, cr->ms,
+ calc_bonds(cr->ms,
idef, x, hist, f, fr, &pbc, graph, enerd, nrnb, lambda, md, fcd,
DOMAINDECOMP(cr) ? cr->dd->gatindex : NULL, atype, born,
- flags,
- fr->bSepDVDL && do_per_step(step, ir->nstlog), step);
+ flags);
/* Check if we have to determine energy differences
* at foreign lambda's.
{
lam_i[j] = (i == 0 ? lambda[j] : fepvals->all_lambda[j][i-1]);
}
- calc_bonds_lambda(fplog, idef, x, fr, &pbc, graph, &(enerd->foreign_grpp), enerd->foreign_term, nrnb, lam_i, md,
+ calc_bonds_lambda(idef, x, fr, &pbc, graph, &(enerd->foreign_grpp), enerd->foreign_term, nrnb, lam_i, md,
fcd, DOMAINDECOMP(cr) ? cr->dd->gatindex : NULL);
sum_epot(&(enerd->foreign_grpp), enerd->foreign_term);
enerd->enerpart_lambda[i] += enerd->foreign_term[F_EPOT];
fr->vir_el_recip);
}
- PRINT_SEPDVDL("Ewald excl./charge/dip. corr.", Vcorr_q, dvdl_long_range_correction_q);
- PRINT_SEPDVDL("Ewald excl. corr. LJ", Vcorr_lj, dvdl_long_range_correction_lj);
enerd->dvdl_lin[efptCOUL] += dvdl_long_range_correction_q;
enerd->dvdl_lin[efptVDW] += dvdl_long_range_correction_lj;
md->chargeA + md->homenr - fr->n_tpi,
&Vlr_q);
}
- PRINT_SEPDVDL("PME mesh", Vlr_q + Vlr_lj, dvdl_long_range_q+dvdl_long_range_lj);
}
}
box_size, cr, md->homenr,
fr->vir_el_recip, fr->ewaldcoeff_q,
lambda[efptCOUL], &dvdl_long_range_q, fr->ewald_table);
- PRINT_SEPDVDL("Ewald long-range", Vlr_q, dvdl_long_range_q);
}
/* Note that with separate PME nodes we get the real energies later */
fr->fshift, &pbc, lambda[efptCOUL], &dvdl_rf_excl);
enerd->dvdl_lin[efptCOUL] += dvdl_rf_excl;
- PRINT_SEPDVDL("RF exclusion correction",
- enerd->term[F_RF_EXCL], dvdl_rf_excl);
}
}
}
if (bEner || bPres || bConstrain)
{
- calc_dispcorr(fplog, ir, fr, 0, top_global->natoms, box, state->lambda[efptVDW],
+ calc_dispcorr(ir, fr, top_global->natoms, box, state->lambda[efptVDW],
corr_pres, corr_vir, &prescorr, &enercorr, &dvdlcorr);
}
}
/* Calculate long range corrections to pressure and energy */
- calc_dispcorr(fplog, inputrec, fr, count, top_global->natoms, ems->s.box, ems->s.lambda[efptVDW],
+ calc_dispcorr(inputrec, fr, top_global->natoms, ems->s.box, ems->s.lambda[efptVDW],
pres, force_vir, &prescorr, &enercorr, &dvdlcorr);
enerd->term[F_DISPCORR] = enercorr;
enerd->term[F_EPOT] += enercorr;
ems->s.x, ems->f, ems->f, fr->bMolPBC, ems->s.box,
ems->s.lambda[efptBONDED], &dvdl_constr,
NULL, &shake_vir, nrnb, econqForceDispl, FALSE, 0, 0);
- if (fr->bSepDVDL && fplog)
- {
- gmx_print_sepdvdl(fplog, "Constraints", t, dvdl_constr);
- }
enerd->term[F_DVDL_CONSTR] += dvdl_constr;
m_add(force_vir, shake_vir, vir);
wallcycle_stop(wcycle, ewcCONSTR);
}
}
-static void posres_wrapper(FILE *fplog,
- int flags,
- gmx_bool bSepDVDL,
+static void posres_wrapper(int flags,
t_inputrec *ir,
t_nrnb *nrnb,
gmx_localtop_t *top,
ir->ePBC == epbcNONE ? NULL : &pbc,
lambda[efptRESTRAINT], &dvdl,
fr->rc_scaling, fr->ePBC, fr->posres_com, fr->posres_comB);
- if (bSepDVDL)
- {
- gmx_print_sepdvdl(fplog, interaction_function[F_POSRES].longname, v, dvdl);
- }
enerd->term[F_POSRES] += v;
/* If just the force constant changes, the FEP term is linear,
* but if k changes, it is not.
inc_nrnb(nrnb, eNR_FBPOSRES, top->idef.il[F_FBPOSRES].nr/2);
}
-static void pull_potential_wrapper(FILE *fplog,
- gmx_bool bSepDVDL,
- t_commrec *cr,
+static void pull_potential_wrapper(t_commrec *cr,
t_inputrec *ir,
matrix box, rvec x[],
rvec f[],
enerd->term[F_COM_PULL] +=
pull_potential(ir->ePull, ir->pull, mdatoms, &pbc,
cr, t, lambda[efptRESTRAINT], x, f, vir_force, &dvdl);
- if (bSepDVDL)
- {
- gmx_print_sepdvdl(fplog, "Com pull", enerd->term[F_COM_PULL], dvdl);
- }
enerd->dvdl_lin[efptRESTRAINT] += dvdl;
}
-static void pme_receive_force_ener(FILE *fplog,
- gmx_bool bSepDVDL,
- t_commrec *cr,
+static void pme_receive_force_ener(t_commrec *cr,
gmx_wallcycle_t wcycle,
gmx_enerdata_t *enerd,
t_forcerec *fr)
gmx_pme_receive_f(cr, fr->f_novirsum, fr->vir_el_recip, &e_q,
fr->vir_lj_recip, &e_lj, &dvdl_q, &dvdl_lj,
&cycles_seppme);
- if (bSepDVDL)
- {
- gmx_print_sepdvdl(fplog, "Electrostatic PME mesh", e_q, dvdl_q);
- gmx_print_sepdvdl(fplog, "Lennard-Jones PME mesh", e_lj, dvdl_lj);
- }
enerd->term[F_COUL_RECIP] += e_q;
enerd->term[F_LJ_RECIP] += e_lj;
enerd->dvdl_lin[efptCOUL] += dvdl_q;
int start, homenr;
int nb_kernel_type;
double mu[2*DIM];
- gmx_bool bSepDVDL, bStateChanged, bNS, bFillGrid, bCalcCGCM, bBS;
+ gmx_bool bStateChanged, bNS, bFillGrid, bCalcCGCM, bBS;
gmx_bool bDoLongRange, bDoForces, bSepLRF, bUseGPU, bUseOrEmulGPU;
gmx_bool bDiffKernels = FALSE;
matrix boxs;
start = 0;
homenr = mdatoms->homenr;
- bSepDVDL = (fr->bSepDVDL && do_per_step(step, inputrec->nstlog));
-
clear_mat(vir_force);
cg0 = 0;
if ((flags & GMX_FORCE_BONDED) && top->idef.il[F_POSRES].nr > 0)
{
- posres_wrapper(fplog, flags, bSepDVDL, inputrec, nrnb, top, box, x,
+ posres_wrapper(flags, inputrec, nrnb, top, box, x,
enerd, lambda, fr);
}
}
/* Compute the bonded and non-bonded energies and optionally forces */
- do_force_lowlevel(fplog, step, fr, inputrec, &(top->idef),
+ do_force_lowlevel(fr, inputrec, &(top->idef),
cr, nrnb, wcycle, mdatoms,
x, hist, f, bSepLRF ? fr->f_twin : f, enerd, fcd, top, fr->born,
&(top->atomtypes), bBornRadii, box,
if (inputrec->ePull == epullUMBRELLA || inputrec->ePull == epullCONST_F)
{
- pull_potential_wrapper(fplog, bSepDVDL, cr, inputrec, box, x,
+ pull_potential_wrapper(cr, inputrec, box, x,
f, vir_force, mdatoms, enerd, lambda, t);
}
/* In case of node-splitting, the PP nodes receive the long-range
* forces, virial and energy from the PME nodes here.
*/
- pme_receive_force_ener(fplog, bSepDVDL, cr, wcycle, enerd, fr);
+ pme_receive_force_ener(cr, wcycle, enerd, fr);
}
if (bDoForces)
int cg0, cg1, i, j;
int start, homenr;
double mu[2*DIM];
- gmx_bool bSepDVDL, bStateChanged, bNS, bFillGrid, bCalcCGCM, bBS;
+ gmx_bool bStateChanged, bNS, bFillGrid, bCalcCGCM, bBS;
gmx_bool bDoLongRangeNS, bDoForces, bDoPotential, bSepLRF;
gmx_bool bDoAdressWF;
matrix boxs;
start = 0;
homenr = mdatoms->homenr;
- bSepDVDL = (fr->bSepDVDL && do_per_step(step, inputrec->nstlog));
-
clear_mat(vir_force);
cg0 = 0;
if ((flags & GMX_FORCE_BONDED) && top->idef.il[F_POSRES].nr > 0)
{
- posres_wrapper(fplog, flags, bSepDVDL, inputrec, nrnb, top, box, x,
+ posres_wrapper(flags, inputrec, nrnb, top, box, x,
enerd, lambda, fr);
}
}
/* Compute the bonded and non-bonded energies and optionally forces */
- do_force_lowlevel(fplog, step, fr, inputrec, &(top->idef),
+ do_force_lowlevel(fr, inputrec, &(top->idef),
cr, nrnb, wcycle, mdatoms,
x, hist, f, bSepLRF ? fr->f_twin : f, enerd, fcd, top, fr->born,
&(top->atomtypes), bBornRadii, box,
if (inputrec->ePull == epullUMBRELLA || inputrec->ePull == epullCONST_F)
{
- pull_potential_wrapper(fplog, bSepDVDL, cr, inputrec, box, x,
+ pull_potential_wrapper(cr, inputrec, box, x,
f, vir_force, mdatoms, enerd, lambda, t);
}
/* In case of node-splitting, the PP nodes receive the long-range
* forces, virial and energy from the PME nodes here.
*/
- pme_receive_force_ener(fplog, bSepDVDL, cr, wcycle, enerd, fr);
+ pme_receive_force_ener(cr, wcycle, enerd, fr);
}
if (bDoForces)
}
}
-void calc_dispcorr(FILE *fplog, t_inputrec *ir, t_forcerec *fr,
- gmx_int64_t step, int natoms,
+void calc_dispcorr(t_inputrec *ir, t_forcerec *fr,
+ int natoms,
matrix box, real lambda, tensor pres, tensor virial,
real *prescorr, real *enercorr, real *dvdlcorr)
{
}
}
- if (fr->bSepDVDL && do_per_step(step, ir->nstlog))
- {
- gmx_print_sepdvdl(fplog, "Dispersion correction", *enercorr, dvdlambda);
- }
if (fr->efep != efepNO)
{
*dvdlcorr += dvdlambda;
bNS = FALSE;
/* Calculate long range corrections to pressure and energy */
- calc_dispcorr(fplog, inputrec, fr, step, top_global->natoms, state->box,
+ calc_dispcorr(inputrec, fr, top_global->natoms, state->box,
lambda, pres, vir, &prescorr, &enercorr, &dvdlcorr);
/* figure out how to rearrange the next 4 lines MRS 8/4/2009 */
enerd->term[F_DISPCORR] = enercorr;
state->veta);
}
- if (fr->bSepDVDL && fplog && do_log)
- {
- gmx_print_sepdvdl(fplog, "Constraint dV/dl", 0.0, dvdl_constr);
- }
if (bVV)
{
/* this factor or 2 correction is necessary
"The [TT]mdrun[tt] program reads the run input file ([TT]-s[tt])",
"and distributes the topology over ranks if needed.",
"[TT]mdrun[tt] produces at least four output files.",
- "A single log file ([TT]-g[tt]) is written, unless the option",
- "[TT]-seppot[tt] is used, in which case each rank writes a log file.",
+ "A single log file ([TT]-g[tt]) is written.",
"The trajectory file ([TT]-o[tt]), contains coordinates, velocities and",
"optionally forces.",
"The structure file ([TT]-c[tt]) contains the coordinates and",
gmx_bool bTestVerlet = FALSE;
gmx_bool bVerbose = FALSE;
gmx_bool bCompact = TRUE;
- gmx_bool bSepPot = FALSE;
gmx_bool bRerunVSite = FALSE;
gmx_bool bConfout = TRUE;
gmx_bool bReproducible = FALSE;
"Be loud and noisy" },
{ "-compact", FALSE, etBOOL, {&bCompact},
"Write a compact log file" },
- { "-seppot", FALSE, etBOOL, {&bSepPot},
- "Write separate V and dVdl terms for each interaction type and rank to the log file(s)" },
{ "-pforce", FALSE, etREAL, {&pforce},
"Print all forces larger than this (kJ/mol nm)" },
{ "-reprod", FALSE, etBOOL, {&bReproducible},
sim_part_fn = sim_part;
if (opt2bSet("-cpi", NFILE, fnm))
{
- if (bSepPot && bAppendFiles)
- {
- gmx_fatal(FARGS, "Output file appending is not supported with -seppot");
- }
-
bAppendFiles =
read_checkpoint_simulation_part(opt2fn_master("-cpi", NFILE,
fnm, cr),
}
Flags = opt2bSet("-rerun", NFILE, fnm) ? MD_RERUN : 0;
- Flags = Flags | (bSepPot ? MD_SEPPOT : 0);
Flags = Flags | (bDDBondCheck ? MD_DDBONDCHECK : 0);
Flags = Flags | (bDDBondComm ? MD_DDBONDCOMM : 0);
Flags = Flags | (bTunePME ? MD_TUNEPME : 0);
/* We postpone opening the log file if we are appending, so we can
first truncate the old log file and append to the correct position
there instead. */
- if ((MASTER(cr) || bSepPot) && !bAppendFiles)
+ if (MASTER(cr) && !bAppendFiles)
{
gmx_log_open(ftp2fn(efLOG, NFILE, fnm), cr,
- !bSepPot, Flags & MD_APPENDFILES, &fplog);
+ Flags & MD_APPENDFILES, &fplog);
please_cite(fplog, "Hess2008b");
please_cite(fplog, "Spoel2005a");
please_cite(fplog, "Lindahl2001a");
please_cite(fplog, "Berendsen95a");
}
- else if (!MASTER(cr) && bSepPot)
- {
- gmx_log_open(ftp2fn(efLOG, NFILE, fnm), cr, !bSepPot, Flags, &fplog);
- }
else
{
fplog = NULL;
}
}
- if (((MASTER(cr) || (Flags & MD_SEPPOT)) && (Flags & MD_APPENDFILES))
-#ifdef GMX_THREAD_MPI
- /* With thread MPI only the master node/thread exists in mdrun.c,
- * therefore non-master nodes need to open the "seppot" log file here.
- */
- || (!MASTER(cr) && (Flags & MD_SEPPOT))
-#endif
- )
+ if (MASTER(cr) && (Flags & MD_APPENDFILES))
{
- gmx_log_open(ftp2fn(efLOG, nfile, fnm), cr, !(Flags & MD_SEPPOT),
+ gmx_log_open(ftp2fn(efLOG, nfile, fnm), cr,
Flags, &fplog);
}
/*init_forcerec(fplog,fr,fcd,inputrec,mtop,cr,box,FALSE,
"nofile","nofile","nofile","nofile",FALSE,pforce);
*/
- fr->bSepDVDL = ((Flags & MD_SEPPOT) == MD_SEPPOT);
/* Initialize QM-MM */
if (fr->bQMMM)