*/
#include "gmxpre.h"
-#include <math.h>
-#include <string.h>
+#include <cmath>
+#include <cstring>
#include "gromacs/commandline/pargs.h"
#include "gromacs/fileio/mtxio.h"
#include "gromacs/math/vec.h"
#include "gromacs/topology/mtop_util.h"
#include "gromacs/utility/futil.h"
+#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/smalloc.h"
static double cv_corr(double nu, double T)
{
double x = PLANCK*nu/(BOLTZ*T);
- double ex = exp(x);
+ double ex = std::exp(x);
if (nu <= 0)
{
static double u_corr(double nu, double T)
{
double x = PLANCK*nu/(BOLTZ*T);
- double ex = exp(x);
+ double ex = std::exp(x);
if (nu <= 0)
{
real * eigenvectors)
{
int i, j, k, l;
- real mass_fac, rdum;
+ real mass_fac;
int natoms;
natoms = top->atoms.nr;
/* Cannot check symmetry since we only store half matrix */
/* divide elements hess[i][j] by sqrt(mas[i])*sqrt(mas[j]) when required */
+ GMX_RELEASE_ASSERT(sparse_hessian != NULL, "NULL matrix pointer provided to nma_sparse_hessian");
+
if (bM)
{
for (iatom = 0; (iatom < natoms); iatom++)
"Width (sigma) of the gaussian peaks (1/cm) when generating a spectrum" }
};
FILE *out, *qc, *spec;
- int status, trjout;
t_topology top;
gmx_mtop_t mtop;
- int ePBC;
rvec *top_x;
matrix box;
real *eigenvalues;
real *eigenvectors;
- real rdum, mass_fac, qcvtot, qutot, qcv, qu;
- int natoms, ndim, nrow, ncol, count, nharm, nvsite;
- char *grpname;
- int i, j, k, l, d, gnx;
+ real qcvtot, qutot, qcv, qu;
+ int natoms, ndim, nrow, ncol, nharm, nvsite;
+ int i, j, k;
gmx_bool bSuck;
- atom_id *index;
t_tpxheader tpx;
int version, generation;
real value, omega, nu;
bSuck = FALSE;
for (i = begin-1; (i < 6); i++)
{
- if (fabs(eigenvalues[i]) > 1.0e-3)
+ if (std::abs(eigenvalues[i]) > 1.0e-3)
{
bSuck = TRUE;
}
{
value = 0;
}
- omega = sqrt(value*factor_gmx_to_omega2);
+ omega = std::sqrt(value*factor_gmx_to_omega2);
nu = 1e-12*omega/(2*M_PI);
value = omega*factor_omega_to_wavenumber;
fprintf (out, "%6d %15g\n", i, value);
if (NULL != spec)
{
- wfac = eigenvalues[i-begin]/(width*sqrt(2*M_PI));
+ wfac = eigenvalues[i-begin]/(width*std::sqrt(2*M_PI));
for (j = 0; (j < maxspec); j++)
{
- spectrum[j] += wfac*exp(-sqr(j-value)/(2*sqr(width)));
+ spectrum[j] += wfac*std::exp(-sqr(j-value)/(2*sqr(width)));
}
}
if (NULL != qc)