Skip to content

Commit 4b51e90

Browse files
authored
Release v0.1.4 (#21)
* update custom pytree node auxdata for safe compare * add fast moleintor vjp, dot_eri_dm vjp * dynamic config * add scipy * add int2e restore * add dfmp2, dfccsd * add iao; update dfmp2 * add rccsd energy * add ccsd symmetry * add _ao2mo * simplify ccsd_t_slow * add optimized ccsd_t * add timer * update eigh; add svd, lowdin jvp * add DF.loop * add df_jk_opt * add ao2mo.nr_e2_opt * avoid df.DF create tmp files * disable jit for ccsd which causes memory leak * update unpack_tril * update pack_tril * add jax scan version of dfmp2 * add boys localization * update implicit_diff, add boys, pipek-mezey * add cphf, mp2 rdm1 * drop support for python 3.7 * drop dependence on jaxopt * add pyscfadlib * add dcsd * add iterative t3 solver * test lo symmetry * update lo, add geomopt * fix basis exp and ctr_coeff derivative * improve eval_gto performance * add eval_gto ctr_coeff gradient * add eval_gto exponent gradient * refactor moleintor
1 parent 3a90edd commit 4b51e90

File tree

230 files changed

+39139
-2023
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+39139
-2023
lines changed

.github/workflows/build_pyscf_linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ sudo apt-get -qq install \
1616
cmake
1717

1818
cd pyscf/pyscf/lib
19-
curl -L "https://github.com/fishjojo/pyscf-deps/blob/master/pyscf-2.1.0-ad-deps.tar.gz?raw=true" | tar xzf -
19+
curl -L "https://github.com/fishjojo/pyscf-deps/blob/master/pyscf-2.1.1-ad-deps.tar.gz?raw=true" | tar xzf -
2020
mkdir build; cd build
2121
cmake -DBUILD_LIBXC=OFF -DBUILD_XCFUN=OFF -DBUILD_LIBCINT=OFF ..
2222
make -j4

.github/workflows/install_pyscf.sh

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,14 @@
11
#!/usr/bin/env bash
22
python -m pip install --upgrade pip
3+
python -m pip cache purge
34
pip install wheel
45
pip install numpy
5-
pip install 'scipy<1.11'
6+
pip install 'scipy<1.12'
67
pip install h5py
7-
pip install typing_extensions
8-
pip install jaxlib jax jaxopt
9-
pip install pytest pytest-cov
8+
pip install jaxlib
9+
pip install jax
10+
pip install pytest
11+
pip install pytest-cov
1012

11-
#pyscf
12-
git clone https://github.com/fishjojo/pyscf.git
13-
cd pyscf; git checkout v2.1.1-ad; cd ..
14-
15-
if [ "$RUNNER_OS" == "Linux" ]; then
16-
os='linux'
17-
elif [ "$RUNNER_OS" == "macOS" ]; then
18-
os='macos'
19-
else
20-
echo "$RUNNER_OS not supported"
21-
exit 1
22-
fi
23-
24-
./.github/workflows/build_pyscf_"$os".sh
13+
pip install 'pyscf==2.3'
14+
pip install 'pyscfadlib==0.1.4'

.github/workflows/lint.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,5 @@
22
export OMP_NUM_THREADS=1
33
export PYTHONPATH=$(pwd):$(pwd)/pyscf:$PYTHONPATH
44
echo "pyscfad = True" >> $HOME/.pyscf_conf.py
5-
echo "pyscf_numpy_backend = 'jax'" >> $HOME/.pyscf_conf.py
6-
echo "pyscf_scipy_linalg_backend = 'pyscfad'" >> $HOME/.pyscf_conf.py
7-
echo "pyscf_scipy_backend = 'jax'" >> $HOME/.pyscf_conf.py
85

96
pylint pyscfad

.github/workflows/pylint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
10-
- name: Set up Python 3.7
10+
- name: Set up Python 3.11
1111
uses: actions/setup-python@v2
1212
with:
13-
python-version: 3.7
13+
python-version: 3.11
1414
- name: install pyscf
1515
run: ./.github/workflows/install_pyscf.sh
1616
- name: install pylint
17-
run: pip install pylint
17+
run: pip install 'pylint==2.17.7'
1818
- name: style check
1919
run: ./.github/workflows/lint.sh

.github/workflows/run_test.sh

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
#!/usr/bin/env bash
22
export OMP_NUM_THREADS=1
33
export PYTHONPATH=$(pwd):$(pwd)/pyscf:$PYTHONPATH
4-
# preload MKL
5-
#if [[ -n "${MKLROOT}" ]]; then
6-
# export LD_PRELOAD=$MKLROOT/lib/intel64/libmkl_avx2.so:$MKLROOT/lib/intel64/libmkl_sequential.so:$MKLROOT/lib/intel64/libmkl_core.so
7-
#fi
84
echo "pyscfad = True" >> $HOME/.pyscf_conf.py
9-
echo "pyscf_numpy_backend = 'jax'" >> $HOME/.pyscf_conf.py
10-
echo "pyscf_scipy_linalg_backend = 'pyscfad'" >> $HOME/.pyscf_conf.py
11-
echo "pyscf_scipy_backend = 'jax'" >> $HOME/.pyscf_conf.py
12-
echo "pyscfad_scf_implicit_diff = True" >> $HOME/.pyscf_conf.py
13-
echo "pyscfad_ccsd_implicit_diff = True" >> $HOME/.pyscf_conf.py
5+
#echo "pyscf_numpy_backend = 'jax'" >> $HOME/.pyscf_conf.py
6+
#echo "pyscf_scipy_linalg_backend = 'pyscfad'" >> $HOME/.pyscf_conf.py
7+
#echo "pyscf_scipy_backend = 'jax'" >> $HOME/.pyscf_conf.py
148

15-
cd pyscfad
16-
pytest --cov-report xml --cov=. --verbosity=1 --durations=10
9+
pytest ./pyscfad --cov-report xml --cov=. --verbosity=1 --durations=10

.pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ disable=abstract-method,
159159
deprecated-method,
160160
arguments-out-of-order,
161161
consider-using-in,
162+
invalid-unary-operand-type,
162163

163164

164165
[REPORTS]

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021-2023 Xing Zhang
3+
Copyright (c) 2021-2024 Xing Zhang
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

MANIFEST.in

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
include MANIFEST.in
22
include README.md setup.py LICENSE
33

4-
prune pyscfad/lib/build
4+
include pyscfad/geomopt/log.ini
55

6-
include pyscfad/lib/*.so
7-
include pyscfad/lib/*.dylib
8-
9-
recursive-include pyscfad/lib *.c *.h
6+
global-exclude *.py[cod]

README.md

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,21 @@ PySCF with Auto-differentiation
88
Installation
99
------------
1010

11-
---
1211
* To install the latest release, run:
1312
```
1413
pip install pyscfad
1514
```
1615

17-
---
18-
* To install the development version, use the following command instead:
16+
* To install the development version, run:
1917
```
2018
pip install git+https://github.com/fishjojo/pyscfad.git
2119
```
22-
This should also install all the dependencies.
23-
Alternatively, the dependencies can be installed via a predefined conda environment:
24-
```
25-
conda env create -f environment.yml
26-
conda activate pyscfad_env
27-
```
28-
OpenMP is not required, but is recommended:
29-
```
30-
# install OpenMP runtime used with clang
31-
# On Linux:
32-
sudo apt update
33-
sudo apt install libomp-dev
3420

35-
# On OSX:
36-
brew install libomp
37-
```
38-
39-
---
40-
* One can also run PySCFAD inside a docker container:
41-
```
42-
docker pull fishjojo/pyscfad:latest
43-
docker run -rm -t -i fishjojo/pyscfad:latest /bin/bash
44-
```
21+
`pyscfad` depends on `pyscf==2.3.0`.
22+
Other dependencies include
23+
`numpy>=1.17`, `scipy<1.12`, `h5py`,
24+
`pyscfadlib`,
25+
`jax>=0.3.25` and `jaxlib>=0.3.25`.
4526

4627
Running examples
4728
----------------
@@ -51,13 +32,6 @@ the following lines need to be added to
5132
the PySCF configure file ($HOME/.pyscf\_conf.py)
5233
```
5334
pyscfad = True
54-
pyscf_numpy_backend = 'jax'
55-
pyscf_scipy_linalg_backend = 'pyscfad'
56-
pyscf_scipy_backend = 'jax'
57-
# The followings turn on implicit differentiations
58-
# for SCF and CC amplitude solvers
59-
pyscfad_scf_implicit_diff = True
60-
pyscfad_ccsd_implicit_diff = True
6135
```
6236

6337
Citing PySCFAD

environment.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)