added Verlet scheme and NxN non-bonded functionality
[gromacs.git] / include / genborn.h
blobf6e9961dda6a04070281c2a451c2e94985cd5851
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 "types/commrec.h"
41 #include "grompp.h"
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
47 /* Still parameters - make sure to edit in genborn_sse.c too if you change these! */
48 #define STILL_P1 0.073*0.1 /* length */
49 #define STILL_P2 0.921*0.1*CAL2JOULE /* energy*length */
50 #define STILL_P3 6.211*0.1*CAL2JOULE /* energy*length */
51 #define STILL_P4 15.236*0.1*CAL2JOULE
52 #define STILL_P5 1.254
54 #define STILL_P5INV (1.0/STILL_P5)
55 #define STILL_PIP5 (M_PI*STILL_P5)
58 /* Initialise GB stuff */
59 int init_gb(gmx_genborn_t **p_born,
60 const t_commrec *cr, t_forcerec *fr, const t_inputrec *ir,
61 const gmx_mtop_t *mtop, real rgbradii, int gb_algorithm);
64 /* Born radii calculations, both with and without SSE acceleration */
65 int calc_gb_rad(t_commrec *cr, t_forcerec *fr, t_inputrec *ir,gmx_localtop_t *top,
66 const t_atomtypes *atype, rvec x[], t_nblist *nl, gmx_genborn_t *born,t_mdatoms *md, t_nrnb *nrnb);
70 /* Bonded GB interactions */
71 real gb_bonds_tab(rvec x[], rvec f[], rvec fshift[], real *charge, real *p_gbtabscale,
72 real *invsqrta, real *dvda, real *GBtab, t_idef *idef, real epsilon_r,
73 real gb_epsilon_solvent, real facel, const t_pbc *pbc, const t_graph *graph);
77 void gb_pd_send(t_commrec *cr, real *send_data, int nr);
80 /* Functions for setting up the F_GB12,13,14 lists in grompp */
81 int
82 init_gb_plist(t_params *p_list);
84 int
85 convert_gb_params(gmx_ffparams_t *ffparams, t_functype ftype, t_params *gb_plist, t_ilist *il);
89 /* Functions for calculating adjustments due to ie chain rule terms */
90 void
91 calc_gb_forces(t_commrec *cr, t_mdatoms *md, gmx_genborn_t *born, gmx_localtop_t *top, const t_atomtypes *atype,
92 rvec x[], rvec f[], t_forcerec *fr,t_idef *idef,int gb_algorithm, int sa_algorithm, t_nrnb *nrnb, gmx_bool bRad,
93 const t_pbc *pbc, const t_graph *graph, gmx_enerdata_t *enerd);
96 int
97 make_gb_nblist(t_commrec *cr, int gb_algorithm, real gbcut,
98 rvec x[], matrix box,
99 t_forcerec *fr, t_idef *idef, t_graph *graph, gmx_genborn_t *born);
101 void
102 make_local_gb(const t_commrec *cr, gmx_genborn_t *born, int gb_algorithm);
104 #ifdef __cplusplus
106 #endif
108 #endif /* _genborn_h */