Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_rama.cpp
index 7aa63cbddd0db19914d2f37441d14292a5671e42..e73381376d0495c7c784045e754aedc2398b63fc 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2019, 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.
 #include "gromacs/utility/smalloc.h"
 
 
-static void plot_rama(FILE *out, t_xrama *xr)
+static void plot_rama(FILE* out, t_xrama* xr)
 {
     int  i;
     real phi, psi;
 
     for (i = 0; (i < xr->npp); i++)
     {
-        phi = xr->dih[xr->pp[i].iphi].ang*RAD2DEG;
-        psi = xr->dih[xr->pp[i].ipsi].ang*RAD2DEG;
+        phi = xr->dih[xr->pp[i].iphi].ang * RAD2DEG;
+        psi = xr->dih[xr->pp[i].ipsi].ang * RAD2DEG;
         fprintf(out, "%g  %g  %s\n", phi, psi, xr->pp[i].label);
     }
 }
 
-int gmx_rama(int argc, char *argv[])
+int gmx_rama(int argc, charargv[])
 {
-    const char       *desc[] = {
-        "[THISMODULE] selects the [GRK]phi[grk]/[GRK]psi[grk] dihedral combinations from your topology file",
+    const char* desc[] = {
+        "[THISMODULE] selects the [GRK]phi[grk]/[GRK]psi[grk] dihedral combinations from "
+        "your topology file",
         "and computes these as a function of time.",
-        "Using simple Unix tools such as [IT]grep[it] you can select out",
-        "specific residues."
+        "Using simple Unix tools such as [IT]grep[it] you can select out", "specific residues."
     };
 
-    FILE             *out;
-    t_xrama          *xr;
+    FILE*             out;
+    t_xrama*          xr;
     int               j;
-    gmx_output_env_t *oenv;
-    t_filenm          fnm[] = {
-        { efTRX, "-f", nullptr,  ffREAD },
-        { efTPR, nullptr, nullptr,  ffREAD },
-        { efXVG, nullptr, "rama", ffWRITE }
-    };
+    gmx_output_env_t* oenv;
+    t_filenm          fnm[] = { { efTRX, "-f", nullptr, ffREAD },
+                       { efTPR, nullptr, nullptr, ffREAD },
+                       { efXVG, nullptr, "rama", ffWRITE } };
 #define NFILE asize(fnm)
 
-    if (!parse_common_args(&argc, argv, PCA_CAN_VIEW | PCA_CAN_TIME,
-                           NFILE, fnm, 0, nullptr, asize(desc), desc, 0, nullptr, &oenv))
+    if (!parse_common_args(&argc, argv, PCA_CAN_VIEW | PCA_CAN_TIME, NFILE, fnm, 0, nullptr,
+                           asize(desc), desc, 0, nullptr, &oenv))
     {
         return 0;
     }
@@ -109,8 +107,7 @@ int gmx_rama(int argc, char *argv[])
     {
         plot_rama(out, xr);
         j++;
-    }
-    while (new_data(xr));
+    } while (new_data(xr));
     fprintf(stderr, "\n");
     xvgrclose(out);