Skip to content

Commit 3d76b0c

Browse files
committed
update
1 parent a9911e7 commit 3d76b0c

10 files changed

+89
-12
lines changed

source/develop/ao2mo_developer.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _developer_ao2mo:
2+
3+
AO to MO transformation
4+
***********************
5+
6+
*Modules*: :mod:`ao2mo`

source/develop/cc_developer.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _developer_cc:
2+
3+
Coupled Cluster Methods
4+
***********************
5+
6+
*Modules*: :mod:`cc`, :mod:`pbc.cc`

source/develop/df_developer.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _developer_df:
2+
3+
Density fitting
4+
***************
5+
6+
*Modules*: :mod:`df`, :mod:`pbc.df`

source/develop/dft_developer.rst

+46-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,48 @@
1+
.. _developer_scf:
12

2-
Include here I think the main mods of DFT vs HF, the numint module, the
3-
key path in numint, and important functions e.g. eval_ao, etc.
3+
*******************************
4+
Density functional theory (DFT)
5+
*******************************
6+
7+
*Modules*: :mod:`dft`, :mod:`pbc.dft`
8+
9+
Overview
10+
========
11+
The DFT methods in modules :mod:`pyscf.dft` and :mod:`pyscf.pbc.dft`
12+
are implemented as derived classes of the base SCF class :class:`pyscf.scf.hf.SCF`.
13+
The major modifications of DFT against HF include re-implementation of the
14+
:meth:`get_veff` and :meth:`energy_elec` methods.
15+
In addition to :meth:`get_jk`, :meth:`get_veff` also calls
16+
:func:`numint.nr_rks` (for spin-restricted cases) or
17+
:func:`numint.nr_uks` (for spin-unrestricted cases)
18+
to compute the exchange-correlation (XC) energy and potential.
19+
The XC energy is added to the total electronic energy in :meth:`energy_elec`.
20+
21+
Numerical integration
22+
=====================
23+
The XC functionals are evaluated on numerical quadrature grids.
24+
These grids are defined in modules :mod:`pyscf.dft.gen_grid` and
25+
:mod:`pyscf.pbc.dft.gen_grid` for molecules and solids, respectively.
26+
The actual methods to evaluate those XC functionals and their related integrals
27+
are implemented in modules :mod:`pyscf.dft.numint` and :mod:`pyscf.pbc.dft.numint`.
28+
For example, the XC energy and potential matrix for a given density matrix are computed by
29+
:meth:`nr_rks` (or :meth:`nr_uks`), which internally calls
30+
31+
- :func:`eval_ao` -- to compute the atomic orbitals (AOs) and their derivatives on the grid
32+
33+
- :func:`eval_rho` -- to compute the electron density and density derivatives on the grid
34+
35+
- :func:`eval_xc` -- to compute the XC energy and potential through an interface to the external library Libxc (:func:`pyscf.dft.libxc.eval_xc`)
36+
or XCFun (:func:`pyscf.dft.xcfun.eval_xc`).
37+
38+
Other convenient functions implemented in :mod:`numint` include
39+
40+
- :func:`eval_mat` -- evaluating the XC potential matrix with AO, electron density, and XC potential values on the grid as the input
41+
42+
- :func:`nr_vxc` -- evaluating the XC energy and potential matrix with the density matrix as the input
43+
44+
- :func:`nr_sap_vxc` -- evaluating the superposition of atomic potentials matrix, which is used as the initial guess for :math:`v_{\rm eff}`
45+
when setting :attr:`mf.init_guess` to ``'vsap'``.
46+
47+
- :func:`nr_rks_fxc`, :func:`nr_uks_fxc` -- evaluating the XC kernel matrix
448

source/develop/fci_developer.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _developer_fci:
2+
3+
Full CI solver
4+
**************
5+
6+
*Modules*: :mod:`fci`

source/develop/mcscf_developer.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _developer_mcscf:
2+
3+
Multi-configuration SCF
4+
***********************
5+
6+
*Modules*: :mod:`mcscf`

source/develop/scf_developer.rst

+4-8
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,9 @@ The molecular HF operator relies on the following underlying AO integral functio
114114
If enough memory is provided, the two-electron repulsion integral is computed (:meth:`mol.intor('int2e')`)
115115
and saved as the attribute :attr:`_eri`,
116116
and is then contracted with the DM (:func:`pyscf.scf.hf.dot_eri_dm`) (incore algorithm).
117-
Otherwise, a "direct" algorithm, where the AO integrals are computed on the flow,
118-
is used (:func:`pyscf.scf._vhf.direct`). CHECK------- The incore path can be forced by
119-
setting :attr:`.incore_anyway` of the :class:`Mole` object to `True`.
120-
121-
.. The eigenvalues and eigenvectors of the Hamiltonian is computed by solving the
122-
.. generalized eigenvalue problem (:func:`pyscf.scf.hf.eig`).
123-
.. And the electronic energy is computed by contracting the Hamiltonian with the DM (:func:`pyscf.scf.hf.energy_elec`).
117+
Otherwise, a "direct" algorithm, where the AO integrals are computed on the fly,
118+
is used (:func:`pyscf.scf._vhf.direct`). The incore path can be forced by
119+
setting :attr:`.incore_anyway` of the :class:`Mole` object to ``True``.
124120

125121
Custom Hamiltonians
126122
===================
@@ -138,7 +134,7 @@ The following shows an example of HF with a Hubbard model Hamiltonian::
138134

139135
# incore_anyway=True ensures the customized Hamiltonian (the _eri attribute)
140136
# is used. Without this parameter, MO integral transformation used in
141-
# subsequent post-HF calculations may <-----------CHECK CHECK
137+
# subsequent post-HF calculations may
142138
# ignore the customized Hamiltonian if there is not enough memory.
143139
mol.incore_anyway = True
144140

source/develop/soscf_developer.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _developer_soscf:
2+
3+
Second-order SCF solver
4+
***********************
5+
6+
*Modules*: :mod:`soscf`

source/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ See :ref:`installing_plugin`.
4343

4444
code-rule.rst
4545
develop/scf_developer.rst
46+
develop/dft_developer.rst
4647
advanced.rst
4748

4849
.. toctree::

source/theory/cc.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
1+
.. _theory_scf:
22

33
********************
44
Coupled cluster (CC)
55
********************
66

7-
*Modules*: :ref:`cc <cc>`, :ref:`pbc.cc <pbc_cc>`
7+
*Modules*: :mod:`cc`, :mod:`pbc.cc`

0 commit comments

Comments
 (0)