changed reading hint
[gromacs/adressmacs.git] / include / types / ifunc.h
blob7c938cb3b1067cc14000963b9cee64fc843ba736
1 /*
2 * $Id$
3 *
4 * This source code is part of
5 *
6 * G R O M A C S
7 *
8 * GROningen MAchine for Chemical Simulations
9 *
10 * VERSION 2.0
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
16 * Please refer to:
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
23 * or e-mail to:
24 * gromacs@chem.rug.nl
26 * And Hey:
27 * Green Red Orange Magenta Azure Cyan Skyblue
30 #ifndef _ifunc_h
31 #define _ifunc_h
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.
47 #define IF_NULL 0
48 #define IF_BOND 1
49 #define IF_DUMMY 1<<1
50 #define IF_CONSTRAINT 1<<2
51 #define IF_CONNECT 1<<3
52 #define IF_BTYPE 1<<5
53 #define IF_ATYPE 1<<6
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.
60 typedef struct
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 */
80 #endif