Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Enumerations | Functions
#include "gromacs/math/vectypes.h"
#include "gromacs/topology/ifunc.h"
#include "gromacs/utility/basedefinitions.h"
+ Include dependency graph for bonded.h:
+ This graph shows which files directly or indirectly include this file:

Description

This file contains declarations necessary for low-level functions for computing energies and forces for bonded interactions.

Author
Mark Abraham mark..nosp@m.j.ab.nosp@m.raham.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Enumerations

enum  BondedKernelFlavor {
  BondedKernelFlavor::ForcesSimdWhenAvailable, BondedKernelFlavor::ForcesNoSimd, BondedKernelFlavor::ForcesAndVirialAndEnergy, BondedKernelFlavor::ForcesAndEnergy,
  BondedKernelFlavor::Count
}
 For selecting which flavor of bonded kernel is used for simple bonded types. More...
 

Functions

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)
 Calculate bond-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, int *t1, int *t2, int *t3)
 Calculate dihedral-angle. No PBC is taken into account (use mol-shift)
 
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, rvec4 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.
 
void make_dp_periodic (real *dp)
 Make a dihedral fall in the range (-pi,pi)
 
real cmap_dihs (int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], const gmx_cmap_t *cmap_grid, const rvec x[], rvec4 f[], rvec fshift[], const struct t_pbc *pbc, const struct t_graph *g, real lambda, real *dvdlambda, const t_mdatoms *md, t_fcdata *fcd, int *global_atom_index)
 Compute CMAP dihedral energies and forces.
 
static constexpr bool computeEnergy (const BondedKernelFlavor flavor)
 Returns whether the energy should be computed.
 
static constexpr bool computeVirial (const BondedKernelFlavor flavor)
 Returns whether the virial should be computed.
 
static constexpr bool computeEnergyOrVirial (const BondedKernelFlavor flavor)
 Returns whether the energy and/or virial should be computed.
 
real calculateSimpleBond (int ftype, int numForceatoms, const t_iatom forceatoms[], const t_iparams forceparams[], const rvec x[], rvec4 f[], rvec fshift[], const struct t_pbc *pbc, const struct t_graph *g, real lambda, real *dvdlambda, const t_mdatoms *md, t_fcdata *fcd, int *global_atom_index, BondedKernelFlavor bondedKernelFlavor)
 Calculates bonded interactions for simple bonded types. More...
 
int nrnbIndex (int ftype)
 Getter for finding the flop count for an ftype interaction.
 

Enumeration Type Documentation

enum BondedKernelFlavor
strong

For selecting which flavor of bonded kernel is used for simple bonded types.

Enumerator
ForcesSimdWhenAvailable 

Compute only forces, use SIMD when available; should not be used with perturbed parameters.

ForcesNoSimd 

Compute only forces, do not use SIMD.

ForcesAndVirialAndEnergy 

Compute forces, virial and energy (no SIMD)

ForcesAndEnergy 

Compute forces and energy (no SIMD)

Count 

The number of flavors.

Function Documentation

real calculateSimpleBond ( int  ftype,
int  numForceatoms,
const t_iatom  forceatoms[],
const t_iparams  forceparams[],
const rvec  x[],
rvec4  f[],
rvec  fshift[],
const struct t_pbc pbc,
const struct t_graph *  g,
real  lambda,
real dvdlambda,
const t_mdatoms md,
t_fcdata *  fcd,
int *  global_atom_index,
BondedKernelFlavor  bondedKernelFlavor 
)

Calculates bonded interactions for simple bonded types.

Exits with an error when the bonded type is not simple All pointers should be non-null, except for pbc and g which can be nullptr.

Returns
the energy or 0 when bondedKernelFlavor did not request the energy.