Index: overlap.py =================================================================== --- overlap.py (revision 5164) +++ overlap.py (working copy) @@ -58,7 +58,7 @@ from gpaw.utilities.blas import gemm from gpaw import extra_parameters -UL='U' +UL = 'L' # Generate the coefficients for the Fourier-Bessel transform C = [] @@ -389,6 +389,12 @@ yield a2, a1, -R_c, -offset +class OppositeDirection(PairFilter): + def iter(self): + for a1, a2, R_c, offset in self.pairs.iter(): + yield a2, a1, -R_c, -offset + + class FourierTransformer: def __init__(self, rcmax, ng): self.ng = ng @@ -690,7 +696,7 @@ expansions.append(ManySiteDictionaryWrapper(self.P_expansions, P_aqxMi)) arrays = [Theta_qxMM, T_qxMM, P_aqxMi] - calc.calculate(self.atompairs, expansions, arrays) + calc.calculate(OppositeDirection(self.atompairs), expansions, arrays) def evaluate(self, spos_ac, Theta_qMM, T_qMM, P_aqMi): calc = TwoCenterIntegralCalculator(self.ibzk_qc, derivative=False)