Gromacs  2025-dev-20240612-66cb22e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions
idef.h File Reference
#include <cstdio>
#include <array>
#include <vector>
#include "gromacs/math/vectypes.h"
#include "gromacs/topology/ifunc.h"
#include "gromacs/utility/real.h"
+ Include dependency graph for idef.h:
+ This graph shows which files directly or indirectly include this file:

Description

Defines interaction types and parameters.

Classes

union  t_iparams
 Union of various interaction paramters. More...
 
struct  InteractionList
 List of listed interactions. More...
 
struct  t_ilist
 Deprecated list of listed interactions. More...
 
struct  InteractionListHandle
 Type for returning a list of InteractionList references. More...
 
struct  gmx_cmapdata_t
 CMAP data for a single grid. More...
 
struct  gmx_cmap_t
 CMAP grids. More...
 
class  InteractionDefinitions
 Struct with list of interaction parameters and lists of interactions. More...
 
struct  t_idef
 Deprecated interation definitions, used in t_topology. More...
 

Typedefs

typedef union t_iparams t_iparams
 Union of various interaction paramters. More...
 
typedef int t_functype
 
using InteractionLists = std::array< InteractionList, F_NRE >
 List of interaction lists. More...
 

Enumerations

enum  { ilsortUNKNOWN, ilsortNO_FE, ilsortFE_SORTED }
 Sorting of the interaction list. More...
 

Functions

static std::vector
< InteractionListHandle
extractILists (const InteractionLists &ilists, int flags)
 Returns a list of all non-empty InteractionList entries with any of the interaction flags in flags set. More...
 
static int ilistStride (const InteractionListHandle &ilistHandle)
 Returns the stride for the iatoms array in ilistHandle. More...
 
void printInteractionParameters (gmx::TextWriter *writer, t_functype ftype, const t_iparams &iparams)
 
void pr_iparams (FILE *fp, t_functype ftype, const t_iparams &iparams)
 
void pr_ilist (FILE *fp, int indent, const char *title, const t_functype *functype, const InteractionList &ilist, bool bShowNumbers, bool bShowParameters, const t_iparams *iparams)
 
void pr_idef (FILE *fp, int indent, const char *title, const t_idef *idef, bool bShowNumbers, bool bShowParameters)
 
void init_idef (t_idef *idef)
 Properly initialize idef struct. More...
 
void done_idef (t_idef *idef)
 Properly clean up idef struct. More...
 

Typedef Documentation

using InteractionLists = std::array<InteractionList, F_NRE>

List of interaction lists.

Contains one list for each interaction type.

TODO: Consider only including entries in use instead of all F_NRE

typedef union t_iparams t_iparams

Union of various interaction paramters.

Some parameters have A and B values for free energy calculations. The B values are not used for regular simulations of course. Free Energy for nonbondeds can be computed by changing the atom type. The harmonic type is used for all harmonic potentials: bonds, angles and improper dihedrals.

No free energy supported for cubic bonds, FENE, WPOL or cross terms.

Enumeration Type Documentation

anonymous enum

Sorting of the interaction list.

Enumerator
ilsortUNKNOWN 

Sorting unknown.

ilsortNO_FE 

Sorting without the free energy interactions.

ilsortFE_SORTED 

Sorting with the free energy interactions also sorted.

Function Documentation

void done_idef ( t_idef idef)

Properly clean up idef struct.

Parameters
[in]idefPointer to idef struct to clean up.
static std::vector<InteractionListHandle> extractILists ( const InteractionLists ilists,
int  flags 
)
inlinestatic

Returns a list of all non-empty InteractionList entries with any of the interaction flags in flags set.

Parameters
[in]ilistsSet of interaction lists.
[in]flagsBit mask with one or more IF_... bits set.
static int ilistStride ( const InteractionListHandle ilistHandle)
inlinestatic

Returns the stride for the iatoms array in ilistHandle.

Parameters
[in]ilistHandleThe ilist to return the stride for.
void init_idef ( t_idef idef)

Properly initialize idef struct.

Parameters
[in]idefPointer to idef struct to initialize.