Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft of CCLR for computing polarizability #70

Merged
merged 44 commits into from
May 3, 2024

Conversation

jattakumi
Copy link
Contributor

@jattakumi jattakumi commented Feb 23, 2024

Description

This PR implements the "asymmetric" CCLR function to compute polarizability within PyCC.

Todos

Notable points that this PR has either accomplished or will accomplish.

  • Constructed the "asymmetric" linear response function within 'ccresponse.py' including the first-order lambda amplitudes.
  • A test case (test_036_lr.py) was used to compute the polarizability of H20/aug-cc-pvdz.

Status

  • Ready to go

@lothian lothian self-requested a review February 26, 2024 02:39
pycc/ccresponse.py Outdated Show resolved Hide resolved
pycc/ccresponse.py Outdated Show resolved Hide resolved
pycc/ccresponse.py Outdated Show resolved Hide resolved
polar1 = 0
polar2 = 0
pertbar_A = self.pertbar[pertkey_a]
Avvoo = pertbar_A.Avvoo.swapaxes(0, 2).swapaxes(1, 3)
Copy link
Member

Choose a reason for hiding this comment

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

Why isn't this done within perbar()?


omega1 = 0.0656

# Creating dictionaries
Copy link
Member

Choose a reason for hiding this comment

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

I don't want the user interface to be so complicated to obtain the polarizability, but we can stick with this for now and make those changes on another PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay

@@ -391,14 +504,310 @@ def r_X2(self, pertbar, omega):

return r_X2

def in_Y1(self, pertbar, X1, X2):
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand the in_Y1()/r_Y1() and in_Y2()/r_Y2() combinations. Why can't we just have r_Y1() and r_Y2() in analogy to the corresponding right-hand perturbed wave function residuals?

Update: Wait, maybe I do. Are these the components of the r_Y1 and r_Y2 residuals that aren't dependent on Y1 and Y2 so you only want to compute them once?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

hbar = self.hbar
L = self.H.L

# Inhomogenous terms appearing in Y1 equations
Copy link
Member

Choose a reason for hiding this comment

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

I would move this up and elaborate so that it's clear to others right away what's going on in these functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have moved it up and elaborated on the solve left function.

@lothian lothian merged commit 53f3fb1 into CrawfordGroup:main May 3, 2024
2 checks passed
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.

5 participants