*
* 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.
case efENT:
case efPQR:
out = gmx_fio_fopen(outfile, "w");
- write_pdbfile_indexed(out, title, atoms, x, ePBC, box, ' ', -1, nindex, index, NULL, TRUE);
+ write_pdbfile_indexed(out, title, atoms, x, ePBC, box, ' ', -1, nindex, index, nullptr, TRUE);
gmx_fio_fclose(out);
break;
case efESP:
fr.bBox = TRUE;
copy_mat(box, fr.box);
out = gmx_fio_fopen(outfile, "w");
- write_g96_conf(out, &fr, -1, NULL);
+ write_g96_conf(out, &fr, -1, nullptr);
gmx_fio_fclose(out);
break;
case efPDB:
case efBRK:
case efENT:
out = gmx_fio_fopen(outfile, "w");
- write_pdbfile(out, title, atoms, x, ePBC, box, ' ', -1, NULL, TRUE);
+ write_pdbfile(out, title, atoms, x, ePBC, box, ' ', -1, nullptr, TRUE);
gmx_fio_fclose(out);
break;
case efESP:
out = gmx_fio_fopen(outfile, "w");
- write_espresso_conf_indexed(out, title, atoms, atoms->nr, NULL, x, v, box);
+ write_espresso_conf_indexed(out, title, atoms, atoms->nr, nullptr, x, v, box);
gmx_fio_fclose(out);
break;
case efTPR:
case efG96:
{
in = gmx_fio_fopen(infile, "r");
- fr.title = NULL;
+ fr.title = nullptr;
fr.natoms = -1;
- fr.atoms = NULL;
- fr.x = NULL;
- fr.v = NULL;
- fr.f = NULL;
- *natoms = read_g96_conf(in, infile, &fr, NULL, g96_line);
+ fr.atoms = nullptr;
+ fr.x = nullptr;
+ fr.v = nullptr;
+ fr.f = nullptr;
+ *natoms = read_g96_conf(in, infile, &fr, nullptr, g96_line);
sfree(const_cast<char *>(fr.title));
gmx_fio_fclose(in);
break;
{
fprintf(stderr, "Warning: Number of atoms in %s is 0\n", infile);
}
- else if (atoms->atom == NULL)
+ else if (atoms->atom == nullptr)
{
gmx_mem("Uninitialized array atom");
}
gmx_gro_read_conf(infile, symtab, name, atoms, x, v, box);
break;
case efG96:
- fr.title = NULL;
+ fr.title = nullptr;
fr.natoms = atoms->nr;
fr.atoms = atoms;
fr.x = x;
fr.v = v;
- fr.f = NULL;
+ fr.f = nullptr;
in = gmx_fio_fopen(infile, "r");
read_g96_conf(in, infile, &fr, symtab, g96_line);
gmx_fio_fclose(in);
init_t_atoms(atoms, natoms, (fn2ftp(infile) == efPDB));
bool xIsNull = false;
- if (x == NULL)
+ if (x == nullptr)
{
snew(x, 1);
xIsNull = true;
}
read_stx_conf(infile,
symtab, name, atoms,
- *x, (v == NULL) ? NULL : *v, ePBC, box);
+ *x, (v == nullptr) ? nullptr : *v, ePBC, box);
if (xIsNull)
{
sfree(*x);
int *ePBC,
rvec **x, rvec **v, matrix box)
{
- GMX_RELEASE_ASSERT(mtop != NULL, "readConfAndTopology requires mtop!=NULL");
+ GMX_RELEASE_ASSERT(mtop != nullptr, "readConfAndTopology requires mtop!=NULL");
- if (ePBC != NULL)
+ if (ePBC != nullptr)
{
*ePBC = -1;
}
}
int natoms;
int ePBC_tmp
- = read_tpx(infile, NULL, box, &natoms,
- (x == NULL) ? NULL : *x, (v == NULL) ? NULL : *v, mtop);
- if (ePBC != NULL)
+ = read_tpx(infile, nullptr, box, &natoms,
+ (x == nullptr) ? nullptr : *x, (v == nullptr) ? nullptr : *v, mtop);
+ if (ePBC != nullptr)
{
*ePBC = ePBC_tmp;
}