Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch 0.17.2 #41

Merged
merged 4 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_conda.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Conda packages
name: Conda pkg

on:
workflow_dispatch:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build PyPI packages
name: PyPI pkg

on:
workflow_dispatch:
Expand All @@ -13,6 +13,12 @@ on:
types:
- published

env:
# Build `universal2` and `arm64` wheels on an Intel runner.
# Note that the `arm64` wheel and the `arm64` part of the `universal2`
# wheel cannot be tested in this configuration.
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"

jobs:
check-version-strings:
runs-on: ubuntu-latest
Expand All @@ -34,7 +40,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-2022, macos-11]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: docs
name: Docs

on:
push:
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ be quite computationally intensive, the evaluation is programmed in C++ and
connected to Python using Cython.

PyQInt mainly serves as an educational package to teach students how to perform
(simple) electronic structure calculations wherein the most difficult task,
i.e. the integral evaluation, is already encapsulated in a handy set of
routines. With PyQInt, the student can for example build their own Hartree-Fock
routine. Some common electronic structure routine, most notably the
Hartree-Fock algorithm, is also readily available.
(simple) electronic structure calculations wherein the most difficult task, i.e.
the integral evaluation, is already encapsulated in a handy set of routines.
With PyQInt, the student can for example build their own Hartree-Fock routine.
Some common electronic structure routine, most notably the Hartree-Fock
algorithm, is also readily available.

> **Note**
> Although PyQInt connects to a C++ backend, it is certainly not optimized for
Expand Down Expand Up @@ -52,13 +52,14 @@ PyQInt offers additional features such as
* Performing [restricted Hartree-Fock](https://en.wikipedia.org/wiki/Hartree%E2%80%93Fock_method)
calculations using [DIIS](https://en.wikipedia.org/wiki/DIIS)
* Calculation of [Crystal Orbital Hamilton Population](http://www.cohp.de/) coefficients
* Construction of localized orbitals using the [Boys-Foster method](https://en.wikipedia.org/wiki/Localized_molecular_orbitals#Foster-Boys)
* Construction of localized orbitals using the [Boys-Foster
method](https://en.wikipedia.org/wiki/Localized_molecular_orbitals#Foster-Boys)
* Visualization of molecular orbitals

All routines are (automatically) tested and verified against several open-source
as well as commercial programs that use cartesian Gaussian orbitals. Nevertheless,
if you spot any mistake, please kindly open an [issue](https://github.com/ifilot/pyqint/issues)
in this Github repository.
as well as commercial programs that use cartesian Gaussian orbitals.
Nevertheless, if you spot any mistake, please kindly open an
[issue](https://github.com/ifilot/pyqint/issues) in this Github repository.

In the image below, the (canonical) molecular orbitals as found using a restricted
Hartree-Fock calculation for the CO molecule are shown.
Expand Down
2 changes: 1 addition & 1 deletion meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: "pyqint"
version: "0.17.1"
version: "0.17.2"

source:
path: .
Expand Down
2 changes: 1 addition & 1 deletion pyqint/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.17.1"
__version__ = "0.17.2"

12 changes: 12 additions & 0 deletions pyqint/cgf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from .gto import gto
from .pyqint import PyCGF
from . import spherical_harmonics as sh

class cgf:
"""
Expand Down Expand Up @@ -48,6 +49,17 @@ def add_gto(self, c, alpha, l, m, n):
self.gtos.append(gto(c, self.p, alpha, l, m, n))
self.cgf.add_gto(c, alpha, l, m, n)

def add_spherical_gto(self, c, alpha, l, m):
"""
Add Spherical Gaussian Type Orbital to Contracted Gaussian Function.
l and m are the coefficients of the requested spherical harmonic function.
l must be <= 6 and -l <= m <= l.
"""
if not l <= 6 or not abs(m) <=l:
raise ValueError("l must be <= 6 and -l <= m <= l")
for gto in sh.spherical_harmonics[l][m]:
self.add_gto(gto[0] * c, alpha, gto[1][0], gto[1][1], gto[1][2])

def get_amp_f(self, x, y, z):
"""
Get the amplitude of the wave function at position r
Expand Down
Loading
Loading