*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2007, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 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.
const gmx_output_env_t *oenv)
{
FILE *fp, *gp, *hp, *tp;
- int *index = NULL;
+ int *index = nullptr;
int nindex, natoms;
t_trxstatus *status;
- rvec *x = NULL, *v = NULL, dx;
+ rvec *x = nullptr, *v = nullptr, dx;
t_pbc pbc;
char *gname;
char timebuf[32];
/* Topology stuff */
t_trxframe fr;
t_tpxheader tpxh;
- gmx_mtop_t *mtop = NULL;
+ gmx_mtop_t *mtop = nullptr;
int ePBC = -1;
- t_block *mols = NULL;
+ t_block *mols = nullptr;
int ii, jj;
real temp, tfac;
/* Cluster size distribution (matrix) */
- real **cs_dist = NULL;
- real tf, dx2, cut2, *t_x = NULL, *t_y, cmid, cmax, cav, ekin;
+ real **cs_dist = nullptr;
+ real tf, dx2, cut2, *t_x = nullptr, *t_y, cmid, cmax, cav, ekin;
int i, j, k, ai, aj, ci, cj, nframe, nclust, n_x, max_size = 0;
int *clust_index, *clust_size, max_clust_size, max_clust_ind, nav, nhisto;
t_rgb rlo = { 1.0, 1.0, 1.0 };
gmx_fatal(FARGS, "tpr (%d atoms) and trajectory (%d atoms) do not match!",
tpxh.natoms, natoms);
}
- ePBC = read_tpx(tpr, NULL, NULL, &natoms, NULL, NULL, mtop);
+ ePBC = read_tpx(tpr, nullptr, nullptr, &natoms, nullptr, nullptr, mtop);
}
if (ndf <= -1)
{
printf("Using molecules rather than atoms. Not reading index file %s\n",
ndx);
}
- GMX_RELEASE_ASSERT(mtop != NULL, "Trying to access mtop->mols from NULL mtop pointer");
+ GMX_RELEASE_ASSERT(mtop != nullptr, "Trying to access mtop->mols from NULL mtop pointer");
mols = &(mtop->mols);
/* Make dummy index */
/* Compute distance */
if (bMol)
{
- GMX_RELEASE_ASSERT(mols != NULL, "Cannot access index[] from NULL mols pointer");
+ GMX_RELEASE_ASSERT(mols != nullptr, "Cannot access index[] from NULL mols pointer");
bSame = FALSE;
for (ii = mols->index[ai]; !bSame && (ii < mols->index[ai+1]); ii++)
{
{
if (bMol)
{
- GMX_RELEASE_ASSERT(mols != NULL, "Cannot access index[] from NULL mols pointer");
+ GMX_RELEASE_ASSERT(mols != nullptr, "Cannot access index[] from NULL mols pointer");
for (j = mols->index[i]; (j < mols->index[i+1]); j++)
{
fprintf(fp, "%d\n", j+1);
t_rgb rgblo, rgbhi;
t_filenm fnm[] = {
- { efTRX, "-f", NULL, ffREAD },
- { efTPR, NULL, NULL, ffOPTRD },
- { efNDX, NULL, NULL, ffOPTRD },
+ { efTRX, "-f", nullptr, ffREAD },
+ { efTPR, nullptr, nullptr, ffOPTRD },
+ { efNDX, nullptr, nullptr, ffOPTRD },
{ efXPM, "-o", "csize", ffWRITE },
{ efXPM, "-ow", "csizew", ffWRITE },
{ efXVG, "-nc", "nclust", ffWRITE },
if (!parse_common_args(&argc, argv,
PCA_CAN_VIEW | PCA_CAN_TIME | PCA_TIME_UNIT,
- NFILE, fnm, NPA, pa, asize(desc), desc, 0, NULL, &oenv))
+ NFILE, fnm, NPA, pa, asize(desc), desc, 0, nullptr, &oenv))
{
return 0;
}