Geant4工具包的g4py为使用python编写Geant4仿真程序提供了一种途径。我的前文提到python接口方案中有pybind11绑定Geant4的方法,非常幸运的是geant4-pybind实现了这个pybind11绑定,只要通过pip安装就可以使用了。
链接地址:geant4-pybind 0.1.0b4 on PyPI - Libraries.io
安装:
pip install geant4-pybind
系统需求:
Unix (Linux, OS X) prerequisits
- A Geant4 installation, version 10.7+ (make sure it is also added to the path)
- A C++14 compiler (preferably the one Geant4 was compiled with)
- CMake
- Python3
- pip
- git
Windows prerequisits
- A Geant4