4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
17 * GROMACS: A message-passing parallel molecular dynamics implementation
18 * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19 * Comp. Phys. Comm. 91, 43-56 (1995)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
27 * Green Red Orange Magenta Azure Cyan Skyblue
38 typedef real t_ifunc(int nbonds,t_iatom iatoms[],t_iparams *iparams,
39 rvec x[],rvec f[],t_forcerec *fr,t_graph *g,
40 matrix box,real lambd,real *dvdlambda,
41 t_mdatoms *md,int ngrp,real egnb[],real egcoul[]);
43 * The function type t_ifunc() calculates one interaction, using iatoms[]
44 * and iparams. Within the function the number of atoms to be used is
45 * known. Within the function only the atomid part of the iatoms[] array
46 * is supplied, not the type field (see also t_ilist). The function
47 * returns the potential energy. The coordinates in x are such that
48 * no calculation of PBC is necessary.
54 #define IF_CONSTRAINT 1<<2
55 #define IF_CONNECT 1<<3
58 /* These flags tell to some of the routines what can be done with this
59 * item in the list. If flags & IF_BOND, then bonded interactions will
60 * be calculated. If flags & IF_CONNECT this link specifies a connection
61 * (chemical bond) between two particles. By specifying this here, we can
62 * keep all the information in one place.
66 char *name; /* the name of this function */
67 char *longname; /* The name for printing etc. */
68 int nratoms; /* nr of atoms needed for this function */
69 int nrfpA,nrfpB; /* number of parameters for this function. */
70 /* this corresponds to the number of params in */
71 /* iparams struct! (see idef.h) */
72 /* A and B are for normal and free energy components respectively. */
73 unsigned long flags; /* Flags (see above) */
74 int nrnb_ind; /* index for nrnb (-1 if unknown) */
75 t_ifunc *ifunc; /* the function it self */
76 } t_interaction_function;
78 #define NRFP(ftype) (interaction_function[(ftype)].nrfpA+interaction_function[(ftype)].nrfpB)
79 #define NRAL(ftype) (interaction_function[(ftype)].nratoms)
81 extern t_interaction_function interaction_function[F_NRE];
82 /* initialised interaction functions descriptor */