Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / selection / centerofmass.h
index 00cd568ac1270a436d0ba71e7f2207e22d0446f9..4aa7cf8288139ef599f024c977ed446427144a6c 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011, by the GROMACS development team, led by
- * David van der Spoel, Berk Hess, Erik Lindahl, and including many
- * others, as listed in the AUTHORS file in the top-level source
- * directory and at http://www.gromacs.org.
+ * Copyright (c) 2009,2010,2011,2013,2014, 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.
  *
  * GROMACS is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -32,7 +32,7 @@
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-/*! \file
+/*! \internal \file
  * \brief API for calculation of centers of mass/geometry.
  *
  * This header defines a few functions that can be used to calculate
 #ifndef GMX_SELECTION_CENTEROFMASS_H
 #define GMX_SELECTION_CENTEROFMASS_H
 
-#include "../legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vectypes.h"
 
-/** Calculate a single center of geometry. */
+struct t_block;
+struct t_blocka;
+struct t_pbc;
+struct t_topology;
+
+/*! \brief
+ * Calculate a single center of geometry.
+ *
+ * \param[in]  top    Topology structure (unused, can be NULL).
+ * \param[in]  x      Position vectors of all atoms.
+ * \param[in]  nrefat Number of atoms in the index.
+ * \param[in]  index  Indices of atoms.
+ * \param[out] xout   COG position for the indexed atoms.
+ * \returns    0 on success.
+ */
 int
 gmx_calc_cog(t_topology *top, rvec x[], int nrefat, atom_id index[], rvec xout);
 /** Calculate a single center of mass. */
@@ -85,6 +100,18 @@ gmx_calc_com(t_topology *top, rvec x[], int nrefat, atom_id index[], rvec xout);
 /** Calculate force on a single center of geometry. */
 int
 gmx_calc_cog_f(t_topology *top, rvec f[], int nrefat, atom_id index[], rvec fout);
+/*! \brief
+ * Calculate force on a single center of mass.
+ *
+ * \param[in]  top    Topology structure (unused, can be NULL).
+ * \param[in]  f      Forces on all atoms.
+ * \param[in]  nrefat Number of atoms in the index.
+ * \param[in]  index  Indices of atoms.
+ * \param[out] fout   Force on the COM position for the indexed atoms.
+ * \returns    0 on success.
+ */
+int
+gmx_calc_com_f(t_topology *top, rvec f[], int nrefat, atom_id index[], rvec fout);
 /** Calculate a single center of mass/geometry. */
 int
 gmx_calc_comg(t_topology *top, rvec x[], int nrefat, atom_id index[],
@@ -107,7 +134,16 @@ int
 gmx_calc_comg_pbc(t_topology *top, rvec x[], t_pbc *pbc,
                   int nrefat, atom_id index[], bool bMass, rvec xout);
 
-/** Calculate centers of geometry for a blocked index. */
+/*! \brief
+ * Calculate centers of geometry for a blocked index.
+ *
+ * \param[in]  top   Topology structure (unused, can be NULL).
+ * \param[in]  x     Position vectors of all atoms.
+ * \param[in]  block t_block structure that divides \p index into blocks.
+ * \param[in]  index Indices of atoms.
+ * \param[out] xout  \p block->nr COG positions.
+ * \returns    0 on success.
+ */
 int
 gmx_calc_cog_block(t_topology *top, rvec x[], t_block *block,
                    atom_id index[], rvec xout[]);
@@ -119,6 +155,19 @@ gmx_calc_com_block(t_topology *top, rvec x[], t_block *block,
 int
 gmx_calc_cog_f_block(t_topology *top, rvec f[], t_block *block,
                      atom_id index[], rvec fout[]);
+/*! \brief
+ * Calculate forces on centers of mass for a blocked index.
+ *
+ * \param[in]  top   Topology structure (unused, can be NULL).
+ * \param[in]  f     Forces on all atoms.
+ * \param[in]  block t_block structure that divides \p index into blocks.
+ * \param[in]  index Indices of atoms.
+ * \param[out] fout  \p block->nr Forces on COM positions.
+ * \returns    0 on success.
+ */
+int
+gmx_calc_com_f_block(t_topology *top, rvec f[], t_block *block,
+                     atom_id index[], rvec fout[]);
 /** Calculate centers of mass/geometry for a blocked index. */
 int
 gmx_calc_comg_block(t_topology *top, rvec x[], t_block *block,