0b538d5fbb495899e437fb6ed974c076bcbc5cd8
[alexxy/gromacs.git] / include / pppm.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 _pppm_h
31 #define _pppm_h
32
33 static char *SRCID_pppm_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 extern void init_pppm(FILE *log,t_commrec *cr,t_nsborder *nsb,
45                       bool bVerbose,bool bOld,
46                       rvec box,char *ghatfn,t_inputrec *ir);
47 /* Setup stuff for PPPM. 
48  * Either reads a ghat function from file (when the file exists)
49  * or generate a ghat function from scratch.
50  */
51
52 extern real do_pppm(FILE *log,       bool bVerbose,
53                     rvec x[],        rvec f[],
54                     real charge[],   rvec box,
55                     real phi[],      t_commrec *cr,
56                     t_nsborder *nsb, t_nrnb *nrnb);
57 /* Do a PPPM calculation for the long range electrostatics. */
58  
59 extern real do_opt_pppm(FILE *log,       bool bVerbose,
60                         t_inputrec *ir,  int natoms,
61                         rvec x[],        rvec f[],
62                         real charge[],   rvec box,
63                         real phi[],      t_commrec *cr,
64                         t_nrnb *nrnb,    rvec beta,
65                         t_fftgrid *grid, bool bOld);
66 /* Do a PPPM setup (generate grid etc.) and a calculation as well 
67  * the grid should be initiated beforehand.
68  */
69
70 extern void calc_invh(rvec box,int nx,int ny,int nz,rvec invh);
71                     
72 extern void spread_q(FILE *log,bool bVerbose,
73                      int start,int nr,
74                      rvec x[],real charge[],rvec box,
75                      t_fftgrid *grid,t_nrnb *nrnb);
76  
77 #endif
78
79