Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / mdlib / vcm.h
index 92b48b2c5cb6242302d0a459aa52f4dee4376fa9..87b95e08f3e92de63284eadbc392196c6407157c 100644 (file)
@@ -53,68 +53,67 @@ struct t_mdatoms;
 struct t_vcm_thread
 {
     //! Linear momentum
-    rvec      p    = {0};
+    rvec p = { 0 };
     //! Center of mass
-    rvec      x    = {0};
+    rvec x = { 0 };
     //! Angular momentum
-    rvec      j    = {0};
+    rvec j = { 0 };
     //! Moment of inertia
-    tensor    i    = {{0}};
+    tensor i = { { 0 } };
     //! Mass
-    real      mass = 0;
+    real mass = 0;
 };
 
 struct t_vcm
 {
     //! Number of groups
-    int                       nr = 0;
+    int nr = 0;
     //! Size of group arrays
-    int                       size = 0;
+    int size = 0;
     //! Stride for thread data
-    int                       stride = 0;
+    int stride = 0;
     //! One of the enums above
-    int                       mode = 0;
+    int mode = 0;
     //! The number of dimensions for corr.
-    int                       ndim = 0;
+    int ndim = 0;
     //! The time step for COMM removal
-    real                      timeStep = 0;
+    real timeStep = 0;
     //! Number of degrees of freedom
-    std::vector<real>         group_ndf;
+    std::vector<real> group_ndf;
     //! Mass per group
-    std::vector<real>         group_mass;
+    std::vector<real> group_mass;
     //! Linear momentum per group
-    std::vector<gmx::RVec>    group_p;
+    std::vector<gmx::RVec> group_p;
     //! Linear velocity per group
-    std::vector<gmx::RVec>    group_v;
+    std::vector<gmx::RVec> group_v;
     //! Center of mass per group
-    std::vector<gmx::RVec>    group_x;
+    std::vector<gmx::RVec> group_x;
     //! Angular momentum per group
-    std::vector<gmx::RVec>    group_j;
+    std::vector<gmx::RVec> group_j;
     //! Angular velocity (omega)
-    std::vector<gmx::RVec>    group_w;
+    std::vector<gmx::RVec> group_w;
     //! Moment of inertia per group
-    tensor                   *group_i = nullptr;
+    tensorgroup_i = nullptr;
     //! These two are copies to pointers in
-    std::vector<char *>       group_name;
+    std::vector<char*> group_name;
     //! Tells whether dimensions are frozen per freeze group
-    ivec                     *nFreeze = nullptr;
+    ivecnFreeze = nullptr;
     //! Temporary data per thread and group
     std::vector<t_vcm_thread> thread_vcm;
 
     //! Tell whether the integrator conserves momentum
     bool integratorConservesMomentum = false;
 
-    t_vcm(const SimulationGroups &groups, const t_inputrec &ir);
+    t_vcm(const SimulationGroups& groups, const t_inputrec& ir);
     ~t_vcm();
 };
 
 /* print COM removal info to log */
-void reportComRemovalInfo(FILE * fp, const t_vcm &vcm);
+void reportComRemovalInfo(FILE* fp, const t_vcm& vcm);
 
 
 /* Do a per group center of mass things */
-void calc_vcm_grp(const t_mdatoms &md,
-                  const rvec x[], const rvec v[], t_vcm *vcm);
+void calc_vcm_grp(const t_mdatoms& md, const rvec x[], const rvec v[], t_vcm* vcm);
 
 /* Set the COM velocity to zero and potentially correct the COM position.
  *
@@ -124,7 +123,6 @@ void calc_vcm_grp(const t_mdatoms &md,
  * and a pointer to the coordinates at normal MD steps.
  * When fplog != nullptr, a warning is printed to fplog with high COM velocity.
  */
-void process_and_stopcm_grp(FILE *fplog, t_vcm *vcm, const t_mdatoms &mdatoms,
-                            rvec x[], rvec v[]);
+void process_and_stopcm_grp(FILE* fplog, t_vcm* vcm, const t_mdatoms& mdatoms, rvec x[], rvec v[]);
 
 #endif