| 1 |
CHARMM Element source/fcm/apbs.fcm |
| 2 |
##IF APBS (apbs_fcm) |
| 3 |
c |
| 4 |
c |
| 5 |
|
| 6 |
|
| 7 |
c----------------------------------------------------------------------- |
| 8 |
c |
| 9 |
c iAPBS variables definition |
| 10 |
c |
| 11 |
c Similar type of varibles are bunched together (integer/integer and |
| 12 |
c real/real) to mimize fortran/C passing incompatability. |
| 13 |
c |
| 14 |
c For detailed description of individual variables please see |
| 15 |
c APBS Programmer's Guide. |
| 16 |
c |
| 17 |
c----------------------------------------------------------------------- |
| 18 |
|
| 19 |
integer*4 MAXION, NATOMS |
| 20 |
parameter (MAXION = 2, NATOMS = MAXAIM) |
| 21 |
|
| 22 |
c----------------------------------------------------------------------- |
| 23 |
c int ispara; /**< 1 => is a parallel calculation, |
| 24 |
c * 0 => is not */ |
| 25 |
! integer ispara |
| 26 |
|
| 27 |
!----------------------------------------------------------------------- |
| 28 |
! i_param members |
| 29 |
! |
| 30 |
! 1 int type; : What type of MG calculation? |
| 31 |
! 0: sequential manual |
| 32 |
! 1: sequential auto-focus |
| 33 |
! 2: parallel auto-focus |
| 34 |
! 2 int nlev; : Levels in multigrid hierarchy |
| 35 |
! 3 int cmeth; : Centering method: |
| 36 |
! 0: center on point, |
| 37 |
! 1: center on molecule |
| 38 |
! 4 int ccmeth; : Coarse grid centering method: 0 => center |
| 39 |
! on point, 1 => center on molecule |
| 40 |
! 5 int fcmeth; : Fine grid centering method: 0 => center on |
| 41 |
! point, 1 => center on molecule |
| 42 |
! 6 int chgm Types of charge discretization methods |
| 43 |
! 0: Trilinear interpolation of charge to |
| 44 |
! 8 nearest grid points. The traditional method; |
| 45 |
! not particularly good to use with PBE forces. |
| 46 |
! 1: Cubic B-spline across nearest- and |
| 47 |
! next-nearest-neighbors. Mainly for use in |
| 48 |
! grid-sensitive applications |
| 49 |
! (such as force calculations). |
| 50 |
! |
| 51 |
! 7 int nonlin; : 0 => LPBE, 1 => NPBE, 2: LRPBE, |
| 52 |
! 3: NRPBE, 4: SMPBE |
| 53 |
! 8 int bcfl; : Boundary condition: 0 => zero, 1 => single |
| 54 |
! Debye-Huckel sphere, 2 => multiple Debye- |
| 55 |
! Huckel spheres, 4 => focusing |
| 56 |
! 9 int srfm; : Surface calculation method |
| 57 |
! 0: Mol surface for epsilon; inflated VdW |
| 58 |
! for kappa; no smoothing |
| 59 |
! 1: As 0 with harmoic average |
| 60 |
! smoothing |
| 61 |
! 2: Cubic spline |
| 62 |
!10 int calcenergy; : Energy calculation |
| 63 |
! 0: don't calculate out energy |
| 64 |
! 1: calculate total energy |
| 65 |
! 2: calculate total energy and all energy |
| 66 |
! components |
| 67 |
!11 int calcforce; : Atomic forces I/O |
| 68 |
! 0: don't calculate forces |
| 69 |
! 1: calculate net forces on molecule |
| 70 |
! 2: calculate atom-level forces |
| 71 |
|
| 72 |
!12 int wpot : write potential map |
| 73 |
!13 int wchg |
| 74 |
!14 int wsmol |
| 75 |
!15 wkappa |
| 76 |
!16 wdiel |
| 77 |
!17 dummy |
| 78 |
!18 dummy |
| 79 |
!19 dummy |
| 80 |
!20 dummy |
| 81 |
!21 calcnpenergy |
| 82 |
!22 int nion; : Number of counterion species |
| 83 |
!23 int rchg; : read charge map |
| 84 |
!24 int rkappa : read kappa map |
| 85 |
!25 int rdiel : read diel maps (x, y and z) |
| 86 |
|
| 87 |
integer*4 i_param(25) |
| 88 |
c----------------------------------------------------------------------- |
| 89 |
c r_pbeparm members |
| 90 |
c |
| 91 |
c 1 double pdie; /**< Solute dielectric */ |
| 92 |
c 2 double sdie; /**< Solvent dielectric */ |
| 93 |
c 3 double srad; /**< Solvent radius */ |
| 94 |
c 4 double swin; /**< Cubic spline window */ |
| 95 |
c 5 double temp; /**< Temperature (in K) */ |
| 96 |
c 6 double gamma; /**< Surface tension for apolar energies/forces |
| 97 |
c * (in kJ/mol/A^2) */ |
| 98 |
c 7 double sdens; /**< Vacc sphere density */ |
| 99 |
c |
| 100 |
|
| 101 |
c----------------------------------------------------------------------- |
| 102 |
c r_param memebers |
| 103 |
c 1 double pdie; : Solute dielectric |
| 104 |
c 2 double sdie; : Solvent dielectric |
| 105 |
c 3 double srad; : Solvent radius |
| 106 |
c 4 double swin; : Cubic spline window |
| 107 |
c 5 double temp; : Temperature (in K) |
| 108 |
c 6 double sdens; : Vacc sphere density |
| 109 |
c 7 double gamma; : Surface tension for apolar energies/forces |
| 110 |
c (in kJ/mol/A^2) |
| 111 |
c 8 double smvolume |
| 112 |
c 9 double smsize |
| 113 |
c |
| 114 |
|
| 115 |
double precision r_param(9) |
| 116 |
|
| 117 |
c----------------------------------------------------------------------- |
| 118 |
c set_pbeparm members |
| 119 |
c |
| 120 |
c 1 cpbeparm->setnonlin = 1; |
| 121 |
c 2 cpbeparm->setbcfl = 1; |
| 122 |
c 3 cpbeparm->setnion = 1; |
| 123 |
c 4 cpbeparm->setpdie = 1; |
| 124 |
c 5 cpbeparm->setsdie = 1; |
| 125 |
c 6 cpbeparm->setsrfm = 1; |
| 126 |
c 7 cpbeparm->setsrad = 1; |
| 127 |
c 8 cpbeparm->setswin = 1; |
| 128 |
c 9 cpbeparm->settemp = 1; |
| 129 |
c 10 cpbeparm->setgamma = 1; |
| 130 |
c 11 cpbeparm->setcalcenergy = 1; |
| 131 |
c 12 cpbeparm->setcalcforce = 0; |
| 132 |
c 13 cpbeparm->setsdens = 1; |
| 133 |
c |
| 134 |
|
| 135 |
! integer set_pbeparm(13) |
| 136 |
|
| 137 |
c----------------------------------------------------------------------- |
| 138 |
c i_mgparm members |
| 139 |
c |
| 140 |
c 1 int type; /**< What type of MG calculation? |
| 141 |
c * \li 0: sequential manual |
| 142 |
c * \li 1: sequential auto-focus |
| 143 |
c * \li 2: parallel auto-focus */ |
| 144 |
c 2 int nlev; /**< Levels in multigrid hierarchy |
| 145 |
c 3 int cmeth; /**< Centering method: |
| 146 |
c * \li 0: center on point, |
| 147 |
c * \li 1: center on molecule */ |
| 148 |
c 4 int ccmeth; /**< Coarse grid centering method: 0 => center |
| 149 |
c * on point, 1 => center on molecule */ |
| 150 |
c 5 int fcmeth; /**< Fine grid centering method: 0 => center on |
| 151 |
c * point, 1 => center on molecule */ |
| 152 |
c 6 int chgm /** Types of charge discretization methods |
| 153 |
c * \li 0: Trilinear interpolation of charge to |
| 154 |
c * 8 nearest grid points. The traditional method; |
| 155 |
c * not particularly good to use with PBE forces. |
| 156 |
c * \li 1: Cubic B-spline across nearest- and |
| 157 |
c * next-nearest-neighbors. Mainly for use in |
| 158 |
c * grid-sensitive applications |
| 159 |
c * (such as force calculations). |
| 160 |
c |
| 161 |
! integer i_mgparm(6) |
| 162 |
|
| 163 |
c----------------------------------------------------------------------- |
| 164 |
c set_mgparm members |
| 165 |
c |
| 166 |
c 1 cmgparm->setdime = 1; |
| 167 |
c 2 cmgparm->setgcent = 1; |
| 168 |
c 3 cmgparm->setcgcent = 1; |
| 169 |
c 4 cmgparm->setfgcent = 1; |
| 170 |
c |
| 171 |
c /* not using grid */ |
| 172 |
c 5 cmgparm->setcglen = 1; |
| 173 |
c 6 cmgparm->setfglen = 1; |
| 174 |
c 7 cmgparm->setglen = 1; |
| 175 |
c 8 cmgparm->setgrid = 0; |
| 176 |
c 9 cmgparm->setchgm = ; |
| 177 |
c |
| 178 |
! integer set_mgparm(9) |
| 179 |
|
| 180 |
c----------------------------------------------------------------------- |
| 181 |
c int dime[3]; /**< Grid dimensions */ |
| 182 |
c int pdime[3]; /**< Grid of processors to be used in |
| 183 |
c * calculation */ |
| 184 |
c |
| 185 |
integer*4 dime(3), pdime(3) |
| 186 |
|
| 187 |
c----------------------------------------------------------------------- |
| 188 |
c double grid[3]; /**< Grid spacings */ |
| 189 |
c double glen[3]; /**< Grid side lengths. */ |
| 190 |
c double center[3]; /**< Grid center. If ispart = 0, then this is |
| 191 |
c * only meaningful if cmeth = 0. However, if |
| 192 |
c * ispart = 1 and cmeth = 0, then this is the |
| 193 |
c * center of the non-disjoint (overlapping) |
| 194 |
c * partition. If ispart = 1 and cmeth = 1, then |
| 195 |
c * this is the vector that must be added to the |
| 196 |
c * center of the molecule to give the center of |
| 197 |
c * the non-disjoint partition. */c |
| 198 |
c double cglen[3]; /**< Coarse grid side lengths */ |
| 199 |
c double fglen[3]; /**< Fine grid side lengths */ |
| 200 |
c double ccenter[3]; /**< Coarse grid center. */ |
| 201 |
c double fcenter[3]; /**< Fine grid center. */ |
| 202 |
c double ofrac; /**< Overlap fraction between procs */ |
| 203 |
c |
| 204 |
double precision grid(3), glen(3), center(3), cglen(3), fglen(3) |
| 205 |
double precision ccenter(3), fcenter(3), ofrac |
| 206 |
|
| 207 |
c----------------------------------------------------------------------- |
| 208 |
c mobile ion definition |
| 209 |
c |
| 210 |
c double ionq[MAXION]; /**< Counterion charges (in e) */ |
| 211 |
c double ionc[MAXION]; /**< Counterion concentrations (in M) */ |
| 212 |
c double ionr[MAXION]; /**< Counterion radii (in A) */ |
| 213 |
c |
| 214 |
double precision ionq(MAXION), ionc(MAXION), ionrr(MAXION) |
| 215 |
|
| 216 |
c----------------------------------------------------------------------- |
| 217 |
c atom |
| 218 |
c double position[3]; /**< Atomic position */ |
| 219 |
c double radius; /**< Atomic radius */ |
| 220 |
c double charge; /**< Atomic charge */ |
| 221 |
c these are defined inside of CHARMM |
| 222 |
|
| 223 |
c----------------------------------------------------------------------- |
| 224 |
c radii from wmain get saved in a_radius |
| 225 |
double precision a_radius(NATOMS) |
| 226 |
|
| 227 |
c----------------------------------------------------------------------- |
| 228 |
c solvation energy and forces saved for use later |
| 229 |
double precision senelec, sennp |
| 230 |
double precision solvfrcx(NATOMS), solvfrcy(NATOMS) |
| 231 |
double precision solvfrcz(NATOMS) |
| 232 |
|
| 233 |
c----------------------------------------------------------------------- |
| 234 |
c some integer variables |
| 235 |
c |
| 236 |
c napbs - how often we calculate APBS forces during MD/minimization |
| 237 |
c umeth - forces update method |
| 238 |
c a_debug - debug/verbosity value [0-5] |
| 239 |
c |
| 240 |
integer*4 napbs, umeth, apbs_debug |
| 241 |
|
| 242 |
c----------------------------------------------------------------------- |
| 243 |
c logical variables |
| 244 |
c |
| 245 |
c qapbs: were all parameters parsed? |
| 246 |
c qfapbs: do we want to calculate solvation forces? |
| 247 |
c qaparsed: did we parse all user options? |
| 248 |
c dime_updates: update grid dimensions on the fly |
| 249 |
logical qapbs, qfapbs, qaparsed, qdime_updates |
| 250 |
|
| 251 |
c----------------------------------------------------------------------- |
| 252 |
c |
| 253 |
c commons |
| 254 |
c |
| 255 |
c----------------------------------------------------------------------- |
| 256 |
|
| 257 |
c----------------------------------------------------------------------- |
| 258 |
c integer common |
| 259 |
common / apbs1 / i_param, |
| 260 |
+ dime, pdime, napbs, umeth, apbs_debug |
| 261 |
|
| 262 |
c----------------------------------------------------------------------- |
| 263 |
c double precision common |
| 264 |
common / apbs2 / r_param, ionq, ionc, ionrr, |
| 265 |
+ grid, glen, center, cglen, fglen, |
| 266 |
+ ccenter, fcenter, ofrac, a_radius, |
| 267 |
+ senelec, sennp, solvfrcx, solvfrcy, solvfrcz |
| 268 |
|
| 269 |
c----------------------------------------------------------------------- |
| 270 |
c logical common |
| 271 |
common / apbs3 / qapbs, qfapbs, qaparsed, qdime_updates |
| 272 |
|
| 273 |
|
| 274 |
##IF SAVEFCM (save) |
| 275 |
SAVE / APBS1 / |
| 276 |
SAVE / APBS2 / |
| 277 |
SAVE / APBS3 / |
| 278 |
##ENDIF (save) |
| 279 |
##ENDIF (apbs_fcm) |
| 280 |
|