*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
}
else
{
- pcrd->externalPotentialProvider = NULL;
+ pcrd->externalPotentialProvider = nullptr;
}
}
else
{
if (bRead)
{
- pcrd->externalPotentialProvider = NULL;
+ pcrd->externalPotentialProvider = nullptr;
}
}
/* Note that we try to support adding new geometries without
else
{
fepvals->n_lambda = 0;
- fepvals->all_lambda = NULL;
+ fepvals->all_lambda = nullptr;
if (fepvals->init_lambda >= 0)
{
fepvals->separate_dvdl[efptFEP] = TRUE;
if (bClear)
{
ilist[j].nr = 0;
- ilist[j].iatoms = NULL;
+ ilist[j].iatoms = nullptr;
}
else
{
}
if (bRead)
{
- if ((block->nalloc_index > 0) && (NULL != block->index))
+ if ((block->nalloc_index > 0) && (nullptr != block->index))
{
sfree(block->index);
}
{
snew(groups->grpname, groups->ngrpname);
}
- atoms->pdbinfo = NULL;
+ atoms->pdbinfo = nullptr;
}
else
{
{
if (bRead)
{
- groups->grpnr[g] = NULL;
+ groups->grpnr[g] = nullptr;
}
}
else
else
{
symbuf = symtab->symbuf;
- while (symbuf != NULL)
+ while (symbuf != nullptr)
{
for (i = 0; (i < symbuf->bufsize) && (i < nr); i++)
{
{
mtop->ffparams.cmap_grid.ngrid = 0;
mtop->ffparams.cmap_grid.grid_spacing = 0;
- mtop->ffparams.cmap_grid.cmapdata = NULL;
+ mtop->ffparams.cmap_grid.cmapdata = nullptr;
}
if (file_version >= 57)
if (!bRead)
{
- GMX_RELEASE_ASSERT(x == NULL && v == NULL, "Passing separate x and v pointers to do_tpx() is not supported when writing");
+ GMX_RELEASE_ASSERT(x == nullptr && v == nullptr, "Passing separate x and v pointers to do_tpx() is not supported when writing");
tpx.natoms = state->natoms;
tpx.ngtc = state->ngtc;
tpx.fep_state = state->fep_state;
tpx.lambda = state->lambda[efptFEP];
- tpx.bIr = (ir != NULL);
- tpx.bTop = (mtop != NULL);
+ tpx.bIr = (ir != nullptr);
+ tpx.bTop = (mtop != nullptr);
tpx.bX = (state->flags & (1 << estX));
tpx.bV = (state->flags & (1 << estV));
tpx.bF = FALSE;
}
else
{
- GMX_RELEASE_ASSERT(!(x == NULL && v != NULL), "Passing x==NULL and v!=NULL is not supported");
+ GMX_RELEASE_ASSERT(!(x == nullptr && v != nullptr), "Passing x==NULL and v!=NULL is not supported");
}
- TopOnlyOK = (ir == NULL);
+ TopOnlyOK = (ir == nullptr);
int fileVersion; /* Version number of the code that wrote the file */
int fileGeneration; /* Generation version number of the code that wrote the file */
if (bRead)
{
state->flags = 0;
- if (x != NULL)
+ if (x != nullptr)
{
init_state(state, 0, tpx.ngtc, 0, 0, 0);
}
}
}
- if (x == NULL)
+ if (x == nullptr)
{
x = as_rvec_array(state->x.data());
v = as_rvec_array(state->v.data());
}
if (fileGeneration <= tpx_generation && ir)
{
- do_inputrec(fio, ir, bRead, fileVersion, mtop ? &mtop->ffparams.fudgeQQ : NULL);
+ do_inputrec(fio, ir, bRead, fileVersion, mtop ? &mtop->ffparams.fudgeQQ : nullptr);
if (fileVersion < 51)
{
set_box_rel(ir, state);
t_fileio *fio;
fio = open_tpx(fn, "r");
- do_tpxheader(fio, TRUE, tpx, TopOnlyOK, NULL, NULL);
+ do_tpxheader(fio, TRUE, tpx, TopOnlyOK, nullptr, nullptr);
close_tpx(fio);
}
fio = open_tpx(fn, "w");
do_tpx(fio, FALSE,
const_cast<t_inputrec *>(ir),
- const_cast<t_state *>(state), NULL, NULL,
+ const_cast<t_state *>(state), nullptr, nullptr,
const_cast<gmx_mtop_t *>(mtop));
close_tpx(fio);
}
t_fileio *fio;
fio = open_tpx(fn, "r");
- do_tpx(fio, TRUE, ir, state, NULL, NULL, mtop);
+ do_tpx(fio, TRUE, ir, state, nullptr, nullptr, mtop);
close_tpx(fio);
}