From afb1134cb16870d64efa4496a6078427dada14a9 Mon Sep 17 00:00:00 2001 From: "Oleg E. Peil" Date: Wed, 9 Mar 2016 19:04:05 +0100 Subject: [PATCH] Added wrapper description file for ATM Wrapper description file 'atm_desc.py' is needed to generate a Python wrapper over the ATM library. Corresponding CMakeLists.txt has also been added. --- python/converters/plovasp/CMakeLists.txt | 5 +++++ python/converters/plovasp/atm_desc.py | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 python/converters/plovasp/CMakeLists.txt create mode 100644 python/converters/plovasp/atm_desc.py diff --git a/python/converters/plovasp/CMakeLists.txt b/python/converters/plovasp/CMakeLists.txt new file mode 100644 index 00000000..7321cf3d --- /dev/null +++ b/python/converters/plovasp/CMakeLists.txt @@ -0,0 +1,5 @@ +include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${TRIQS_INCLUDE_ALL}) +triqs_python_extension(atm) +target_link_libraries(atm atm_c ${TRIQS_LIBRARY_ALL}) +triqs_set_rpath_for_target(atm) + diff --git a/python/converters/plovasp/atm_desc.py b/python/converters/plovasp/atm_desc.py new file mode 100644 index 00000000..48795a03 --- /dev/null +++ b/python/converters/plovasp/atm_desc.py @@ -0,0 +1,20 @@ +# Generated automatically using the command : +# c++2py.py -m atm -o atm --moduledoc "Analytical Tetrahedron Method for DOS" ../../../c++/plovasp/atm/dos_tetra3d.hpp +from wrap_generator import * + +# The module +module = module_(full_name = "atm", doc = "Analytical Tetrahedron Method for calculating DOS", app_name = "atm") + +# All the triqs C++/Python modules + +# Add here all includes beyond what is automatically included by the triqs modules +module.add_include("../../../c++/plovasp/atm/dos_tetra3d.hpp") + +# Add here anything to add in the C++ code at the start, e.g. namespace using +module.add_preamble(""" +#include +""") + +module.add_function ("array_view dos_tetra_weights_3d (array_view eigk, double en, array_view itt)", doc = """DOS of a band by analytical tetrahedron method\n\n Returns corner weights for all tetrahedra for a given band and real energy.""") + +module.generate_code()