From: Magnus Lundborg Date: Thu, 6 Feb 2014 15:13:27 +0000 (+0100) Subject: Added information about how to cite the TNG paper. X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=5241daea0fb588d5153b716792bc182e17e1eabc;p=alexxy%2Fgromacs.git Added information about how to cite the TNG paper. Change-Id: I698582f296603f741842f99437bcf872a42682d7 --- diff --git a/src/gromacs/fileio/mdoutf.c b/src/gromacs/fileio/mdoutf.c index 3e17d3b111..8d3f5474ab 100644 --- a/src/gromacs/fileio/mdoutf.c +++ b/src/gromacs/fileio/mdoutf.c @@ -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; } diff --git a/src/gromacs/fileio/mdoutf.h b/src/gromacs/fileio/mdoutf.h index cb6b812720..889c039995 100644 --- a/src/gromacs/fileio/mdoutf.h +++ b/src/gromacs/fileio/mdoutf.h @@ -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, diff --git a/src/gromacs/gmxlib/copyrite.cpp b/src/gromacs/gmxlib/copyrite.cpp index 8aa33b8495..144825abf5 100644 --- a/src/gromacs/gmxlib/copyrite.cpp +++ b/src/gromacs/gmxlib/copyrite.cpp @@ -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) diff --git a/src/gromacs/mdlib/minimize.c b/src/gromacs/mdlib/minimize.c index c9b00c98b6..6a583a3585 100644 --- a/src/gromacs/mdlib/minimize.c +++ b/src/gromacs/mdlib/minimize.c @@ -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, diff --git a/src/gromacs/mdlib/sim_util.c b/src/gromacs/mdlib/sim_util.c index 251f64e284..6b6cf4cb4b 100644 --- a/src/gromacs/mdlib/sim_util.c +++ b/src/gromacs/mdlib/sim_util.c @@ -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));