Remove mdrun -seppot
authorMark Abraham <mark.j.abraham@gmail.com>
Sat, 31 May 2014 17:43:09 +0000 (19:43 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Sun, 17 Aug 2014 06:24:19 +0000 (01:24 -0500)
This output of rank-local energies is not needed for any routine use,
and isn't much use in mdrun -debug either. Removing it simplifies a
few code paths, including removing some dependencies on writing sane
things to the log file. Eliminated some now-unused parameters.

Refs #1292

Change-Id: I7628b78862144ae2478b6f42a6818915e3a22fe3

16 files changed:
src/gromacs/gmxlib/bondfree.c
src/gromacs/gmxlib/main.cpp
src/gromacs/legacyheaders/bondf.h
src/gromacs/legacyheaders/force.h
src/gromacs/legacyheaders/main.h
src/gromacs/legacyheaders/mdrun.h
src/gromacs/legacyheaders/sim_util.h
src/gromacs/legacyheaders/types/forcerec.h
src/gromacs/mdlib/force.c
src/gromacs/mdlib/md_support.cpp
src/gromacs/mdlib/minimize.c
src/gromacs/mdlib/sim_util.c
src/gromacs/mdlib/tpi.c
src/programs/mdrun/md.cpp
src/programs/mdrun/mdrun.cpp
src/programs/mdrun/runner.cpp

index a77b22a75cbda67ab5874da9fcb625e30f3ef2c3..ba73d22d55e3a7254962eb493fb2ed22562a3a3e 100644 (file)
@@ -4448,7 +4448,7 @@ static void reduce_thread_forces(int n, rvec *f, rvec *fshift,
     }
 }
 
