Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 1.3 KB

File metadata and controls

47 lines (38 loc) · 1.3 KB

PySCF with Auto-differentiation

Build Status codecov DOI

Installation

  • To install the latest release, use the following command:
pip install pyscfad
  • To install the development version, use the following command instead:
pip install git+https://github.com/fishjojo/pyscfad.git
  • Install dependencies manually
pip install numpy scipy h5py
pip install jax jaxlib jaxopt

# install pyscf
cd $HOME; git clone https://github.com/fishjojo/pyscf.git
cd pyscf; git checkout ad 
cd pyscf/lib; mkdir build 
cd build; cmake ..; make

export PYTHONPATH=$HOME/pyscf:$PYTHONPATH

Running examples

  • Add the following lines to the PySCF configure file ($HOME/.pyscf_conf.py)
pyscfad = True
pyscf_numpy_backend = 'jax'
pyscf_scipy_linalg_backend = 'pyscfad'
pyscf_scipy_backend = 'jax'
# The followings are optional
pyscfad_scf_implicit_diff = True
pyscfad_ccsd_implicit_diff = True