Skip to content

Commit 523067d

Browse files
authored
update dispersion doc (#151)
* update disp doc * update format
1 parent 79d2037 commit 523067d

File tree

2 files changed

+25
-16
lines changed

2 files changed

+25
-16
lines changed

source/user/dft.rst

+21-14
Original file line numberDiff line numberDiff line change
@@ -181,22 +181,29 @@ or - as an alternative - the same may be achieved in the following way:
181181
Dispersion corrections
182182
======================
183183

184-
Two main ways exist for adding dispersion (van der Waals) corrections to KS-DFT calculations. One is to augment mean-field results by Grimme's D3 corrections :cite:`DFTD3`, which can be added through an interface to the external library `libdftd3 <https://github.com/cuanto/libdftd3>`_, cf. `dftd3/00-hf_with_dftd3.py <https://github.com/pyscf/pyscf/blob/master/examples/dftd3/00-hf_with_dftd3.py>`_:
185-
186-
>>> from pyscf import dftd3
187-
>>> mf_hf_d3 = dftd3.dftd3(dft.RKS(mol_hf))
188-
>>> mf_hf_d3.kernel()
184+
Adding dispersion (van der Waals) corrections to KS-DFT calculations requires the `pyscf-dispersion <https://github.com/pyscf/dispersion>`_ extension,
185+
which implements a simplified interface to `simple-dftd3 <https://github.com/dftd3/simple-dftd3>`_
186+
and `dftd4 <https://github.com/dftd4/dftd4>`_ libraries.
187+
188+
It is recommended to enable D3 :cite:`DFTD3`, D4 dispersion corrections through the KS class instantiation.
189+
The values of attributes nlc, disp, and xc of KS object are automatically configured in this way.
190+
Both the ``mol.KS`` method or ``dft.RKS`` function can be used,
191+
cf. `dft/16-dft_d3.py <https://github.com/pyscf/pyscf/blob/master/examples/dft/16-dft_d3.py>`_:
192+
193+
>>> mf_d3 = mol_hf.KS(xc='wb97x-d4')
194+
>>> #mf_d3 = mol_hf.KS(xc='b3lyp-d3bj')
195+
>>> #mf_d3 = mol_hf.KS(xc='b3lyp-d3zero')
196+
>>> mf_d3.kernel()
189197

190-
Alternatively, non-local correlation may be added through the VV10 functional :cite:`vydrov_voorhis_vv10_functional_jcp_2010`, cf. `dft/33-nlc_functionals.py <https://github.com/pyscf/pyscf/blob/master/examples/dft/33-nlc_functionals.py>`_:
191-
192-
>>> mf_hf.xc = 'wb97m_v'
193-
>>> mf_hf.nlc = 'vv10'
194-
>>> mf_hf.grids.atom_grid = {'H': (99, 590), 'F': (99, 590)}
195-
>>> mf_hf.grids.prune = None
196-
>>> mf_hf.nlcgrids.atom_grid = {'H': (50, 194), 'F': (50, 194)}
197-
>>> mf_hf.nlcgrids.prune = dft.gen_grid.sg1_prune
198-
>>> mf_hf.kernel()
198+
Alternatively, non-local correlation may be added through the VV10 functional :cite:`vydrov_voorhis_vv10_functional_jcp_2010`,
199+
cf. `dft/33-nlc_functionals.py <https://github.com/pyscf/pyscf/blob/master/examples/dft/33-nlc_functionals.py>`_:
200+
201+
>>> mf_nlc = dft.RKS(mol_hf)
202+
>>> mf_nlc.xc = 'wb97m_v'
203+
>>> mf_nlc.kernel()
199204

205+
See `dft/33-nlc_functionals.py <https://github.com/pyscf/pyscf/blob/master/examples/dft/33-nlc_functionals.py>`_
206+
for more examples of setting the ``nlc`` and ``nlcgrids`` attribute.
200207
It's important to keep in mind that the evaluation of the VV10 functional involves a double grid integration, so differences in grid size can make an enormous difference in time.
201208

202209
.. _user_dft_collinear:

source/user/scf.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,10 @@ Spin-restricted, spin-unrestricted, restricted open-shell, and generalized calcu
318318

319319
The general spin-orbital used in the HF or KS-DFT wave function can be
320320
written as
321-
.. math::
322-
\psi_i(1) = \phi_{i\alpha}(r)\alpha + \phi_{i\beta}(r)\beta \;,
321+
322+
.. math::
323+
324+
\psi_i(1) = \phi_{i\alpha}(r)\alpha + \phi_{i\beta}(r)\beta \;,
323325
324326
Four variants of the ansatz :math:`\psi(1)` are commonly used in
325327
quantum chemistry; they are also all available in PySCF.

0 commit comments

Comments
 (0)