-
Notifications
You must be signed in to change notification settings - Fork 4
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
Head and wings corrections for k-dTDA #58
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some comments, haven't reviewed in full yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs the moments functions to be reworked a bit to avoid interrupting original program flow and inheritance, and a few other minor changes
momentGW/pbc/tda.py
Outdated
""" | ||
kpts = self.kpts | ||
head = np.zeros((self.nkpts, self.nmom_max + 1), dtype=object) | ||
HW_const = np.sqrt(4.0 * np.pi) / np.linalg.norm(self.q_abs[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no caps in the variable name
…from_master # Conflicts: # momentGW/gw.py # momentGW/pbc/gw.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry that this took so long, the code is good and clean and it didn't really need much more reviewing. Is MPI working? and is test coverage good for your additions? Otherwise, LGTM, go ahead and merge after addressing my minor comments
if len(list(self.fsc)) > 3: | ||
raise ValueError( | ||
"Finite size corrections require as an input a combination of H, W and B " | ||
"for the different finite size corrections (H - Head, W - Wing, B - Body)") | ||
for i, letter in enumerate(list(self.fsc)): | ||
if letter not in ["H", "W", "B"]: | ||
raise ValueError( | ||
"Finite size corrections require as an input a combination of H, W and B " | ||
"for the different finite size corrections (H - Head, W - Wing, B - Body)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if len(list(self.fsc)) > 3: | |
raise ValueError( | |
"Finite size corrections require as an input a combination of H, W and B " | |
"for the different finite size corrections (H - Head, W - Wing, B - Body)") | |
for i, letter in enumerate(list(self.fsc)): | |
if letter not in ["H", "W", "B"]: | |
raise ValueError( | |
"Finite size corrections require as an input a combination of H, W and B " | |
"for the different finite size corrections (H - Head, W - Wing, B - Body)") | |
if any(char not in {"H", "W", "B"} for char in self.fsc): | |
raise ValueError( | |
"Finite size corrections require as an input a combination of H, W and B " | |
"for the different finite size corrections (H: Head, W: Wing, B: Body)") |
"""Get the finite size corrected uncompressed ``(1+ aux, MO, MO)`` | ||
integrals.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Get the finite size corrected uncompressed ``(1+ aux, MO, MO)`` | |
integrals.""" | |
""" | |
Get the finite size corrected uncompressed ``(1+ aux, MO, MO)`` integrals. | |
""" |
if ct.flags.f_contiguous: | ||
c = np.asfortranarray(ct.transpose(order_ct)) | ||
elif ct.flags.c_contiguous: | ||
c = np.ascontiguousarray(ct.transpose(order_ct)) | ||
else: | ||
c = ct.transpose(order_ct) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still not comfortable with this and don't think it's needed -- if there is need for contiguity it should be forced when needed and not here, is that ok?
Implementation of the head and wings corrections for k-dTDA.
Due to a large number of PRs between when this was started and now this PR, have moved all commits relating to the HW corrections from a previous branch to a new branch from master.