1#!/usr/bin/env python
2# Copyright 2014-2020 The PySCF Developers. All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16# Author: Qiming Sun <osirpt.sun@gmail.com>
17
18'''
19Density fitting
20===============
21
22This module provides the fundamental functions to handle the 3-index tensors
23(including the 3-center 2-electron AO and MO integrals, the Cholesky
24decomposed integrals) required by the density fitting method or the RI
25(resolution of identity) approximation.
26
27Simple usage::
28
29    >>> from pyscf import gto, dft
30    >>> mol = gto.M(atom='N 0 0 0; N 0 0 1', basis='ccpvdz')
31    >>> mf = dft.RKS(mol).density_fit().run()
32'''
33
34from . import incore
35from . import outcore
36from . import addons
37from .addons import load, aug_etb, DEFAULT_AUXBASIS, make_auxbasis, make_auxmol
38from .df import DF, GDF, DF4C, GDF4C
39
40from . import r_incore
41
42def density_fit(obj, *args, **kwargs):
43    '''Given SCF/MCSCF or post-HF object, use density fitting technique to
44    approximate the 2e integrals.'''
45    return obj.density_fit(*args, **kwargs)
46
47