ADMPDispPmeForce
This is a convenient wrapper for dispersion PME calculations It wrapps all the environment parameters of multipolar PME calculation The so called "environment paramters" means parameters that do not need to be differentiable
Source code in dmff/admp/disp_pme.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
refresh_calculators()
refresh the energy and force calculator according to the current environment
Source code in dmff/admp/disp_pme.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
update_env(attr, val)
Update the environment of the calculator
Source code in dmff/admp/disp_pme.py
53 54 55 56 57 58 |
|
disp_pme_real(positions, box, pairs, c_list, mScales, kappa, pmax)
This function calculates the dispersion real space energy It expands the atomic parameters to pairwise parameters
Input
positions: Na * 3: positions box: 3 * 3: box, axes arranged in row pairs: Np * 3: interacting pair indices and topology distance c_list: Na * (pmax-4)/2: atomic dispersion coefficients mScales: (Nexcl,): permanent multipole-multipole interaction exclusion scalings: 1-2, 1-3 ... covalent_map: Na * Na: topological distances between atoms, if i, j are topologically distant, then covalent_map[i, j] == 0 kappa: float: kappa in A^-1 pmax: int array: maximal exponents (p) to compute, e.g., (6, 8, 10)
Output
ene: dispersion pme realspace energy
Source code in dmff/admp/disp_pme.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
|
disp_pme_real_kernel(ri, rj, ci, cj, box, box_inv, mscales, kappa, pmax)
The kernel to calculate the realspace dispersion energy
Inputs
ri: Np * 3: position i rj: Np * 3: position j ci: Np * (pmax-4)/2: dispersion coeffs of i, c6, c8, c10 etc cj: Np * (pmax-4)/2: dispersion coeffs of j, c6, c8, c10 etc kappa: float: kappa pmax: int: largest p in 1/r^p, assume starting from 6 with increment of 2
Output
energy: float: the dispersion pme energy
Source code in dmff/admp/disp_pme.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
|
disp_pme_self(c_list, kappa, pmax)
This function calculates the dispersion self energy
Inputs
c_list: Na * 3: dispersion susceptibilities C_6, C_8, C_10 kappa: float: kappa used in dispersion
Output
ene_self: float: the self energy
Source code in dmff/admp/disp_pme.py
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
|
energy_disp_pme(positions, box, pairs, c_list, mScales, kappa, K1, K2, K3, pmax, recip_fn6, recip_fn8, recip_fn10, lpme=True)
Top level wrapper for dispersion pme
Input
positions: Na * 3: positions box: 3 * 3: box, axes arranged in row pairs: Np * 3: interacting pair indices and topology distance c_list: Na * (pmax-4)/2: atomic dispersion coefficients mScales: (Nexcl,): permanent multipole-multipole interaction exclusion scalings: 1-2, 1-3 ... covalent_map: Na * Na: topological distances between atoms, if i, j are topologically distant, then covalent_map[i, j] == 0 disp_pme_recip_fn: function: the reciprocal calculator, see recip.py kappa: float: kappa in A^-1 K1, K2, K3: int: max K for reciprocal calculations pmax: int array: maximal exponents (p) to compute, e.g., (6, 8, 10) lpme: bool: whether do pme or not, useful when doing cluster calculations
Output
energy: total dispersion pme energy
Source code in dmff/admp/disp_pme.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|
g_p(x2, pmax)
Compute the g(x, p) function
Inputs
x: float: the input variable pmax: int: the maximal powers of dispersion, here we assume evenly spacing even powers starting from 6 e.g., (6,), (6, 8) or (6, 8, 10)
Outputs
g: (p-4)//2: g(x, p)
Source code in dmff/admp/disp_pme.py
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
|