Skip to content

Commit d5dac46

Browse files
authored
Merge pull request #170 from sokolov-group/master
Updates to the ADC module user manual
2 parents a42f9de + ee1956e commit d5dac46

File tree

2 files changed

+428
-279
lines changed

2 files changed

+428
-279
lines changed

source/user/adc.rst

Lines changed: 215 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,152 +1,237 @@
11
.. _user_adc:
22

33
*****************************************
4-
Algebraic diagrammatic construction (ADC)
4+
Algebraic diagrammatic construction (ADC)
55
*****************************************
66

77
*Modules*: :py:mod:`pyscf.adc`
88

99
Introduction
1010
=============================
11-
The algebraic diagrammatic construction theory (ADC(n)) is a post-Hartree-Fock
12-
method used for computing correlated excited states of molecules.
13-
:cite:`Schirmer1983,Schirmer1998`
14-
The ADC methods involve a perturbative expansion of a propagator followed
15-
by truncation at a certain order :math:`n` that defines the ADC(n) approximation.
16-
Depending upon the property being investigated, propagators can be of different
11+
Algebraic diagrammatic construction theory (ADC) is a post-Hartree-Fock
12+
approach for computing excited electronic states.
13+
:cite:`Schirmer1983,Schirmer1998,Dreuw:2014p82,Banerjee:2023p3037`
14+
This is done by approximating a linear-response function
15+
(so-called propagator) to the :math:`n`-th order in perturbation theory,
16+
defining the hierarchy of ADC(n) methods.
17+
Depending on the property being investigated, propagators can be of different
1718
types. Some common examples include the polarization propagator for neutral
1819
electronic excitations, the one-particle Green's function for charged excitations,
1920
and the two-electron propagator for Auger electron spectroscopy.
20-
The different propagators lead to different variants of the ADC method.
21-
22-
At present, the `adc` module in PySCF can be used to calculate the one-particle
23-
Green's function, that provides access to charged excitations,
24-
such as ionization potentials (IP-ADC) and
25-
electron affinities (EA-ADC) with different ADC(n) approximations
26-
(ADC(2), ADC(2)-X and ADC(3)). :cite:`Trofimov2005,Banerjee2019`
27-
The ADC(n) methods provide access to the
28-
excitation energies and their corresponding transition intensities via a
29-
'one-shot' calculation.
30-
31-
A simple ADC(n) computation involves the calculation of the ground-state energy
32-
and wavefunction that correspond to those of the :math:`n`-th order
33-
Møller--Plesset perturbation theory (MPn), followed by the evaluation of the
34-
ADC(n) excitation energies (e.g., IP or EA) and the corresponding transition
35-
probabilities.
36-
37-
An example of IP and EA computation using the default ADC method (ADC(2))
38-
is shown below::
21+
The different propagators lead to different variants of the ADC methods.
3922

40-
from pyscf import gto, scf, adc
41-
mol = gto.M(atom='H 0 0 0; F 0 0 1', basis='ccpvdz')
42-
mf = scf.RHF(mol).run()
43-
myadc = adc.ADC(mf)
44-
myadc.kernel_gs()
45-
e_ip,v_ip,p_ip,x_ip,adc_es = myadc.ip_adc()
46-
e_ea,v_ea,p_ea,x_ea,adc_ea = myadc.ea_adc()
23+
At present, the `adc` module in PySCF can be used to calculate neutral electronic
24+
excitations from the polarization propagator and charged excitations
25+
(ionization potentials, electron affinities) from the one-particle
26+
Green's function.
27+
For each property (EE, IP, and EA) three ADC approximations are available:
28+
strict second-order (ADC(2)), extended second-order (ADC(2)-X), and
29+
strict third-order (ADC(3)) methods. :cite:`Dreuw:2014p82,Banerjee:2023p3037`
30+
Each method provides access to the excitation energies and transition intensities
31+
via a 'one-shot' calculation.
4732

