Added a shell script for running PLOVasp converter

The script simply runs pytriqs with an auto-executable module
`plovasp.converter`.
This commit is contained in:
Oleg E. Peil 2016-03-11 11:35:19 +01:00
parent 9401bed308
commit edf5038140
5 changed files with 18 additions and 4 deletions

View File

@ -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})

View File

@ -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)

View File

@ -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 <conf-file> [<path-to-vasp-calcultaion>]")
raise SystemExit(" Usage: plovasp <conf-file> [<path-to-vasp-calcultaion>]")
else:
filename = sys.argv[1]
if narg > 2:
@ -79,3 +85,4 @@ def main():
if __name__ == '__main__':
main()

5
shells/CMakeLists.txt Normal file
View File

@ -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)

4
shells/plovasp.bash.in Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
pytriqs -m applications.dft.converters.plovasp.converter $@