mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-11-19 12:32:40 +01:00
.. | ||
src | ||
test | ||
build_pyqmckl.sh | ||
README.md |
Python API of the QMCkl library
Requirements
numpy
SWIG
(>= 4.0)
Manual installation
- Install the QMCkl as usual
- Get the latest
qmckl.h
file python process.py
to generatepyqmckl_include.i
list of SWIG patternsswig -python -py3 -o pyqmckl_wrap.c pyqmckl.i
to generate the SWIG wrapper code in C andpyqmckl.py
module in Python. Note: for this to work three files have to be present in the working directory:pyqmckl.i
,pyqmckl_include.i
andnumpy.i
.<c-compiler> -I/usr/include/python3.8 -c -fPIC pyqmckl_wrap.c
to compile the wrapper code into an object file using the<c-compiler>
(replace with your C compiler, e.g.gcc
) on your machine<c-compiler> -shared pyqmckl_wrap.o -lqmckl -o _pyqmckl.so
to produce the final C extension (this requires theqmckl
library to be installed and present in the linking paths together with all its dependencies liketrexio
)- Put the produced
_pyqmckl.so
andpyqmckl.py
files in the working directory and then runimport pyqmckl