2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5 * Copyright (c) 2001-2004, The GROMACS development team.
6 * Copyright (c) 2013,2014, by the GROMACS development team, led by
7 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
8 * and including many others, as listed in the AUTHORS file in the
9 * top-level source directory and at http://www.gromacs.org.
11 * GROMACS is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public License
13 * as published by the Free Software Foundation; either version 2.1
14 * of the License, or (at your option) any later version.
16 * GROMACS is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with GROMACS; if not, see
23 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
24 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 * If you want to redistribute modifications to GROMACS, please
27 * consider that scientific software is very special. Version
28 * control is crucial - bugs must be traceable. We will be happy to
29 * consider code for inclusion in the official distribution, but
30 * derived work must not be called official GROMACS. Details are found
31 * in the README & COPYING files - if they are missing, get the
32 * official version at http://www.gromacs.org.
34 * To help us fund GROMACS development, we humbly ask that you cite
35 * the research papers on the package. Check out http://www.gromacs.org.
52 #include <boost/version.hpp>
54 /* This file is completely threadsafe - keep it that way! */
56 #include "gromacs/legacyheaders/macros.h"
57 #include "gromacs/random/random.h"
58 #include "gromacs/legacyheaders/smalloc.h"
59 #include "gromacs/legacyheaders/string2.h"
60 #include "gromacs/legacyheaders/vec.h"
62 #include "gromacs/fft/fft.h"
63 #include "gromacs/fileio/futil.h"
64 #include "gromacs/fileio/strdb.h"
65 #include "gromacs/utility/baseversion.h"
66 #include "gromacs/utility/exceptions.h"
67 #include "gromacs/utility/gmxassert.h"
68 #include "gromacs/utility/programcontext.h"
70 #include "buildinfo.h"
72 static gmx_bool be_cool(void)
74 /* Yes, it is bad to check the environment variable every call,
75 * but we dont call this routine often, and it avoids using
76 * a mutex for locking the variable...
78 #ifdef GMX_COOL_QUOTES
79 return (getenv("GMX_NO_QUOTES") == NULL);
86 static void pukeit(const char *db, const char *defstring, char *retstring,
87 int retsize, int *cqnum)
94 if (be_cool() && ((fp = low_libopen(db, FALSE)) != NULL))
96 nhlp = fget_lines(fp, &help);
97 /* for libraries we can use the low-level close routines */
99 rng = gmx_rng_init(gmx_rng_make_seed());
100 *cqnum = static_cast<int>(nhlp*gmx_rng_uniform_real(rng));
101 gmx_rng_destroy(rng);
102 if (strlen(help[*cqnum]) >= STRLEN)
104 help[*cqnum][STRLEN-1] = '\0';
106 strncpy(retstring, help[*cqnum], retsize);
107 for (i = 0; (i < nhlp); i++)
116 strncpy(retstring, defstring, retsize);
120 void bromacs(char *retstring, int retsize)
124 pukeit("bromacs.dat",
125 "Groningen Machine for Chemical Simulation",
126 retstring, retsize, &dum);
129 void cool_quote(char *retstring, int retsize, int *cqnum)
144 /* protect audience from explicit lyrics */
145 snew(tmpstr, retsize+1);
146 pukeit("gurgle.dat", "Thanx for Using GROMACS - Have a Nice Day",
147 tmpstr, retsize-2, p);
149 if ((ptr = strchr(tmpstr, '_')) != NULL)
153 sprintf(retstring, "\"%s\" %s", tmpstr, ptr);
157 strcpy(retstring, tmpstr);
162 static void printCopyright(FILE *fp)
164 static const char * const Contributors[] = {
167 "Herman J.C. Berendsen",
174 "Christoph Junghans",
190 "Christian Wennberg",
193 static const char * const CopyrightText[] = {
194 "Copyright (c) 1991-2000, University of Groningen, The Netherlands.",
195 "Copyright (c) 2001-2014, The GROMACS development team at",
196 "Uppsala University, Stockholm University and",
197 "the Royal Institute of Technology, Sweden.",
198 "check out http://www.gromacs.org for more information."
200 static const char * const LicenseText[] = {
201 "GROMACS is free software; you can redistribute it and/or modify it",
202 "under the terms of the GNU Lesser General Public License",
203 "as published by the Free Software Foundation; either version 2.1",
204 "of the License, or (at your option) any later version."
207 #define NCONTRIBUTORS (int)asize(Contributors)
208 #define NCR (int)asize(CopyrightText)
210 // FAH has an exception permission from LGPL to allow digital signatures in Gromacs.
214 #define NLICENSE (int)asize(LicenseText)
217 fprintf(fp, "GROMACS is written by:\n");
218 for (int i = 0; i < NCONTRIBUTORS; )
220 for (int j = 0; j < 4 && i < NCONTRIBUTORS; ++j, ++i)
222 fprintf(fp, "%-18s ", Contributors[i]);
226 fprintf(fp, "and the project leaders:\n");
227 fprintf(fp, "Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel\n");
229 for (int i = 0; i < NCR; ++i)
231 fprintf(fp, "%s\n", CopyrightText[i]);
234 for (int i = 0; i < NLICENSE; ++i)
236 fprintf(fp, "%s\n", LicenseText[i]);
241 void gmx_thanx(FILE *fp)
246 /* protect the audience from suggestive discussions */
247 cool_quote(cq, 1023, &cqnum);
251 fprintf(fp, "\ngcq#%d: %s\n\n", cqnum, cq);
255 fprintf(fp, "\n%s\n\n", cq);
268 void please_cite(FILE *fp, const char *key)
270 static const t_citerec citedb[] = {
272 "M. P. Allen and D. J. Tildesley",
273 "Computer simulation of liquids",
274 "Oxford Science Publications",
277 "H. J. C. Berendsen, D. van der Spoel and R. van Drunen",
278 "GROMACS: A message-passing parallel molecular dynamics implementation",
282 "H. J. C. Berendsen, J. P. M. Postma, A. DiNola and J. R. Haak",
283 "Molecular dynamics with coupling to an external bath",
285 81, 1984, "3684-3690" },
287 "J. P. Ryckaert and G. Ciccotti and H. J. C. Berendsen",
288 "Numerical Integration of the Cartesian Equations of Motion of a System with Constraints; Molecular Dynamics of n-Alkanes",
290 23, 1977, "327-341" },
292 "S. Miyamoto and P. A. Kollman",
293 "SETTLE: An Analytical Version of the SHAKE and RATTLE Algorithms for Rigid Water Models",
295 13, 1992, "952-962" },
297 "D. T. Cromer & J. B. Mann",
298 "X-ray scattering factors computed from numerical Hartree-Fock wave functions",
302 "E. Barth and K. Kuczera and B. Leimkuhler and R. D. Skeel",
303 "Algorithms for Constrained Molecular Dynamics",
305 16, 1995, "1192-1209" },
307 "U. Essmann, L. Perera, M. L. Berkowitz, T. Darden, H. Lee and L. G. Pedersen ",
308 "A smooth particle mesh Ewald method",
310 103, 1995, "8577-8592" },
312 "A. E. Torda and R. M. Scheek and W. F. van Gunsteren",
313 "Time-dependent distance restraints in molecular dynamics simulations",
315 157, 1989, "289-294" },
317 "I. G. Tironi and R. Sperb and P. E. Smith and W. F. van Gunsteren",
318 "Generalized reaction field method for molecular dynamics simulations",
320 102, 1995, "5451-5459" },
322 "B. Hess and H. Bekker and H. J. C. Berendsen and J. G. E. M. Fraaije",
323 "LINCS: A Linear Constraint Solver for molecular simulations",
325 18, 1997, "1463-1472" },
328 "P-LINCS: A Parallel Linear Constraint Solver for molecular simulation",
329 "J. Chem. Theory Comput.",
330 4, 2008, "116-122" },
332 "B. Hess and C. Kutzner and D. van der Spoel and E. Lindahl",
333 "GROMACS 4: Algorithms for highly efficient, load-balanced, and scalable molecular simulation",
334 "J. Chem. Theory Comput.",
335 4, 2008, "435-447" },
337 "J. S. Hub, B. L. de Groot and D. van der Spoel",
338 "g_wham - A free weighted histogram analysis implementation including robust error and autocorrelation estimates",
339 "J. Chem. Theory Comput.",
340 6, 2010, "3713-3720"},
342 "Y. In-Chul and M. L. Berkowitz",
343 "Ewald summation for systems with slab geometry",
345 111, 1999, "3155-3162" },
347 "B. L. de Groot and D. M. F. van Aalten and R. M. Scheek and A. Amadei and G. Vriend and H. J. C. Berendsen",
348 "Prediction of Protein Conformational Freedom From Distance Constrains",
350 29, 1997, "240-251" },
352 "D. van der Spoel and P. J. van Maaren and H. J. C. Berendsen",
353 "A systematic study of water models for molecular simulation. Derivation of models optimized for use with a reaction-field.",
355 108, 1998, "10220-10230" },
357 "D. S. Wishart and A. M. Nip",
358 "Protein Chemical Shift Analysis: A Practical Guide",
359 "Biochem. Cell Biol.",
360 76, 1998, "153-163" },
362 "V. N. Maiorov and G. M. Crippen",
363 "Size-Independent Comparison of Protein Three-Dimensional Structures",
364 "PROTEINS: Struct. Funct. Gen.",
365 22, 1995, "273-283" },
367 "K. A. Feenstra and B. Hess and H. J. C. Berendsen",
368 "Improving Efficiency of Large Time-scale Molecular Dynamics Simulations of Hydrogen-rich Systems",
370 20, 1999, "786-798" },
372 "Tuanan C. Lourenco and Mariny F. C. Coelho and Teodorico C. Ramalho and David van der Spoel and Luciano T. Costa",
373 "Insights on the Solubility of CO2 in 1-Ethyl-3-methylimidazolium Bis(trifluoromethylsulfonyl)imide from the Microscopic Point of View",
374 "Environ. Sci. Technol.",
375 47, 2013, "7421-7429" },
377 "N. Timneanu and C. Caleman and J. Hajdu and D. van der Spoel",
378 "Auger Electron Cascades in Water and Ice",
380 299, 2004, "277-283" },
382 "T. A. Pascal and S. T. Lin and W. A. Goddard III",
383 "Thermodynamics of liquids: standard molar entropies and heat capacities of common solvents from 2PT molecular dynamics",
384 "Phys. Chem. Chem. Phys.",
385 13, 2011, "169-181" },
387 "C. Caleman and P. J. van Maaren and M. Hong and J. S. Hub and L. T. da Costa and D. van der Spoel",
388 "Force Field Benchmark of Organic Liquids: Density, Enthalpy of Vaporization, Heat Capacities, Surface Tension, Isothermal Compressibility, Volumetric Expansion Coefficient, and Dielectric Constant",
389 "J. Chem. Theo. Comp.",
392 "E. Lindahl and B. Hess and D. van der Spoel",
393 "GROMACS 3.0: A package for molecular simulation and trajectory analysis",
395 7, 2001, "306-317" },
397 "J. Wang and W. Wang and S. Huo and M. Lee and P. A. Kollman",
398 "Solvation model based on weighted solvent accessible surface area",
400 105, 2001, "5055-5067" },
402 "D. Eisenberg and A. D. McLachlan",
403 "Solvation energy in protein folding and binding",
405 319, 1986, "199-203" },
408 "van der Waals Volumes and Radii",
410 68, 1964, "441-451" },
412 "Frank Eisenhaber and Philip Lijnzaad and Patrick Argos and Chris Sander and Michael Scharf",
413 "The Double Cube Lattice Method: Efficient Approaches to Numerical Integration of Surface Area and Volume and to Dot Surface Contouring of Molecular Assemblies",
415 16, 1995, "273-284" },
417 "B. Hess, H. Saint-Martin and H.J.C. Berendsen",
418 "Flexible constraints: an adiabatic treatment of quantum degrees of freedom, with application to the flexible and polarizable MCDHO model for water",
420 116, 2002, "9602-9610" },
422 "Csaba Hetenyi and David van der Spoel",
423 "Efficient docking of peptides to proteins without prior knowledge of the binding site.",
425 11, 2002, "1729-1737" },
427 "B. Hess and R.M. Scheek",
428 "Orientation restraints in molecular dynamics simulations using time and ensemble averaging",
430 164, 2003, "19-27" },
432 "A. K. Rappe and W. A. Goddard III",
433 "Charge Equillibration for Molecular Dynamics Simulations",
435 95, 1991, "3358-3363" },
437 "Y. Mu, P. H. Nguyen and G. Stock",
438 "Energy landscape of a small peptide revelaed by dihedral angle principal component analysis",
439 "Prot. Struct. Funct. Bioinf.",
442 "T. Okabe and M. Kawata and Y. Okamoto and M. Mikami",
443 "Replica-exchange {M}onte {C}arlo method for the isobaric-isothermal ensemble",
445 335, 2001, "435-439" },
447 "K. Hukushima and K. Nemoto",
448 "Exchange Monte Carlo Method and Application to Spin Glass Simulations",
449 "J. Phys. Soc. Jpn.",
450 65, 1996, "1604-1608" },
453 "Dipolar Relaxation and Nuclear Overhauser effects in nonrigid molecules: The effect of fluctuating internuclear distances",
455 72, 1980, "6035-6043" },
457 "P. Bultinck and W. Langenaeker and P. Lahorte and F. De Proft and P. Geerlings and M. Waroquier and J. P. Tollenaere",
458 "The electronegativity equalization method I: Parametrization and validation for atomic charge calculations",
460 106, 2002, "7887-7894" },
462 "Q. Y. Yang and K. A. Sharp",
463 "Atomic charge parameters for the finite difference Poisson-Boltzmann method using electronegativity neutralization",
464 "J. Chem. Theory Comput.",
465 2, 2006, "1152-1167" },
467 "D. van der Spoel, E. Lindahl, B. Hess, G. Groenhof, A. E. Mark and H. J. C. Berendsen",
468 "GROMACS: Fast, Flexible and Free",
470 26, 2005, "1701-1719" },
472 "D. van der Spoel, P. J. van Maaren, P. Larsson and N. Timneanu",
473 "Thermodynamics of hydrogen bonding in hydrophilic and hydrophobic media",
475 110, 2006, "4393-4398" },
477 "D. van der Spoel and M. M. Seibert",
478 "Protein folding kinetics and thermodynamics from atomistic simulations",
479 "Phys. Rev. Letters",
480 96, 2006, "238102" },
483 "Transverse-current autocorrelation-function calculations of the shear viscosity for molecular liquids",
485 49, 1994, "359-366" },
487 "G. Bussi, D. Donadio and M. Parrinello",
488 "Canonical sampling through velocity rescaling",
490 126, 2007, "014101" },
492 "J. S. Hub and B. L. de Groot",
493 "Does CO2 permeate through Aquaporin-1?",
495 91, 2006, "842-848" },
497 "J. S. Hub and B. L. de Groot",
498 "Mechanism of selectivity in aquaporins and aquaglyceroporins",
500 105, 2008, "1198-1203" },
502 "M. S. Friedrichs, P. Eastman, V. Vaidyanathan, M. Houston, S. LeGrand, A. L. Beberg, D. L. Ensign, C. M. Bruns, and V. S. Pande",
503 "Accelerating Molecular Dynamic Simulation on Graphics Processing Units",
505 30, 2009, "864-872" },
507 "O. Engin, A. Villa, M. Sayar and B. Hess",
508 "Driving Forces for Adsorption of Amphiphilic Peptides to Air-Water Interface",
510 114, 2010, "11093" },
512 "S. Fritsch, C. Junghans and K. Kremer",
513 "Adaptive molecular simulation study on structure formation of toluene around C60 using Gromacs",
514 "J. Chem. Theo. Comp.",
517 "C. Junghans and S. Poblete",
518 "A reference implementation of the adaptive resolution scheme in ESPResSo",
522 "H. Wang, F. Dommert, C.Holm",
523 "Optimizing working parameters of the smooth particle mesh Ewald algorithm in terms of accuracy and efficiency",
525 133, 2010, "034117" },
527 "Y. Sugita, Y. Okamoto",
528 "Replica-exchange molecular dynamics method for protein folding",
530 314, 1999, "141-151" },
532 "C. Kutzner and J. Czub and H. Grubmuller",
533 "Keep it Flexible: Driving Macromolecular Rotary Motions in Atomistic Simulations with GROMACS",
534 "J. Chem. Theory Comput.",
535 7, 2011, "1381-1393" },
537 "M. Hoefling, N. Lima, D. Haenni, C.A.M. Seidel, B. Schuler, H. Grubmuller",
538 "Structural Heterogeneity and Quantitative FRET Efficiency Distributions of Polyprolines through a Hybrid Atomistic Simulation and Monte Carlo Approach",
542 "R. W. Hockney and J. W. Eastwood",
543 "Computer simulation using particles",
547 "V. Ballenegger, J.J. Cerda, and C. Holm",
548 "How to Convert SPME to P3M: Influence Functions and Error Estimates",
549 "J. Chem. Theory Comput.",
550 8, 2012, "936-947" },
552 "Garmay Yu, Shvetsov A, Karelov D, Lebedev D, Radulescu A, Petukhov M, Isaev-Ivanov V",
553 "Correlated motion of protein subdomains and large-scale conformational flexibility of RecA protein filament",
554 "Journal of Physics: Conference Series",
555 340, 2012, "012094" },
557 "C. Kutzner, H. Grubmuller, B. L. de Groot, and U. Zachariae",
558 "Computational Electrophysiology: The Molecular Dynamics of Ion Channel Permeation and Selectivity in Atomistic Detail",
560 101, 2011, "809-817"},
562 "M. Lundborg, R. Apostolov, D. Spangberg, A. Gardenas, D. van der Spoel and E. Lindahl",
563 "An efficient and extensible format, library, and API for binary trajectory data from molecular simulations",
567 #define NSTR (int)asize(citedb)
572 #define LINE_WIDTH 79
579 for (index = 0; (index < NSTR) && (strcmp(citedb[index].key, key) != 0); index++)
584 fprintf(fp, "\n++++ PLEASE READ AND CITE THE FOLLOWING REFERENCE ++++\n");
587 /* Insert newlines */
588 author = wrap_lines(citedb[index].author, LINE_WIDTH, 0, FALSE);
589 title = wrap_lines(citedb[index].title, LINE_WIDTH, 0, FALSE);
590 fprintf(fp, "%s\n%s\n%s %d (%d) pp. %s\n",
591 author, title, citedb[index].journal,
592 citedb[index].volume, citedb[index].year,
593 citedb[index].pages);
599 fprintf(fp, "Entry %s not found in citation database\n", key);
601 fprintf(fp, "-------- -------- --- Thank You --- -------- --------\n\n");
605 const char *GromacsVersion()
607 return gmx_version();
610 const char *ShortProgram(void)
614 // TODO: Use the display name once it doesn't break anything.
615 return gmx::getProgramContext().programName();
617 GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
620 const char *Program(void)
624 return gmx::getProgramContext().fullBinaryPath();
626 GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
630 extern void gmx_print_version_info_gpu(FILE *fp);
632 static void gmx_print_version_info(FILE *fp)
634 fprintf(fp, "Gromacs version: %s\n", gmx_version());
635 const char *const git_hash = gmx_version_git_full_hash();
636 if (git_hash[0] != '\0')
638 fprintf(fp, "GIT SHA1 hash: %s\n", git_hash);
640 const char *const base_hash = gmx_version_git_central_base_hash();
641 if (base_hash[0] != '\0')
643 fprintf(fp, "Branched from: %s\n", base_hash);
647 fprintf(fp, "Precision: double\n");
649 fprintf(fp, "Precision: single\n");
651 fprintf(fp, "Memory model: %u bit\n", (unsigned)(8*sizeof(void *)));
653 #ifdef GMX_THREAD_MPI
654 fprintf(fp, "MPI library: thread_mpi\n");
655 #elif defined(GMX_MPI)
656 fprintf(fp, "MPI library: MPI\n");
658 fprintf(fp, "MPI library: none\n");
661 fprintf(fp, "OpenMP support: enabled\n");
663 fprintf(fp, "OpenMP support: disabled\n");
666 fprintf(fp, "GPU support: enabled\n");
668 fprintf(fp, "GPU support: disabled\n");
670 /* A preprocessor trick to avoid duplicating logic from vec.h */
671 #define gmx_stringify2(x) #x
672 #define gmx_stringify(x) gmx_stringify2(x)
673 fprintf(fp, "invsqrt routine: %s\n", gmx_stringify(gmx_invsqrt(x)));
675 fprintf(fp, "SIMD instructions: %s\n", GMX_SIMD_STRING);
677 fprintf(fp, "SIMD instructions: %s\n", "Intel MIC");
680 fprintf(fp, "FFT library: %s\n", gmx_fft_get_version_info());
682 fprintf(fp, "RDTSCP usage: enabled\n");
684 fprintf(fp, "RDTSCP usage: disabled\n");
687 fprintf(fp, "C++11 compilation: enabled\n");
689 fprintf(fp, "C++11 compilation: disabled\n");
692 fprintf(fp, "TNG support: enabled\n");
694 fprintf(fp, "TNG support: disabled\n");
697 fprintf(fp, "Built on: %s\n", BUILD_TIME);
698 fprintf(fp, "Built by: %s\n", BUILD_USER);
699 fprintf(fp, "Build OS/arch: %s\n", BUILD_HOST);
700 fprintf(fp, "Build CPU vendor: %s\n", BUILD_CPU_VENDOR);
701 fprintf(fp, "Build CPU brand: %s\n", BUILD_CPU_BRAND);
702 fprintf(fp, "Build CPU family: %d Model: %d Stepping: %d\n",
703 BUILD_CPU_FAMILY, BUILD_CPU_MODEL, BUILD_CPU_STEPPING);
704 /* TODO: The below strings can be quite long, so it would be nice to wrap
705 * them. Can wait for later, as the master branch has ready code to do all
707 fprintf(fp, "Build CPU features: %s\n", BUILD_CPU_FEATURES);
708 fprintf(fp, "C compiler: %s\n", BUILD_C_COMPILER);
709 fprintf(fp, "C compiler flags: %s\n", BUILD_CFLAGS);
710 fprintf(fp, "C++ compiler: %s\n", BUILD_CXX_COMPILER);
711 fprintf(fp, "C++ compiler flags: %s\n", BUILD_CXXFLAGS);
713 /* MKL might be used for LAPACK/BLAS even if FFTs use FFTW, so keep it separate */
714 fprintf(fp, "Linked with Intel MKL version %d.%d.%d.\n",
715 __INTEL_MKL__, __INTEL_MKL_MINOR__, __INTEL_MKL_UPDATE__);
717 #ifdef GMX_EXTERNAL_BOOST
718 const bool bExternalBoost = true;
720 const bool bExternalBoost = false;
722 fprintf(fp, "Boost version: %d.%d.%d%s\n", BOOST_VERSION / 100000,
723 BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100,
724 bExternalBoost ? " (external)" : " (internal)");
726 gmx_print_version_info_gpu(fp);
731 void gmx_is_double_precision()
733 /* allow precision detection */
736 void gmx_is_single_precision()
738 /* allow precision detection */
745 BinaryInformationSettings::BinaryInformationSettings()
746 : bExtendedInfo_(false), bCopyright_(false),
747 bGeneratedByHeader_(false), prefix_(""), suffix_("")
751 void printBinaryInformation(FILE *fp,
752 const ProgramContextInterface &programContext)
754 printBinaryInformation(fp, programContext, BinaryInformationSettings());
757 void printBinaryInformation(FILE *fp,
758 const ProgramContextInterface &programContext,
759 const BinaryInformationSettings &settings)
761 const char *prefix = settings.prefix_;
762 const char *suffix = settings.suffix_;
763 const char *precisionString = "";
765 precisionString = " (double precision)";
767 const char *const name = programContext.displayName();
768 if (settings.bGeneratedByHeader_)
770 fprintf(fp, "%sCreated by:%s\n", prefix, suffix);
772 if (settings.bCopyright_)
774 GMX_RELEASE_ASSERT(prefix[0] == '\0' && suffix[0] == '\0',
775 "Prefix/suffix not supported with copyright");
776 // This line is printed again after the copyright notice to make it
777 // appear together with all the other information, so that it is not
778 // necessary to read stuff above the copyright notice.
779 // The line above the copyright notice puts the copyright notice is
781 // TODO: It would be nice to know here whether we are really running a
782 // Gromacs binary or some other binary that is calling Gromacs; we
783 // could then print "%s is part of GROMACS" or some alternative text.
784 fprintf(fp, "%sGROMACS: %s, %s%s%s\n", prefix, name,
785 gmx_version(), precisionString, suffix);
790 fprintf(fp, "%sGROMACS: %s, %s%s%s\n", prefix, name,
791 gmx_version(), precisionString, suffix);
792 const char *const binaryPath = programContext.fullBinaryPath();
793 if (binaryPath != NULL && binaryPath[0] != '\0')
795 fprintf(fp, "%sExecutable: %s%s\n", prefix, binaryPath, suffix);
797 const char *const libraryPath = programContext.defaultLibraryDataPath();
798 if (libraryPath != NULL && libraryPath[0] != '\0')
800 fprintf(fp, "%sLibrary dir: %s%s\n", prefix, libraryPath, suffix);
802 const char *const commandLine = programContext.commandLine();
803 if (commandLine != NULL && commandLine[0] != '\0')
805 fprintf(fp, "%sCommand line:%s\n%s %s%s\n",
806 prefix, suffix, prefix, commandLine, suffix);
808 if (settings.bExtendedInfo_)
810 GMX_RELEASE_ASSERT(prefix[0] == '\0' && suffix[0] == '\0',
811 "Prefix/suffix not supported with extended info");
813 gmx_print_version_info(fp);