-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,
@@ -4458,7 +4458,7 @@ static real calc_one_bond(FILE *fplog, int thread,
                           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;
@@ -4528,27 +4528,11 @@ static real calc_one_bond(FILE *fplog, int thread,
                                                   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)
@@ -4559,7 +4543,7 @@ static real calc_one_bond(FILE *fplog, int thread,
     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,
@@ -4569,8 +4553,7 @@ void calc_bonds(FILE *fplog, const gmx_multisim_t *ms,
                 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;
@@ -4596,11 +4579,6 @@ void calc_bonds(FILE *fplog, const gmx_multisim_t *ms,
     {
         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)
@@ -4666,11 +4644,11 @@ void calc_bonds(FILE *fplog, const gmx_multisim_t *ms,
         {
             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;
             }
         }
@@ -4700,8 +4678,7 @@ void calc_bonds(FILE *fplog, const gmx_multisim_t *ms,
     }
 }
 
-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,
@@ -4752,11 +4729,11 @@ void calc_bonds_lambda(FILE *fplog,
 
             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;
             }
         }
index e58bb0e3881e34cefdcd45376fd78d317de87bf8..5655d288df26041e34bded3a4486e3796c2eebfc 100644 (file)
@@ -218,63 +218,22 @@ void check_multi_int64(FILE *log, const gmx_multisim_t *ms,
 }
 
 
-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 */
index 126a3069e427cb995ebd7f725d6a296ef7f6e33d..f9047333d807b3352743a46975a9cf2906d08cea 100644 (file)
@@ -58,7 +58,7 @@ int glatnr(int *global_atom_index, int i);
  * 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,
@@ -67,8 +67,7 @@ void calc_bonds(FILE *fplog, const gmx_multisim_t *ms,
                 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:
@@ -87,16 +86,11 @@ void calc_bonds(FILE *fplog, const gmx_multisim_t *ms,
  *     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,
index 1d3fb6bc796d299c60b60a8147d2b5e24f41eac8..eff0196b5925681968c809fe4ee8b9a773ea3db3 100644 (file)
@@ -55,8 +55,6 @@ extern "C" {
 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 */
@@ -256,9 +254,7 @@ void ns(FILE              *fplog,
         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,
index e447d85af0753b4d9a2b8729d22f557fd79b785c..e5b0803efc31b8e5302edefcb3ee88789525d65f 100644 (file)
@@ -49,7 +49,7 @@ extern "C" {
 #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.
  */
index 308975916d467167db50708601874c3e11a37915..25f5d5d2c6932cab102087d4f10043221faf1489 100644 (file)
@@ -61,7 +61,6 @@ extern "C" {
 #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)
index 5a404cc40076c932d9c966dc679ba5ad72ff9c65..b92649ad7e0ccdc1e70ed62105d908636990d163 100644 (file)
@@ -114,8 +114,8 @@ void finish_run(FILE *log, t_commrec *cr,
 
 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);
 
index 16b0e87841c8fda544614307d848af219cc1fb77..961a98691c258b1b12267d5b886ec70966839d91 100644 (file)
@@ -293,7 +293,6 @@ typedef struct {
     real     sc_r_power;
     real     sc_sigma6_def;
     real     sc_sigma6_min;
-    gmx_bool bSepDVDL;
 
     /* NS Stuff */
     int  eeltype;
index 738e7d7918c3126a67e86113845ef1492b141fcf..021761672ca9f597a60c28ef4cc8afd54b473119 100644 (file)
@@ -137,13 +137,7 @@ static void reduce_thread_forces(int n, rvec *f,
     }
 }
 
-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,
@@ -167,7 +161,7 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
 {
     int         i, j;
     int         donb_flags;
-    gmx_bool    bDoEpot, bSepDVDL, bSB;
+    gmx_bool    bDoEpot, bSB;
     int         pme_flags;
     matrix      boxs;
     rvec        box_size;
@@ -181,8 +175,6 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
     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 */
@@ -198,7 +190,6 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
         box_size[i] = box[i][i];
     }
 
-    bSepDVDL = (fr->bSepDVDL && do_per_step(step, ir->nstlog));
     debug_gmx();
 
     /* do QMMM first if requested */
@@ -207,12 +198,6 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
         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
@@ -230,7 +215,6 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
         /* 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;
     }
 
@@ -348,24 +332,6 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
         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();
 
 
@@ -409,11 +375,10 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
     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.
@@ -432,7 +397,7 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
                 {
                     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];
@@ -568,8 +533,6 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
                                                    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;
 
@@ -645,7 +608,6 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
                                         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);
             }
         }
 
@@ -656,7 +618,6 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
                              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 */
@@ -691,8 +652,6 @@ void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
                                        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);
             }
         }
     }
index 2883d6a1b7221614811a934017509753c76781c1..8402ad44e808ad164cf3341fe7ed8a6fc34ba2d5 100644 (file)
@@ -463,7 +463,7 @@ void compute_globals(FILE *fplog, gmx_global_stat_t gstat, t_commrec *cr, t_inpu
 
     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);
     }
 
index 224b2b5336e294753e4fdba8eb95efbbad92c2bc..9da6b35d737b416aaff0fa5c7e0aac4bceeb5251 100644 (file)
@@ -770,7 +770,7 @@ static void evaluate_energy(FILE *fplog, t_commrec *cr,
     }
 
     /* 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;
@@ -789,10 +789,6 @@ static void evaluate_energy(FILE *fplog, t_commrec *cr,
                   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);
index ada853a849d42955e8d14fda6891f4b11c365162..6cd4f026581f37409286a7d81a69b41028291e61 100644 (file)
@@ -313,9 +313,7 @@ static void calc_virial(int start, int homenr, rvec x[], rvec f[],
     }
 }
 
-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,
@@ -337,10 +335,6 @@ static void posres_wrapper(FILE *fplog,
                   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.
@@ -386,9 +380,7 @@ static void fbposres_wrapper(t_inputrec *ir,
     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[],
@@ -411,16 +403,10 @@ static void pull_potential_wrapper(FILE *fplog,
     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)
@@ -440,11 +426,6 @@ static void pme_receive_force_ener(FILE           *fplog,
     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;
@@ -825,7 +806,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
     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;
@@ -842,8 +823,6 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
     start  = 0;
     homenr = mdatoms->homenr;
 
-    bSepDVDL = (fr->bSepDVDL && do_per_step(step, inputrec->nstlog));
-
     clear_mat(vir_force);
 
     cg0 = 0;
@@ -1338,7 +1317,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
 
     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);
     }
 
@@ -1348,7 +1327,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
     }
 
     /* 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,
@@ -1532,7 +1511,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
 
     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);
     }
 
@@ -1552,7 +1531,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
         /* 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)
@@ -1585,7 +1564,7 @@ void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
     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;
@@ -1597,8 +1576,6 @@ void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
     start  = 0;
     homenr = mdatoms->homenr;
 
-    bSepDVDL = (fr->bSepDVDL && do_per_step(step, inputrec->nstlog));
-
     clear_mat(vir_force);
 
     cg0 = 0;
@@ -1885,7 +1862,7 @@ void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
 
     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);
     }
 
@@ -1895,7 +1872,7 @@ void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
     }
 
     /* 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,
@@ -2006,7 +1983,7 @@ void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
 
     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);
     }
 
@@ -2026,7 +2003,7 @@ void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
         /* 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)
@@ -2442,8 +2419,8 @@ 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)
 {
@@ -2544,10 +2521,6 @@ void calc_dispcorr(FILE *fplog, t_inputrec *ir, t_forcerec *fr,
             }
         }
 
-        if (fr->bSepDVDL && do_per_step(step, ir->nstlog))
-        {
-            gmx_print_sepdvdl(fplog, "Dispersion correction", *enercorr, dvdlambda);
-        }
         if (fr->efep != efepNO)
         {
             *dvdlcorr += dvdlambda;
index d517174f1b353d40ca35673e8fc4269e3f7e170a..be3c127b75d452828e1f55f33bae66f6f28e654a 100644 (file)
@@ -659,7 +659,7 @@ double do_tpi(FILE *fplog, t_commrec *cr,
             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;
index 011b84a3d81ee5318b8083773115b72d1acf9c8e..282782f5b974cdce28f5176d6601f0c2aa92d0f6 100644 (file)
@@ -1565,10 +1565,6 @@ double do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
                                        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
index a46c6f7a683818039ebb25d65a5f1d6a35c7c33b..c5df1ada6a3576842e769bc90cf99b5b341e823d 100644 (file)
@@ -82,8 +82,7 @@ int gmx_mdrun(int argc, char *argv[])
         "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",
@@ -454,7 +453,6 @@ int gmx_mdrun(int argc, char *argv[])
     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;
@@ -564,8 +562,6 @@ int gmx_mdrun(int argc, char *argv[])
           "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},
@@ -697,11 +693,6 @@ int gmx_mdrun(int argc, char *argv[])
     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),
@@ -756,7 +747,6 @@ int gmx_mdrun(int argc, char *argv[])
     }
 
     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);
@@ -776,19 +766,15 @@ int gmx_mdrun(int argc, char *argv[])
     /* 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;
index 4281e4e03511e062147b8d80ef10578cb4e711b6..afe6022a0cdb1568abfdad5b9464ac0897cd7c55 100644 (file)
@@ -1370,16 +1370,9 @@ int mdrunner(gmx_hw_opt_t *hw_opt,
         }
     }
 
-    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);
     }
 
@@ -1552,7 +1545,6 @@ int mdrunner(gmx_hw_opt_t *hw_opt,
         /*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)