Skip to content

Commit

Permalink
Refactors rpa.py
Browse files Browse the repository at this point in the history
  • Loading branch information
obackhouse committed Jul 12, 2023
1 parent 4808853 commit 2158bdc
Show file tree
Hide file tree
Showing 2 changed files with 628 additions and 643 deletions.
19 changes: 4 additions & 15 deletions momentGW/gw.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from pyscf.ao2mo import _ao2mo
from pyscf.lib import logger

from momentGW import rpa
from momentGW.rpa import RPA
from momentGW.base import BaseGW
from momentGW.fock import fock_loop

Expand Down Expand Up @@ -266,23 +266,12 @@ def build_se_moments(self, nmom_max, Lpq, Lia, **kwargs):
"""

if self.polarizability == "drpa":
return rpa.build_se_moments_drpa(
self,
nmom_max,
Lpq,
Lia,
**kwargs,
)
rpa = RPA(self, nmom_max, Lpq, Lia, **kwargs)
return rpa.kernel()

elif self.polarizability == "drpa-exact":
# Use exact dRPA
# FIXME for Lpq, Lia changes
return rpa.build_se_moments_drpa_exact(
self,
nmom_max,
Lpq,
**kwargs,
)
raise NotImplementedError # FIXME

def solve_dyson(self, se_moments_hole, se_moments_part, se_static, Lpq=None):
"""Solve the Dyson equation due to a self-energy resulting
Expand Down
Loading

0 comments on commit 2158bdc

Please sign in to comment.