def __init__(self, name, hybrid=None, xc=None, gygi=False, alpha=None, skip_gamma=False, ecut=None, etotflag=False, acdf=False, coredensity=True, logfilename='-', bands=None, core_valence=True): """Mix standard functionals with exact exchange. bands: list or None List of bands to calculate energy for. Default is None meaning do all bands. """ self.alpha = alpha self.skip_gamma = skip_gamma self.gygi = gygi self.exx = 0.0 self.etotflag = etotflag self.ecut = ecut self.fd = logfilename self.write_timing_information = True self.bands = bands self.acdf = acdf # adiabatic-connection dissipation fluctuation for RPA correlation energy self.coredensity = coredensity self.core_valence = core_valence if self.acdf: self.exxacdf = 0.0 self.etotflag = True print('etotflag is True') HybridXCBase.__init__(self, name, hybrid, xc)
def __init__(self, name, hybrid=None, xc=None, alpha=None, gamma_point=1, method='standard', bandstructure=False, logfilename='-', bands=None, fcut=1e-10, molecule=False, qstride=1, world=None): """Mix standard functionals with exact exchange. name: str Name of functional: EXX, PBE0, HSE03, HSE06 hybrid: float Fraction of exact exchange. xc: str or XCFunctional object Standard DFT functional with scaled down exchange. method: str Use 'standard' standard formula and 'acdf for adiabatic-connection dissipation fluctuation formula. alpha: float XXX describe gamma_point: bool 0: Skip k2-k1=0 interactions. 1: Use the alpha method. 2: Integrate the gamma point. bandstructure: bool Calculate bandstructure instead of just the total energy. bands: list of int List of bands to calculate bandstructure for. Default is all bands. molecule: bool Decouple electrostatic interactions between periodically repeated images. fcut: float Threshold for empty band. """ self.alpha = alpha self.fcut = fcut self.gamma_point = gamma_point self.method = method self.bandstructure = bandstructure self.bands = bands self.fd = logfilename self.write_timing_information = True HybridXCBase.__init__(self, name, hybrid, xc) # EXX energies: self.exx = None # total self.evv = None # valence-valence (pseudo part) self.evvacdf = None # valence-valence (pseudo part) self.devv = None # valence-valence (PAW correction) self.evc = None # valence-core self.ecc = None # core-core self.exx_skn = None # bandstructure self.qlatest = None if world is None: world = mpi.world self.world = world self.molecule = molecule if isinstance(qstride, int): qstride = [qstride] * 3 self.qstride_c = np.asarray(qstride) self.timer = Timer()