48-
In the example shown above, the ground state calculation is performed by
49-
running the function ``kernel_gs()``, whereas the excited state calculations
50-
are carried out using the ``ip_adc()`` and ``ea_adc()`` functions.
33+
A conventional (single-reference) ADC(n) calculation involves computing the
34+
ground-state energy and wavefunction that correspond to those of the
35+
:math:`n`-th order Møller--Plesset perturbation theory (MPn), followed by evaluating
36+
the ADC(n) excitation energies and the corresponding transition probabilities.
5137

52-
Alternatively, both the ground and excited state calculations can be run
53-
together using the ``kernel()`` function::
38+
Some examples of ADC calculations for the HF molecule are shown below::
5439

5540
from pyscf import gto, scf, adc
5641
mol = gto.M(atom='H 0 0 0; F 0 0 1', basis='ccpvdz')
5742
mf = scf.RHF(mol).run()
58-
myadc = adc.ADC(mf)
59-
myadc.kernel()
6043

61-
By default, the ``kernel()`` function performs a IP-ADC(2) calculation. One can specify the type of charged
62-
excitation and order of the desired ADC computation::
44+
myadc = adc.ADC(mf)
45+
myadc.verbose = 4
6346

47+
#IP-ADC(3) for 1 root
6448
myadc.method = "adc(3)"
49+
myadc.method_type = "ip"
50+
eip,vip,pip,xip = myadc.kernel()
51+
52+
#EA-ADC(2)-x for 1 root
53+
myadc.method = "adc(2)-x"
6554
myadc.method_type = "ea"
66-
myadc.kernel()
55+
eea,vea,pea,xea = myadc.kernel()
6756

68-
The ADC functions return the ``nroots`` lowest-energy eigenvalues. The
69-
default value of ``nroots`` is set to 1. More roots can be requested using::
57+
#EE-ADC(2) for 3 roots
58+
myadc.compute_properties = False
59+
myadc.method = "adc(2)"
60+
myadc.method_type = "ee"
61+
eee,vee,pee,xee = myadc.kernel(nroots = 3)
7062

71-
myadc.kernel(nroots=3)
63+
Here, ``method`` specifies the level of ADC approximation,
64+
``method_type`` defines the type of excitation (EE, IP, and EA), and
65+
``nroots`` defines the number of excited states to be computed (default is 1).
7266

7367
More examples can be found in
74-
:source:`examples/adc/01-closed_shell.py`,
75-
:source:`examples/adc/03-closed_shell_different_setup.py`.
68+
:source:`examples/adc`.
7669

7770

7871
Spin-restricted and spin-unrestricted calculations
7972
==========================================================================
80-
The `adc` module can be used to perform calculations of IP's and EA's of closed- and
81-
open-shell molecules starting with the RHF and UHF reference
82-
wavefunctions, leading to the RADC(n) and UADC(n) methods, respectively.
83-
:cite:`Banerjee2021`
73+
The `adc` module can be used to compute EE's, IP's, and EA's
74+
for closed- and open-shell molecules starting with the restricted (RHF) or
75+
unrestricted (UHF) Hartree-Fock reference wavefunctions using the RADC or UADC
76+
modules.
77+
Additionally, open-shell ADC calculations can be carried out using the
78+
restricted open-shell (ROHF) reference wavefunction, which are supported by
79+
the UADC module.
8480
See :ref:`user_scf` to learn more about the different reference wavefunctions.
8581

8682
Shown below is an example of the IP- and EA-UADC(2) calculations for the
8783
open-shell OH radical::
8884

8985
from pyscf import gto, scf, adc
90-
mol = gto.M(atom='O 0 0 0; H 0 0 1', basis='aug-cc-pvdz')
86+
mol = gto.Mole()
87+
mol.atom = [
88+
['O', ( 0., 0. , 0. )],
89+
['H', ( 0., 0. , 0.969)],]
90+
mol.basis = 'aug-cc-pvdz'
9191
mol.spin = 1
92+
mol.build()
93+
9294
mf = scf.UHF(mol).run()
9395

