Skip to content

Commit

Permalink
Expanding documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ifilot committed Jan 17, 2024
1 parent 1a13bb2 commit bc9ba03
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 7 deletions.
6 changes: 4 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ PyQInt: a Python package for evaluating Gaussian integrals and performing electr

.. image:: https://img.shields.io/github/v/tag/ifilot/pyqint?label=version
:alt: GitHub tag (latest SemVer)
.. image:: https://github.com/ifilot/pyqint/actions/workflows/build.yml/badge.svg
:target: https://github.com/ifilot/pyqint/actions/workflows/build.yml
.. image:: https://github.com/ifilot/pyqint/actions/workflows/build_wheels.yml/badge.svg
:target: https://github.com/ifilot/pyqint/actions/workflows/build_wheels.yml
.. image:: https://github.com/ifilot/pyqint/actions/workflows/build_conda.yml/badge.svg
:target: https://github.com/ifilot/pyqint/actions/workflows/build_conda.yml
.. image:: https://img.shields.io/badge/License-GPLv3-blue.svg
:target: https://www.gnu.org/licenses/gpl-3.0

Expand Down
40 changes: 35 additions & 5 deletions docs/user_interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -550,14 +550,13 @@ Parallel evaluation of integrals

From a collection of Contracted Gaussian Functions, the complete set of overlap,
kinetic, nuclear attraction and two-electron integrals can be quickly evaluated
using the `build_integrals` function. Using the `npar` argument, the number of
threads to be spawned can be set.
using the `build_integrals_openmp` function. The function will automatically determine
the number of available cores to allocate for this process.

.. code-block:: python
from pyqint import PyQInt, Molecule
import numpy as np
import multiprocessing
# construct integrator object
integrator = PyQInt()
Expand All @@ -569,8 +568,7 @@ threads to be spawned can be set.
cgfs, nuclei = mol.build_basis('sto3g')
# evaluate all integrals
ncpu = multiprocessing.cpu_count()
S, T, V, teint = integrator.build_integrals(cgfs, nuclei, npar=ncpu, verbose=False)
S, T, V, teint = integrator.build_integrals_openmp(cgfs, nuclei)
print(S)
print(T)
Expand Down Expand Up @@ -754,6 +752,38 @@ The output of the above script yields::
Total energy: -39.72630504189621
Sum of the individual terms: -39.726305041896055

Custom basis sets
-----------------

Besides the basis sets offered by :program:`PyQInt`, one can also use a custom
basis set defined by the user. The :code:`rhf` routine accepts either a basis set
for its :code:`basis` argument, or alternatively a list of :code:`cgf` objects.
In the example code shown below, the latter is done.

.. code-block:: python
mol = Molecule()
mol.add_atom('H', 0.0000, 0.0000, 0.3561150187, unit='angstrom')
mol.add_atom('H', 0.0000, 0.0000, -0.3561150187, unit='angstrom')
nuclei = mol.get_nuclei()
cgfs = []
for n in nuclei:
_cgf = cgf(n[0])
_cgf.add_gto(0.154329, 3.425251, 0, 0, 0)
_cgf.add_gto(0.535328, 0.623914, 0, 0, 0)
_cgf.add_gto(0.444635, 0.168855, 0, 0, 0)
cgfs.append(_cgf)
res = HF().rhf(mol, basis=cgfs)
.. hint::

A nice website to find a large collection of Gaussian Type basis set coefficients is
`https://www.basissetexchange.org/ <https://www.basissetexchange.org/>`_.

Orbital visualization
=====================

Expand Down

0 comments on commit bc9ba03

Please sign in to comment.