Skip to content

Commit 703cdb1

Browse files
committed
deploy: fa495f5
1 parent 4006bfb commit 703cdb1

23 files changed

+373
-5
lines changed

_sources/index.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ requests are ideally submitted via the `github issue tracker
8282
population_analysis
8383
symmetry_adapted_basis
8484
acceleration_routines
85+
integrator
8586
gallery
8687
community_guidelines
8788

_sources/integrator.rst.txt

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
.. index:: integrator
2+
3+
Integrator object
4+
=================
5+
6+
The :code:`PyQInt` class is the low-level numerical integrator used internally
7+
throughout the ``pyqint`` package. It provides efficient evaluation of
8+
Gaussian-type orbital (GTO) and contracted Gaussian function (CGF) integrals
9+
via a C++ backend with optional OpenMP parallelization.
10+
11+
Most users do **not** interact with :code:`PyQInt` directly. Instead, higher-
12+
level routines construct and manage an integrator instance internally. Direct
13+
use of :code:`PyQInt` is intended for advanced users who need fine-grained
14+
control over integral evaluation or wish to experiment with custom workflows.
15+
16+
Overview
17+
--------
18+
19+
The integrator implements core quantum-chemical building blocks, including:
20+
21+
* Overlap integrals
22+
* Kinetic energy integrals
23+
* Nuclear attraction integrals
24+
* Two-electron (electron–repulsion) integrals
25+
* First derivatives with respect to nuclear coordinates
26+
* Grid-based evaluation of basis functions and molecular orbitals
27+
28+
The implementation is optimized for repeated evaluation and makes use of
29+
internal caching where possible.
30+
31+
Creating an Integrator
32+
----------------------
33+
34+
An integrator instance is created by specifying limits on angular momentum
35+
and the maximum order of the Boys function:
36+
37+
.. code-block:: python
38+
39+
from pyqint import PyQInt
40+
41+
qint = PyQInt(lmax=4, nu_max=12)
42+
43+
The parameters control internal cache sizes and directly affect both memory
44+
usage and performance. Reusing a single integrator instance is recommended
45+
when evaluating many integrals.
46+
47+
Typical Usage
48+
-------------
49+
50+
Most integrals are evaluated using contracted Gaussian functions (CGFs):
51+
52+
.. code-block:: python
53+
54+
S = qint.overlap(cgf1, cgf2)
55+
T = qint.kinetic(cgf1, cgf2)
56+
V = qint.nuclear(cgf1, cgf2, rc, zc)
57+
58+
Two-electron integrals can be computed either individually or in batches:
59+
60+
.. code-block:: python
61+
62+
eri = qint.repulsion(cgf1, cgf2, cgf3, cgf4)
63+
64+
For performance-critical workflows, the integrator provides routines that
65+
build full matrices and tensors in a single call using OpenMP:
66+
67+
.. code-block:: python
68+
69+
S, T, V, tei = qint.build_integrals_openmp(cgfs, nuclei)
70+
71+
Parallel Execution
72+
------------------
73+
74+
If OpenMP support was available at build time, the integrator will
75+
automatically parallelize suitable workloads. The number of threads is
76+
controlled via standard OpenMP environment variables such as ``OMP_NUM_THREADS``.
77+
78+
The current thread count can be queried at runtime:
79+
80+
.. code-block:: python
81+
82+
nthreads = qint.get_num_threads()
83+
84+
Build Information
85+
-----------------
86+
87+
For diagnostic and reproducibility purposes, the integrator exposes
88+
build-time information:
89+
90+
.. code-block:: python
91+
92+
info = qint.get_compile_info()
93+
94+
The returned dictionary includes compiler details, OpenMP availability,
95+
and compilation date and time.
96+
97+
Grid-Based Evaluation
98+
---------------------
99+
100+
The integrator also supports evaluation of basis functions, molecular
101+
orbitals, and their gradients on three-dimensional grids:
102+
103+
.. code-block:: python
104+
105+
grid = qint.build_rectgrid3d(-5.0, 5.0, 50)
106+
values = qint.plot_wavefunction(grid, coeff, cgfs)
107+
108+
These routines are primarily intended for visualization and analysis.
109+
110+
Notes
111+
-----
112+
113+
* The :code:`PyQInt` object is **not thread-safe** across Python threads.
114+
* Creating multiple integrators increases memory usage due to internal caches.
115+
* Most users should rely on higher-level interfaces provided by ``pyqint``.

acceleration_routines.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<script src="_static/js/theme.js"></script>
2424
<link rel="index" title="Index" href="genindex.html" />
2525
<link rel="search" title="Search" href="search.html" />
26-
<link rel="next" title="Gallery" href="gallery.html" />
26+
<link rel="next" title="Integrator object" href="integrator.html" />
2727
<link rel="prev" title="Symmetry-adapted basis sets" href="symmetry_adapted_basis.html" />
2828
</head>
2929

@@ -74,6 +74,7 @@
7474
<li class="toctree-l2"><a class="reference internal" href="#integrator-construction-and-defaults">Integrator Construction and Defaults</a></li>
7575
</ul>
7676
</li>
77+
<li class="toctree-l1"><a class="reference internal" href="integrator.html">Integrator object</a></li>
7778
<li class="toctree-l1"><a class="reference internal" href="gallery.html">Gallery</a></li>
7879
<li class="toctree-l1"><a class="reference internal" href="community_guidelines.html">Community guidelines</a></li>
7980
</ul>
@@ -337,7 +338,7 @@ <h2><a class="toc-backref" href="#id9" role="doc-backlink">Integrator Constructi
337338
</div>
338339
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
339340
<a href="symmetry_adapted_basis.html" class="btn btn-neutral float-left" title="Symmetry-adapted basis sets" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
340-
<a href="gallery.html" class="btn btn-neutral float-right" title="Gallery" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
341+
<a href="integrator.html" class="btn btn-neutral float-right" title="Integrator object" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
341342
</div>
342343

343344
<hr/>

basis_functions.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
<li class="toctree-l1"><a class="reference internal" href="population_analysis.html">Population Analysis</a></li>
7777
<li class="toctree-l1"><a class="reference internal" href="symmetry_adapted_basis.html">Symmetry-adapted basis sets</a></li>
7878
<li class="toctree-l1"><a class="reference internal" href="acceleration_routines.html">Integral evaluation acceleration routines</a></li>
79+
<li class="toctree-l1"><a class="reference internal" href="integrator.html">Integrator object</a></li>
7980
<li class="toctree-l1"><a class="reference internal" href="gallery.html">Gallery</a></li>
8081
<li class="toctree-l1"><a class="reference internal" href="community_guidelines.html">Community guidelines</a></li>
8182
</ul>

basis_sets_and_molecules.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
<li class="toctree-l1"><a class="reference internal" href="population_analysis.html">Population Analysis</a></li>
6868
<li class="toctree-l1"><a class="reference internal" href="symmetry_adapted_basis.html">Symmetry-adapted basis sets</a></li>
6969
<li class="toctree-l1"><a class="reference internal" href="acceleration_routines.html">Integral evaluation acceleration routines</a></li>
70+
<li class="toctree-l1"><a class="reference internal" href="integrator.html">Integrator object</a></li>
7071
<li class="toctree-l1"><a class="reference internal" href="gallery.html">Gallery</a></li>
7172
<li class="toctree-l1"><a class="reference internal" href="community_guidelines.html">Community guidelines</a></li>
7273
</ul>

community_guidelines.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
<li class="toctree-l1"><a class="reference internal" href="population_analysis.html">Population Analysis</a></li>
6161
<li class="toctree-l1"><a class="reference internal" href="symmetry_adapted_basis.html">Symmetry-adapted basis sets</a></li>
6262
<li class="toctree-l1"><a class="reference internal" href="acceleration_routines.html">Integral evaluation acceleration routines</a></li>
63+
<li class="toctree-l1"><a class="reference internal" href="integrator.html">Integrator object</a></li>
6364
<li class="toctree-l1"><a class="reference internal" href="gallery.html">Gallery</a></li>
6465
<li class="toctree-l1 current"><a class="current reference internal" href="#">Community guidelines</a></li>
6566
</ul>

electronic_structure_calculations.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
<li class="toctree-l1"><a class="reference internal" href="population_analysis.html">Population Analysis</a></li>
7474
<li class="toctree-l1"><a class="reference internal" href="symmetry_adapted_basis.html">Symmetry-adapted basis sets</a></li>
7575
<li class="toctree-l1"><a class="reference internal" href="acceleration_routines.html">Integral evaluation acceleration routines</a></li>
76+
<li class="toctree-l1"><a class="reference internal" href="integrator.html">Integrator object</a></li>
7677
<li class="toctree-l1"><a class="reference internal" href="gallery.html">Gallery</a></li>
7778
<li class="toctree-l1"><a class="reference internal" href="community_guidelines.html">Community guidelines</a></li>
7879
</ul>

gallery.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<link rel="index" title="Index" href="genindex.html" />
2424
<link rel="search" title="Search" href="search.html" />
2525
<link rel="next" title="Community guidelines" href="community_guidelines.html" />
26-
<link rel="prev" title="Integral evaluation acceleration routines" href="acceleration_routines.html" />
26+
<link rel="prev" title="Integrator object" href="integrator.html" />
2727
</head>
2828

2929
<body class="wy-body-for-nav">
@@ -61,6 +61,7 @@
6161
<li class="toctree-l1"><a class="reference internal" href="population_analysis.html">Population Analysis</a></li>
6262
<li class="toctree-l1"><a class="reference internal" href="symmetry_adapted_basis.html">Symmetry-adapted basis sets</a></li>
6363
<li class="toctree-l1"><a class="reference internal" href="acceleration_routines.html">Integral evaluation acceleration routines</a></li>
64+
<li class="toctree-l1"><a class="reference internal" href="integrator.html">Integrator object</a></li>
6465
<li class="toctree-l1 current"><a class="current reference internal" href="#">Gallery</a></li>
6566
<li class="toctree-l1"><a class="reference internal" href="community_guidelines.html">Community guidelines</a></li>
6667
</ul>
@@ -148,7 +149,7 @@
148149
</div>
149150
</div>
150151
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
151-
<a href="acceleration_routines.html" class="btn btn-neutral float-left" title="Integral evaluation acceleration routines" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
152+
<a href="integrator.html" class="btn btn-neutral float-left" title="Integrator object" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
152153
<a href="community_guidelines.html" class="btn btn-neutral float-right" title="Community guidelines" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
153154
</div>
154155

genindex.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
<li class="toctree-l1"><a class="reference internal" href="population_analysis.html">Population Analysis</a></li>
5959
<li class="toctree-l1"><a class="reference internal" href="symmetry_adapted_basis.html">Symmetry-adapted basis sets</a></li>
6060
<li class="toctree-l1"><a class="reference internal" href="acceleration_routines.html">Integral evaluation acceleration routines</a></li>
61+
<li class="toctree-l1"><a class="reference internal" href="integrator.html">Integrator object</a></li>
6162
<li class="toctree-l1"><a class="reference internal" href="gallery.html">Gallery</a></li>
6263
<li class="toctree-l1"><a class="reference internal" href="community_guidelines.html">Community guidelines</a></li>
6364
</ul>
@@ -142,6 +143,8 @@ <h2 id="I">I</h2>
142143
</ul></td>
143144
<td style="width: 33%; vertical-align: top;"><ul>
144145
<li><a href="integral_evaluation.html#index-0">integral-evaluation</a>
146+
</li>
147+
<li><a href="integrator.html#index-0">integrator</a>
145148
</li>
146149
</ul></td>
147150
</tr></table>

geometry_optimization.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
<li class="toctree-l1"><a class="reference internal" href="population_analysis.html">Population Analysis</a></li>
6666
<li class="toctree-l1"><a class="reference internal" href="symmetry_adapted_basis.html">Symmetry-adapted basis sets</a></li>
6767
<li class="toctree-l1"><a class="reference internal" href="acceleration_routines.html">Integral evaluation acceleration routines</a></li>
68+
<li class="toctree-l1"><a class="reference internal" href="integrator.html">Integrator object</a></li>
6869
<li class="toctree-l1"><a class="reference internal" href="gallery.html">Gallery</a></li>
6970
<li class="toctree-l1"><a class="reference internal" href="community_guidelines.html">Community guidelines</a></li>
7071
</ul>

0 commit comments

Comments
 (0)