Repository navigation
Commit b7f89f4
committed
[feat.physics.sigma.D8+] the 90-second budget was a browser tab's patience wearing physics clothes
Ivan, reading a refusal: "75 atoms in def2-svp is 779 basis functions,
predicted ~202 s against a 90 s budget. Use a smaller basis, raise
max_seconds, or trim the ligand — 和现在这整个physics面板有什么意义呢"
The three options ARE the argument, and every one is bad:
· "use a smaller basis" offers STO-3G — the level this same codebase now
refuses to print HOMO/LUMO from, and which for a sigma-hole is not merely
inaccurate but structurally wrong (no d functions on Cl/Br/S,
non-relativistic all-electron I). The panel was recommending the theory
its own caveat system disowns.
· "raise max_seconds" means holding a synchronous HTTP request for minutes.
· "trim the ligand" means changing the molecule to fit the computer.
And 75 atoms is an ORDINARY LEAD COMPOUND. The panel refused exactly the
molecules it exists for, and the single decision it was justified by — is Cl→Br
worth a synthesis — needs def2-SVP precisely on halogenated compounds.
DIAGNOSIS: 202 s is not a long quantum chemistry calculation. It is a long
SYNCHRONOUS HTTP REQUEST. The budget was never a statement about physics; it
was a statement about how long a browser tab will wait, and it was enforcing
that on the science.
So: submit-and-poll. POST /jobs/surface/mep and /jobs/torsion/strain return a
job id immediately with a cost quote and a queue position. GET /jobs/<id>
polls. POST /jobs/<id>/cancel rides the per-cycle watchdog that already exists
rather than needing a second mechanism. One worker, deliberately — the GPU is
one device and two concurrent SCFs thrash it; a queue with a depth is honest
about that where unlimited threads would not be.
MEASURED WHILE BUILDING IT, and it changes what the prediction is FOR:
4-bromobenzonitrile, 13 atoms, def2-svp: predicted 7.4 s, elapsed 151 s+
imatinib-scale, nao 673: predicted 148 s (with the 3x
safety), 49 s without it
The model is wrong in BOTH directions — a 3x safety factor that over-predicts
and refuses large molecules, and a fit that under-predicts small ones by more
than an order of magnitude. (Load average was 91 from concurrent sessions, so
the 151 s is not a clean number; but the same molecule took ~100 s uncontended
earlier, so contention is not the whole story.)
A gate whose predictor is order-of-magnitude wrong is not a gate, it is a
lottery. With a queue it does not have to be one: the prediction becomes
ADVICE, and being wrong costs an inaccurate progress hint instead of a refused
calculation. That is the actual repair — not a better fit.
nao_for() computes the basis count without running anything, so the quote is
made from the only honest predictor. Atom count is not it: 120 atoms of C/H is
~360 basis functions and 120 atoms with six iodines is over 500, which is
exactly why MAX_QM_ATOMS = 120 failed to stop a 43-atom heme.
NEXT: the panel still calls the synchronous routes. Moving it onto the queue is
what makes the answer reach a chemist; until then this is a backend that can do
the work and a UI that still asks the wrong way.1 parent 387ab43 commit b7f89f4
2 files changed
Lines changed: 239 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 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 | + | |
96 | 124 | | |
97 | 125 | | |
98 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
| |||
77 | 85 | | |
78 | 86 | | |
79 | 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 | + | |
| 131 | + | |
| 132 | + | |
| 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 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
80 | 212 | | |
81 | 213 | | |
82 | 214 | | |
| |||
103 | 235 | | |
104 | 236 | | |
105 | 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 | + | |
| 262 | + | |
| 263 | + | |
106 | 264 | | |
107 | 265 | | |
108 | 266 | | |
109 | 267 | | |
110 | 268 | | |
111 | 269 | | |
112 | 270 | | |
113 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
114 | 278 | | |
115 | 279 | | |
116 | 280 | | |
| |||
123 | 287 | | |
124 | 288 | | |
125 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
126 | 335 | | |
127 | 336 | | |
128 | 337 | | |
| |||
194 | 403 | | |
195 | 404 | | |
196 | 405 | | |
| 406 | + | |
197 | 407 | | |
0 commit comments