Ejemplo n.º 1
0
def hybrid_2c_coeff(ni, xc_code, spin=0):
    ''' Wrapper to the xc_code hybrid coefficient parser to return the exchange and correlation components of the hybrid coefficent separately '''

    # For all prebuilt and exchange-only functionals, hyb_c = 0
    if not re.search(',', xc_code):
        return [_NumInt.hybrid_coeff(ni, xc_code, spin=0), 0]

    # All factors of 'HF' are summed by default. Therefore just run the same code for the exchange and correlation parts of the string separately
    x_code, c_code = xc_code.split(',')
    c_code = ',' + c_code
    hyb_x = _NumInt.hybrid_coeff(ni, x_code, spin=0) if len(x_code) else 0
    hyb_c = _NumInt.hybrid_coeff(ni, c_code, spin=0) if len(c_code) else 0
    return [hyb_x, hyb_c]
Ejemplo n.º 2
0
def ft_hybrid_coeff(ni, xc_code, spin=0):
    return _NumInt.hybrid_coeff(ni, xc_code[2:], spin=0)