Skip to content

Commit 5bbb632

Browse files
authored
Patch v1.1.0 (#57)
* Changing Python class names to GTO and CGF * Adding Python versions 3.13 and 3.14 * Fixing entries * Upgrading wheels
1 parent f1b99b8 commit 5bbb632

17 files changed

+67
-67
lines changed

.github/workflows/build_wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- uses: actions/checkout@v4
4747

4848
- name: Build wheels
49-
uses: pypa/cibuildwheel@v2.17.0
49+
uses: pypa/cibuildwheel@v3.2.0
5050

5151
- uses: actions/upload-artifact@v4
5252
with:

conda_build_config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ python:
44
- 3.10
55
- 3.11
66
- 3.12
7+
- 3.13
78
numpy:
89
- 1.22
910
- 1.22
1011
- 1.23
1112
- 1.26
1213
- 1.26
14+
- 2.1
1315
zip_keys:
1416
- python
1517
- numpy

docs/user_interface.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ polynomial, and :math:`N` a normalization constant such that
3535
GTOs are a fundamental building block of CGF (see below) and typically a user would
3636
not directly work with them. Nevertheless, GTO objects can be constructed as follows::
3737

38-
from pyqint import PyQInt, cgf, gto
38+
from pyqint import PyQInt, CGF, GTO
3939

4040
coeff = 1.0 # coefficients only have meaning for GTOs within a CGF
4141
alpha = 0.5
4242
l,m,n = 0,0,0
4343
p = (0,0,0)
44-
G = gto(coeff, p, alpha, l, m, n)
44+
G = GTO(coeff, p, alpha, l, m, n)
4545

4646
.. note::
4747
If you work with individual GTOs, the first parameter to construct the GTO
@@ -62,9 +62,9 @@ is esentially a linear combination of GTOs as given by
6262
To build a CGF, we first have to produce the CGF object and then
6363
add GTOs to it::
6464

65-
from pyqint import PyQInt, cgf
65+
from pyqint import PyQInt, CGF
6666

67-
cgf = cgf([0.0, 0.0, 0.0])
67+
cgf = CGF([0.0, 0.0, 0.0])
6868

6969
cgf.add_gto(0.154329, 3.425251, 0, 0, 0)
7070
cgf.add_gto(0.535328, 0.623914, 0, 0, 0)
@@ -97,15 +97,15 @@ are separated by a distance of 1.4 Bohr.
9797

9898
.. code-block:: python
9999
100-
from pyqint import PyQInt, cgf
100+
from pyqint import PyQInt, CGF
101101
import numpy as np
102102
from copy import deepcopy
103103
104104
# construct integrator object
105105
integrator = PyQInt()
106106
107107
# build CGF for a H atom located at the origin
108-
cgf1 = cgf([0.0, 0.0, 0.0])
108+
cgf1 = CGF([0.0, 0.0, 0.0])
109109
110110
cgf1.add_gto(0.154329, 3.425251, 0, 0, 0)
111111
cgf1.add_gto(0.535328, 0.623914, 0, 0, 0)
@@ -145,15 +145,15 @@ are separated by a distance of 1.4 Bohr.
145145

146146
.. code-block:: python
147147
148-
from pyqint import PyQInt, cgf, gto
148+
from pyqint import PyQInt, CGF
149149
import numpy as np
150150
from copy import deepcopy
151151
152152
# construct integrator object
153153
integrator = PyQInt()
154154
155155
# build CGF for a H atom located at the origin
156-
cgf1 = cgf([0.0, 0.0, 0.0])
156+
cgf1 = CGF([0.0, 0.0, 0.0])
157157
158158
cgf1.add_gto(0.154329, 3.425251, 0, 0, 0)
159159
cgf1.add_gto(0.535328, 0.623914, 0, 0, 0)
@@ -195,15 +195,15 @@ the nuclei are the same.
195195

196196
.. code-block:: python
197197
198-
from pyqint import PyQInt, cgf, gto
198+
from pyqint import PyQInt, CGF
199199
import numpy as np
200200
from copy import deepcopy
201201
202202
# construct integrator object
203203
integrator = PyQInt()
204204
205205
# build CGF for a H atom located at the origin
206-
cgf1 = cgf([0.0, 0.0, 0.0])
206+
cgf1 = CGF([0.0, 0.0, 0.0])
207207
208208
cgf1.add_gto(0.154329, 3.425251, 0, 0, 0)
209209
cgf1.add_gto(0.535328, 0.623914, 0, 0, 0)
@@ -260,15 +260,15 @@ system are calculated.
260260

261261
.. code-block:: python
262262
263-
from pyqint import PyQInt, cgf, gto
263+
from pyqint import PyQInt, CGF
264264
import numpy as np
265265
from copy import deepcopy
266266
267267
# construct integrator object
268268
integrator = PyQInt()
269269
270270
# build CGF for a H atom located at the origin
271-
cgf1 = cgf([0.0, 0.0, 0.0])
271+
cgf1 = CGF([0.0, 0.0, 0.0])
272272
273273
cgf1.add_gto(0.154329, 3.425251, 0, 0, 0)
274274
cgf1.add_gto(0.535328, 0.623914, 0, 0, 0)
@@ -776,13 +776,13 @@ In the example code shown below, the latter is done.
776776
777777
cgfs = []
778778
for n in nuclei:
779-
_cgf = cgf(n[0])
779+
cgf = CGF(n[0])
780780
781-
_cgf.add_gto(0.154329, 3.425251, 0, 0, 0)
782-
_cgf.add_gto(0.535328, 0.623914, 0, 0, 0)
783-
_cgf.add_gto(0.444635, 0.168855, 0, 0, 0)
781+
cgf.add_gto(0.154329, 3.425251, 0, 0, 0)
782+
cgf.add_gto(0.535328, 0.623914, 0, 0, 0)
783+
cgf.add_gto(0.444635, 0.168855, 0, 0, 0)
784784
785-
cgfs.append(_cgf)
785+
cgfs.append(cgf)
786786
787787
res = HF().rhf(mol, basis=cgfs, verbose=True)
788788

meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package:
22
name: "pyqint"
3-
version: "1.0.1"
3+
version: "1.1.0"
44

55
source:
66
path: .

pyqint/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from .molecule import Molecule
22
from .pyqint import PyQInt
3-
from .cgf import cgf
4-
from .gto import gto
3+
from .cgf import CGF
4+
from .gto import GTO
55
from .hf import HF
66
from .foster_boys import FosterBoys
77
from .cohp import COHP

pyqint/_version.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
__version__ = "1.0.1"
2-
1+
__version__ = "1.1.0"

pyqint/cgf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from .gto import gto
1+
from .gto import GTO
22
from .pyqint import PyCGF
33
from . import spherical_harmonics as sh
44

5-
class cgf:
5+
class CGF:
66
"""
77
Contracted Gaussian Type Orbital
88
"""
@@ -46,7 +46,7 @@ def add_gto(self, c, alpha, l, m, n):
4646
"""
4747
Add Gaussian Type Orbital to Contracted Gaussian Function
4848
"""
49-
self.gtos.append(gto(c, self.p, alpha, l, m, n))
49+
self.gtos.append(GTO(c, self.p, alpha, l, m, n))
5050
self.cgf.add_gto(c, alpha, l, m, n)
5151

5252
def add_spherical_gto(self, c, alpha, l, m):

pyqint/gto.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from .pyqint import PyGTO
22

3-
class gto:
3+
class GTO:
44
"""
55
Primitive Gaussian Type Orbital
66
"""
@@ -27,7 +27,7 @@ def __setstate__(self, d):
2727
self.p = d[1]
2828
self.alpha = d[2]
2929
self.l = d[3]
30-
self.m = d[3]
30+
self.m = d[4]
3131
self.n = d[5]
3232
self.gto = PyGTO(self.c, self.p, self.alpha, self.l, self.m, self.n)
3333

pyqint/molecule.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import json
44
import os
55
import numpy as np
6-
from .cgf import cgf
6+
from .cgf import CGF
77
from .element import Element
88

99
class Molecule:
@@ -88,47 +88,47 @@ def build_basis(self, name):
8888
for cgf_t in cgfs_template['cgfs']:
8989
# s-orbitals
9090
if cgf_t['type'] == 'S':
91-
self.__cgfs.append(cgf(atom[1]))
91+
self.__cgfs.append(CGF(atom[1]))
9292
for gto in cgf_t['gtos']:
9393
self.__cgfs[-1].add_gto(gto['coeff'], gto['alpha'], 0, 0, 0)
9494

9595
# p-orbitals
9696
if cgf_t['type'] == 'P':
97-
self.__cgfs.append(cgf(atom[1]))
97+
self.__cgfs.append(CGF(atom[1]))
9898
for gto in cgf_t['gtos']:
9999
self.__cgfs[-1].add_gto(gto['coeff'], gto['alpha'], 1, 0, 0)
100100

101-
self.__cgfs.append(cgf(atom[1]))
101+
self.__cgfs.append(CGF(atom[1]))
102102
for gto in cgf_t['gtos']:
103103
self.__cgfs[-1].add_gto(gto['coeff'], gto['alpha'], 0, 1, 0)
104104

105-
self.__cgfs.append(cgf(atom[1]))
105+
self.__cgfs.append(CGF(atom[1]))
106106
for gto in cgf_t['gtos']:
107107
self.__cgfs[-1].add_gto(gto['coeff'], gto['alpha'], 0, 0, 1)
108108

109109
# d-orbitals
110110
if cgf_t['type'] == 'D':
111-
self.__cgfs.append(cgf(atom[1]))
111+
self.__cgfs.append(CGF(atom[1]))
112112
for gto in cgf_t['gtos']:
113113
self.__cgfs[-1].add_gto(gto['coeff'], gto['alpha'], 2, 0, 0)
114114

115-
self.__cgfs.append(cgf(atom[1]))
115+
self.__cgfs.append(CGF(atom[1]))
116116
for gto in cgf_t['gtos']:
117117
self.__cgfs[-1].add_gto(gto['coeff'], gto['alpha'], 0, 2, 0)
118118

119-
self.__cgfs.append(cgf(atom[1]))
119+
self.__cgfs.append(CGF(atom[1]))
120120
for gto in cgf_t['gtos']:
121121
self.__cgfs[-1].add_gto(gto['coeff'], gto['alpha'], 0, 0, 2)
122122

123-
self.__cgfs.append(cgf(atom[1]))
123+
self.__cgfs.append(CGF(atom[1]))
124124
for gto in cgf_t['gtos']:
125125
self.__cgfs[-1].add_gto(gto['coeff'], gto['alpha'], 1, 1, 0)
126126

127-
self.__cgfs.append(cgf(atom[1]))
127+
self.__cgfs.append(CGF(atom[1]))
128128
for gto in cgf_t['gtos']:
129129
self.__cgfs[-1].add_gto(gto['coeff'], gto['alpha'], 1, 0, 1)
130130

131-
self.__cgfs.append(cgf(atom[1]))
131+
self.__cgfs.append(CGF(atom[1]))
132132
for gto in cgf_t['gtos']:
133133
self.__cgfs[-1].add_gto(gto['coeff'], gto['alpha'], 0, 1, 1)
134134

tests/test_cgf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import unittest
2-
from pyqint import PyQInt, Molecule, cgf
3-
from copy import deepcopy
2+
from pyqint import PyQInt, Molecule, CGF
43
import numpy as np
54
import os
65

@@ -75,7 +74,7 @@ def testSphericalHarmonicsOnSite(self):
7574
p0 = [0.0, 0.0, 0.0]
7675
for l in range(7):
7776
for m in range(-l, l+1):
78-
orb = cgf(p0)
77+
orb = CGF(p0)
7978
orb.add_spherical_gto(1.0, 1.0, l, m)
8079
basis_functions.append(orb)
8180
# build overlap matrix

0 commit comments

Comments
 (0)