*/
#include "gmxpre.h"
-#include <math.h>
-#include <string.h>
+#include <cmath>
+#include <cstring>
#include "gromacs/commandline/pargs.h"
#include "gromacs/fileio/confio.h"
snew(mtot, bun->n);
+ clear_rvec(axis[0]);
+ clear_rvec(axis[1]);
+
for (end = 0; end < bun->nend; end++)
{
for (i = 0; i < bun->n; i++)
{
t_trxframe frout;
static rvec *xout = NULL;
- int i, end;
+ int i;
if (xout == NULL)
{
{ "-z", FALSE, etBOOL, {&bZ},
"Use the [IT]z[it]-axis as reference instead of the average axis" }
};
- FILE *out, *flen, *fdist, *fz, *ftilt, *ftiltr, *ftiltl;
+ FILE *flen, *fdist, *fz, *ftilt, *ftiltr, *ftiltl;
FILE *fkink = NULL, *fkinkr = NULL, *fkinkl = NULL;
t_trxstatus *status;
t_trxstatus *fpdb;
t_trxframe fr;
t_atoms outatoms;
real t, comp;
- int natoms;
char *grpname[MAX_ENDS], title[256];
/* FIXME: The constness should not be cast away */
char *anm = (char *)"CA", *rnm = (char *)"GLY";
- int i, j, gnx[MAX_ENDS];
+ int i, gnx[MAX_ENDS];
atom_id *index[MAX_ENDS];
t_bundle bun;
gmx_bool bKink;
fprintf(ftilt, " %6g", RAD2DEG*acos(bun.dir[i][ZZ]));
comp = bun.mid[i][XX]*bun.dir[i][XX]+bun.mid[i][YY]*bun.dir[i][YY];
fprintf(ftiltr, " %6g", RAD2DEG*
- asin(comp/sqrt(sqr(comp)+sqr(bun.dir[i][ZZ]))));
+ std::asin(comp/std::sqrt(sqr(comp)+sqr(bun.dir[i][ZZ]))));
comp = bun.mid[i][YY]*bun.dir[i][XX]-bun.mid[i][XX]*bun.dir[i][YY];
fprintf(ftiltl, " %6g", RAD2DEG*
- asin(comp/sqrt(sqr(comp)+sqr(bun.dir[i][ZZ]))));
+ std::asin(comp/std::sqrt(sqr(comp)+sqr(bun.dir[i][ZZ]))));
if (bKink)
{
rvec_sub(bun.end[0][i], bun.end[2][i], va);
copy_rvec(bun.mid[i], vr);
vr[ZZ] = 0;
unitv_no_table(vr, vr);
- fprintf(fkinkr, " %6g", RAD2DEG*asin(iprod(vc, vr)));
+ fprintf(fkinkr, " %6g", RAD2DEG*std::asin(iprod(vc, vr)));
vl[XX] = vr[YY];
vl[YY] = -vr[XX];
vl[ZZ] = 0;
- fprintf(fkinkl, " %6g", RAD2DEG*asin(iprod(vc, vl)));
+ fprintf(fkinkl, " %6g", RAD2DEG*std::asin(iprod(vc, vl)));
}
}
fprintf(flen, "\n");