Tagged files with gromacs 3.0 header and added some license info
[alexxy/gromacs.git] / include / force.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  * Giving Russians Opium May Alter Current Situation
35  */
36
37 #ifndef _force_h
38 #define _force_h
39
40 static char *SRCID_force_h = "$Id$";
41 #ifdef HAVE_CONFIG_H
42 #include <config.h>
43 #endif
44
45 #ifdef HAVE_IDENT
46 #ident  "@(#) force.h 1.53 5/15/97"
47 #endif /* HAVE_IDENT */
48 #include "typedefs.h"
49 #include "pbc.h"
50 #include "nsb.h"
51 #include "network.h"
52 #include "tgroup.h"
53
54
55 extern void calc_vir(FILE *log,int nxf,rvec x[],rvec f[],tensor vir,
56                      t_commrec *cr);
57 /* Calculate virial for nxf atoms, and add it to vir */
58
59 extern void f_calc_vir(FILE *log,int i0,int i1,rvec x[],rvec f[],tensor vir,
60                        t_commrec *cr,t_graph *g,rvec shift_vec[]);
61 /* Calculate virial taking periodicity into account */
62
63 extern t_forcerec *mk_forcerec(void);
64
65 extern void make_tables(FILE *fp,t_forcerec *fr,bool bVerbose,char *fn);
66 /* Make tables for inner loops. When bVerbose the tables are printed
67  * to .xvg files
68  */
69  
70 extern void pr_forcerec(FILE *log,t_forcerec *fr,t_commrec *cr);
71
72 extern void init_forcerec(FILE       *log,     
73                           t_forcerec *fr,   
74                           t_inputrec *ir,   
75                           t_topology *top,
76                           t_commrec  *cr,
77                           t_mdatoms  *mdatoms,
78                           t_nsborder *nsb,
79                           matrix     box,
80                           bool       bMolEpot,
81                           char       *tabfn);
82 /* The Force rec struct must be created with mk_forcerec 
83  * The booleans have the following meaning:
84  * bSetQ:    Copy the charges [ only necessary when they change ]
85  * bMolEpot: Use the free energy stuff per molecule
86  */
87  
88 extern void update_forcerec(FILE *log,t_forcerec *fr,matrix box);
89 /* Updates parameters in the forcerec that are time dependent */
90
91 extern void set_avcsix(FILE *log,t_forcerec *fr,t_mdatoms *mdatoms);
92 /* Compute the average C6 param for LJ corrections */
93
94 extern void ns(FILE *log,
95                t_forcerec *fr,
96                rvec       x[],
97                rvec       f[],
98                matrix     box,
99                t_groups   *grps,
100                t_grpopts  *opts,
101                t_topology *top,
102                t_mdatoms  *md,
103                t_commrec  *cr,
104                t_nrnb     *nrnb,
105                t_nsborder *nsb,
106                int        step,
107                real       lambda,
108                real       *dvdlambda);
109 /* Call the neighborsearcher */
110
111 extern void force(FILE *log,  
112                   int          step,
113                   t_forcerec   *fr,
114                   t_inputrec   *ir,
115                   t_idef       *idef,
116                   t_nsborder   *nsb,
117                   t_commrec    *cr,
118                   t_nrnb       *nrnb,
119                   t_groups     *grps,
120                   t_mdatoms    *md,
121                   int          ngener,
122                   t_grpopts    *opts,
123                   rvec x[],
124                   rvec f[],    
125                   real epot[], bool bVerbose,
126                   matrix       box,
127                   real         lambda,
128                   t_graph      *graph,
129                   t_block      *excl,
130                   bool         bNBonly,
131                   matrix       lr_vir,
132                   rvec         mu_tot,
133                   real         qsum,
134                   bool         bGatherOnly);
135 /* Call all the force routines */
136
137 /* Routine from fnbf.m4 */
138 extern void do_fnbf(FILE *log,t_commrec *cr,t_forcerec *fr,
139                     rvec x[],rvec f[],t_mdatoms *md,
140                     real egnb[],real egcoul[],rvec box_size,
141                     t_nrnb *nrnb,real lambda,real *dvdlambda,
142                     bool bLR,int eNL);
143
144 #endif  /* _force_h */