diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9d56bf1023..a792c40d0f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -97,15 +97,16 @@ jobs: packages-dir: ${{ github.workspace }}/dist verbose: true - release-pypi-macos: - name: Build wheels on macos - runs-on: macos-latest + release-pypi-macos-x86: + name: Build wheels for macos + runs-on: macos-12 steps: - uses: actions/checkout@v3 - name: Build wheels uses: pypa/cibuildwheel@v2.14.1 env: - CIBW_BUILD: cp39-macosx_x86_64 cp39-macosx_arm64 + CIBW_BUILD: cp311-macosx_x86_64 + CIBW_BUILD_VERBOSITY: "1" CMAKE_CONFIGURE_ARGS: "-DWITH_F12=OFF" with: output-dir: mac-wheels @@ -114,10 +115,36 @@ jobs: ls mac-wheels - name: Publish to PyPI run: | - pip install twine + pip3 install twine export TWINE_USERNAME=__token__ export TWINE_PASSWORD="${{ secrets.PYPI_API_TOKEN }}" - twine upload --verbose /mac-wheels/* + twine upload --verbose mac-wheels/* + + release-pypi-macos-arm64: + name: Build wheels for Apple M chips + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Build wheels + uses: pypa/cibuildwheel@v2.14.1 + env: + CIBW_BUILD: cp311-macosx_arm64 + CIBW_BUILD_VERBOSITY: "1" + # Cross-platform build for arm64 wheels on x86 platform + CIBW_ARCHS_MACOS: "x86_64 universal2 arm64" + CMAKE_CONFIGURE_ARGS: "-DWITH_F12=OFF" + CMAKE_OSX_ARCHITECTURES: arm64 + with: + output-dir: mac-wheels + - name: List available wheels + run: | + ls mac-wheels + - name: Publish to PyPI + run: | + pip3 install twine + export TWINE_USERNAME=__token__ + export TWINE_PASSWORD="${{ secrets.PYPI_API_TOKEN }}" + twine upload --verbose mac-wheels/* release-conda-linux: runs-on: ubuntu-latest diff --git a/CHANGELOG b/CHANGELOG index 3357410bef..0131615df5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,41 @@ -PySCF (2023-08-01) ------------------------ +PySCF 2.4.0 (2023-10-16) +------------------------ * Added - - NVT Molecular Dynamics + - Mulliken population analysis for KGHF. + - Interface to libmsym (https://github.com/mcodev31/libmsym) for handeling non-abelian symmetry. + - A variant of the Hückel initial SCF guess. + - PBC TDDFT with non-zero particle-hole momentum transfer for GDF/RSDF (same as the kshift used in pbc eom-ee-ccsd). + - PBC TDDFT with twisted boundary conditions (both single k-point and k-point mesh). + - NVT Molecular Dynamics. + - Gaussian charge model for int1e_grids. + - GHF with fractional occupancy. + - FCIDUMP for MCSCF orbitals. + - DF-CCSD and frozen core for FNO-CCSD. + - multi-collinear functional for PBC DFT. + - non-local functional (VV10) for PBC DFT. + - "undo" method for dynamic classes. This method can revert the action for conversion methods such as "density_fit()", "x2c()", "newton()", "as_scanner()", etc.. + - Merged basis parser for molecular GTO basis and GTH basis. GTH basis can be assigned to Mole object directly. + - Merged ECP and PP parser. PP can be assigned to Mole object directly. + - C-PCM, IEF-PCM, COSMO, and SS(V)PE solvent models and their Gradients. +* Improved + - Performance of the gradients of nuclear repulsion energy. + - JK builder for short-range ERIs. + - The layout of the Mole class and Cell class. Remove the inheritance between Cell and Mole. + - The layout of various SCF classes and the conversion methods (to_ks, to_hf, to_uhf, to_ghf, etc.) between different SCF objects. + - The layout of various MCSCF classes. + - New style to generate dynamic class for DF methods, X2C, QMMM, SOSCF, Solvent model, StateAverageMCSCF, Scanner methods, etc. + - SCF smearing method. + - Make Mole and Cell object picklable. +* Fixes + - supercell symmetry. + - NAO orbital localization. + - Finite-size correction for PBC TDDFT (1/Nk convergence to TDL and agreement with molecular code). + - Bugs in FCI for num. orbitals >= 64. + - PBC empty cell error. + - The edge case CAS(2,2) for Selected CI. + - Dimension issue in PBC-GDF cderi tensor. + - Assume 46 and 78 core configurations to be f-in-valence. + - Coding styles and deprecated warnings from numpy. PySCF 2.3.0 (2023-07-04) ------------------------ diff --git a/MANIFEST.in b/MANIFEST.in index b81d383473..3ed5220083 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -7,9 +7,9 @@ include pyscf/lib/*.so pyscf/lib/config.h.in # macos dynamic libraries include pyscf/lib/*.dylib -include pyscf/lib/deps/lib*/libcint.[45].dylib +include pyscf/lib/deps/lib*/libcint.[4-9].dylib include pyscf/lib/deps/lib*/libxc.*.dylib -include pyscf/lib/deps/lib*/libxcfun.[23].dylib +include pyscf/lib/deps/lib*/libxcfun.[2-9].dylib include pyscf/geomopt/log.ini diff --git a/NOTICE b/NOTICE index 7c3b43ce76..a21469aea7 100644 --- a/NOTICE +++ b/NOTICE @@ -98,6 +98,10 @@ Wanja Schulze Till Hanke Kevin J. Sung Jonathan Edward Moussa +Xiaojie Wu +Pavel Pokhilko +Frédéric Chapoton +Daniel King diff --git a/README.md b/README.md index bc7af9257e..a0b2a39bf4 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ Python-based Simulations of Chemistry Framework [![Build Status](https://github.com/pyscf/pyscf/workflows/CI/badge.svg)](https://github.com/pyscf/pyscf/actions?query=workflow%3ACI) [![codecov](https://codecov.io/gh/pyscf/pyscf/branch/master/graph/badge.svg)](https://codecov.io/gh/pyscf/pyscf) -2023-07-04 +2023-10-15 -* [Stable release 2.3.0](https://github.com/pyscf/pyscf/releases/tag/v2.3.0) +* [Stable release 2.4.0](https://github.com/pyscf/pyscf/releases/tag/v2.4.0) * [Changelog](../master/CHANGELOG) * [Documentation](http://www.pyscf.org) * [Installation](#installation) diff --git a/pyscf/__init__.py b/pyscf/__init__.py index 12991c7777..3e32baeb00 100644 --- a/pyscf/__init__.py +++ b/pyscf/__init__.py @@ -35,7 +35,7 @@ ''' -__version__ = '2.3.0' +__version__ = '2.4.0' import os import sys diff --git a/setup.py b/setup.py index 310f8f45cd..e23d90fb58 100755 --- a/setup.py +++ b/setup.py @@ -17,7 +17,6 @@ import sys from setuptools import setup, find_packages, Extension from setuptools.command.build_py import build_py -from distutils.util import get_platform CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', @@ -80,6 +79,28 @@ def get_version(): EXTRAS['fciqmcscf'] = ['pyscf-fciqmc'] EXTRAS['tblis'] = ['pyscf-tblis'] +def get_platform(): + from distutils.util import get_platform + platform = get_platform() + if sys.platform == 'darwin': + arch = os.getenv('CMAKE_OSX_ARCHITECTURES') + if arch: + osname = platform.rsplit('-', 1)[0] + if ';' in arch: + platform = f'{osname}-universal2' + else: + platform = f'{osname}-{arch}' + elif os.getenv('_PYTHON_HOST_PLATFORM'): + # the cibuildwheel environment + platform = os.getenv('_PYTHON_HOST_PLATFORM') + if platform.endswith('arm64'): + os.putenv('CMAKE_OSX_ARCHITECTURES', 'arm64') + elif platform.endswith('x86_64'): + os.putenv('CMAKE_OSX_ARCHITECTURES', 'x86_64') + else: + os.putenv('CMAKE_OSX_ARCHITECTURES', 'arm64;x86_64') + return platform + class CMakeBuildPy(build_py): def run(self): self.plat_name = get_platform()