Renamed bonded module as 'listed-forces'
[alexxy/gromacs.git] / src / gromacs / listed-forces / bonded.h
similarity index 74%
rename from src/gromacs/bonded/bonded.h
rename to src/gromacs/listed-forces/bonded.h
index 0fdc81d9fcc7637d86c07aac40b2a5a2e558f252..b3acfd35135c58a00cfc6433fbd773bee7198b91 100644 (file)
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
+/*! \defgroup module_listed-forces Interactions between lists of particles
+ * \ingroup group_mdrun
+ *
+ * \brief Computes energies and forces for interactions between a
+ * small number of particles, e.g bonds.
+ *
+ * More functionality will move into this module shortly.
+ *
+ * \author Mark Abraham <mark.j.abraham@gmail.com>
+ *
+ */
+
+/*! \file
+ *
+ * \brief
+ * This file contains function declarations necessary for mdrun and tools
+ * to compute energies and forces for bonded interactions.
+ *
+ * \author Mark Abraham <mark.j.abraham@gmail.com>
+ * \inpublicapi
+ * \ingroup module_listed-forces
+ */
 
-#ifndef GMX_BONDED_BONDED_H
-#define GMX_BONDED_BONDED_H
+#ifndef GMX_LISTED_FORCES_BONDED_H
+#define GMX_LISTED_FORCES_BONDED_H
 
 #include <stdio.h>
 
-#include "gromacs/legacyheaders/genborn.h"
 #include "gromacs/legacyheaders/nrnb.h"
 #include "gromacs/legacyheaders/typedefs.h"
 
@@ -51,19 +72,23 @@ extern "C" {
 struct t_graph;
 struct t_pbc;
 
-int glatnr(int *global_atom_index, int i);
-/* Returns the global topology atom number belonging to local atom index i.
+/*! \brief Returns the global topology atom number belonging to local atom index i.
  * This function is intended for writing ascii output
  * and returns atom numbers starting at 1.
  * When global_atom_index=NULL returns i+1.
  */
+int glatnr(int *global_atom_index, int i);
 
-/*! \brief Return whether this is a potential calculated in
- * bonded.cpp, i.e. an interaction that actually calculates a
- * potential and works on multiple atoms (not e.g. a connection or a
- * position restraint). */
-gmx_bool ftype_is_bonded_potential(int ftype);
+/*! \brief Return whether this is an interaction that actually
+ * calculates a potential and works on multiple atoms (not e.g. a
+ * connection or a position restraint).
+ *
+ * \todo This function could go away when idef is not a big bucket of
+ * everything. */
+gmx_bool
+ftype_is_bonded_potential(int ftype);
 
+/*! \brief Calculates all bonded force interactions. */
 void calc_bonds(const gmx_multisim_t *ms,
                 const t_idef *idef,
                 const rvec x[], history_t *hist,
@@ -73,28 +98,10 @@ void calc_bonds(const gmx_multisim_t *ms,
                 const t_mdatoms *md,
                 t_fcdata *fcd, int *ddgatindex,
                 int force_flags);
-/*
- * The function calc_bonds() calculates all bonded force interactions.
- * The "bonds" are specified as follows:
- *   int nbonds
- *         the total number of bonded interactions.
- *   t_iatom *forceatoms
- *     specifies which atoms are involved in a bond of a certain
- *     type, see also struct t_idef.
- *   t_functype *functype
- *         defines for every bonded force type what type of function to
- *     use, see also struct t_idef.
- *   t_iparams *forceparams
- *         defines the parameters for every bond type, see also struct
- *     t_idef.
- *   real epot[NR_F]
- *     total potential energy split up over the function types.
- *   int *ddgatindex
- *     global atom number indices, should be NULL when not using DD.
- *   return value:
- *         the total potential energy (sum over epot).
- */
 
+/*! \brief As calc_bonds, but only determines the potential energy
+ * for the perturbed interactions.
+ * The shift forces in fr are not affected. */
 void calc_bonds_lambda(const t_idef *idef,
                        const rvec x[],
                        t_forcerec *fr,
@@ -103,48 +110,45 @@ void calc_bonds_lambda(const t_idef *idef,
                        real *lambda,
                        const t_mdatoms *md,
                        t_fcdata *fcd, int *global_atom_index);
-/* As calc_bonds, but only determines the potential energy
- * for the perturbed interactions.
- * The shift forces in fr are not affected.
- */
 
+/*! \brief Position restraints require a different pbc treatment from other bondeds */
 real posres(int nbonds,
             const t_iatom forceatoms[], const t_iparams forceparams[],
             const rvec x[], rvec f[], rvec vir_diag,
             struct t_pbc *pbc,
             real lambda, real *dvdlambda,
             int refcoord_scaling, int ePBC, rvec comA, rvec comB);
-/* Position restraints require a different pbc treatment from other bondeds */
 
+/*! \brief Flat-bottom posres. Same PBC treatment as in normal position restraints */
 real fbposres(int nbonds,
               const t_iatom forceatoms[], const t_iparams forceparams[],
               const rvec x[], rvec f[], rvec vir_diag,
               struct t_pbc *pbc, int refcoord_scaling, int ePBC, rvec com);
-/* Flat-bottom posres. Same PBC treatment as in normal position restraints */
 
+/*! \brief Calculate bond-angle. No PBC is taken into account (use mol-shift) */
 real bond_angle(const rvec xi, const rvec xj, const rvec xk,
                 const struct t_pbc *pbc,
                 rvec r_ij, rvec r_kj, real *costh,
                 int *t1, int *t2);  /* out */
-/* Calculate bond-angle. No PBC is taken into account (use mol-shift) */
 
+/*! \brief Calculate dihedral-angle. No PBC is taken into account (use mol-shift) */
 real dih_angle(const rvec xi, const rvec xj, const rvec xk, const rvec xl,
                const struct t_pbc *pbc,
                rvec r_ij, rvec r_kj, rvec r_kl, rvec m, rvec n, /* out */
                real *sign,
                int *t1, int *t2, int *t3);
-/* Calculate dihedral-angle. No PBC is taken into account (use mol-shift) */
 
+/*! \brief Do an update of the forces for dihedral potentials */
 void do_dih_fup(int i, int j, int k, int l, real ddphi,
                 rvec r_ij, rvec r_kj, rvec r_kl,
                 rvec m, rvec n, rvec f[], rvec fshift[],
                 const struct t_pbc *pbc, const struct t_graph *g,
                 const rvec *x, int t1, int t2, int t3);
-/* Do an update of the forces for dihedral potentials */
 
+/*! \brief Make a dihedral fall in the range (-pi,pi) */
 void make_dp_periodic(real *dp);
-/* make a dihedral fall in the range (-pi,pi) */
 
+//! \cond
 /*************************************************************************
  *
  *  Bonded force functions
@@ -157,7 +161,7 @@ t_ifunc pdihs, idihs, rbdihs;
 t_ifunc restrdihs, cbtdihs;
 t_ifunc tab_bonds, tab_angles, tab_dihs;
 t_ifunc polarize, anharm_polarize, water_pol, thole_pol, angres, angresz, dihres, unimplemented;
-
+//! \endcond
 
 #ifdef __cplusplus
 }