Added information about how to cite the TNG paper.
authorMagnus Lundborg <lundborg.magnus@gmail.com>
Thu, 6 Feb 2014 15:13:27 +0000 (16:13 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 11 Feb 2014 10:03:32 +0000 (11:03 +0100)
Change-Id: I698582f296603f741842f99437bcf872a42682d7

src/gromacs/fileio/mdoutf.c
src/gromacs/fileio/mdoutf.h
src/gromacs/gmxlib/copyrite.cpp
src/gromacs/mdlib/minimize.c
src/gromacs/mdlib/sim_util.c

index 3e17d3b1119e91e335d4328fba02b05d78e901eb..8d3f5474ab69c202d5016bbc0de7e5c717628876 100644 (file)
@@ -44,6 +44,7 @@
 #include "tngio.h"
 #include "trajectory_writing.h"
 #include "checkpoint.h"
+#include "copyrite.h"
 
 struct gmx_mdoutf {
     t_fileio         *fp_trn;
@@ -66,14 +67,14 @@ struct gmx_mdoutf {
 };
 
 
-gmx_mdoutf_t init_mdoutf(int nfile, const t_filenm fnm[], int mdrun_flags,
-                         const t_commrec *cr, const t_inputrec *ir,
-                         gmx_mtop_t *top_global,
+gmx_mdoutf_t init_mdoutf(FILE *fplog, int nfile, const t_filenm fnm[],
+                         int mdrun_flags, const t_commrec *cr,
+                         const t_inputrec *ir, gmx_mtop_t *top_global,
                          const output_env_t oenv)
 {
     gmx_mdoutf_t  of;
     char          filemode[3];
-    gmx_bool      bAppendFiles;
+    gmx_bool      bAppendFiles, bCiteTng = FALSE;
     int           i;
 
     snew(of, 1);
@@ -124,6 +125,7 @@ gmx_mdoutf_t init_mdoutf(int nfile, const t_filenm fnm[], int mdrun_flags,
                     {
                         gmx_tng_prepare_md_writing(of->tng, top_global, ir);
                     }
+                    bCiteTng = TRUE;
                     break;
                 default:
                     gmx_incons("Invalid full precision file format");
@@ -145,6 +147,7 @@ gmx_mdoutf_t init_mdoutf(int nfile, const t_filenm fnm[], int mdrun_flags,
                     {
                         gmx_tng_prepare_low_prec_writing(of->tng_low_prec, top_global, ir);
                     }
+                    bCiteTng = TRUE;
                     break;
                 default:
                     gmx_incons("Invalid reduced precision file format");
@@ -202,6 +205,11 @@ gmx_mdoutf_t init_mdoutf(int nfile, const t_filenm fnm[], int mdrun_flags,
         }
     }
 
+    if (bCiteTng)
+    {
+        please_cite(fplog, "Lundborg2014");
+    }
+
     return of;
 }
 
index cb6b812720d86ecbe8db99ca2d7c8597e7f2eb92..889c03999565173e3929dfcf4cd80af27695b59f 100644 (file)
@@ -52,7 +52,8 @@ typedef struct gmx_mdoutf *gmx_mdoutf_t;
  * Returns a pointer to a data structure with all output file pointers
  * and names required by mdrun.
  */
-gmx_mdoutf_t init_mdoutf(int                nfile,
+gmx_mdoutf_t init_mdoutf(FILE              *fplog,
+                         int                nfile,
                          const t_filenm     fnm[],
                          int                mdrun_flags,
                          const t_commrec   *cr,
index 8aa33b8495691d48007991a284846c19ddd1c632..144825abf5b49c4be4994c98290b0bebe1ad92e4 100644 (file)
@@ -556,7 +556,12 @@ void please_cite(FILE *fp, const char *key)
           "C. Kutzner, H. Grubmuller, B. L. de Groot, and U. Zachariae",
           "Computational Electrophysiology: The Molecular Dynamics of Ion Channel Permeation and Selectivity in Atomistic Detail",
           "Biophys. J.",
-          101, 2011, "809-817"}
+          101, 2011, "809-817"},
+        { "Lundborg2014",
+          "M. Lundborg, R. Apostolov, D. Spangberg, A. Gardenas, D. van der Spoel and E. Lindahl",
+          "An efficient and extensible format, library, and API for binary trajectory data from molecular simulations",
+          "J. Comput. Chem.",
+          35, 2014, "260-269"}
     };
 #define NSTR (int)asize(citedb)
 
index c9b00c98b69b81ac9fbb16e89d6d0d31053e40fd..6a583a35857cf90c99c886cf1654124675487690 100644 (file)
@@ -443,7 +443,7 @@ void init_em(FILE *fplog, const char *title,
         *gstat = global_stat_init(ir);
     }
 
-    *outf = init_mdoutf(nfile, fnm, 0, cr, ir, top_global, NULL);
+    *outf = init_mdoutf(fplog, nfile, fnm, 0, cr, ir, top_global, NULL);
 
     snew(*enerd, 1);
     init_enerdata(top_global->groups.grps[egcENER].nr, ir->fepvals->n_lambda,
index 251f64e284e1ed77c6b379a8854edb7da49f69eb..6b6cf4cb4b1120609f5d3a5218d55accfe517d04 100644 (file)
@@ -2769,7 +2769,7 @@ void init_md(FILE *fplog,
 
     if (nfile != -1)
     {
-        *outf = init_mdoutf(nfile, fnm, Flags, cr, ir, mtop, oenv);
+        *outf = init_mdoutf(fplog, nfile, fnm, Flags, cr, ir, mtop, oenv);
 
         *mdebin = init_mdebin((Flags & MD_APPENDFILES) ? NULL : mdoutf_get_fp_ene(*outf),
                               mtop, ir, mdoutf_get_fp_dhdl(*outf));