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

Release 0.1.8 #54

Merged
merged 8 commits into from
Oct 31, 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/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
environment: ci
steps:
- uses: actions/checkout@v4
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/publish_pyscfadlib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

jobs:
publish_pypi_linux_x86:
publish_pypi_linux_x86_aarch64:
name: publish linux_x86 wheels to pypi
runs-on: ubuntu-latest

Expand All @@ -18,10 +18,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels
uses: pypa/cibuildwheel@v2.19.2
uses: pypa/cibuildwheel@v2.21.3
env:
CIBW_ARCHS_LINUX: "x86_64"
CIBW_ARCHS_LINUX: x86_64 aarch64
with:
package-dir: pyscfadlib
output-dir: pyscfadlib/wheelhouse
Expand All @@ -40,7 +45,7 @@ jobs:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.19.2
uses: pypa/cibuildwheel@v2.21.3
env:
MACOSX_DEPLOYMENT_TARGET: "10.14"
with:
Expand All @@ -63,7 +68,7 @@ jobs:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.19.2
uses: pypa/cibuildwheel@v2.21.3
env:
CMAKE_OSX_ARCHITECTURES: arm64;x86_64
with:
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Change log

## pyscfad 0.1.8 (October 30, 2024)

* Changes
* Add support to Python 3.13.
* Add `scipy.logm` ensuring real results when possible.

* Bug fixes
* Fix `logger.flush` not catching certain formats.

## pyscfad 0.1.7 (July 26, 2024)

* Changes
Expand Down
2 changes: 1 addition & 1 deletion doc/source/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Installation
Python version support
----------------------

Officially Python 3.9, 3.10, 3.11 and 3.12.
Officially Python 3.9, 3.10, 3.11, 3.12, and 3.13.

Installing from PyPI
--------------------
Expand Down
21 changes: 14 additions & 7 deletions pyscfad/dft/test/test_rks_hess.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
import jax
from pyscf.lib import fp
#from pyscf.lib import fp
from pyscf.dft import rks as pyscf_rks
from pyscfad import gto, dft

@pytest.fixture
Expand All @@ -17,17 +18,23 @@ def energy(mol, xc):
e = mf.kernel()
return e

def test_rks_nuc_hess_lda(get_mol):
def test_rks_nuc_hess_lda_high_cost(get_mol):
mol = get_mol
hess = jax.hessian(energy)(mol, 'lda,vwn').coords.coords
assert abs(fp(hess) - -0.5301815984221748) < 1e-6
#assert abs(fp(hess) - -0.5301815984221748) < 1e-6
hess0 = pyscf_rks.RKS(mol, xc='lda,vwn').run().Hessian().kernel()
assert abs(hess.transpose(0,2,1,3) - hess0).max() < 1e-6

def test_rks_nuc_hess_gga(get_mol):
def test_rks_nuc_hess_gga_high_cost(get_mol):
mol = get_mol
hess = jax.hessian(energy)(mol, 'pbe, pbe').coords.coords
assert abs(fp(hess) - -0.5146764054396936) < 1e-6
#assert abs(fp(hess) - -0.5146764054396936) < 1e-6
hess0 = pyscf_rks.RKS(mol, xc='pbe, pbe').run().Hessian().kernel()
assert abs(hess.transpose(0,2,1,3) - hess0).max() < 1e-6

def test_rks_nuc_hess_gga_hybrid(get_mol):
def test_rks_nuc_hess_gga_hybrid_high_cost(get_mol):
mol = get_mol
hess = jax.hessian(energy)(mol, 'b3lyp5').coords.coords
assert abs(fp(hess) - -0.5114248632559669) < 1e-6
#assert abs(fp(hess) - -0.5114248632559669) < 1e-6
hess0 = pyscf_rks.RKS(mol, xc='b3lyp5').run().Hessian().kernel()
assert abs(hess.transpose(0,2,1,3) - hess0).max() < 1e-6
2 changes: 1 addition & 1 deletion pyscfad/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.7"
__version__ = "0.1.8"
11 changes: 7 additions & 4 deletions pyscfadlib/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"numpy>=1.17",
Expand All @@ -44,7 +45,7 @@ build-verbosity = 1

test-requires = ["pytest", "pyscf>=2.3"]
test-command = "pytest {package}/test"
test-skip = "cp311-macosx_arm64"
#test-skip = "cp311-macosx_arm64"

container-engine = "docker"
manylinux-x86_64-image = "manylinux2014"
Expand All @@ -55,11 +56,13 @@ skip = ["pp*", "*musllinux*"]
"build-dir" = "build/{wheel_tag}"

[tool.cibuildwheel.linux]
archs = ["x86_64"]
#archs = ["x86_64", "aarch64"]
before-all = [
"ulimit -n 1024",
"ln -s libquadmath.so.0 /usr/lib64/libquadmath.so",
"yum install -y openblas-devel.x86_64",
# "ln -s libquadmath.so.0 /usr/lib64/libquadmath.so",
"yum install -y epel-release",
"yum-config-manager --enable epel",
"yum install -y openblas-devel",
]
repair-wheel-command = "auditwheel -v repair -w {dest_dir} {wheel}"

Expand Down
2 changes: 1 addition & 1 deletion pyscfadlib/pyscfadlib/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.7'
__version__ = '0.1.8'
7 changes: 7 additions & 0 deletions pyscfadlib/test/test_lapack.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pytest

def test_import():
try:
from pyscfadlib import lapack as lp
except ImportError as e:
raise ImportError(e)
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
],
zip_safe=False,
)
Loading