Gromacs  2022.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
#include "gmxpre.h"
#include "pairs.h"
#include <cmath>
#include "gromacs/listed_forces/bonded.h"
#include "gromacs/math/functions.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdtypes/forcerec.h"
#include "gromacs/mdtypes/group.h"
#include "gromacs/mdtypes/interaction_const.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/nblist.h"
#include "gromacs/mdtypes/simulation_workload.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pbcutil/pbc_simd.h"
#include "gromacs/simd/simd.h"
#include "gromacs/simd/simd_math.h"
#include "gromacs/simd/vector_operations.h"
#include "gromacs/tables/forcetable.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxassert.h"
#include "listed_internal.h"
+ Include dependency graph for pairs.cpp:

Description

This file defines functions for "pair" interactions (i.e. listed non-bonded interactions, e.g. 1-4 interactions)

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

Functions

static void warning_rlimit (const rvec *x, int ai, int aj, int *global_atom_index, real r, real rlimit)
 Issue a warning if a listed interaction is beyond a table limit.
 
static real evaluate_single (real r2, real tabscale, const real *vftab, real tableStride, real qq, real c6, real c12, real *velec, real *vvdw)
 Compute the energy and force for a single pair interaction.
 
static real sixthRoot (const real r)
 
template<KernelSoftcoreType softcoreType>
static real free_energy_evaluate_single (real r2, real rCoulCutoff, const interaction_const_t::SoftCoreParameters &scParams, real tabscale, const real *vftab, real tableStride, real qqA, real c6A, real c12A, real qqB, real c6B, real c12B, real facel, const real LFC[2], const real LFV[2], const real DLF[2], const real lfac_coul[2], const real lfac_vdw[2], const real dlfac_coul[2], const real dlfac_vdw[2], real *velectot, real *vvdwtot, real *dvdl)
 Compute the energy and force for a single pair interaction under FEP.
 
template<BondedKernelFlavor flavor>
static real do_pairs_general (int ftype, int nbonds, const t_iatom iatoms[], const t_iparams iparams[], const rvec x[], rvec4 f[], rvec fshift[], const struct t_pbc *pbc, const real *lambda, real *dvdl, gmx::ArrayRef< real > chargeA, gmx::ArrayRef< real > chargeB, gmx::ArrayRef< bool > atomIsPerturbed, gmx::ArrayRef< unsigned short > cENER, int numEnergyGroups, const t_forcerec *fr, gmx_grppairener_t *grppener, int *global_atom_index)
 Calculate pair interactions, supports all types and conditions.
 
template<typename T , int pack_size, typename pbc_type >
static void do_pairs_simple (int nbonds, const t_iatom iatoms[], const t_iparams iparams[], const rvec x[], rvec4 f[], const pbc_type pbc, gmx::ArrayRef< real > charge, const real scale_factor)
 Calculate pairs, only for plain-LJ + plain Coulomb normal type. More...
 
void do_pairs (int ftype, int nbonds, const t_iatom iatoms[], const t_iparams iparams[], const rvec x[], rvec4 f[], rvec fshift[], const struct t_pbc *pbc, const real *lambda, real *dvdl, gmx::ArrayRef< real > chargeA, gmx::ArrayRef< real > chargeB, gmx::ArrayRef< bool > atomIsPerturbed, gmx::ArrayRef< unsigned short > cENER, const int numEnergyGroups, const t_forcerec *fr, const bool havePerturbedInteractions, const gmx::StepWorkload &stepWork, gmx_grppairener_t *grppener, int *global_atom_index)
 Calculate all listed pair interactions. More...
 

Function Documentation

void do_pairs ( int  ftype,
int  nbonds,
const t_iatom  iatoms[],
const t_iparams  iparams[],
const rvec  x[],
rvec4  f[],
rvec  fshift[],
const struct t_pbc pbc,
const real lambda,
real dvdl,
gmx::ArrayRef< real chargeA,
gmx::ArrayRef< real chargeB,
gmx::ArrayRef< bool >  atomIsPerturbed,
gmx::ArrayRef< unsigned short >  cENER,
const int  numEnergyGroups,
const t_forcerec *  fr,
const bool  havePerturbedInteractions,
const gmx::StepWorkload stepWork,
gmx_grppairener_t *  grppener,
int *  global_atom_index 
)

Calculate all listed pair interactions.

Calculate VdW/charge listed pair interactions (usually 1-4 interactions).

template<typename T , int pack_size, typename pbc_type >
static void do_pairs_simple ( int  nbonds,
const t_iatom  iatoms[],
const t_iparams  iparams[],
const rvec  x[],
rvec4  f[],
const pbc_type  pbc,
gmx::ArrayRef< real charge,
const real  scale_factor 
)
static

Calculate pairs, only for plain-LJ + plain Coulomb normal type.

This function is templated for real/SimdReal and for optimization.