e9a7fb06c8fb8f5c354db0f6ffa95e435d405691
[alexxy/gromacs.git] / include / pme.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 2.0
11  * 
12  * Copyright (c) 1991-1999
13  * BIOSON Research Institute, Dept. of Biophysical Chemistry
14  * University of Groningen, The Netherlands
15  * 
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)
20  * 
21  * Also check out our WWW page:
22  * http://md.chem.rug.nl/~gmx
23  * or e-mail to:
24  * gromacs@chem.rug.nl
25  * 
26  * And Hey:
27  * Good ROcking Metal Altar for Chronical Sinners
28  */
29
30 #ifndef _pme_h
31 #define _pme_h
32
33 static char *SRCID_pme_h = "$Id$";
34
35 #ifdef HAVE_CONFIG_H
36 #include <config.h>
37 #endif
38
39 #include <stdio.h>
40 #include "typedefs.h"
41 #include "complex.h"
42 #include "fftgrid.h"
43
44 typedef real *splinevec[DIM];
45
46 extern real do_pme(FILE *log,       bool bVerbose,
47                    t_inputrec *ir,
48                    rvec x[],        rvec f[],
49                    real charge[],   matrix box,
50                    t_commrec *cr,
51                    t_nsborder *nsb, t_nrnb *nrnb,
52                    matrix lrvir,real ewaldcoeff,
53                    bool bGatherOnly);
54     
55 /* Do a PME calculation for the long range electrostatics. 
56  * If bGatherOnly is set, the energy from the last computation will be used, and 
57  * the forces will be interpolated at the new positions. No new solving is done then.
58  */
59
60 extern void sum_qgrid(t_commrec *cr,t_nsborder *nsb,t_fftgrid *grid,bool bForward);
61
62 extern void init_pme(FILE *log,t_commrec *cr,
63                      int nkx,int nky,int nkz,int pme_order,int homenr,
64                      bool bOptFFT);
65
66 /* Routine for spreading something on a grid. Can be misused for non-PME
67  * related things. init_pme must be called before this guy.
68  */
69 extern t_fftgrid *spread_on_grid(FILE *logfile,   int homenr,
70                                  int pme_order,   rvec x[],
71                                  real charge[],   matrix box,
72                                  bool bGatherOnly);
73
74 #endif