-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
107 changed files
with
2,002 additions
and
803 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Publish pyscfad | ||
|
||
on: | ||
release: | ||
types: | ||
- released | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish_pypi_any: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04] | ||
python-version: ["3.11"] | ||
|
||
environment: release | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Build wheels | ||
run: | | ||
python3 -m pip install --upgrade build | ||
python3 -m build | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: github release | ||
|
||
on: [workflow_dispatch] | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Release Info | ||
run: ./.github/workflows/release_info.sh | ||
id: release_info | ||
- name: Create Release | ||
if: ${{ steps.release_info.outputs.version_tag }} | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.release_info.outputs.version_tag }} | ||
release_name: pyscfad release ${{ steps.release_info.outputs.version_tag }} | ||
body_path: RELEASE.md | ||
prerelease: true | ||
# draft: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Get latest version tag | ||
get_last_tag() { | ||
curl --silent "https://api.github.com/repos/fishjojo/pyscfad/releases/latest" | sed -n 's/.*"tag_name": "v\(.*\)",.*/\1/p' | ||
} | ||
last_version=$(get_last_tag) | ||
echo Last version: $last_version | ||
|
||
# Get current version tag | ||
cur_version=$(sed -n "/^__version__ =/s/.*\"\(.*\)\"/\1/p" pyscfad/version.py) | ||
if [ -z "$cur_version" ]; then | ||
cur_version=$(sed -n "/^__version__ =/s/.*'\(.*\)'/\1/p" pyscfad/version.py) | ||
fi | ||
echo Current version: $cur_version | ||
|
||
# Create version tag | ||
if [ -n "$last_version" ] && [ -n "$cur_version" ] && [ "$cur_version" != "$last_version" ]; then | ||
git config user.name "Github Actions" | ||
git config user.email "[email protected]" | ||
version_tag=v"$cur_version" | ||
|
||
# Extract release info from CHANGELOG | ||
sed -n "/^## pyscfad $cur_version/,/^## pyscfad $last_version/p" CHANGELOG.md | tail -n +2 | sed -e '/^## pyscfad /,$d' | head -n -1 > RELEASE.md | ||
echo "::set-output name=version_tag::$version_tag" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
#!/usr/bin/env bash | ||
export OMP_NUM_THREADS=1 | ||
export PYTHONPATH=$(pwd):$(pwd)/pyscf:$PYTHONPATH | ||
echo "pyscfad = True" >> $HOME/.pyscf_conf.py | ||
#echo "pyscf_numpy_backend = 'jax'" >> $HOME/.pyscf_conf.py | ||
#echo "pyscf_scipy_linalg_backend = 'pyscfad'" >> $HOME/.pyscf_conf.py | ||
#echo "pyscf_scipy_backend = 'jax'" >> $HOME/.pyscf_conf.py | ||
export PYTHONPATH=$(pwd):$PYTHONPATH | ||
|
||
pytest ./pyscfad --cov-report xml --cov=. --verbosity=1 --durations=10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Change log | ||
|
||
## pyscfad 0.1.5 | ||
* Changes | ||
* pyscfad is now compatable with pyscf 2.6. | ||
* Add `backend` module (experimental). | ||
* Add GCCSD(T). | ||
* Add interface to Jabobi sweep for Pipek-Mezey localization. | ||
|
||
* Bug fixes | ||
* Fix LRC hybrid density functionals. | ||
|
||
## pyscfad 0.1.4 (Mar 5, 2024) | ||
* Changes | ||
* pyscfad is now compatable with pyscf 2.3. | ||
* Drop support for python 3.7. | ||
* Drop dependence on jaxopt. | ||
* Update JAX custom pytree node auxiliary data for safe comparison. | ||
* Add `pyscfadlib`, fast C codes for custom VJPs. | ||
* Add dynamic configuration. | ||
* Allow `implicit_diff` to use preconditioners. | ||
* Improve `scipy.linalg.eigh`. | ||
* Add `scipy.linalg.svd`. | ||
* Improve `lib.unpack_tril`, `lib.pack_tril`. | ||
* Refactor `gto.moleintor`. | ||
* Add fast VJP for molecular integrals. | ||
* Improve `gto.eval_gto` performance. | ||
* Add `gto.eval_gto` gradient w.r.t. `Mole.ctr_coeff` and `Mole.exp`. | ||
* Avoid `df.DF` to create temperary files. | ||
* Optimize `df.df_jk`. | ||
* Add `scf.cphf`. | ||
* Add `ao2mo._ao2mo`. | ||
* Add `lo.iao`, `lo.boys`, `lo.pipek`, `lo.orth`. | ||
* Add `geomopt`. | ||
* Add `mp.dfmp2`, MP2 one-RDM. | ||
* Consider permutation symmetry for CCSD. | ||
* Disable `jit` for CCSD which causes memory leak. | ||
* Simplify implementation of `cc.ccsd_t_slow`. | ||
* Add optimized `cc.ccsd_t`. | ||
* Add iterative CCSD(T) solver. | ||
* Add `cc.dfccsd`, `cc.dcsd`. | ||
* Add `tools.timer`. | ||
|
||
* Bug fixes | ||
* Fix integral derivatives w.r.t. `Mole.ctr_coeff` and `Mole.exp`. | ||
|
||
## pyscfad 0.1.3 (Sep 13, 2023) | ||
* Bug fixes | ||
* Fix installation issues. | ||
|
||
## pyscfad 0.1.2 (Mar 13, 2023) | ||
* Changes | ||
* Add AD support for ROHF. | ||
|
||
## pyscfad 0.1.1 (Jan 25, 2023) | ||
* Changes | ||
* pyscfad is now compatable with pyscf 2.1. | ||
|
||
## pyscfad 0.1.0 (Aug 3, 2022) | ||
* Changes | ||
* First release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
""" | ||
PySCF with auto-differentiation | ||
""" | ||
import sys | ||
from pyscfad.version import __version__ | ||
|
||
#from pyscfad import util | ||
#from pyscfad import implicit_diff | ||
|
||
from pyscfad._src._config import ( | ||
config, | ||
config_update | ||
) | ||
|
||
import jax | ||
jax.config.update("jax_enable_x64", True) | ||
# export backend.numpy to pyscfad namespace | ||
# pylint: disable=useless-import-alias | ||
from pyscfad.backend import numpy as numpy | ||
from pyscfad.backend import ops as ops | ||
sys.modules['pyscfad.numpy'] = numpy | ||
sys.modules['pyscfad.ops'] = ops | ||
|
||
del sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.