Skip to main content

Python package for evaluating integrals of Gaussian type orbitals in electronic structure calculations

Project description

PyQInt

Anaconda-Server Badge PyPI

Table of Contents

Purpose

PyQInt is a Python package for calculating one- and two-electron integrals as encountered in electronic structure calculations. Since integral evaluation can be quite computationally intensive, they are programmed in C++ and connected to Python using Cython.

Installation

Anaconda

Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge

Open Anaconda prompt and type

conda install -c ifilot pyqint

PyPi

PyPI PyPI - Downloads PyPI - Python Version

Open a terminal and type

pip install pyqint

Usage

Overlap integrals

from pyqint.pyqint import PyQInt, cgf, gto
import numpy as np
from copy import deepcopy

# construct integrator object
integrator = PyQInt()

# build cgf for hydrogen separated by 1.4 a.u.
cgf1 = cgf([0.0, 0.0, 0.0])

cgf1.add_gto(0.154329, 3.425251, 0, 0, 0)
cgf1.add_gto(0.535328, 0.623914, 0, 0, 0)
cgf1.add_gto(0.444635, 0.168855, 0, 0, 0)

# create a copy of the CGF
cgf2 = deepcopy(cgf1)
cgf2.p[2] = 1.4

# construct empty matrix
S = np.zeros((2,2))
S[0,0] = integrator.overlap(cgf1, cgf1)
S[0,1] = S[1,0] = integrator.overlap(cgf1, cgf2)
S[1,1] = integrator.overlap(cgf2, cgf2)

# output result
print(S)

Kinetic integrals

from pyqint.pyqint import PyQInt, cgf, gto
import numpy as np
from copy import deepcopy

# construct integrator object
integrator = PyQInt()

# build cgf for hydrogen separated by 1.4 a.u.
cgf1 = cgf([0.0, 0.0, 0.0])

cgf1.add_gto(0.154329, 3.425251, 0, 0, 0)
cgf1.add_gto(0.535328, 0.623914, 0, 0, 0)
cgf1.add_gto(0.444635, 0.168855, 0, 0, 0)

# create a copy of the CGF
cgf2 = deepcopy(cgf1)
cgf2.p[2] = 1.4

# construct empty matrix
T = np.zeros((2,2))
T[0,0] = integrator.kinetic(cgf1, cgf1)
T[0,1] = T[1,0] = integrator.kinetic(cgf1, cgf2)
T[1,1] = integrator.kinetic(cgf2, cgf2)

# output result
print(T)

Nuclear attraction integrals

from pyqint.pyqint import PyQInt, cgf, gto
import numpy as np
from copy import deepcopy

# construct integrator object
integrator = PyQInt()

# build cgf for hydrogen separated by 1.4 a.u.
cgf1 = cgf([0.0, 0.0, 0.0])

cgf1.add_gto(0.154329, 3.425251, 0, 0, 0)
cgf1.add_gto(0.535328, 0.623914, 0, 0, 0)
cgf1.add_gto(0.444635, 0.168855, 0, 0, 0)

# create a copy of the CGF
cgf2 = deepcopy(cgf1)
cgf2.p[2] = 1.4

# Build nuclear attraction integrals
V1 = np.zeros((2,2))
V1[0,0] = integrator.nuclear(cgf1, cgf1, cgf1.p, 1)
V1[0,1] = V1[1,0] = integrator.nuclear(cgf1, cgf2, cgf1.p, 1)
V1[1,1] = integrator.nuclear(cgf2, cgf2, cgf1.p, 1)

V2 = np.zeros((2,2))
V2[0,0] = integrator.nuclear(cgf1, cgf1, cgf2.p, 1)
V2[0,1] = V2[1,0] = integrator.nuclear(cgf1, cgf2, cgf2.p, 1)
V2[1,1] = integrator.nuclear(cgf2, cgf2, cgf2.p, 1)

# print result
print(V1,V2)

Two-electron integrals

from pyqint.pyqint import PyQInt, cgf, gto
import numpy as np
from copy import deepcopy

# construct integrator object
integrator = PyQInt()

# build cgf for hydrogen separated by 1.4 a.u.
cgf1 = cgf([0.0, 0.0, 0.0])

