908f64b348832b26604bc55679474960842a0895
[alexxy/gromacs.git] / include / gpp_atomtype.h
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  *                        VERSION 3.2.0
10  * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
11  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
12  * Copyright (c) 2001-2004, The GROMACS development team,
13  * check out http://www.gromacs.org for more information.
14
15  * This program is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU General Public License
17  * as published by the Free Software Foundation; either version 2
18  * of the License, or (at your option) any later version.
19  * 
20  * If you want to redistribute modifications, please consider that
21  * scientific software is very special. Version control is crucial -
22  * bugs must be traceable. We will be happy to consider code for
23  * inclusion in the official distribution, but derived work must not
24  * be called official GROMACS. Details are found in the README & COPYING
25  * files - if they are missing, get the official version at www.gromacs.org.
26  * 
27  * To help us fund GROMACS development, we humbly ask that you cite
28  * the papers on the package - you can find them in the top README file.
29  * 
30  * For more info, check our website at http://www.gromacs.org
31  * 
32  * And Hey:
33  * Gromacs Runs On Most of All Computer Systems
34  */
35
36 #ifndef _gpp_atomtype_h
37 #define _gpp_atomtype_h
38
39 #include <stdio.h>
40 #include "visibility.h"
41 #include "typedefs.h"
42 #include "macros.h"
43 #include "grompp.h"
44
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48
49 typedef struct gpp_atomtype *gpp_atomtype_t;
50
51 GMX_LIBGMXPREPROCESS_EXPORT
52 int get_atomtype_type(const char *str,gpp_atomtype_t at);
53 /* Return atomtype corresponding to case-insensitive str
54    or NOTSET if not found */
55
56 GMX_LIBGMXPREPROCESS_EXPORT
57 int get_atomtype_ntypes(gpp_atomtype_t at);
58 /* Return number of atomtypes */
59
60 GMX_LIBGMXPREPROCESS_EXPORT
61 char *get_atomtype_name(int nt,gpp_atomtype_t at);
62 /* Return name corresponding to atomtype nt, or NULL if not found */
63
64 real get_atomtype_massA(int nt,gpp_atomtype_t at);
65 real get_atomtype_massB(int nt,gpp_atomtype_t at);
66 real get_atomtype_qA(int nt,gpp_atomtype_t at);
67 real get_atomtype_qB(int nt,gpp_atomtype_t at);
68 GMX_LIBGMXPREPROCESS_EXPORT
69 real get_atomtype_radius(int nt,gpp_atomtype_t at);
70 GMX_LIBGMXPREPROCESS_EXPORT
71 real get_atomtype_vol(int nt,gpp_atomtype_t at);
72 GMX_LIBGMXPREPROCESS_EXPORT
73 real get_atomtype_surftens(int nt,gpp_atomtype_t at);
74 GMX_LIBGMXPREPROCESS_EXPORT
75 real get_atomtype_gb_radius(int nt,gpp_atomtype_t at);
76 GMX_LIBGMXPREPROCESS_EXPORT
77 real get_atomtype_S_hct(int nt,gpp_atomtype_t at);
78 int get_atomtype_ptype(int nt,gpp_atomtype_t at);
79 int get_atomtype_batype(int nt,gpp_atomtype_t at);
80 GMX_LIBGMXPREPROCESS_EXPORT
81 int get_atomtype_atomnumber(int nt,gpp_atomtype_t at);
82
83 /* Return the above variable for atomtype nt, or NOTSET if not found */
84
85 real get_atomtype_nbparam(int nt,int param,gpp_atomtype_t at);
86 /* Similar to the previous but returns the paramth parameter or NOTSET */
87
88 GMX_LIBGMXPREPROCESS_EXPORT
89 gpp_atomtype_t init_atomtype(void);
90 /* Return a new atomtype structure */
91
92 void done_atomtype(gpp_atomtype_t at);
93 /* Free the memory in the structure */
94
95 int set_atomtype(int nt,gpp_atomtype_t at,t_symtab *tab,
96                         t_atom *a,const char *name,t_param *nb,
97                         int bondatomtype,
98                         real radius,real vol,real surftens,int atomnumber,
99                         real gb_radius, real S_hct);
100 /* Set the values of an existing atom type nt. Returns nt on success or
101    NOTSET on error. */  
102
103 int
104 set_atomtype_gbparam(gpp_atomtype_t at, int i,
105                      real radius,real vol,real surftens,
106                      real gb_radius, real S_hct);
107
108 int add_atomtype(gpp_atomtype_t at,t_symtab *tab,
109                         t_atom *a,const char *name,t_param *nb,
110                         int bondatomtype,
111                         real radius,real vol,real surftens,real atomnumber,
112                         real gb_radius, real S_hct);
113 /* Add a complete new atom type to an existing atomtype structure. Returns
114    the number of the atom type. */
115
116 void print_at (FILE * out, gpp_atomtype_t at);
117 /* Print an atomtype record to a text file */
118
119 GMX_LIBGMXPREPROCESS_EXPORT
120 void renum_atype(t_params plist[],gmx_mtop_t *mtop,
121                         int *wall_atomtype,
122                         gpp_atomtype_t at,gmx_bool bVerbose);
123                         
124 GMX_LIBGMXPREPROCESS_EXPORT
125 void copy_atomtype_atomtypes(gpp_atomtype_t atype,t_atomtypes *atypes);
126 /* Copy from one structure to another */
127
128 #ifdef __cplusplus
129 }
130 #endif
131
132 #endif  /* _gpp_atomtype_h */
133
134
135
136
137
138
139
140