diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5ffbf999..70bab742 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,8 +1,9 @@ # load triqs helper to set up tests find_package(TriqsTest) -FILE(COPY SrVO3.h5 SrVO3.ctqmcout SrVO3.symqmc SrVO3.sympar SrVO3.parproj DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +FILE(COPY SrVO3.h5 SrVO3.ctqmcout SrVO3.symqmc SrVO3.sympar SrVO3.parproj hamiltonian.hk DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) triqs_add_test_hdf(wien2k_convert " -p 1.e-6" ) +triqs_add_test_hdf(hk_convert " -p 1.e-6" ) triqs_add_test_hdf(sumklda_basic " -d 1.e-6" ) triqs_add_test_hdf(srvo3_Gloc " -d 1.e-6" ) triqs_add_test_hdf(U_mat " -d 1.e-6" ) diff --git a/test/hamiltonian.hk b/test/hamiltonian.hk new file mode 100644 index 00000000..781fa1f0 --- /dev/null +++ b/test/hamiltonian.hk @@ -0,0 +1,169 @@ + 27 + 1.0 + 1 + 1 1 2 3 + 1 + 1 1 2 3 0 1 + 2 2 3 + -0.99637800 0.00000000 0.00000000 + 0.00000000 -0.99637800 0.00000000 + 0.00000000 0.00000000 -0.99637800 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + -0.90056700 0.00000000 0.00000000 + 0.00000000 0.58187406 0.00000000 + 0.00000000 0.00000000 0.58187406 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + -0.90056701 0.00000000 0.00000000 + 0.00000000 0.58187389 0.00000000 + 0.00000000 0.00000000 0.58187389 + 0.00000000 -0.00000000 0.00000000 + -0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.58187406 0.00000000 0.00000000 + 0.00000000 0.58187406 0.00000000 + 0.00000000 0.00000000 -0.90056700 + 0.00000000 0.00000000 0.00000000 + 0.00000000 -0.00000000 -0.00000000 + 0.00000000 -0.00000000 -0.00000000 + 0.57772205 -0.00000000 -0.04829400 + -0.00000000 0.90099002 0.00000000 + -0.04829400 0.00000000 0.57772205 + -0.00000000 -0.00000000 0.00000000 + -0.00000000 0.00000000 -0.00000000 + 0.00000000 -0.00000000 -0.00000000 + 0.57772205 -0.00000000 0.04829400 + -0.00000000 0.90098999 0.00000000 + 0.04829400 0.00000000 0.57772189 + -0.00000000 0.00000000 0.00000000 + 0.00000000 -0.00000000 0.00000000 + 0.00000000 0.00000000 -0.00000000 + 0.58187389 0.00000000 0.00000000 + 0.00000000 0.58187389 0.00000000 + 0.00000000 0.00000000 -0.90056701 + -0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 -0.00000000 + 0.00000000 -0.00000000 -0.00000000 + 0.57772189 -0.00000000 0.04829400 + -0.00000000 0.90098999 0.00000000 + 0.04829400 0.00000000 0.57772205 + -0.00000000 -0.00000000 0.00000000 + -0.00000000 -0.00000000 0.00000000 + 0.00000000 0.00000000 -0.00000000 + 0.57772189 0.00000000 -0.04829401 + 0.00000000 0.90098995 0.00000000 + -0.04829401 0.00000000 0.57772189 + -0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.58187406 0.00000000 0.00000000 + 0.00000000 -0.90056700 0.00000000 + 0.00000000 0.00000000 0.58187406 + -0.00000000 0.00000000 0.00000000 + 0.00000000 -0.00000000 -0.00000000 + 0.00000000 -0.00000000 -0.00000000 + 0.57772205 -0.04829400 -0.00000000 + -0.04829400 0.57772205 0.00000000 + -0.00000000 0.00000000 0.90099002 + 0.00000000 -0.00000000 0.00000000 + -0.00000000 -0.00000000 0.00000000 + 0.00000000 0.00000000 -0.00000000 + 0.57772205 0.04829400 -0.00000000 + 0.04829400 0.57772189 0.00000000 + -0.00000000 0.00000000 0.90098999 + 0.00000000 -0.00000000 0.00000000 + -0.00000000 -0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.90099002 0.00000000 0.00000000 + 0.00000000 0.57772205 -0.04829400 + 0.00000000 -0.04829400 0.57772205 + -0.00000000 0.00000000 0.00000000 + 0.00000000 -0.00000000 -0.00000000 + 0.00000000 -0.00000000 -0.00000000 + 1.06798204 -0.01598400 -0.01598400 + -0.01598400 1.06798204 -0.01598400 + -0.01598400 -0.01598400 1.06798204 + -0.00000000 -0.00000000 -0.00000000 + -0.00000000 -0.00000000 0.00000000 + -0.00000000 0.00000000 -0.00000000 + 1.06798202 0.01598400 0.01598400 + 0.01598400 1.06798199 -0.01598400 + 0.01598400 -0.01598400 1.06798199 + -0.00000000 -0.00000000 -0.00000000 + -0.00000000 0.00000000 0.00000000 + -0.00000000 0.00000000 0.00000000 + 0.90098999 0.00000000 0.00000000 + 0.00000000 0.57772189 0.04829400 + 0.00000000 0.04829400 0.57772205 + 0.00000000 0.00000000 0.00000000 + 0.00000000 -0.00000000 0.00000000 + 0.00000000 0.00000000 -0.00000000 + 1.06798199 -0.01598400 0.01598400 + -0.01598400 1.06798199 0.01598400 + 0.01598400 0.01598400 1.06798202 + -0.00000000 -0.00000000 -0.00000000 + -0.00000000 -0.00000000 0.00000000 + -0.00000000 0.00000000 0.00000000 + 1.06798197 0.01598400 -0.01598400 + 0.01598400 1.06798194 0.01598400 + -0.01598400 0.01598400 1.06798197 + -0.00000000 -0.00000000 -0.00000000 + -0.00000000 0.00000000 0.00000000 + -0.00000000 0.00000000 -0.00000000 + 0.58187389 0.00000000 0.00000000 + 0.00000000 -0.90056701 0.00000000 + 0.00000000 0.00000000 0.58187389 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 -0.00000000 + 0.00000000 -0.00000000 0.00000000 + 0.57772189 0.04829400 0.00000000 + 0.04829400 0.57772205 -0.00000000 + 0.00000000 -0.00000000 0.90098999 + -0.00000000 0.00000000 0.00000000 + 0.00000000 -0.00000000 0.00000000 + 0.00000000 0.00000000 -0.00000000 + 0.57772189 -0.04829401 -0.00000000 + -0.04829401 0.57772189 0.00000000 + -0.00000000 0.00000000 0.90098995 + -0.00000000 -0.00000000 0.00000000 + -0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 -0.00000000 + 0.90098999 0.00000000 0.00000000 + 0.00000000 0.57772205 0.04829400 + 0.00000000 0.04829400 0.57772189 + -0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 -0.00000000 + 0.00000000 -0.00000000 -0.00000000 + 1.06798199 0.01598400 -0.01598400 + 0.01598400 1.06798202 0.01598400 + -0.01598400 0.01598400 1.06798199 + 0.00000000 -0.00000000 -0.00000000 + -0.00000000 0.00000000 -0.00000000 + -0.00000000 -0.00000000 0.00000000 + 1.06798197 -0.01598400 0.01598400 + -0.01598400 1.06798197 0.01598400 + 0.01598400 0.01598400 1.06798194 + 0.00000000 -0.00000000 -0.00000000 + -0.00000000 -0.00000000 -0.00000000 + -0.00000000 -0.00000000 -0.00000000 + 0.90098995 0.00000000 0.00000000 + 0.00000000 0.57772189 -0.04829401 + 0.00000000 -0.04829401 0.57772189 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 -0.00000000 + 0.00000000 -0.00000000 0.00000000 + 1.06798194 0.01598400 0.01598400 + 0.01598400 1.06798197 -0.01598400 + 0.01598400 -0.01598400 1.06798197 + -0.00000000 0.00000000 -0.00000000 + 0.00000000 0.00000000 0.00000000 + -0.00000000 0.00000000 0.00000000 + 1.06798192 -0.01598400 -0.01598400 + -0.01598400 1.06798192 -0.01598400 + -0.01598400 -0.01598400 1.06798192 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 diff --git a/test/hk_convert.output.h5 b/test/hk_convert.output.h5 new file mode 100644 index 00000000..c150bda9 Binary files /dev/null and b/test/hk_convert.output.h5 differ diff --git a/test/hk_convert.py b/test/hk_convert.py new file mode 100644 index 00000000..e8298402 --- /dev/null +++ b/test/hk_convert.py @@ -0,0 +1,29 @@ + +################################################################################ +# +# TRIQS: a Toolbox for Research in Interacting Quantum Systems +# +# Copyright (C) 2011 by M. Aichhorn, L. Pourovskii, V. Vildosola +# +# TRIQS is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. +# +# TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# TRIQS. If not, see . +# +################################################################################ + + +from pytriqs.applications.dft.converters import * +from pytriqs.archive import * + +Converter = HkConverter(hk_file='hamiltonian.hk',hdf_file='hk_convert.output.h5') + +Converter.convert_dmft_input()