Merge branch 'master' of git.gromacs.org:gromacs
[gromacs/rigid-bodies.git] / include / genborn.h
blobffff50ec216cbb5e297afaadbdffe98c81052db8
1 /*
2 *
3 * This source code is part of
4 *
5 * G R O M A C S
6 *
7 * GROningen MAchine for Chemical Simulations
8 *
9 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
10 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
11 * Copyright (c) 2001-2008, The GROMACS development team,
12 * check out http://www.gromacs.org for more information.
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * If you want to redistribute modifications, please consider that
20 * scientific software is very special. Version control is crucial -
21 * bugs must be traceable. We will be happy to consider code for
22 * inclusion in the official distribution, but derived work must not
23 * be called official GROMACS. Details are found in the README & COPYING
24 * files - if they are missing, get the official version at www.gromacs.org.
26 * To help us fund GROMACS development, we humbly ask that you cite
27 * the papers on the package - you can find them in the top README file.
29 * For more info, check our website at http://www.gromacs.org
31 * And Hey:
32 * Gallium Rubidium Oxygen Manganese Argon Carbon Silicon
36 #ifndef _genborn_h
37 #define _genborn_h
39 #include "typedefs.h"
40 #include "grompp.h"
42 #ifdef HAVE_CONFIG_H
43 #include <config.h>
44 #endif
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
50 /* Still parameters - make sure to edit in genborn_sse.c too if you change these! */
51 #define STILL_P1 0.073*0.1 /* length */
52 #define STILL_P2 0.921*0.1*CAL2JOULE /* energy*length */
53 #define STILL_P3 6.211*0.1*CAL2JOULE /* energy*length */
54 #define STILL_P4 15.236*0.1*CAL2JOULE
55 #define STILL_P5 1.254
57 #define STILL_P5INV (1.0/STILL_P5)
58 #define STILL_PIP5 (M_PI*STILL_P5)
61 /* Initialise GB stuff */
62 int init_gb(gmx_genborn_t **p_born,
63 const t_commrec *cr, t_forcerec *fr, const t_inputrec *ir,
64 const gmx_mtop_t *mtop, real rgbradii, int gb_algorithm);
67 /* Born radii calculations, both with and without SSE acceleration */
68 int calc_gb_rad(t_commrec *cr, t_forcerec *fr, t_inputrec *ir,gmx_localtop_t *top,
69 const t_atomtypes *atype, rvec x[], t_nblist *nl, gmx_genborn_t *born,t_mdatoms *md, t_nrnb *nrnb);
73 /* Bonded GB interactions */
74 real gb_bonds_tab(rvec x[], rvec f[], rvec fshift[], real *charge, real *p_gbtabscale,
75 real *invsqrta, real *dvda, real *GBtab, t_idef *idef, real epsilon_r,
76 real gb_epsilon_solvent, real facel, const t_pbc *pbc, const t_graph *graph);
80 void gb_pd_send(t_commrec *cr, real *send_data, int nr);
83 /* Functions for setting up the F_GB12,13,14 lists in grompp */
84 int
85 init_gb_plist(t_params *p_list);
87 int
88 convert_gb_params(gmx_ffparams_t *ffparams, t_functype ftype, t_params *gb_plist, t_ilist *il);
92 /* Functions for calculating adjustments due to ie chain rule terms */
93 real
94 calc_gb_forces(t_commrec *cr, t_mdatoms *md, gmx_genborn_t *born, gmx_localtop_t *top, const t_atomtypes *atype,
95 rvec x[], rvec f[], t_forcerec *fr,t_idef *idef,int gb_algorithm, t_nrnb *nrnb, bool bRad,
96 const t_pbc *pbc, const t_graph *graph);
99 int
100 make_gb_nblist(t_commrec *cr, int gb_algorithm, real gbcut,
101 rvec x[], matrix box,
102 t_forcerec *fr, t_idef *idef, t_graph *graph, gmx_genborn_t *born);
104 void
105 make_local_gb(const t_commrec *cr, gmx_genborn_t *born, int gb_algorithm);
107 #ifdef __cplusplus
109 #endif
111 #endif /* _genborn_h */