Tagged files with gromacs 3.0 header and added some license info
[alexxy/gromacs.git] / include / bondf.h
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 3.0
11  * 
12  * Copyright (c) 1991-2001
13  * BIOSON Research Institute, Dept. of Biophysical Chemistry
14  * University of Groningen, The Netherlands
15  * 
16  * This program is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU General Public License
18  * as published by the Free Software Foundation; either version 2
19  * of the License, or (at your option) any later version.
20  * 
21  * If you want to redistribute modifications, please consider that
22  * scientific software is very special. Version control is crucial -
23  * bugs must be traceable. We will be happy to consider code for
24  * inclusion in the official distribution, but derived work must not
25  * be called official GROMACS. Details are found in the README & COPYING
26  * files - if they are missing, get the official version at www.gromacs.org.
27  * 
28  * To help us fund GROMACS development, we humbly ask that you cite
29  * the papers on the package - you can find them in the top README file.
30  * 
31  * Do check out http://www.gromacs.org , or mail us at gromacs@gromacs.org .
32  * 
33  * And Hey:
34  * Good ROcking Metal Altar for Chronical Sinners
35  */
36
37 #ifndef _bondf_h
38 #define _bondf_h
39
40 static char *SRCID_bondf_h = "$Id$";
41 #ifdef HAVE_CONFIG_H
42 #include <config.h>
43 #endif
44
45 #ifdef HAVE_IDENT
46 #ident  "@(#) bondf.h 1.28 2/19/97"
47 #endif /* HAVE_IDENT */
48
49 #ifdef CPLUSPLUS
50 extern "C" {
51 #endif
52
53 #include <stdio.h>
54 #include "typedefs.h"
55 #include "nrnb.h"
56 #include "pbc.h"
57
58 extern void calc_bonds(FILE *log,t_commrec *cr,t_idef *idef,
59                        rvec x[],rvec f[],t_forcerec *fr,t_graph *g,
60                        real epot[],t_nrnb *nrnb,matrix box,real lambda,
61                        t_mdatoms *md,int ngrp,real egnb[],real egcoul[]);
62 /* 
63  * The function calc_bonds() caluclates all bonded force interactions.
64  * The "bonds" are specified as follows:
65  *   int nbonds
66  *          the total number of bonded interactions.
67  *   t_iatom *forceatoms
68  *     specifies which atoms are involved in a bond of a certain 
69  *     type, see also struct t_idef.
70  *   t_functype *functype
71  *          defines for every bonded force type what type of function to 
72  *     use, see also struct t_idef.
73  *   t_iparams *forceparams
74  *          defines the parameters for every bond type, see also struct 
75  *     t_idef.
76  *   real epot[NR_F]
77  *     total potential energy split up over the function types.
78  *   return value:
79  *          the total potential energy (sum over epot).
80  */
81
82 extern real bond_angle(matrix box,
83                        rvec xi,rvec xj,rvec xk,                 /* in  */
84                        rvec r_ij,rvec r_kj,real *costh);        /* out */
85 /* Calculate bond-angle. No PBC is taken into account (use mol-shift) */
86
87 extern real dih_angle(matrix box,
88                       rvec xi,rvec xj,rvec xk,rvec xl,   /* in */
89                       rvec r_ij,rvec r_kj,rvec r_kl,rvec m,rvec n, /* out */
90                       real *cos_phi,real *sign);
91 /* Calculate dihedral-angle. No PBC is taken into account (use mol-shift) */
92
93 extern void do_dih_fup(int i,int j,int k,int l,real ddphi,
94                        rvec r_ij,rvec r_kj,rvec r_kl,
95                        rvec m,rvec n,rvec f[],t_forcerec *fr,t_graph *g,
96                        rvec x[]);
97 /* Do an update of the forces for dihedral potentials */
98
99 /*************************************************************************
100  *
101  *  Bonded force functions
102  *
103  *************************************************************************/
104   extern t_ifunc bonds,g96bonds,morsebonds,cubicbonds;
105   extern t_ifunc angles,g96angles;
106   extern t_ifunc pdihs,idihs,rbdihs;
107   extern t_ifunc water_pol,posres,angres,angresz,do_14,unimplemented;
108
109 #ifdef CPLUSPLUS
110 }
111 #endif
112
113 #endif  /* _bondf_h */