Authors: aXioM=XiaoHan+MoHan :)
This framework helps bind (GPU/MPI-accelerated) C++ codes with Python using pybind11. For example, packages/mdsw implements Molecular Dynamics in C++ and it interfaces with OpenAI/gym environment through Python. New package can be added by following the existing examples. Axiom allows C++ and Python to communicate efficiently within memory through Numpy. Below shows an calculation done with mdsw -- the greedy search part is written in Python.
Minimum Atomistic Defect (Frank-Partial Dislocation) Nucleation Energy Barrier Found by Greedy Algorithm- OS X > Yosemite, Linux: CentOS >= 7.5.1804 or ubuntu >=16.04.4 LTS).
- python: 2.7 or 3.6.
- git clone git@github.com:XiaohanZhangCMU/axiom.git; cd axiom;
- Add your (GPU/MPI)C++ project "ABC" to axiom/packages/ABC. Organize the codes into src and include.
- Write CMakeLists.txt in axiom/packages/ABC and write _axiom.cpp in a similar way as other packages to export the variables and methods to python.
- sh ./install_package "your package name " to compile. (You can also supply multiple package names and build them simultaneously. If no argument is given, all packages in axiom/packages will be built.)
- In python script, add sys.path.append('your_path_to/axiom/lib/') to the top.
- Enjoy!
- pip install PyOpenGL PyOpenGL_accelerate (On Ubuntu or Linux need: sudo apt-get install python-opengl).
- python3 -m pip install Pillow
- zoo: A playground for simple pybind11 binding.
- tensor: GPU and boost::share_ptr for automatic gpu memeory allocation and syncronization.
- mdsw: MD++ (http://micro.stanford.edu/MDpp), a molecular dynamics simulator. Working with reinforcement learning. See Python/frankMEP/SearchAlgorihtm.py.
- mdfem: Solve nonlinear neo-hookean FEM by minimizing potential energy.
- fem: A one dimensional elasticity FEM solver (to be generalized).
- Implement greedy search algorithm for Frank Partial Dislocation energy barrier calculation in silicon thin film.
- mdsw interfaces with openAI/gym. On going: Deep Q network search algorithm for Frank Partial dislocation nucleation mechanism.
- tensor package enables automatic memory synchronization between GPU and CPU for tensors (same as Caffe).
- python/tests/View.py uses PyOpenG for visualization.
- Arrays can be exported as numpy arrays and modified in place (no deep memory copy is needed).
Bug reports or questions:
- Note: python script should not have the same name as the module because "module load" refers to the currently used python script, not the dynamic libraries.