def __init__(self, gd, finegd, pd2, pd3, nspins, setups, timer, xc, world, vext=None, psolver=None, redistributor=None, realpbc_c=None): assert gd.comm.size == 1 assert finegd.comm.size == 1 assert redistributor is not None # XXX should not be like this Hamiltonian.__init__(self, gd, finegd, nspins, setups, timer, xc, world, vext=vext, redistributor=redistributor) self.vbar = PWLFC([[setup.vbar] for setup in setups], pd2) self.pd2 = pd2 self.pd3 = pd3 self.vHt_q = pd3.empty() if psolver is None: psolver = ReciprocalSpacePoissonSolver(pd3, realpbc_c) elif isinstance(psolver, dict): direction = psolver['dipolelayer'] assert len(psolver) == 1 from gpaw.dipole_correction import DipoleCorrection psolver = DipoleCorrection( ReciprocalSpacePoissonSolver(pd3, realpbc_c), direction) self.poisson = psolver self.npoisson = 0
def __init__(self, gd, finegd, pd2, pd3, nspins, setups, timer, xc, vext=None, collinear=True, world=None): Hamiltonian.__init__(self, gd, finegd, nspins, setups, timer, xc, vext, collinear, world) self.vbar = PWLFC([[setup.vbar] for setup in setups], pd2) self.pd2 = pd2 self.pd3 = pd3 class PS: def initialize(self): pass def get_stencil(self): return '????' def estimate_memory(self, mem): pass self.poisson = PS() self.npoisson = 0
def __init__(self, gd, finegd, pd2, pd3, nspins, setups, timer, xc, world, kptband_comm, vext=None, collinear=True): Hamiltonian.__init__(self, gd, finegd, nspins, setups, timer, xc, world, kptband_comm, vext, collinear) self.vbar = PWLFC([[setup.vbar] for setup in setups], pd2) self.pd2 = pd2 self.pd3 = pd3 class PS: def initialize(self): pass def get_stencil(self): return '????' def estimate_memory(self, mem): pass self.poisson = PS() self.npoisson = 0