import warnings


def get_xc_functionals(name):
    """
    Get the XC functionals for a given functional name. This utility does
    not deal with defining hybrid functionals since those may or may not
    require ADMM, which is not supported by LibXC and so needs to be manually
    defined.

    Args:
        name: Name of the functional.
    """
    name = name.upper()
    if name == "PBE":
        return ["PBE"]
    if name in ("LDA", "PADE"):
        return ["PADE"]
    if name == "B3LYP":
        return ["B3LYP"]
    if name == "BLYP":
        return ["BLYP"]
    if name == "SCAN":
        return ["MGGA_X_SCAN", "MGGA_C_SCAN"]
    if name == "SCANL":
        return ["MGGA_X_SCANL", "MGGA_C_SCANL"]
    if name == "R2SCAN":
        return ["MGGA_X_R2SCAN", "MGGA_C_R2SCAN"]
    if name == "R2SCANL":
        return ["MGGA_X_R2SCANL", "MGGA_C_R2SCANL"]
    warnings.warn(f"Unknown XC functionals: {name}")
    return [name]