Merge branch 'master' into pygromacs
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_dyndom.cpp
similarity index 98%
rename from src/gromacs/gmxana/gmx_dyndom.c
rename to src/gromacs/gmxana/gmx_dyndom.cpp
index f85ff7636c0a09fa5c6652c9a0aa521408ff84f4..91f1c96e34317bf172513e65d5dfc9b8dc0b7f73 100644 (file)
@@ -36,6 +36,8 @@
  */
 #include "gmxpre.h"
 
+#include <cmath>
+
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/trxio.h"
@@ -58,7 +60,7 @@ static void rot_conf(t_atoms *atoms, rvec x[], rvec v[], real trans, real angle,
     mat4     Rx, Ry, Rz, Rinvy, Rinvz, Mtot;
     mat4     temp1, temp2, temp3;
     vec4     xv;
-    int      i, j, ai;
+    int      i, ai;
 
     rvec_sub(tail, head, arrow);
     arrow_len = norm(arrow);
@@ -101,8 +103,8 @@ static void rot_conf(t_atoms *atoms, rvec x[], rvec v[], real trans, real angle,
     }
 
     /* Compute theta and phi that describe the arrow */
-    theta = acos(arrow[ZZ]/arrow_len);
-    phi   = atan2(arrow[YY]/arrow_len, arrow[XX]/arrow_len);
+    theta = std::acos(arrow[ZZ]/arrow_len);
+    phi   = std::atan2(arrow[YY]/arrow_len, arrow[XX]/arrow_len);
     if (debug)
     {
         fprintf(debug, "Phi = %.1f, Theta = %.1f\n", RAD2DEG*phi, RAD2DEG*theta);