Tidy: modernize-use-nullptr
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_dos.cpp
index 3845ba98ca151538af70ed41abba1208d04ae759..072999b613a6c79732a77b4827e1826b2201f103 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2011,2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -307,9 +307,9 @@ int gmx_dos(int argc, char *argv[])
     };
 
     t_filenm            fnm[] = {
-        { efTRN, "-f",    NULL,    ffREAD  },
-        { efTPR, "-s",    NULL,    ffREAD  },
-        { efNDX, NULL,    NULL,    ffOPTRD },
+        { efTRN, "-f",    nullptr,    ffREAD  },
+        { efTPR, "-s",    nullptr,    ffREAD  },
+        { efNDX, nullptr,    nullptr,    ffOPTRD },
         { efXVG, "-vacf", "vacf",  ffWRITE },
         { efXVG, "-mvacf", "mvacf", ffWRITE },
         { efXVG, "-dos",  "dos",   ffWRITE },
@@ -339,7 +339,7 @@ int gmx_dos(int argc, char *argv[])
     please_cite(fplog, "Pascal2011a");
     please_cite(fplog, "Caleman2011b");
 
-    read_tps_conf(ftp2fn(efTPR, NFILE, fnm), &top, &ePBC, NULL, NULL, box, TRUE);
+    read_tps_conf(ftp2fn(efTPR, NFILE, fnm), &top, &ePBC, nullptr, nullptr, box, TRUE);
 
     /* Handle index groups */
     get_index(&top.atoms, ftp2fn_null(efNDX, NFILE, fnm), 1, &grpNatoms, &index, &grpname);
@@ -359,7 +359,7 @@ int gmx_dos(int argc, char *argv[])
     snew(c1, gnx);
     for (i = 0; (i < gnx); i++)
     {
-        c1[i] = NULL;
+        c1[i] = nullptr;
     }
 
     read_first_frame(oenv, &status, ftp2fn(efTRN, NFILE, fnm), &fr, TRX_NEED_V);
@@ -429,7 +429,7 @@ int gmx_dos(int argc, char *argv[])
     normalizeAutocorrelation = opt2parg_bool("-normalize", npargs, ppa);
 
     /* Note that we always disable normalization here, regardless of user settings */
-    low_do_autocorr(NULL, oenv, NULL, nframes, gnx, nframes, c1, dt, eacNormal, 0, FALSE,
+    low_do_autocorr(nullptr, oenv, nullptr, nframes, gnx, nframes, c1, dt, eacNormal, 0, FALSE,
                     FALSE, FALSE, -1, -1, 0);
     snew(dos, DOS_NR);
     for (j = 0; (j < DOS_NR); j++)
@@ -506,7 +506,7 @@ int gmx_dos(int argc, char *argv[])
         }
     }
     /* Normalize it */
-    dostot = evaluate_integral(nframes/4, nu, dos[DOS], NULL, nframes/4, &stddev);
+    dostot = evaluate_integral(nframes/4, nu, dos[DOS], nullptr, nframes/4, &stddev);
     if (bNormalizeDos)
     {
         for (j = 0; (j < nframes/4); j++)
@@ -585,14 +585,14 @@ int gmx_dos(int argc, char *argv[])
         dos[DOS_E][j]  = (dos[DOS_DIFF][j]*wEdiff +
                           dos[DOS_SOLID][j]*wEsolid(nu[j], beta));
     }
-    DiffCoeff = evaluate_integral(nframes/2, tt, dos[VACF], NULL, nframes/2, &stddev);
+    DiffCoeff = evaluate_integral(nframes/2, tt, dos[VACF], nullptr, nframes/2, &stddev);
     DiffCoeff = 1000*DiffCoeff/3.0;
     fprintf(fplog, "Diffusion coefficient from VACF %g 10^-5 cm^2/s\n",
             DiffCoeff);
     fprintf(fplog, "Diffusion coefficient from DoS %g 10^-5 cm^2/s\n",
             1000*DoS0/(12*tmass*beta));
 
-    cP = BOLTZ * evaluate_integral(nframes/4, nu, dos[DOS_CP], NULL,
+    cP = BOLTZ * evaluate_integral(nframes/4, nu, dos[DOS_CP], nullptr,
                                    nframes/4, &stddev);
     fprintf(fplog, "Heat capacity %g J/mol K\n", 1000*cP/Nmol);
     fprintf(fplog, "\nArrivederci!\n");