94-
myadc = adc.ADC(mf) # This is a UADC calculation
95-
myadc.kernel_gs()
96-
eip,vip,pip,xip,ip_es = myadc.ip_adc()
97-
eea,vea,pea,xea,ea_es = myadc.ea_adc()
96+
#IP-UADC calculation for 4 roots using the UHF reference
97+
myadc = adc.ADC(mf)
98+
myadc.verbose = 4
99+
100+
myadc.method = "adc(2)"
101+
myadc.method_type = "ip"
102+
eip,vip,pip,xip = myadc.kernel(nroots = 4)
103+
104+
mf = scf.ROHF(mol).run()
105+
106+
#EA-UADC calculation for 4 roots using the ROHF reference
107+
myadc = adc.ADC(mf)
108+
myadc.verbose = 4
109+
110+
myadc.method = "adc(2)"
111+
myadc.method_type = "ea"
112+
eea,vea,pea,xea = myadc.kernel(nroots = 4)
113+
98114

99115
More examples can be found in
100-
:source:`examples/adc/ 02-open_shell.py`,
101-
:source:`examples/adc/`04-open_shell_different_setup.py`.
116+
:source:`examples/adc`.
102117

103118

104-
Spectroscopic properties
119+
Excited-state properties
105120
=========================
106-
The `adc` module supports calculation of the spectroscopic factors, which provide
107-
information about probabilities of transitions in the photoelectron spectra. :cite:`Banerjee2021`
108-
Computation of spectroscopic factors is performed by default and can be switched
121+
The `adc` module supports computing transition and excited-state properties.
122+
For EE, oscillator strengths are available (currently, only in the UADC
123+
implementation). :cite:`Dreuw:2014p82`
124+
The IP- and EA-ADC methods provide spectroscopic factors, which measure the
125+
probabilities of charged excitations in photoelectron spectra. :cite:`Banerjee:2023p3037`
126+
Computation of transition properties is performed by default and can be switched
109127
off by setting ``compute_properties = False`` ::
110128

111129
myadc.compute_properties = False
112130
myadc.method = "adc(3)"
113131
myadc.method_type = "ip"
114132
myadc.kernel(nroots = 3)
115133

116-
After the ADC calculation is performed, the `adc` module can be used to compute
117-
the Dyson orbitals :cite:`Oana2007` corresponding to ionized and electron-attached states::
134+
Open-shell calculations using EE-UADC further support evaluating the spin
135+
square operator expectation values for the excited states (<S^2>).
136+
The <S^2> values are not computed by default, they can be requested using
137+
the ``compute_spin_square = True`` flag. See a relevant example
138+
for more details: :source:`examples/adc/08-open_shell_spin_square.py`.
139+
140+
For the IP- and EA-ADC methods, the `adc` module can be used to compute
141+
the Dyson orbitals :cite:`Oana2007` visualizing the wavefunction of
142+
ionized hole or attached electron for states with large
143+
spectroscopic factors (> 0.5). ::
118144

119145
dyson_orb = myadc.compute_dyson_mo()
120146

147+
Additionally, the ADC codes enable computing the one-particle reduced
148+
density matrices (1-RDMs) for the ground and excited electronic states.
149+
To obtain the ground-state 1-RDM, run the ``make_ref_rdm1()`` function
150+
after a successful ADC calculation::
151+
152+
myadc.kernel(nroots = 3)
153+
rdm1_ref = myadc.make_ref_rdm1()
154+
155+
The excited-state 1-RDMs can be calculated as follows::
156+
157+
rdm1_exc = myadc.make_rdm1()
158+
159+
The 1-RDMs can be used to compute excited-state one-particle properties,
160+
such as dipole moments, see the following example:
161+
:source:`examples/adc/07-closed_shell_1RDMS.py`.
162+
The 1-RDM functionality is currently limited, see below.
121163

122-
Analysis of spectroscopic properties
164+
Transition 1-RDMs between the ground and excited states are also available
165+
for all methods, except EE-RADC.
166+
They are returned as spectroscopic amplitudes at the end of a successful ADC
167+
calculation with ``compute_properties = True``, for example::
168+
169+
from pyscf import gto, scf, adc
170+
mol = gto.Mole()
171+
mol.atom = [
172+
['O', ( 0., 0. , 0. )],
173+
['H', ( 0., 0. , 0.969)],]
174+
mol.basis = 'aug-cc-pvdz'
175+
mol.spin = 1
176+
mol.build()
177+
178+
mf = scf.UHF(mol).run()
179+
180+
# Transition 1-RDMs (alpha and beta spin) computed using EE-UADC(2)
181+
myadc = adc.ADC(mf)
182+
myadc.verbose = 4
183+
myadc.method = "adc(2)"
184+
myadc.method_type = "ee"
185+
trdm_a, trdm_b = myadc.kernel(nroots = 4)[3]
186+
187+
188+
Analysis of excited-state properties
123189
=====================================
124-
The `adc` module allows to perform the analysis of the ADC(n) eigenvectors, that
125-
can be useful for characterizing the nature of electronic transitions. When
126-
``compute_properties`` is set to True, this analysis will also display the largest
127-
contributions to the spectroscopic factors. The analysis of the ADC(n) eigenvectors
190+
The `adc` module allows to analyze the ADC(n) eigenvectors
191+
for characterizing the nature of electronic transitions. When
192+
``compute_properties = True`` is set, this analysis will also display the largest
193+
contributions to the spectroscopic factors (IP, EA) or amplitudes (EE) for singly
194+
excited states. The analysis of ADC(n) eigenvectors
128195
and spectroscopic factors can be invoked using the ``analyze()`` function::
129196

130197
myadc.kernel(nroots = 3)
131198
myadc.analyze()
132199

133200

201+
Core excitation energies and spectra
202+
=====================================
203+
The IP-ADC code supports calculating core ionization energies and
204+
X-ray photoelectron spectra (XPS) using the core-valence separation technique
205+
(CVS). To invoke CVS, specify the ``ncvs`` parameter
206+
of IP-ADC object before running the ``kernel()`` function.
207+
The ``ncvs`` parameter should be set to an integer defining the index of the core
208+
orbital that is expected to be ionized first in the XPS spectrum.
209+
For example, probing the 1s orbital of C in CO can be done by setting
210+
``ncvs = 2`` since the C 1s orbitals are higher in energy than O 1s.
211+
212+
134213
Algorithms and job control
135214
===========================
136215

137-
The capabilities of the `adc` module at present are summarized in in the
216+
The current capabilities of the `adc` module are summarized in the
138217
following table:
139218

140-
========== ========== ==================== ===============================
141-
Method Reference Spin-adaptation Properties
142-
---------- ---------- -------------------- -------------------------------
143-
ADC(2) RHF, UHF Yes IP, EA, spectroscopic factors, Dyson orb
144-
ADC(2)-X RHF, UHF Yes IP, EA, spectroscopic factors, Dyson orb
145-
ADC(3) RHF, UHF Yes IP, EA, spectroscopic factors, Dyson orb
146-
========== ========== ==================== ===============================
147-
148-
The ADC(n) calculations can be performed using different algorithms, depending on
149-
the available memory controlled by the ``max_memory`` keyword:
219+
============= ================ =====================================================
220+
Method Reference Available properties
221+
------------- ---------------- -----------------------------------------------------
222+
EE-ADC(2) RHF, UHF, ROHF EEs, osc. strengths (UADC), spin square (UADC)
223+
EE-ADC(2)-X RHF, UHF, ROHF EEs, osc. strengths (UADC), spin square (UADC)
224+
EE-ADC(3) RHF, UHF, ROHF EEs, osc. strengths (UADC), spin square (UADC)
225+
IP-ADC(2) RHF, UHF, ROHF IPs, core IPs, spec. factors, Dyson orb
226+
IP-ADC(2)-X RHF, UHF, ROHF IPs, core IPs, spec. factors, Dyson orb
227+
IP-ADC(3) RHF, UHF, ROHF IPs, core IPs, spec. factors, Dyson orb
228+
EA-ADC(2) RHF, UHF, ROHF EAs, spec. factors, Dyson orb
229+
EA-ADC(2)-X RHF, UHF, ROHF EAs, spec. factors, Dyson orb
230+
EA-ADC(3) RHF, UHF, ROHF EAs, spec. factors, Dyson orb
231+
============= ================ =====================================================
232+
233+
The ADC(n) calculations are performed using one of the three algorithms for
234+
handling the two-electron integrals:
150235

151236
* In-core
152237

@@ -157,23 +242,59 @@ the available memory controlled by the ``max_memory`` keyword:
157242

158243
* Out-of-core
159244

160-
Use of disk to store the expensive tensors.
161-
This algorithm is invoked by setting ``max_memory`` to a small value.
245+
Uses disk to store expensive tensors.
246+
This algorithm is invoked when storing two-electron integrals requires
247+
more memory than specified by the ``max_memory`` keyword (in MB).
162248
See :source:`examples/adc/05-outcore.py`
163249

164250

165-
* Density-fitted (DF) algorithm
251+
* Density fitting (DF)
252+
253+
The memory and disk usage can be greatly reduced by approximating the
254+
two-electron integrals with density fitting. An example of the ADC(2)
255+
calculation with density fitting is provided below::
256+
257+
from pyscf import gto, scf, adc, df
258+
mol = gto.M(atom='H 0 0 0; F 0 0 1', basis='ccpvdz')
259+
260+
mf = scf.RHF(mol).density_fit('ccpvdz-jkfit').run()
261+
myadc = adc.ADC(mf).density_fit('ccpvdz-ri')
262+
eip,vip,pip,xip = myadc.kernel()
263+
264+
Density fitting introduces small errors in excitation energies
265+
(~$10^{-3}$ eV), provided that the appropriate auxiliary basis
266+
set is used. :cite:`Banerjee2021`
267+
For calculations with more than 300 orbitals, using density fitting
268+
is strongly recommended.
269+
270+
More examples can be found in: :source:`examples/adc/06-dfadc.py`.
271+
272+
273+
Current limitations
274+
====================
275+
276+
Some limitations of current implementation are listed below:
277+
278+
* The EE-RADC code does not support calculating oscillator strengths.
279+
This property can be computed using the EE-UADC code (i.e., by using
280+
the UHF reference) for a closed- or open-shell molecule.
281+
282+
* The EE- and IP/EA-RADC codes compute only the states of lowest spin:
283+
S = 0 (singlet) and S = 1/2 (doublet), respectively. Using the
284+
corresponding UADC code allows to compute excitations with ΔS = 0,
285+
±1 for EE and ΔS = ±1/2, ±3/2 for IP and EA.
286+
287+
* Computing spin square expectation values is currently only available for
288+
EE-UADC.
166289

167-
The memory and disk usage can be greatly reduced by approximating the
168-
two-electron integrals with density-fitting. A simple example of a
169-
DF-ADC(2) calculation is::
290+
* The reference and excited-state 1-RDMs are not implemented for EE-RADC.
291+
Also, the reference 1-RDMs are not available for any UADC method.
170292

171-
from pyscf import gto, scf, adc, df
172-
mol = gto.M(atom='H 0 0 0; F 0 0 1', basis='ccpvdz')
293+
* The EE-UADC(3) calculations of excited-state one-particle reduced density
294+
matrices include correlation contributions up to EE-UADC(2)-X, i.e. the
295+
third-order terms are missing from the singles-singles and singles-doubles
296+
coupling sectors.
173297

174-
mf = scf.RHF(mol).density_fit('ccpvdz-jkfit').run()
175-
myadc = adc.ADC(mf).density_fit('ccpvdz-ri')
176-
eip,vip,pip,xip = myadc.kernel()
298+
* The EE-UADC(3) oscillator strengths do not include the contributions from
299+
third-order amplitudes.
177300

178-
More examples can be found in:
179-
:source:`examples/adc/06-dfadc.py`.

0 commit comments

Comments
 (0)