*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,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.
gmx_fatal(FARGS, "Couldn't open %s. Exiting.\n", fn);
}
- if (NULL == fgets(buffer, 255, in))
+ if (nullptr == fgets(buffer, 255, in))
{
gmx_fatal(FARGS, "Error reading from file %s", fn);
}
for (i = 0; i < nr; i++)
{
- if (fgets(buffer, 255, in) == NULL)
+ if (fgets(buffer, 255, in) == nullptr)
{
gmx_fatal(FARGS, "reading datafile. Check your datafile.\n");
}
t_electron *found; /* found by bsearch */
t_electron sought; /* thingie thought by bsearch */
real boxSz, aveBox;
- gmx_rmpbc_t gpbc = NULL;
+ gmx_rmpbc_t gpbc = nullptr;
real t,
z;
(const void *)eltab, nr, sizeof(t_electron),
(int(*)(const void*, const void*))compare);
- if (found == NULL)
+ if (found == nullptr)
{
fprintf(stderr, "Couldn't find %s. Add it to the .dat file\n",
*(top->atoms.atomname[index[n][i]]));
real t,
z;
real boxSz, aveBox;
- gmx_rmpbc_t gpbc = NULL;
+ gmx_rmpbc_t gpbc = nullptr;
if (axis < 0 || axis >= DIM)
{
const gmx_output_env_t *oenv)
{
FILE *den;
- const char *title = NULL;
- const char *xlabel = NULL;
- const char *ylabel = NULL;
+ const char *title = nullptr;
+ const char *xlabel = nullptr;
+ const char *ylabel = nullptr;
int slice, n;
real ddd;
real axispos;
gmx_output_env_t *oenv;
static const char *dens_opt[] =
- { NULL, "mass", "number", "charge", "electron", NULL };
+ { nullptr, "mass", "number", "charge", "electron", nullptr };
static int axis = 2; /* normal to memb. default z */
static const char *axtitle = "Z";
static int nslices = 50; /* nr of slices defined */
int i;
t_filenm fnm[] = { /* files for g_density */
- { efTRX, "-f", NULL, ffREAD },
- { efNDX, NULL, NULL, ffOPTRD },
- { efTPR, NULL, NULL, ffREAD },
+ { efTRX, "-f", nullptr, ffREAD },
+ { efNDX, nullptr, nullptr, ffOPTRD },
+ { efTPR, nullptr, nullptr, ffREAD },
{ efDAT, "-ei", "electrons", ffOPTRD }, /* file with nr. of electrons */
{ efXVG, "-o", "density", ffWRITE },
};
return 0;
}
- GMX_RELEASE_ASSERT(dens_opt[0] != NULL, "Option setting inconsistency; dens_opt[0] is NULL");
+ GMX_RELEASE_ASSERT(dens_opt[0] != nullptr, "Option setting inconsistency; dens_opt[0] is NULL");
if (bSymmetrize && !bCenter)
{
else
{
ncenter = 0;
- index_center = NULL;
+ index_center = nullptr;
}
fprintf(stderr, "\nSelect %d group%s to calculate density for:\n", ngrps, (ngrps > 1) ? "s" : "");