Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in SF TDA/TDDFT calculations where runs were failing due to a missing self.max_space attribute. The fix comments out the max_space parameter in the davidson solver calls, and enables previously skipped tests by installing the mcfun dependency in the CI pipeline.
Changes:
- Commented out
max_spaceparameter in uhf_sf.py and uks_sf.py to prevent AttributeError - Added mcfun installation to CI workflow to enable SF TDA/TDDFT tests
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pyscf/sftda/uks_sf.py | Comments out max_space parameter in davidson_nosym1 call to fix AttributeError |
| pyscf/sftda/uhf_sf.py | Comments out max_space parameter in davidson1 call to fix AttributeError |
| .github/workflows/run_ci.sh | Adds mcfun package installation to enable previously skipped SF TDA/TDDFT tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
There're 4 test fails in SF TDA grad which are close to ref value. And 1 more in SF TDDFT which deviates a lot but occurs randomly. I have no idea about them. |
|
Can @Haskiy or @hoshishin please help recover the failing tests? |
|
I tested multiple pyscf version (see actions here. For the SF TDDFT BP86/TPSS energy test, it actually fails randomly with any pyscf versions from 2.5 to 2.9. But it may have a higher possibility to survive in 2.5 which misleads people. |
|
And the 4 SF TDA grad tests start failing from pyscf 2.7. They don't deviate much so I guess we can simply updates the ref value. |
|
I understand what you mean. When I wrote the unit tests initially, I kept six decimal places unchanged. This might be due to two reasons: first, the PySCF 2.5.0 version I was using at the time was related to this, and the tests passed; second, there was a bug in the code with the subspace size (i.e., the max_space parameter) when solving the spin flip TDA equations. |
|
Hi, I have opened a new PR #178 which incorporates this fix as part of a comprehensive refactor of the SF-TDDFT module. The new PR also resolves the max_space compatibility issue, adds ROKS support, and cleans up the codebase. |
Currently any run of SF TDA/TDDFT fails because there's no
self.max_space. For a quick fix I comment it since it's not used. Can be added back if someone want to use it.Also, almost all tests for SF TDA/TDDFT are skipped because no mcfun installed. Now they are enabled.
Also fix the occri tests fail due to recent pyscf changes.