Skip to content

fix: constant_terms.py qao=3 issue#214

Merged
rugwed-lokhande merged 1 commit into
mainfrom
213-bug-bug-in-constant_termspy-related-to-qao3
Jun 7, 2026
Merged

fix: constant_terms.py qao=3 issue#214
rugwed-lokhande merged 1 commit into
mainfrom
213-bug-bug-in-constant_termspy-related-to-qao3

Conversation

@rugwed-lokhande

Copy link
Copy Markdown
Contributor

This PR fixes the third-order QAO3 active-energy constant-term generation in gen_constant_terms.

Previously, the d3_g_e_wfnparams2 contribution for order == 3 was contracted with the second-order and first-order wavefunction responses, corresponding to G_Epp * p2 * p1 * E1. This was incorrect. The third-order FANPT expression requires this term to be contracted with two first-order wavefunction responses, corresponding to G_Epp * p1 * p1 * E1.

The fix replaces the incorrect previous_responses[1][:-1] response vector with previous_responses[0][:-1] in the d3_g_e_wfnparams2 contraction.

@rugwed-lokhande rugwed-lokhande requested a review from kzsigmond June 7, 2026 18:55
@rugwed-lokhande rugwed-lokhande linked an issue Jun 7, 2026 that may be closed by this pull request

@kzsigmond kzsigmond left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easiest review of all time! Thanks @rugwed-lokhande

@rugwed-lokhande rugwed-lokhande merged commit bd895df into main Jun 7, 2026
3 checks passed
@rugwed-lokhande rugwed-lokhande deleted the 213-bug-bug-in-constant_termspy-related-to-qao3 branch June 7, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: bug in constant_terms.py related to qao=3

2 participants