Index: mixer.py =================================================================== --- mixer.py (revisiĆ³n: 11127) +++ mixer.py (copia de trabajo) @@ -199,17 +199,17 @@ class ExperimentalDotProd: def __init__(self, calc): - self.calc = calc + self.density = calc.density + self.setups = calc.wfs.setups def __call__(self, R1_G, R2_G, dD1_ap, dD2_ap): prod = np.vdot(R1_G, R2_G).real - setups = self.calc.wfs.setups # okay, this is a bit nasty because it depends on dD1_ap # and its friend having come from D_asp.values() and the dictionaries # not having been modified. This is probably true... for now. - avalues = self.calc.density.D_asp.keys() + avalues = self.density.D_asp.keys() for a, dD1_p, dD2_p in zip(avalues, dD1_ap, dD2_ap): - I4_pp = setups[a].four_phi_integrals() + I4_pp = self.setups[a].four_phi_integrals() dD4_pp = np.outer(dD1_p, dD2_p) # not sure if corresponds quite prod += (I4_pp * dD4_pp).sum() return prod