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
34 typedef real
t_ifunc(int nbonds
,t_iatom iatoms
[],t_iparams
*iparams
,
35 rvec x
[],rvec f
[],t_forcerec
*fr
,t_graph
*g
,
36 matrix box
,real lambd
,real
*dvdlambda
,
37 t_mdatoms
*md
,int ngrp
,real egnb
[],real egcoul
[]);
39 * The function type t_ifunc() calculates one interaction, using iatoms[]
40 * and iparams. Within the function the number of atoms to be used is
41 * known. Within the function only the atomid part of the iatoms[] array
42 * is supplied, not the type field (see also t_ilist). The function
43 * returns the potential energy. The coordinates in x are such that
44 * no calculation of PBC is necessary.
50 #define IF_CONSTRAINT 1<<2
51 #define IF_CONNECT 1<<3
54 /* These flags tell to some of the routines what can be done with this
55 * item in the list. If flags & IF_BOND, then bonded interactions will
56 * be calculated. If flags & IF_CONNECT this link specifies a connection
57 * (chemical bond) between two particles. By specifying this here, we can
58 * keep all the information in one place.
62 char *name
; /* the name of this function */
63 char *longname
; /* The name for printing etc. */
64 int nratoms
; /* nr of atoms needed for this function */
65 int nrfpA
,nrfpB
; /* number of parameters for this function. */
66 /* this corresponds to the number of params in */
67 /* iparams struct! (see idef.h) */
68 /* A and B are for normal and free energy components respectively. */
69 unsigned long flags
; /* Flags (see above) */
70 int nrnb_ind
; /* index for nrnb (-1 if unknown) */
71 t_ifunc
*ifunc
; /* the function it self */
72 } t_interaction_function
;
74 #define NRFP(ftype) (interaction_function[(ftype)].nrfpA+interaction_function[(ftype)].nrfpB)
75 #define NRAL(ftype) (interaction_function[(ftype)].nratoms)
77 extern t_interaction_function interaction_function
[F_NRE
];
78 /* initialised interaction functions descriptor */