# To help us fund GROMACS development, we humbly ask that you cite
# the research papers on the package. Check out http://www.gromacs.org.
-# Due to a bug, gcc 4.4.x crashes when compiling bonded/bonded.cpp with -O3 and
+# Due to a bug, gcc 4.4.x crashes when compiling listed-forces/bonded.cpp with -O3 and
# -fopenmp, but strangely it does not crash with -O2 + all additional options.
# -O3 uses. Therefore, for the affected files, when compiling in release mode,
# we override -O3 with -O2 and add the additional option.
\item {\tt GMX_NO_NODECOMM}: do not use separate inter- and intra-node communicators.
\item {\tt GMX_NO_NONBONDED}: skip non-bonded calculations; can be used to estimate the possible
performance gain from adding a GPU accelerator to the current hardware setup -- assuming that this is
- fast enough to complete the non-bonded calculations while the CPU does bonded force and PME computation.
+ fast enough to complete the non-bonded calculations while the CPU does listed force and PME computation.
\item {\tt GMX_NO_PULLVIR}: when set, do not add virial contribution to COM pull forces.
\item {\tt GMX_NOCHARGEGROUPS}: disables multi-atom charge groups, {\ie} each atom
in all non-solvent molecules is assigned its own charge group.
add_subdirectory(gmxlib)
add_subdirectory(mdlib)
add_subdirectory(gmxpreprocess)
-add_subdirectory(bonded)
+add_subdirectory(listed-forces)
add_subdirectory(commandline)
add_subdirectory(fft)
add_subdirectory(linearalgebra)
# apply gcc 4.4.x bug workaround
if(GMX_USE_GCC44_BUG_WORKAROUND)
include(gmxGCC44O3BugWorkaround)
- gmx_apply_gcc44_bug_workaround("bonded/bonded.cpp")
+ gmx_apply_gcc44_bug_workaround("listed-forces/bonded.cpp")
gmx_apply_gcc44_bug_workaround("mdlib/force.c")
gmx_apply_gcc44_bug_workaround("mdlib/constr.c")
endif()
#include <stdio.h>
#include <string.h>
-#include "gromacs/bonded/bonded.h"
#include "gromacs/fileio/confio.h"
#include "gromacs/fileio/trxio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/legacyheaders/macros.h"
#include "gromacs/legacyheaders/txtdump.h"
#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/listed-forces/bonded.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/pbcutil/pbc.h"
#include <algorithm>
-#include "gromacs/bonded/bonded.h"
#include "gromacs/commandline/pargs.h"
#include "gromacs/fileio/enxio.h"
#include "gromacs/fileio/matio.h"
#include "gromacs/legacyheaders/txtdump.h"
#include "gromacs/legacyheaders/viewit.h"
#include "gromacs/linearalgebra/nrjac.h"
+#include "gromacs/listed-forces/bonded.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/pbcutil/pbc.h"
#include <math.h>
#include <string.h>
-#include "gromacs/bonded/bonded.h"
#include "gromacs/legacyheaders/macros.h"
#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/listed-forces/bonded.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/topology/index.h"
#include <math.h>
#include <stdlib.h>
-#include "gromacs/bonded/bonded.h"
+#include "gromacs/listed-forces/bonded.h"
#include "gromacs/pbcutil/rmpbc.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include <algorithm>
-#include "gromacs/bonded/bonded.h"
+#include "gromacs/listed-forces/bonded.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
{
"GMX_DEFAULT_NUM_THREADS should never be set",
"GMX_DOMDEC_NUM_THREADS", "GMX_PAIRSEARCH_NUM_THREADS",
- "GMX_NONBONDED_NUM_THREADS", "GMX_BONDED_NUM_THREADS",
+ "GMX_NONBONDED_NUM_THREADS", "GMX_LISTED_FORCES_NUM_THREADS",
"GMX_PME_NUM_THREADS", "GMX_UPDATE_NUM_THREADS",
"GMX_VSITE_NUM_THREADS",
"GMX_LINCS_NUM_THREADS", "GMX_SETTLE_NUM_THREADS"
/* This file is completely threadsafe - keep it that way! */
#include "gmxpre.h"
-#include "gromacs/bonded/bonded.h"
#include "gromacs/legacyheaders/disre.h"
#include "gromacs/legacyheaders/genborn.h"
#include "gromacs/legacyheaders/orires.h"
#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/listed-forces/bonded.h"
#define def_bonded(str, lstr, nra, nrpa, nrpb, ind, func) \
{str, lstr, (nra), (nrpa), (nrpb), IF_BOND, (ind), (func)}
#include "thread_mpi/threads.h"
-#include "gromacs/bonded/bonded.h"
#include "gromacs/gmxlib/nonbonded/nb_free_energy.h"
#include "gromacs/gmxlib/nonbonded/nb_generic.h"
#include "gromacs/gmxlib/nonbonded/nb_generic_adress.h"
#include "gromacs/legacyheaders/ns.h"
#include "gromacs/legacyheaders/txtdump.h"
#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/listed-forces/bonded.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
#include "gromacs/pbcutil/ishift.h"
#include <assert.h>
-#include "gromacs/bonded/bonded.h"
#include "gromacs/commandline/pargs.h"
#include "gromacs/fileio/confio.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/readinp.h"
#include "gromacs/legacyheaders/txtdump.h"
+#include "gromacs/listed-forces/bonded.h"
#include "gromacs/math/units.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2012, The GROMACS development team.
- * Copyright (c) 2012, by the GROMACS development team, led by
+ * Copyright (c) 2012,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.
#define GMX_FORCE_NS (1<<2)
/* Update long-range neighborlists */
#define GMX_FORCE_LRNS (1<<3)
-/* Calculate bonded energies/forces */
-#define GMX_FORCE_BONDED (1<<4)
+/* Calculate listed energies/forces (e.g. bonds, restraints, 1-4, FEP non-bonded) */
+#define GMX_FORCE_LISTED (1<<4)
/* Store long-range forces in a separate array */
#define GMX_FORCE_SEPLRF (1<<5)
/* Calculate non-bonded energies/forces */
#define GMX_FORCE_DO_LR (1<<11)
/* Normally one want all energy terms and forces */
-#define GMX_FORCE_ALLFORCES (GMX_FORCE_BONDED | GMX_FORCE_NONBONDED | GMX_FORCE_FORCES)
+#define GMX_FORCE_ALLFORCES (GMX_FORCE_LISTED | GMX_FORCE_NONBONDED | GMX_FORCE_FORCES)
#ifdef __cplusplus
# 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(GLOB BONDED_SOURCES *.cpp *.c)
-set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${BONDED_SOURCES} PARENT_SCOPE)
+file(GLOB LISTED_FORCES_SOURCES *.cpp)
+set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${LISTED_FORCES_SOURCES} PARENT_SCOPE)
-set(BONDED_PUBLIC_HEADERS
+set(LISTED_FORCES_PUBLIC_HEADERS
bonded.h)
-gmx_install_headers(bonded ${BONDED_PUBLIC_HEADERS})
+gmx_install_headers(listed-forces ${LISTED_FORCES_PUBLIC_HEADERS})
if (BUILD_TESTING)
# add_subdirectory(tests)
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
+/*! \internal \file
+ *
+ * \brief This file defines functions necessary for mdrun and tools to
+ * compute energies and forces for bonded interactions.
+ *
+ * \author Mark Abraham <mark.j.abraham@gmail.com>
+ *
+ * \ingroup module_listed-forces
+ */
#include "gmxpre.h"
#include "bonded.h"
#include <algorithm>
-#include "gromacs/bonded/restcbt.h"
#include "gromacs/legacyheaders/disre.h"
#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/macros.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
-/* Find a better place for this? */
+#include "restcbt.h"
+
+/*! \brief Mysterious CMAP coefficient matrix */
const int cmap_coeff_matrix[] = {
1, 0, -3, 2, 0, 0, 0, 0, -3, 0, 9, -6, 2, 0, -6, 4,
0, 0, 0, 0, 0, 0, 0, 0, 3, 0, -9, 6, -2, 0, 6, -4,
return atnr;
}
-/* TODO This kind of code appears in many places. Consolidate it */
+/*! \brief Compute dx = xi - xj, modulo PBC if non-NULL
+ *
+ * \todo This kind of code appears in many places. Consolidate it */
static int pbc_rvec_sub(const t_pbc *pbc, const rvec xi, const rvec xj, rvec dx)
{
if (pbc)
gmx_simd_real_t bxx;
} pbc_simd_t;
-/* Set the SIMD pbc data from a normal t_pbc struct */
+/*! \brief Set the SIMD pbc data from a normal t_pbc struct */
static void set_pbc_simd(const t_pbc *pbc, pbc_simd_t *pbc_simd)
{
rvec inv_bdiag;
}
}
-/* Correct distance vector *dx,*dy,*dz for PBC using SIMD */
+/*! \brief Correct distance vector *dx,*dy,*dz for PBC using SIMD */
static gmx_inline void
pbc_dx_simd(gmx_simd_real_t *dx, gmx_simd_real_t *dy, gmx_simd_real_t *dz,
const pbc_simd_t *pbc)
#endif /* GMX_SIMD_HAVE_REAL */
-/*
- * Morse potential bond by Frank Everdij
+/*! \brief Morse potential bond
*
- * Three parameters needed:
+ * By Frank Everdij. Three parameters needed:
*
* b0 = equilibrium distance in nm
* be = beta in nm^-1 (actually, it's nu_e*Sqrt(2*pi*pi*mu/D_e))
* Note: the potential is referenced to be +cb at infinite separation
* and zero at the equilibrium distance!
*/
-
real morse_bonds(int nbonds,
const t_iatom forceatoms[], const t_iparams forceparams[],
const rvec x[], rvec f[], rvec fshift[],
return vtot;
}
+//! \cond
real cubic_bonds(int nbonds,
const t_iatom forceatoms[], const t_iparams forceparams[],
const rvec x[], rvec f[], rvec fshift[],
return vtot;
}
-int cmap_setup_grid_index(int ip, int grid_spacing, int *ipm1, int *ipp1, int *ipp2)
+//! \endcond
+
+/*! \brief Mysterious undocumented function */
+static int
+cmap_setup_grid_index(int ip, int grid_spacing, int *ipm1, int *ipp1, int *ipp2)
{
int im1, ip1, ip2;
}
-real cmap_dihs(int nbonds,
- const t_iatom forceatoms[], const t_iparams forceparams[],
- const gmx_cmap_t *cmap_grid,
- const rvec x[], rvec f[], rvec fshift[],
- const t_pbc *pbc, const t_graph *g,
- real gmx_unused lambda, real gmx_unused *dvdlambda,
- const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd,
- int gmx_unused *global_atom_index)
+/*! \brief Compute CMAP dihedral energies and forces */
+static real
+cmap_dihs(int nbonds,
+ const t_iatom forceatoms[], const t_iparams forceparams[],
+ const gmx_cmap_t *cmap_grid,
+ const rvec x[], rvec f[], rvec fshift[],
+ const t_pbc *pbc, const t_graph *g,
+ real gmx_unused lambda, real gmx_unused *dvdlambda,
+ const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd,
+ int gmx_unused *global_atom_index)
{
int i, j, k, n, idx;
int ai, aj, ak, al, am;
}
-
+//! \cond
/***********************************************************
*
* G R O M O S 9 6 F U N C T I O N S
return vtot;
}
-/* TODO This function could go away when idef is not a big bucket of
- everything. */
-gmx_bool ftype_is_bonded_potential(int ftype)
+//! \endcond
+
+gmx_bool
+ftype_is_bonded_potential(int ftype)
{
return
(interaction_function[ftype].flags & IF_BOND) &&
(ftype < F_GB12 || ftype > F_GB14);
}
+/*! \brief Zero thread-local force-output buffers */
static void zero_thread_forces(f_thread_t *f_t, int n,
int nblock, int blocksize)
{
}
}
+/*! \brief The max thread number is arbitrary, we used a fixed number
+ * to avoid memory management. Using more than 16 threads is probably
+ * never useful performance wise. */
+#define MAX_BONDED_THREADS 256
+
+/*! \brief Reduce thread-local force buffers */
static void reduce_thread_force_buffer(int n, rvec *f,
int nthreads, f_thread_t *f_t,
int nblock, int block_size)
{
- /* The max thread number is arbitrary,
- * we used a fixed number to avoid memory management.
- * Using more than 16 threads is probably never useful performance wise.
- */
-#define MAX_BONDED_THREADS 256
int b;
if (nthreads > MAX_BONDED_THREADS)
}
}
+/*! \brief Reduce thread-local forces */
static void reduce_thread_forces(int n, rvec *f, rvec *fshift,
real *ener, gmx_grppairener_t *grpp, real *dvdl,
int nthreads, f_thread_t *f_t,
}
}
+/*! \brief Calculate one element of the list of bonded interactions
+ for this thread */
static real calc_one_bond(int thread,
int ftype, const t_idef *idef,
const rvec x[], rvec f[], rvec fshift[],
const t_idef *idef,
const rvec x[], history_t *hist,
rvec f[], t_forcerec *fr,
- const t_pbc *pbc, const t_graph *g,
+ const struct t_pbc *pbc, const struct t_graph *g,
gmx_enerdata_t *enerd, t_nrnb *nrnb,
real *lambda,
const t_mdatoms *md,
void calc_bonds_lambda(const t_idef *idef,
const rvec x[],
t_forcerec *fr,
- const t_pbc *pbc, const t_graph *g,
+ const struct t_pbc *pbc, const struct t_graph *g,
gmx_grppairener_t *grpp, real *epot, t_nrnb *nrnb,
real *lambda,
const t_mdatoms *md,
* 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"
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,
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,
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
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
}
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
+/*! \internal \file
+ *
+ * \brief
+ * This file contains function definitions necessary
+ * for computations of forces due to restricted angle, restricted dihedral and
+ * combined bending-torsion potentials.
+ *
+ * \author Nicolae Goga
+ *
+ * \ingroup module_listed-forces
+ */
#include "gmxpre.h"
#include "restcbt.h"
* the research papers on the package. Check out http://www.gromacs.org.
*/
-
-/*! \libinternal \file
+/*! \internal \file
*
*
* \brief
* This file contains function declarations necessary
for computations of forces due to restricted angle, restricted dihedral and
combined bending-torsion potentials.
-
*
* \author Nicolae Goga
*
- * \inlibraryapi
+ * \ingroup module_listed-forces
*/
-#ifndef GMX_BONDED_RESTCBT_H
-#define GMX_BONDED_RESTCBT_H
+#ifndef GMX_LISTED_FORCES_RESTCBT_H
+#define GMX_LISTED_FORCES_RESTCBT_H
#include "gromacs/legacyheaders/types/simple.h"
#include "gromacs/math/vec.h"
#include "gromacs/topology/idef.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
/*! \brief This function computes factors needed for restricted angle potentials.
*
* The restricted angle potential is used in coarse-grained simulations to avoid singularities
rvec f_theta_post_aj, rvec f_theta_post_ak, rvec f_theta_post_al,
real * v);
-
-#ifdef __cplusplus
-}
-#endif
-
#endif
#include <algorithm>
-#include "gromacs/bonded/bonded.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/pdbio.h"
#include "gromacs/imd/imd.h"
#include "gromacs/legacyheaders/pme.h"
#include "gromacs/legacyheaders/shellfc.h"
#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/listed-forces/bonded.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/nb_verlet.h"
#include "gromacs/mdlib/nbnxn_search.h"
#include <math.h>
#include <string.h>
-#include "gromacs/bonded/bonded.h"
#include "gromacs/legacyheaders/coulomb.h"
#include "gromacs/legacyheaders/domdec.h"
#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
#include "gromacs/legacyheaders/txtdump.h"
#include "gromacs/legacyheaders/typedefs.h"
#include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/listed-forces/bonded.h"
#include "gromacs/math/vec.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/mshift.h"
/* MRS: Eventually, many need to include free energy contribution here! */
if (ir->implicit_solvent)
{
- wallcycle_sub_start(wcycle, ewcsBONDED);
+ wallcycle_sub_start(wcycle, ewcsLISTED);
calc_gb_forces(cr, md, born, top, x, f, fr, idef,
ir->gb_algorithm, ir->sa_algorithm, nrnb, &pbc, graph, enerd);
- wallcycle_sub_stop(wcycle, ewcsBONDED);
+ wallcycle_sub_stop(wcycle, ewcsLISTED);
}
#ifdef GMX_MPI
pr_rvecs(debug, 0, "fshift after SR", fr->fshift, SHIFTS);
}
- /* Shift the coordinates. Must be done before bonded forces and PPPM,
+ /* Shift the coordinates. Must be done before listed forces and PPPM,
* but is also necessary for SHAKE and update, therefore it can NOT
- * go when no bonded forces have to be evaluated.
+ * go when no listed forces have to be evaluated.
*/
/* Here sometimes we would not need to shift with NBFonly,
inc_nrnb(nrnb, eNR_SHIFTX, graph->nnodes);
}
}
- /* Check whether we need to do bondeds or correct for exclusions */
+ /* Check whether we need to do listed interactions or correct for exclusions */
if (fr->bMolPBC &&
- ((flags & GMX_FORCE_BONDED)
+ ((flags & GMX_FORCE_LISTED)
|| EEL_RF(fr->eeltype) || EEL_FULL(fr->eeltype) || EVDW_PME(fr->vdwtype)))
{
/* Since all atoms are in the rectangular or triclinic unit-cell,
}
debug_gmx();
- if (flags & GMX_FORCE_BONDED)
+ if (flags & GMX_FORCE_LISTED)
{
- wallcycle_sub_start(wcycle, ewcsBONDED);
+ wallcycle_sub_start(wcycle, ewcsLISTED);
calc_bonds(cr->ms,
idef, (const rvec *) x, hist, f, fr, &pbc, graph, enerd, nrnb, lambda, md, fcd,
DOMAINDECOMP(cr) ? cr->dd->gatindex : NULL,
}
debug_gmx();
- wallcycle_sub_stop(wcycle, ewcsBONDED);
+ wallcycle_sub_stop(wcycle, ewcsLISTED);
}
where();
int list_nalloc;
} t_gbtmpnbls;
-/* This function is exactly the same as the one in bonded/bonded.cpp. The reason
+/* This function is exactly the same as the one in listed-forces/bonded.cpp. The reason
* it is copied here is that the bonded gb-interactions are evaluated
* not in calc_bonds, but rather in calc_gb_forces
*/
#include <sys/time.h>
#endif
-#include "gromacs/bonded/bonded.h"
#include "gromacs/essentialdynamics/edsam.h"
#include "gromacs/gmxlib/nonbonded/nb_free_energy.h"
#include "gromacs/gmxlib/nonbonded/nb_kernel.h"
#include "gromacs/legacyheaders/typedefs.h"
#include "gromacs/legacyheaders/update.h"
#include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/listed-forces/bonded.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/nb_verlet.h"
}
/* We calculate the non-bonded forces, when done on the CPU, here.
- * We do this before calling do_force_lowlevel, as in there bondeds
- * forces are calculated before PME, which does communication.
- * With this order, non-bonded and bonded force calculation imbalance
- * can be balanced out by the domain decomposition load balancing.
+ * We do this before calling do_force_lowlevel, because in that
+ * function, the listed forces are calculated before PME, which
+ * does communication. With this order, non-bonded and listed
+ * force calculation imbalance can be balanced out by the domain
+ * decomposition load balancing.
*/
if (!bUseOrEmulGPU)
update_QMMMrec(cr, fr, x, mdatoms, box, top);
}
- if ((flags & GMX_FORCE_BONDED) && top->idef.il[F_POSRES].nr > 0)
+ if ((flags & GMX_FORCE_LISTED) && top->idef.il[F_POSRES].nr > 0)
{
posres_wrapper(flags, inputrec, nrnb, top, box, x,
enerd, lambda, fr);
}
- if ((flags & GMX_FORCE_BONDED) && top->idef.il[F_FBPOSRES].nr > 0)
+ if ((flags & GMX_FORCE_LISTED) && top->idef.il[F_FBPOSRES].nr > 0)
{
fbposres_wrapper(inputrec, nrnb, top, box, x, enerd, fr);
}
update_QMMMrec(cr, fr, x, mdatoms, box, top);
}
- if ((flags & GMX_FORCE_BONDED) && top->idef.il[F_POSRES].nr > 0)
+ if ((flags & GMX_FORCE_LISTED) && top->idef.il[F_POSRES].nr > 0)
{
posres_wrapper(flags, inputrec, nrnb, top, box, x,
enerd, lambda, fr);
}
- if ((flags & GMX_FORCE_BONDED) && top->idef.il[F_FBPOSRES].nr > 0)
+ if ((flags & GMX_FORCE_LISTED) && top->idef.il[F_FBPOSRES].nr > 0)
{
fbposres_wrapper(inputrec, nrnb, top, box, x, enerd, fr);
}
"DD redist.", "DD NS grid + sort", "DD setup comm.",
"DD make top.", "DD make constr.", "DD top. other",
"NS grid local", "NS grid non-loc.", "NS search local", "NS search non-loc.",
- "Bonded F", "Nonbonded F", "Ewald F correction",
+ "Listed F", "Nonbonded F", "Ewald F correction",
"NB X buffer ops.", "NB F buffer ops."
};
ewcsDD_MAKETOP, ewcsDD_MAKECONSTR, ewcsDD_TOPOTHER,
ewcsNBS_GRID_LOCAL, ewcsNBS_GRID_NONLOCAL,
ewcsNBS_SEARCH_LOCAL, ewcsNBS_SEARCH_NONLOCAL,
- ewcsBONDED, ewcsNONBONDED, ewcsEWALD_CORRECTION,
+ ewcsLISTED, ewcsNONBONDED, ewcsEWALD_CORRECTION,
ewcsNB_X_BUF_OPS, ewcsNB_F_BUF_OPS,
ewcsNR
};