Debian Codegraph @

contrib/iapbs/modules/Amber/apbs_vars.f90

raw
1 !
2 #include "../include/dprec.fh"
3
4 MODULE apbs_vars
5 #ifdef APBS
6
7 use file_io_dat, only : MAX_FN_LEN
8 !-----------------------------------------------------------------------
9 !
10 ! iAPBS variables definition
11 !
12 ! Similar type of varibles are packed together (integer/integer and
13 ! real/real) to mimize fortran/C passing incompatabilities.
14 !
15 ! For detailed description of individual variables please see
16 ! the iAPBS Programmer's Guide.
17 !
18 !-----------------------------------------------------------------------
19 ! max number of counterions
20 INTEGER, PARAMETER :: MAXION = 10
21 ! static dimensions (for now) rokFIXME
22 ! INTEGER, PARAMETER :: APBSNATOMS = 3000000
23
24
25 !-----------------------------------------------------------------------
26 ! int ispara; : 1 => is a parallel calculation,
27 ! 0 => is not
28 INTEGER :: ispara
29
30 !-----------------------------------------------------------------------
31 ! r_param memebers
32 ! 1 double pdie; : Solute dielectric
33 ! 2 double sdie; : Solvent dielectric
34 ! 3 double srad; : Solvent radius
35 ! 4 double swin; : Cubic spline window
36 ! 5 double temp; : Temperature (in K)
37 ! 6 double sdens; : Vacc sphere density
38 ! 7 double gamma; : Surface tension for apolar energies/forces
39 ! (in kJ/mol/A^2)
40 ! 8 double smvolume
41 ! 9 double smsize
42 !
43 _REAL_ :: r_param(9)
44
45 !-----------------------------------------------------------------------
46 ! i_param members
47 !
48 ! 1 int type; : What type of MG calculation?
49 ! 0: sequential manual
50 ! 1: sequential auto-focus
51 ! 2: parallel auto-focus
52 ! 2 int nlev; : Levels in multigrid hierarchy
53 ! 3 int cmeth; : Centering method:
54 ! 0: center on point,
55 ! 1: center on molecule
56 ! 4 int ccmeth; : Coarse grid centering method: 0 => center
57 ! on point, 1 => center on molecule
58 ! 5 int fcmeth; : Fine grid centering method: 0 => center on
59 ! point, 1 => center on molecule
60 ! 6 int chgm Types of charge discretization methods
61 ! 0: Trilinear interpolation of charge to
62 ! 8 nearest grid points. The traditional method;
63 ! not particularly good to use with PBE forces.
64 ! 1: Cubic B-spline across nearest- and
65 ! next-nearest-neighbors. Mainly for use in
66 ! grid-sensitive applications
67 ! (such as force calculations).
68 !
69 ! 7 int nonlin; : 0 => LPBE, 1 => NPBE, 2: LRPBE,
70 ! 3: NRPBE, 4: SMPBE
71 ! 8 int bcfl; : Boundary condition: 0 => zero, 1 => single
72 ! Debye-Huckel sphere, 2 => multiple Debye-
73 ! Huckel spheres, 4 => focusing
74 ! 9 int srfm; : Surface calculation method
75 ! 0: Mol surface for epsilon; inflated VdW
76 ! for kappa; no smoothing
77 ! 1: As 0 with harmoic average
78 ! smoothing
79 ! 2: Cubic spline
80 !10 int calcenergy; : Energy calculation
81 ! 0: don't calculate out energy
82 ! 1: calculate total energy
83 ! 2: calculate total energy and all energy
84 ! components
85 !11 int calcforce; : Atomic forces I/O
86 ! 0: don't calculate forces
87 ! 1: calculate net forces on molecule
88 ! 2: calculate atom-level forces
89
90 !12 int wpot : write potential map
91 !13 int wchg : write charge map
92 !14 int wsmol : write smol map
93 !15 int wkappa : write kappa map
94 !16 int wdiel : write diel maps (x, y and z)
95 !17 int watompot : write atom potentials map
96 !18 int rpot : read pot map
97 !19 dummy
98 !20 calcnpforce
99 !21 calcnpenergy
100 !22 int nion; : Number of counterion species
101 !23 int rchg; : read charge map
102 !24 int rkappa : read kappa map
103 !25 int rdiel : read diel maps (x, y and z)
104
105
106 INTEGER :: i_param(25)
107
108 !-----------------------------------------------------------------------
109 ! int dime[3]; : Grid dimensions
110 ! int pdime[3]; : Grid of processors to be used in
111 ! calculation
112 !
113 INTEGER :: dime(3), pdime(3)
114
115 !-----------------------------------------------------------------------
116 ! double grid[3]; : Grid spacings
117 ! double glen[3]; : Grid side lengths.
118 ! double center[3]; : Grid center. If ispart = 0, then this is
119 ! only meaningful if cmeth = 0. However, if
120 ! ispart = 1 and cmeth = 0, then this is the
121 ! center of the non-disjoint (overlapping)
122 ! partition. If ispart = 1 and cmeth = 1, then
123 ! this is the vector that must be added to the
124 ! center of the molecule to give the center of
125 ! the non-disjoint partition.
126 ! double cglen[3]; : Coarse grid side lengths
127 ! double fglen[3]; : Fine grid side lengths
128 ! double ccenter[3]; : Coarse grid center.
129 ! double fcenter[3]; : Fine grid center.
130 ! double ofrac; : Overlap fraction between procs
131 !
132 _REAL_ :: grid(3), glen(3), center(3), cglen(3), fglen(3)
133 _REAL_ :: ccenter(3), fcenter(3), ofrac
134
135 !-----------------------------------------------------------------------
136 ! mobile ion definition
137 !
138 ! double ionq[MAXION]; : Counterion charges (in e)
139 ! double ionc[MAXION]; : Counterion concentrations (in M)
140 ! double ionr[MAXION]; : Counterion radii (in A)
141 !
142 _REAL_ :: ionq(MAXION), ionc(MAXION), ionrr(MAXION)
143
144 !-----------------------------------------------------------------------
145 ! internal PB radii and charges
146 ! _REAL_ :: pbradii(APBSNATOMS) ! PB radii
147 ! _REAL_ :: pbcg(APBSNATOMS) ! PB charges
148
149 _REAL_, ALLOCATABLE :: pbradii(:)
150 _REAL_, ALLOCATABLE :: pbcg(:)
151
152 !-----------------------------------------------------------------------
153 ! solvation energy and forces saved for use later
154 _REAL_ :: senelec, sennp
155 ! _REAL_ :: solvfrcx(APBSNATOMS)
156 ! _REAL_ :: solvfrcy(APBSNATOMS)
157 ! _REAL_ :: solvfrcz(APBSNATOMS)
158 _REAL_, ALLOCATABLE :: solvfrcx(:)
159 _REAL_, ALLOCATABLE :: solvfrcy(:)
160 _REAL_, ALLOCATABLE :: solvfrcz(:)
161
162 _REAL_ :: geom_upd_limit, evdw_upd_limit, saveevdw
163 ! _REAL_ :: savedx(APBSNATOMS)
164 ! _REAL_ :: savedy(APBSNATOMS)
165 ! _REAL_ :: savedz(APBSNATOMS)
166 _REAL_, ALLOCATABLE :: savedx(:)
167 _REAL_, ALLOCATABLE :: savedy(:)
168 _REAL_, ALLOCATABLE :: savedz(:)
169
170
171 !-----------------------------------------------------------------------
172 ! some integer variables
173 !
174 ! napbs - how often we calculate APBS forces during MD/minimization
175 ! umeth - forces update method
176 ! apbs_debug - debug/verbosity value [0-5]
177 ! apbs_print - debug/verbosity value [0-5]
178 ! radiopt - optimization of radii method (see the source for details)
179 !
180 INTEGER :: napbs, umeth, apbs_debug, apbs_print, radiopt
181
182 !-----------------------------------------------------------------------
183 ! logical variables
184 !
185 ! qapbs: were all parameters parsed?
186 ! qfapbs: do we want to calculate solvation forces?
187 ! qaparsed: did we parse all user options?
188 ! dime_updates: update grid dimensions on the fly
189 LOGICAL :: qapbs, qfapbs, qaparsed, dime_updates
190
191 !-----------------------------------------------------------------------
192 ! string variables
193 !
194 ! pqr: file name for an external pqr file (reading radii and charges)
195 !
196 CHARACTER(len=MAX_FN_LEN) pqr
197
198
199 !-----------------------------------------------------------------------
200 !
201 ! commons
202 !
203 !-----------------------------------------------------------------------
204 !
205 ! disable COMMONs, we are using modules
206 !
207 !-----------------------------------------------------------------------
208 ! integer common
209 ! COMMON / apbs_int / ispara, i_pbeparm, set_pbeparm, i_mgparm, &
210 ! dime, pdime, set_mgparm, napbs, umeth, apbs_debug
211
212 !-----------------------------------------------------------------------
213 ! double precision common
214 ! COMMON / apbs_real / r_pbeparm, ionq, ionc, ionrr, &
215 ! grid, glen, center, cglen, fglen, &
216 ! ccenter, fcenter, ofrac, pbcg, pbradii, &
217 ! senelec, sennp, solvfrcx, solvfrcy, solvfrcz
218
219 !-----------------------------------------------------------------------
220 ! logical common
221 ! COMMON / apbs_logical/ qapbs, qfapbs, qaparsed
222 !
223 !
224 ! SAVE / apbs_int /
225 ! SAVE / apbs_real /
226 ! SAVE / apbs_logical /
227
228 #endif /* APBS */
229 END MODULE apbs_vars