Commit 9c49503
committed
feat(deltaspin): opt-in subspace acceleration for LCAO spin-constrained DFT
- Add sc_acceleration_mode parameter: off/first_order/subspace
- Add sc_acceleration_rms_thr parameter to control activation threshold
- Restore full HSolverLCAO diagonalization as the default path for correctness
- Subspace/first-order methods are now opt-in and only activate once RMS
drops below the configured threshold
- Pass acceleration parameters through init_sc chain to SpinConstrain class
- Add comprehensive comments explaining i_step=-2 subspace build branch,
acceleration activation logic, and the three execution paths in cal_mw_from_lambda
- Fix critical bug where subspace diagonalization incorrectly replaced the
full solver, causing convergence failure1 parent 3706309 commit 9c49503
16 files changed
Lines changed: 1692 additions & 63 deletions
File tree
- source
- source_esolver
- source_io/module_parameter
- source_lcao
- module_deltaspin
- module_operator_lcao
- source_pw/module_pwdft
- tests/17_DS_DFTU/24_LCAO_DS_S2_Z
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| 445 | + | |
445 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
446 | 454 | | |
447 | 455 | | |
448 | 456 | | |
| |||
468 | 476 | | |
469 | 477 | | |
470 | 478 | | |
| 479 | + | |
471 | 480 | | |
472 | 481 | | |
473 | 482 | | |
| |||
508 | 517 | | |
509 | 518 | | |
510 | 519 | | |
| 520 | + | |
511 | 521 | | |
512 | 522 | | |
513 | 523 | | |
| |||
517 | 527 | | |
518 | 528 | | |
519 | 529 | | |
| 530 | + | |
520 | 531 | | |
521 | 532 | | |
522 | 533 | | |
523 | 534 | | |
524 | 535 | | |
525 | 536 | | |
| 537 | + | |
526 | 538 | | |
527 | 539 | | |
528 | 540 | | |
| |||
538 | 550 | | |
539 | 551 | | |
540 | 552 | | |
| 553 | + | |
541 | 554 | | |
542 | 555 | | |
543 | 556 | | |
| |||
549 | 562 | | |
550 | 563 | | |
551 | 564 | | |
| 565 | + | |
552 | 566 | | |
553 | 567 | | |
554 | 568 | | |
555 | 569 | | |
556 | 570 | | |
557 | 571 | | |
| 572 | + | |
558 | 573 | | |
559 | 574 | | |
560 | 575 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| 612 | + | |
| 613 | + | |
612 | 614 | | |
613 | 615 | | |
614 | 616 | | |
| |||
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 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 | + | |
295 | 330 | | |
296 | 331 | | |
297 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
0 commit comments