*
* 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.
}
calc_triclinic_images(box, img + 1);
- write_sto_conf(fn, "Images", &atoms, img, NULL, ePBC, box);
+ write_sto_conf(fn, "Images", &atoms, img, nullptr, ePBC, box);
done_atom(&atoms);
sfree(img);
resind_prev = -1;
for (i = 0; i < isize; i++)
{
- resind = atoms->atom[index == NULL ? i : index[i]].resind;
+ resind = atoms->atom[index == nullptr ? i : index[i]].resind;
if (resind != resind_prev)
{
atoms->resinfo[resind].nr = resnr_start;
{ 0, 0, 0 }, targetvec =
{ 0, 0, 0 };
static const char *btype[] =
- { NULL, "triclinic", "cubic", "dodecahedron", "octahedron", NULL },
+ { nullptr, "triclinic", "cubic", "dodecahedron", "octahedron", nullptr },
*label = "A";
static rvec visbox =
{ 0, 0, 0 };
FILE *out;
const char *infile, *outfile;
int outftp, inftp, natom, i, j, n_bfac, itype, ntype;
- double *bfac = NULL, c6, c12;
- int *bfac_nr = NULL;
- t_topology *top = NULL;
+ double *bfac = nullptr, c6, c12;
+ int *bfac_nr = nullptr;
+ t_topology *top = nullptr;
char *grpname, *sgrpname, *agrpname;
int isize, ssize, asize;
int *index, *sindex, *aindex;
gmx_output_env_t *oenv;
t_filenm fnm[] =
{
- { efSTX, "-f", NULL, ffREAD },
- { efNDX, "-n", NULL, ffOPTRD },
- { efSTO, NULL, NULL, ffOPTWR },
+ { efSTX, "-f", nullptr, ffREAD },
+ { efNDX, "-n", nullptr, ffOPTRD },
+ { efSTO, nullptr, nullptr, ffOPTWR },
{ efPQR, "-mead", "mead", ffOPTWR },
{ efDAT, "-bf", "bfact", ffOPTRD }
};
bScale = bScale || bRho;
bCalcGeom = bCenter || bRotate || bOrient || bScale;
- GMX_RELEASE_ASSERT(btype[0] != NULL, "Option setting inconsistency; btype[0] is NULL");
+ GMX_RELEASE_ASSERT(btype[0] != nullptr, "Option setting inconsistency; btype[0] is NULL");
bCalcDiam = (btype[0][0] == 'c' || btype[0][0] == 'd' || btype[0][0] == 'o');
read_tps_conf(infile, top_tmp, &ePBC, &x, &v, box, FALSE);
t_atoms &atoms = top_tmp->atoms;
natom = atoms.nr;
- if (atoms.pdbinfo == NULL)
+ if (atoms.pdbinfo == nullptr)
{
snew(atoms.pdbinfo, atoms.nr);
}
if (bMead || bGrasp || bCONECT)
{
- top = read_top(infile, NULL);
+ top = read_top(infile, nullptr);
}
if (bMead || bGrasp)
else
{
ssize = atoms.nr;
- sindex = NULL;
+ sindex = nullptr;
}
diam = calc_geom(ssize, sindex, x, gc, rmin, rmax, bCalcDiam);
rvec_sub(rmax, rmin, size);
get_index(&atoms, ftp2fn_null(efNDX, NFILE, fnm), 1, &isize, &index, &grpnames);
/* Orient the principal axes along the coordinate axes */
- orient_princ(&atoms, isize, index, natom, x, bHaveV ? v : NULL, NULL);
+ orient_princ(&atoms, isize, index, natom, x, bHaveV ? v : nullptr, nullptr);
sfree(index);
sfree(grpnames);
}
else
{
ssize = atoms.nr;
- sindex = NULL;
+ sindex = nullptr;
}
printf("Translating %d atoms (out of %d) by %g %g %g nm\n", ssize, natom,
translation[XX], translation[YY], translation[ZZ]);
}
}
- if ((btype[0] != NULL) && (bSetSize || bDist || (btype[0][0] == 't' && bSetAng)))
+ if ((btype[0] != nullptr) && (bSetSize || bDist || (btype[0][0] == 't' && bSetAng)))
{
ePBC = epbcXYZ;
if (!(bSetSize || bDist))
}
else
{
- conect = NULL;
+ conect = nullptr;
}
if (bIndex)
}
else
{
- write_sto_conf_indexed(outfile, *top_tmp->name, &atoms, x, bHaveV ? v : NULL, ePBC, box, isize, index);
+ write_sto_conf_indexed(outfile, *top_tmp->name, &atoms, x, bHaveV ? v : nullptr, ePBC, box, isize, index);
}
}
else
{
if (resnr_start >= 0)
{
- renum_resnr(&atoms, atoms.nr, NULL, resnr_start);
+ renum_resnr(&atoms, atoms.nr, nullptr, resnr_start);
}
if ((outftp == efPDB) || (outftp == efPQR))
}
else
{
- write_sto_conf(outfile, *top_tmp->name, &atoms, x, bHaveV ? v : NULL, ePBC, box);
+ write_sto_conf(outfile, *top_tmp->name, &atoms, x, bHaveV ? v : nullptr, ePBC, box);
}
}
gmx_atomprop_destroy(aps);
- do_view(oenv, outfile, NULL);
+ do_view(oenv, outfile, nullptr);
return 0;
}