cgf1.add_gto(0.154329, 3.425251, 0, 0, 0)
cgf1.add_gto(0.535328, 0.623914, 0, 0, 0)
cgf1.add_gto(0.444635, 0.168855, 0, 0, 0)

# create a copy of the CGF
cgf2 = deepcopy(cgf1)
cgf2.p[2] = 1.4

T1111 = integrator.repulsion(cgf1, cgf1, cgf1, cgf1)
T1122 = integrator.repulsion(cgf1, cgf1, cgf2, cgf2)
T1112 = integrator.repulsion(cgf1, cgf1, cgf1, cgf2)
T2121 = integrator.repulsion(cgf2, cgf1, cgf2, cgf1)
T1222 = integrator.repulsion(cgf1, cgf2, cgf2, cgf2)
T2211 = integrator.repulsion(cgf2, cgf2, cgf1, cgf1)

print(T1111)
print(T1122)
print(T1112)
print(T2121)
print(T1222)
print(T2211)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pyqint-0.5.0-cp39-cp39-manylinux2010_x86_64.whl (900.1 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pyqint-0.5.0-cp38-cp38-manylinux2010_x86_64.whl (953.2 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pyqint-0.5.0-cp37-cp37m-manylinux2010_x86_64.whl (865.7 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

pyqint-0.5.0-cp36-cp36m-manylinux2010_x86_64.whl (868.5 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

pyqint-0.5.0-cp35-cp35m-manylinux2010_x86_64.whl (853.6 kB view details)

Uploaded CPython 3.5m manylinux: glibc 2.12+ x86-64

File details

Details for the file pyqint-0.5.0-cp39-cp39-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pyqint-0.5.0-cp39-cp39-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 900.1 kB
  • Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.3

File hashes

Hashes for pyqint-0.5.0-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 033acd7d718472672d54c5dbc52e6e00d4fb2e65f47c4c4e4e792fa9a6c33489
MD5 e6664294ef3baeab4d43e5b72ba7b37c
BLAKE2b-256 39654674229b7fcfc7e3e556ddd6f61a2fa75d478efbd0fecfc5b698eaf46253

See more details on using hashes here.

File details

Details for the file pyqint-0.5.0-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pyqint-0.5.0-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 953.2 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.3

File hashes

Hashes for pyqint-0.5.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f6e66fb60d78184c420454a1ec259b1d1f8a08af1b0a6110d718fb42fc9f63e0
MD5 0f390fb320e51ff02c9cef869f224881
BLAKE2b-256 5d256ef5e63f4fc0d3cafd26b3fdffc0527774dd9554d2dddfd8d1e47e683cf5

See more details on using hashes here.

File details

Details for the file pyqint-0.5.0-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pyqint-0.5.0-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 865.7 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.3

File hashes

Hashes for pyqint-0.5.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d7a6b420f25eb63dca997403a8cd4d785749aadd0fa78d40f91e37f0c7ee9b9c
MD5 2705d687bdfa3e9b8687c756052bfd2b
BLAKE2b-256 decd813b08dfb987038db5d6a990960215eb5489d45f1da86253b30b6db21656

See more details on using hashes here.

File details

Details for the file pyqint-0.5.0-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pyqint-0.5.0-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 868.5 kB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.3

File hashes

Hashes for pyqint-0.5.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 375b4ff3c8d24349f082e8e5057af9d3abaca1237fdae487dd24e4924be4b117
MD5 bd01e866c34d74ac231530e4b51e0d89
BLAKE2b-256 1b334080b2cf785210ae727611efbc78a37ed47a9ed2e136343f0fe3f2ad37ac

See more details on using hashes here.

File details

Details for the file pyqint-0.5.0-cp35-cp35m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pyqint-0.5.0-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 853.6 kB
  • Tags: CPython 3.5m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.3

File hashes

Hashes for pyqint-0.5.0-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 1d33dd6851d8c36b4d50cfa3cefd0d78e1a6c16a59c397a95223533cdac9ae08
MD5 e519e308f4740cca8dd4ea6c8ff873cc
BLAKE2b-256 e9ec3763478f8ac6aa5be386d9df714352e81bd30ababd21f38d2f801de2ec94

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page