Gromacs  2025.0-dev-20241011-013a99c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions | Variables
ifunc.h File Reference
#include "gromacs/libgromacs_export.h"
#include "gromacs/math/vectypes.h"
+ Include dependency graph for ifunc.h:
+ This graph shows which files directly or indirectly include this file:

Description

Declares interaction functions.

Classes

struct  t_interaction_function
 Interaction function. More...
 

Typedefs

typedef int t_iatom
 
typedef real rvec4 [4]
 

Enumerations

enum  {
  F_BONDS, F_G96BONDS, F_MORSE, F_CUBICBONDS,
  F_CONNBONDS, F_HARMONIC, F_FENEBONDS, F_TABBONDS,
  F_TABBONDSNC, F_RESTRBONDS, F_ANGLES, F_G96ANGLES,
  F_RESTRANGLES, F_LINEAR_ANGLES, F_CROSS_BOND_BONDS, F_CROSS_BOND_ANGLES,
  F_UREY_BRADLEY, F_QUARTIC_ANGLES, F_TABANGLES, F_PDIHS,
  F_RBDIHS, F_RESTRDIHS, F_CBTDIHS, F_FOURDIHS,
  F_IDIHS, F_PIDIHS, F_TABDIHS, F_CMAP,
  F_GB12_NOLONGERUSED, F_GB13_NOLONGERUSED, F_GB14_NOLONGERUSED, F_GBPOL_NOLONGERUSED,
  F_NPSOLVATION_NOLONGERUSED, F_LJ14, F_COUL14, F_LJC14_Q,
  F_LJC_PAIRS_NB, F_LJ, F_BHAM, F_LJ_LR_NOLONGERUSED,
  F_BHAM_LR_NOLONGERUSED, F_DISPCORR, F_COUL_SR, F_COUL_LR_NOLONGERUSED,
  F_RF_EXCL, F_COUL_RECIP, F_LJ_RECIP, F_DPD,
  F_POLARIZATION, F_WATER_POL, F_THOLE_POL, F_ANHARM_POL,
  F_POSRES, F_FBPOSRES, F_DISRES, F_DISRESVIOL,
  F_ORIRES, F_ORIRESDEV, F_ANGRES, F_ANGRESZ,
  F_DIHRES, F_DIHRESVIOL, F_CONSTR, F_CONSTRNC,
  F_SETTLE, F_VSITE1, F_VSITE2, F_VSITE2FD,
  F_VSITE3, F_VSITE3FD, F_VSITE3FAD, F_VSITE3OUT,
  F_VSITE4FD, F_VSITE4FDN, F_VSITEN, F_COM_PULL,
  F_DENSITYFITTING, F_EQM, F_EPOT, F_EKIN,
  F_ETOT, F_ECONSERVED, F_TEMP, F_VTEMP_NOLONGERUSED,
  F_PDISPCORR, F_PRES, F_DVDL_CONSTR, F_DVDL,
  F_DKDL, F_DVDL_COUL, F_DVDL_VDW, F_DVDL_BONDED,
  F_DVDL_RESTRAINT, F_DVDL_TEMPERATURE, F_NRE
}
 Interaction function enums. More...
 

Functions

static bool IS_RESTRAINT_TYPE (int ifunc)
 
static int NRFPA (int ftype)
 
static int NRFPB (int ftype)
 
static int NRFP (int ftype)
 
static int NRAL (int ftype)
 
static bool IS_CHEMBOND (int ftype)
 Tells if function type ftype represents a chemical bond.
 
static bool IS_ANGLE (int ftype)
 Tells if a function type ftype represents an angle. More...
 
static bool IS_VSITE (int ftype)
 
static bool IS_TABULATED (int ftype)
 

Variables

constexpr unsigned int IF_NULL = 0
 
constexpr unsigned int IF_BOND = 1 << 0
 With IF_BOND a bonded interaction will be calculated.
 
constexpr unsigned int IF_VSITE = 1 << 1
 
constexpr unsigned int IF_CONSTRAINT = 1 << 2
 
constexpr unsigned int IF_CHEMBOND = 1 << 3
 
constexpr unsigned int IF_BTYPE = 1 << 4
 With IF_BTYPE grompp can convert the bond to a Morse potential.
 
constexpr unsigned int IF_ATYPE = 1 << 5
 
constexpr unsigned int IF_DIHEDRAL = 1 << 6
 
constexpr unsigned int IF_PAIR = 1 << 7
 
constexpr unsigned int IF_TABULATED = 1 << 8
 
constexpr unsigned int IF_LIMZERO = 1 << 9
 
constexpr int MAXATOMLIST = 6
 Maximum allowed number of atoms.
 
constexpr int MAXFORCEPARAM = 12
 Maximum allowed number of parameters.
 
constexpr int NR_RBDIHS = 6
 Maximum terms in interaction_function. Check src/gromacs/gmxpreprocess/toppush.cpp when you change these numbers.
 
constexpr int NR_CBTDIHS = 6
 
constexpr int NR_FOURDIHS = 4
 
LIBGROMACS_EXPORT const
t_interaction_function 
interaction_function [F_NRE]
 Initialised interaction functions descriptor. More...
 

Enumeration Type Documentation

anonymous enum

Interaction function enums.

This MUST correspond to the t_interaction_function[F_NRE] in src/gromacs/topology/ifunc.cpp.

Enumerator
F_DVDL_TEMPERATURE 

Not calculated for now, but should just be the energy (NVT) or enthalpy (NPT), or 0 (NVE).

F_NRE 

This number is for the total number of energies.

Function Documentation

static bool IS_ANGLE ( int  ftype)
inlinestatic

Tells if a function type ftype represents an angle.

Per Larsson, 2007-11-06.

Variable Documentation

constexpr unsigned int IF_ATYPE = 1 << 5

With IF_BTYPE or IF_ATYPE the bond/angle can be converted to a constraint or used for vsite parameter determination by grompp.

constexpr unsigned int IF_LIMZERO = 1 << 9

IF_LIMZERO indicates that for a bonded interaction the potential does goes to zero for large distances, thus if such an interaction it not assigned to any node by the domain decomposition, the simulation still continue, if mdrun has been told so.

constexpr unsigned int IF_NULL = 0

These flags tell to some of the routines what can be done with this item in the list.

LIBGROMACS_EXPORT const t_interaction_function interaction_function[F_NRE]

Initialised interaction functions descriptor.

Initialised interaction functions descriptor.

This MUST correspond to the enum in api/legacy/include/gromacs/topology/ifunc.h.

Note also that the longname field of the interaction is used for printing e.g. the mdrun log file in a columnar style, and pr_ebin makes available only 14 printing characters (ie not including the terminating '\0'). So please abbreviate accordingly, e.g. "Conserved En."