diff --git a/CMakeLists.txt b/CMakeLists.txt index d257cc32..cea7e048 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,7 @@ set(CMAKE_INSTALL_PREFIX ${TRIQS_PATH}) add_subdirectory(fortran/dmftproj) add_subdirectory(python) +add_subdirectory(shells) add_subdirectory(test) option(BUILD_DOC "Build documentation" OFF) if(${BUILD_DOC}) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 080a2c06..13015480 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -8,7 +8,4 @@ configure_file(${CMAKE_SOURCE_DIR}/cmake/sitecustomize.py ${CMAKE_CURRENT_BINARY # make a local pytriqs copy triqs_prepare_local_pytriqs(${python_destination}) -# to be able to run from toplevel -execute_process(COMMAND ln -fs ${CMAKE_BINARY_DIR}/fortran/vertex/vertex.so ${CMAKE_BINARY_DIR}/pytriqs/${python_destination}) - add_subdirectory(converters/plovasp) diff --git a/python/converters/plovasp/main.py b/python/converters/plovasp/converter.py similarity index 89% rename from python/converters/plovasp/main.py rename to python/converters/plovasp/converter.py index 345de7fc..ccd5aeda 100644 --- a/python/converters/plovasp/main.py +++ b/python/converters/plovasp/converter.py @@ -63,9 +63,15 @@ def generate_and_output_as_text(conf_filename, vasp_dir): output_as_text(pars, el_struct, pshells, pgroups) def main(): + """ + This function should not be called directly but via a bash script + 'plovasp' invoking the main function as follows: + + pytriqs -m applications.dft.converters.plovasp.converter $@ + """ narg = len(sys.argv) if narg < 2: - raise SystemExit(" Usage: python main.py []") + raise SystemExit(" Usage: plovasp []") else: filename = sys.argv[1] if narg > 2: @@ -79,3 +85,4 @@ def main(): if __name__ == '__main__': main() + diff --git a/shells/CMakeLists.txt b/shells/CMakeLists.txt new file mode 100644 index 00000000..3a39ed6c --- /dev/null +++ b/shells/CMakeLists.txt @@ -0,0 +1,5 @@ + +configure_file(plovasp.bash.in plovasp) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plovasp DESTINATION bin + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + diff --git a/shells/plovasp.bash.in b/shells/plovasp.bash.in new file mode 100755 index 00000000..d4a34067 --- /dev/null +++ b/shells/plovasp.bash.in @@ -0,0 +1,4 @@ +#!/bin/bash + +pytriqs -m applications.dft.converters.plovasp.converter $@ +