*
* 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.
snew(vsiteconflist, 1);
snew(vsitetoplist, 1);
- while (fgets2(pline, STRLEN-2, ddb) != NULL)
+ while (fgets2(pline, STRLEN-2, ddb) != nullptr)
{
strip_comment(pline);
trim(pline);
if (pline[0] == OPENDIR)
{
strncpy(dirstr, pline+1, STRLEN-2);
- if ((ch = strchr (dirstr, CLOSEDIR)) != NULL)
+ if ((ch = strchr (dirstr, CLOSEDIR)) != nullptr)
{
(*ch) = 0;
}
srenew(vsitetoplist[i].bond, k+1);
strncpy(vsitetoplist[i].bond[k].atom1, s1, MAXNAME-1);
strncpy(vsitetoplist[i].bond[k].atom2, s2, MAXNAME-1);
- vsitetoplist[i].bond[k].value = strtod(s3, NULL);
+ vsitetoplist[i].bond[k].value = strtod(s3, nullptr);
}
else if (n == 4)
{
strncpy(vsitetoplist[i].angle[k].atom1, s1, MAXNAME-1);
strncpy(vsitetoplist[i].angle[k].atom2, s2, MAXNAME-1);
strncpy(vsitetoplist[i].angle[k].atom3, s3, MAXNAME-1);
- vsitetoplist[i].angle[k].value = strtod(s4, NULL);
+ vsitetoplist[i].angle[k].value = strtod(s4, nullptr);
}
else
{
}
else
{
- return NULL;
+ return nullptr;
}
}
{ NOTSET, NOTSET, NOTSET, NOTSET, NOTSET, NOTSET };
c[0] = b;
- add_param(plist, ai, aj, c, NULL);
+ add_param(plist, ai, aj, c, nullptr);
}
static void add_vsites(t_params plist[], int vsite_type[],
srenew(*newcgnr, at->nr+*nadd);
for (j = 0; j < NMASS; j++)
{
- (*newatomname)[at->nr+*nadd-1-j] = NULL;
+ (*newatomname)[at->nr+*nadd-1-j] = nullptr;
}
/* Dummy masses will be placed at the center-of-mass in each ring. */
srenew(*newatomname, at->nr+*nadd);
srenew(*newvsite_type, at->nr+*nadd);
srenew(*newcgnr, at->nr+*nadd);
- (*newatomname)[at->nr+*nadd-1] = NULL;
+ (*newatomname)[at->nr+*nadd-1] = nullptr;
/* Calc the dummy mass initial position */
rvec_sub(x[ats[atHH]], x[ats[atOH]], r1);
t_atom *newatom;
t_params *params;
char ***newatomname;
- char *resnm = NULL;
+ char *resnm = nullptr;
int ndb, f;
char **db;
int nvsiteconf, nvsitetop, cmplength;
{ "CG", /* PHE */
"CD1", "HD1", "CD2", "HD2",
"CE1", "HE1", "CE2", "HE2",
- "CZ", "HZ", NULL },
+ "CZ", "HZ", nullptr },
{ "CB", /* TRP */
"CG",
"CD1", "HD1", "CD2",
"NE1", "HE1", "CE2", "CE3", "HE3",
"CZ2", "HZ2", "CZ3", "HZ3",
- "CH2", "HH2", NULL },
+ "CH2", "HH2", nullptr },
{ "CG", /* TYR */
"CD1", "HD1", "CD2", "HD2",
"CE1", "HE1", "CE2", "HE2",
- "CZ", "OH", "HH", NULL },
+ "CZ", "OH", "HH", nullptr },
{ "CG", /* HIS */
"ND1", "HD1", "CD2", "HD2",
- "CE1", "HE1", "NE2", "HE2", NULL }
+ "CE1", "HE1", "NE2", "HE2", nullptr }
};
if (debug)
ndb = fflib_search_file_end(ffdir, ".vsd", FALSE, &db);
nvsiteconf = 0;
- vsiteconflist = NULL;
+ vsiteconflist = nullptr;
nvsitetop = 0;
- vsitetop = NULL;
+ vsitetop = nullptr;
for (f = 0; f < ndb; f++)
{
read_vsite_database(db[f], &vsiteconflist, &nvsiteconf, &vsitetop, &nvsitetop);
strcpy(nexttpname, get_atomtype_name(get_atype(heavies[0], at, nrtp, rtp, rt), atype));
ch = get_dummymass_name(vsiteconflist, nvsiteconf, tpname, nexttpname);
- if (ch == NULL)
+ if (ch == nullptr)
{
if (ndb > 0)
{
for (j = 0; j < NMASS; j++)
{
- newatomname[at->nr+nadd-1-j] = NULL;
+ newatomname[at->nr+nadd-1-j] = nullptr;
}
/* calculate starting position for the masses */