mirror of
https://github.com/triqs/dft_tools
synced 2024-12-21 11:53:41 +01:00
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:
parent
9401bed308
commit
edf5038140
@ -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})
|
||||
|
@ -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)
|
||||
|
@ -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
5
shells/CMakeLists.txt
Normal 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
4
shells/plovasp.bash.in
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
pytriqs -m applications.dft.converters.plovasp.converter $@
|
||||
|
Loading…
Reference in New Issue
Block a user