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

Description

This file contains declarations of high-level functions used by mdrun to compute energies and forces for listed interactions.

Clients of libgromacs that want to evaluate listed interactions should call functions declared here.

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

Typedefs

using BondedFunction = real(*)(int nbonds, const t_iatom iatoms[], const t_iparams iparams[], const rvec x[], rvec4 f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, const t_mdatoms *md, t_fcdata *fcd, int *ddgatindex)
 Type of CPU function to compute a bonded interaction.
 

Functions

BondedFunction bondedFunction (int ftype)
 Getter for finding a callable CPU function to compute an ftype interaction.
 
void calc_listed (const t_commrec *cr, const gmx_multisim_t *ms, struct gmx_wallcycle *wcycle, const t_idef *idef, const rvec x[], history_t *hist, gmx::ForceOutputs *forceOutputs, const t_forcerec *fr, const struct t_pbc *pbc, const struct t_pbc *pbc_full, const struct t_graph *g, gmx_enerdata_t *enerd, t_nrnb *nrnb, const real *lambda, const t_mdatoms *md, struct t_fcdata *fcd, int *ddgatindex, const gmx::StepWorkload &stepWork)
 Calculates all listed force interactions. More...
 
void calc_listed_lambda (const t_idef *idef, const rvec x[], const t_forcerec *fr, const struct t_pbc *pbc, const struct t_graph *g, gmx_grppairener_t *grpp, real *epot, t_nrnb *nrnb, const real *lambda, const t_mdatoms *md, struct t_fcdata *fcd, int *global_atom_index)
 As calc_listed(), but only determines the potential energy for the perturbed interactions. More...
 
void do_force_listed (struct gmx_wallcycle *wcycle, const matrix box, const t_lambda *fepvals, const t_commrec *cr, const gmx_multisim_t *ms, const t_idef *idef, const rvec x[], history_t *hist, gmx::ForceOutputs *forceOutputs, const t_forcerec *fr, const struct t_pbc *pbc, const struct t_graph *graph, gmx_enerdata_t *enerd, t_nrnb *nrnb, const real *lambda, const t_mdatoms *md, struct t_fcdata *fcd, int *global_atom_index, const gmx::StepWorkload &stepWork)
 Do all aspects of energy and force calculations for mdrun on the set of listed interactions.
 
bool haveRestraints (const t_idef &idef, const t_fcdata &fcd)
 Returns true if there are position, distance or orientation restraints.
 
bool haveCpuBondeds (const t_forcerec &fr)
 Returns true if there are CPU (i.e. not GPU-offloaded) bonded interactions to compute.
 
bool haveCpuListedForces (const t_forcerec &fr, const t_idef &idef, const t_fcdata &fcd)
 Returns true if there are listed interactions to compute. More...
 

Function Documentation

void calc_listed ( const t_commrec *  cr,
const gmx_multisim_t ms,
struct gmx_wallcycle *  wcycle,
const t_idef *  idef,
const rvec  x[],
history_t hist,
gmx::ForceOutputs forceOutputs,
const t_forcerec *  fr,
const struct t_pbc pbc,
const struct t_pbc pbc_full,
const struct t_graph *  g,
gmx_enerdata_t *  enerd,
t_nrnb *  nrnb,
const real lambda,
const t_mdatoms md,
struct t_fcdata *  fcd,
int *  ddgatindex,
const gmx::StepWorkload stepWork 
)

Calculates all listed force interactions.

Note that pbc_full is used only for position restraints, and is not initialized if there are none.

void calc_listed_lambda ( const t_idef *  idef,
const rvec  x[],
const t_forcerec *  fr,
const struct t_pbc pbc,
const struct t_graph *  g,
gmx_grppairener_t *  grpp,
real epot,
t_nrnb *  nrnb,
const real lambda,
const t_mdatoms md,
struct t_fcdata *  fcd,
int *  global_atom_index 
)

As calc_listed(), but only determines the potential energy for the perturbed interactions.

The shift forces in fr are not affected.

bool haveCpuListedForces ( const t_forcerec &  fr,
const t_idef &  idef,
const t_fcdata &  fcd 
)

Returns true if there are listed interactions to compute.

NOTE: the current implementation returns true if there are position restraints or any bonded interactions computed on the CPU.