Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / selection / centerofmass.h
index 844c1c2343a939c28522aaf991d7e1cd23b97806..4aa7cf8288139ef599f024c977ed446427144a6c 100644 (file)
@@ -1,34 +1,38 @@
 /*
+ * This file is part of the GROMACS molecular simulation package.
  *
- *                This source code is part of
+ * 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.
  *
- *                 G   R   O   M   A   C   S
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
  *
- *          GROningen MAchine for Chemical Simulations
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
  *
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2009, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
  *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
  *
  * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
+ * 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
  * Finally, there is a function gmx_calc_comg_blocka() that takes both the
  * index group and the partitioning as a single \c t_blocka structure.
  *
- * \author Teemu Murtola <teemu.murtola@cbr.su.se>
+ * \author Teemu Murtola <teemu.murtola@gmail.com>
  * \ingroup module_selection
  */
 #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. */
@@ -81,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[],
@@ -103,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[]);
@@ -115,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,