*/
#include "gmxpre.h"
-#include <math.h>
+#include <cmath>
+#include <cstring>
#include "gromacs/commandline/pargs.h"
#include "gromacs/fileio/confio.h"
char rresnm[8];
int i;
- strcpy(rresnm, *ri->name);
+ std::strcpy(rresnm, *ri->name);
rresnm[3] = '\0';
for (i = 0; (i < atoms->nr); i++)
{
if ((ri->nr == atoms->resinfo[atoms->atom[i].resind].nr) &&
(ri->ic == atoms->resinfo[atoms->atom[i].resind].ic) &&
- (strcmp(*atoms->resinfo[atoms->atom[i].resind].name, rresnm) == 0) &&
- (strstr(*atoms->atomname[i], atomnm) != NULL))
+ (std::strcmp(*atoms->resinfo[atoms->atom[i].resind].name, rresnm) == 0) &&
+ (std::strstr(*atoms->atomname[i], atomnm) != NULL))
{
break;
}
"This shows the directions in which the atoms fluctuate the most and",
"the least."
};
- static gmx_bool bRes = FALSE, bAniso = FALSE, bdevX = FALSE, bFit = TRUE;
+ static gmx_bool bRes = FALSE, bAniso = FALSE, bFit = TRUE;
t_pargs pargs[] = {
{ "-res", FALSE, etBOOL, {&bRes},
"Calculate averages for each residue" },
"Do a least squares superposition before computing RMSF. Without this you must make sure that the reference structure and the trajectory match." }
};
int natom;
- int step, nre, natoms, i, g, m, teller = 0;
- real t, lambda, *w_rls, *w_rms;
+ int i, m, teller = 0;
+ real t, *w_rls;
- t_inputrec ir;
t_topology top;
int ePBC;
t_atoms *pdbatoms, *refatoms;
- gmx_bool bCont;
matrix box, pdbbox;
rvec *x, *pdbx, *xref;
t_trxstatus *status;
- int npdbatoms, res0;
- char buf[256];
+ int npdbatoms;
const char *label;
char title[STRLEN];
{
aid = index[i];
pdbatoms->pdbinfo[aid].bAnisotropic = TRUE;
- pdbatoms->pdbinfo[aid].uij[U11] = 1e6*U[i][XX*DIM + XX];
- pdbatoms->pdbinfo[aid].uij[U22] = 1e6*U[i][YY*DIM + YY];
- pdbatoms->pdbinfo[aid].uij[U33] = 1e6*U[i][ZZ*DIM + ZZ];
- pdbatoms->pdbinfo[aid].uij[U12] = 1e6*U[i][XX*DIM + YY];
- pdbatoms->pdbinfo[aid].uij[U13] = 1e6*U[i][XX*DIM + ZZ];
- pdbatoms->pdbinfo[aid].uij[U23] = 1e6*U[i][YY*DIM + ZZ];
+ pdbatoms->pdbinfo[aid].uij[U11] = static_cast<int>(1e6*U[i][XX*DIM + XX]);
+ pdbatoms->pdbinfo[aid].uij[U22] = static_cast<int>(1e6*U[i][YY*DIM + YY]);
+ pdbatoms->pdbinfo[aid].uij[U33] = static_cast<int>(1e6*U[i][ZZ*DIM + ZZ]);
+ pdbatoms->pdbinfo[aid].uij[U12] = static_cast<int>(1e6*U[i][XX*DIM + YY]);
+ pdbatoms->pdbinfo[aid].uij[U13] = static_cast<int>(1e6*U[i][XX*DIM + ZZ]);
+ pdbatoms->pdbinfo[aid].uij[U23] = static_cast<int>(1e6*U[i][YY*DIM + ZZ]);
}
}
if (bRes)
top.atoms.atom[index[i]].resind != top.atoms.atom[index[i+1]].resind)
{
fprintf(fp, "%5d %8.4f\n",
- bRes ? top.atoms.resinfo[top.atoms.atom[index[i]].resind].nr : index[i]+1, sqrt(rmsf[i]));
+ bRes ? top.atoms.resinfo[top.atoms.atom[index[i]].resind].nr : index[i]+1, std::sqrt(rmsf[i]));
}
}
xvgrclose(fp);
top.atoms.atom[index[i]].resind != top.atoms.atom[index[i+1]].resind)
{
fprintf(fp, "%5d %8.4f\n",
- bRes ? top.atoms.resinfo[top.atoms.atom[index[i]].resind].nr : index[i]+1, sqrt(rmsf[i]));
+ bRes ? top.atoms.resinfo[top.atoms.atom[index[i]].resind].nr : index[i]+1, std::sqrt(rmsf[i]));
}
}
xvgrclose(fp);