def loadbasis(cmd: str, dtype: torch.dtype=_dtype, device: torch.device=_device, requires_grad: bool=False) -> List[CGTOBasis]:
    '\n    Load basis from a file and return the list of CGTOBasis.\n\n    Arguments\n    ---------\n    cmd: str\n        This can be a file path where the basis is stored or a\n        string in format ``"atomz:basis"``, e.g. ``"1:6-311++G**"``.\n    dtype: torch.dtype\n        Tensor data type for ``alphas`` and ``coeffs`` of the GTO basis\n    device: torch.device\n        Tensor device for ``alphas`` and ``coeffs``\n    requires_grad: bool\n        If ``True``, the ``alphas`` and ``coeffs`` tensors become differentiable\n\n    Returns\n    -------\n    list of CGTOBasis\n        List of GTO basis loaded from the given file\n    '
    res = []
    if (not os.path.exists(cmd)):
        file = _get_basis_file(cmd)
    else:
        file = cmd
    with open(file, 'r') as f:
        lines = f.read().split('\n')
    while True:
        line = lines.pop(0)
        if (line == ''):
            continue
        if line.startswith('!'):
            continue
        break
    while (len(lines) > 0):
        line = lines.pop(0)
        if line.startswith('**'):
            break
        desc = line.split()
        nlines = int(desc[1])
        if (nlines == 0):
            raise RuntimeError(('Zero line on basis %s' % file))
        alphas = []
        coeffsT = []
        for i in range(nlines):
            alphacoeff = [_read_float(f) for f in lines.pop(0).split()]
            alphas.append(alphacoeff[0])
            coeffsT.append(alphacoeff[1:])
        coeffs = list(zip(*coeffsT))
        ncoeffs = len(coeffs)
        angmoms = _expand_angmoms(desc[0], ncoeffs)
        alpha = torch.tensor(alphas, dtype=dtype, device=device, requires_grad=requires_grad)
        for i in range(ncoeffs):
            coeff = torch.tensor(coeffs[i], dtype=dtype, device=device, requires_grad=requires_grad)
            basis = CGTOBasis(angmom=angmoms[i], alphas=alpha, coeffs=coeff)
            basis.wfnormalize_()
            res.append(basis)
    return res
Load basis from a file and return the list of CGTOBasis.

Arguments
---------
cmd: str
    This can be a file path where the basis is stored or a
    string in format ``"atomz:basis"``, e.g. ``"1:6-311++G**"``.
dtype: torch.dtype
    Tensor data type for ``alphas`` and ``coeffs`` of the GTO basis
device: torch.device
    Tensor device for ``alphas`` and ``coeffs``
requires_grad: bool
    If ``True``, the ``alphas`` and ``coeffs`` tensors become differentiable

Returns
-------
list of CGTOBasis
    List of GTO basis loaded from the given file
def loadbasis(cmd: str, dtype: torch.dtype=_dtype, device: torch.device=_device, requires_grad: bool=False) -> List[CGTOBasis]:
    '\n    Load basis from a file and return the list of CGTOBasis.\n\n    Arguments\n    ---------\n    cmd: str\n        This can be a file path where the basis is stored or a\n        string in format ``"atomz:basis"``, e.g. ``"1:6-311++G**"``.\n    dtype: torch.dtype\n        Tensor data type for ``alphas`` and ``coeffs`` of the GTO basis\n    device: torch.device\n        Tensor device for ``alphas`` and ``coeffs``\n    requires_grad: bool\n        If ``True``, the ``alphas`` and ``coeffs`` tensors become differentiable\n\n    Returns\n    -------\n    list of CGTOBasis\n        List of GTO basis loaded from the given file\n    '
    res = []
    if (not os.path.exists(cmd)):
        file = _get_basis_file(cmd)
    else:
        file = cmd
    with open(file, 'r') as f:
        lines = f.read().split('\n')
    while True:
        line = lines.pop(0)
        if (line == ):
            continue
        if line.startswith('!'):
            continue
        break
    while (len(lines) > 0):
        line = lines.pop(0)
        if line.startswith('**'):
            break
        desc = line.split()
        nlines = int(desc[1])
        if (nlines == 0):
            raise RuntimeError(('Zero line on basis %s' % file))
        alphas = []
        coeffsT = []
        for i in range(nlines):
            alphacoeff = [_read_float(f) for f in lines.pop(0).split()]
            alphas.append(alphacoeff[0])
            coeffsT.append(alphacoeff[1:])
        coeffs = list(zip(*coeffsT))
        ncoeffs = len(coeffs)
        angmoms = _expand_angmoms(desc[0], ncoeffs)
        alpha = torch.tensor(alphas, dtype=dtype, device=device, requires_grad=requires_grad)
        for i in range(ncoeffs):
            coeff = torch.tensor(coeffs[i], dtype=dtype, device=device, requires_grad=requires_grad)
            basis = CGTOBasis(angmom=angmoms[i], alphas=alpha, coeffs=coeff)
            basis.wfnormalize_()
            res.append(basis)
    return res