An example project built with pybind11 and scikit-build-core. Python 3.7+ (see older commits for older versions of Python).
- Create and activate a new conda env, e.g.
conda create -n myenv python=3.8 & conda activate myenv
. - Clone ABACUS main repository and
cd abacus-develop/python/pyabacus
. - Build pyabacus by
pip install -v .
or install test dependencies & build pyabacus bypip install .[test]
. (Usepip install -v .[test] -i https://pypi.tuna.tsinghua.edu.cn/simple
to accelerate installation process.)
There are examples for CI in .github/workflows
. A simple way to produces
binary "wheels" for all platforms is illustrated in the "wheels.yml" file,
using cibuildwheel
.
Use pytest -v
to run all the unit tests for pyabacus in the local machine.
$ cd tests/
$ pytest -v
Run python vis_nao.py
to visualize the numerical orbital.
$ cd examples/
$ python vis_nao.py
Run python ex_s_rotate.py
in examples
to check the S matrix.
$ cd examples/
$ python ex_s_rotate.py
norm(S_e3 - S_numer) = 3.341208104032616e-15
pybind11 is provided under a BSD-style license that can be found in the LICENSE file. By using, distributing, or contributing to this project, you agree to the terms and conditions of this license.
import pyabacus as m
s = m.ModuleBase.Sphbes()
s.sphbesj(1, 0.0)
0.0