mirror of
https://github.com/triqs/dft_tools
synced 2024-12-30 16:15:47 +01:00
Continued
This commit is contained in:
parent
76dff0f5a2
commit
1a0ba43f8d
@ -42,9 +42,22 @@ message(STATUS "TRIQS : Adding compilation flags detected by the library (C++11/
|
||||
add_subdirectory(c++)
|
||||
add_subdirectory(python)
|
||||
add_subdirectory(shells)
|
||||
add_subdirectory(test)
|
||||
|
||||
#------------------------
|
||||
# tests
|
||||
#------------------------
|
||||
|
||||
enable_testing()
|
||||
|
||||
option(Build_Tests "Build the tests of the library " ON)
|
||||
if (Build_Tests)
|
||||
message(STATUS "-------- Preparing tests -------------")
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
#------------------------
|
||||
# Documentation
|
||||
#------------------------
|
||||
option(BUILD_DOC "Build documentation" OFF)
|
||||
if(${BUILD_DOC})
|
||||
if(NOT TRIQS_WITH_DOCUMENTATION)
|
||||
|
@ -1,6 +1,6 @@
|
||||
add_library(atm_c dos_tetra3d.hpp dos_tetra3d.cpp argsort.hpp argsort.cpp)
|
||||
target_link_libraries(atm_c triqs)
|
||||
target_compile_options(atm_c PRIVATE -std=c++14)
|
||||
target_compile_options(atm_c PRIVATE -std=c++17)
|
||||
|
||||
install(TARGETS atm_c DESTINATION lib)
|
||||
|
||||
|
@ -4,7 +4,14 @@ set(PYTHON_LIB_DEST ${CPP2PY_PYTHON_LIB_DEST_ROOT}/pytriqs/cthyb)
|
||||
|
||||
# site_customize for build
|
||||
set(package_name "pytriqs.applications")
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/sitecustomize.py ${CMAKE_CURRENT_BINARY_DIR}/sitecustomize.py @ONLY)
|
||||
|
||||
# Create a temporary copy of the python modules so that we can run before installation with the test
|
||||
FILE(GLOB_RECURSE all_py_files RELATIVE ${CMAKE_SOURCE_DIR}/python *.py )
|
||||
foreach(f ${all_py_files})
|
||||
configure_file(${f} ${f} COPYONLY)
|
||||
endforeach()
|
||||
|
||||
#configure_file(${CMAKE_SOURCE_DIR}/cmake/sitecustomize.py ${CMAKE_CURRENT_BINARY_DIR}/sitecustomize.py @ONLY)
|
||||
|
||||
# VASP converter
|
||||
add_subdirectory(converters/plovasp)
|
||||
|
@ -19,10 +19,8 @@
|
||||
# TRIQS. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##########################################################################
|
||||
from pytriqs.cmake_info import hdf5_command_path
|
||||
import pytriqs.utility.mpi as mpi
|
||||
|
||||
|
||||
class ConverterTools:
|
||||
|
||||
def __init__(self):
|
||||
@ -73,7 +71,7 @@ class ConverterTools:
|
||||
mpi.report("Repacking the file %s" % self.hdf_file)
|
||||
|
||||
retcode = subprocess.call(
|
||||
[hdf5_command_path + "/h5repack", "-i%s" % self.hdf_file, "-otemphgfrt.h5"])
|
||||
["h5repack", "-i%s" % self.hdf_file, "-otemphgfrt.h5"])
|
||||
if retcode != 0:
|
||||
mpi.report("h5repack failed!")
|
||||
else:
|
||||
|
@ -3,7 +3,8 @@ set(python_destination pytriqs/applications/dft/converters/plovasp)
|
||||
add_cpp2py_module(atm)
|
||||
target_link_libraries(atm atm_c triqs)
|
||||
#triqs_set_rpath_for_target(atm)
|
||||
target_compile_options(atm PRIVATE -std=c++14)
|
||||
target_compile_options(atm PRIVATE -std=c++17)
|
||||
target_include_directories(atm PRIVATE ${CMAKE_SOURCE_DIR}/c++)
|
||||
|
||||
# This we need in order for tests to work
|
||||
#add_custom_command(TARGET atm POST_BUILD COMMAND ln -fs ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}/atm.so ${CMAKE_BINARY_DIR}/python/dft/converters/plovasp)
|
||||
|
@ -8,11 +8,11 @@ module = module_(full_name = "atm", doc = "Analytical Tetrahedron Method for cal
|
||||
# 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")
|
||||
module.add_include("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 <triqs/python_tools/converters/arrays.hpp>
|
||||
#include <triqs/cpp2py_converters/arrays.hpp>
|
||||
""")
|
||||
|
||||
module.add_function ("array_view<double,2> dos_tetra_weights_3d (array_view<double,1> eigk, double en, array_view<long,2> 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.""")
|
||||
|
@ -1,8 +1,8 @@
|
||||
from pytriqs.applications.dft.sumk_dft import *
|
||||
from sumk_dft import *
|
||||
from pytriqs.utility.h5diff import h5diff
|
||||
from pytriqs.gf import *
|
||||
from pytriqs.utility.comparison_tests import assert_block_gfs_are_close
|
||||
from pytriqs.applications.dft import BlockStructure
|
||||
from block_structure import BlockStructure
|
||||
|
||||
SK = SumkDFT('blockstructure.in.h5',use_dft_blocks=True)
|
||||
|
||||
|
@ -21,11 +21,12 @@
|
||||
################################################################################
|
||||
|
||||
|
||||
from pytriqs.applications.dft.converters import *
|
||||
from pytriqs.archive import *
|
||||
from pytriqs.utility.h5diff import h5diff
|
||||
import pytriqs.utility.mpi as mpi
|
||||
|
||||
from converters import *
|
||||
|
||||
Converter = HkConverter(filename='hk_convert_hamiltonian.hk',hdf_filename='hk_convert.out.h5')
|
||||
|
||||
Converter.convert_dft_input()
|
||||
|
@ -2,7 +2,7 @@
|
||||
import os
|
||||
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.atm import dos_tetra_weights_3d
|
||||
from converters.plovasp.atm import dos_tetra_weights_3d
|
||||
import mytest
|
||||
|
||||
################################################################################
|
||||
|
@ -7,7 +7,7 @@ _rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import arraytest
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.inpconf import ConfigParameters
|
||||
from converters.plovasp.inpconf import ConfigParameters
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
@ -7,7 +7,7 @@ _rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import arraytest
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.inpconf import ConfigParameters
|
||||
from converters.plovasp.inpconf import ConfigParameters
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
@ -7,7 +7,7 @@ _rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import arraytest
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.inpconf import ConfigParameters
|
||||
from converters.plovasp.inpconf import ConfigParameters
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
@ -7,7 +7,7 @@ _rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import arraytest
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.inpconf import ConfigParameters
|
||||
from converters.plovasp.inpconf import ConfigParameters
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
@ -7,7 +7,7 @@ _rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import arraytest
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.inpconf import ConfigParameters
|
||||
from converters.plovasp.inpconf import ConfigParameters
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
@ -7,7 +7,7 @@ _rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import arraytest
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.inpconf import ConfigParameters
|
||||
from converters.plovasp.inpconf import ConfigParameters
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
import pytriqs.applications.dft.converters.plovasp.vaspio
|
||||
from pytriqs.applications.dft.converters.plovasp.inpconf import ConfigParameters
|
||||
from pytriqs.applications.dft.converters.plovasp.plotools import check_data_consistency
|
||||
from pytriqs.applications.dft.converters.plovasp.elstruct import ElectronicStructure
|
||||
import converters.plovasp.vaspio
|
||||
from converters.plovasp.inpconf import ConfigParameters
|
||||
from converters.plovasp.plotools import check_data_consistency
|
||||
from converters.plovasp.elstruct import ElectronicStructure
|
||||
import mytest
|
||||
|
||||
################################################################################
|
||||
|
@ -4,9 +4,9 @@ import rpath
|
||||
_rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.inpconf import ConfigParameters
|
||||
from pytriqs.applications.dft.converters.plovasp.proj_shell import ProjectorShell
|
||||
from pytriqs.applications.dft.converters.plovasp.proj_group import ProjectorGroup
|
||||
from converters.plovasp.inpconf import ConfigParameters
|
||||
from converters.plovasp.proj_shell import ProjectorShell
|
||||
from converters.plovasp.proj_group import ProjectorGroup
|
||||
import mytest
|
||||
|
||||
################################################################################
|
||||
|
@ -4,11 +4,11 @@ import rpath
|
||||
_rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.vaspio import VaspData
|
||||
from pytriqs.applications.dft.converters.plovasp.elstruct import ElectronicStructure
|
||||
from pytriqs.applications.dft.converters.plovasp.inpconf import ConfigParameters
|
||||
from pytriqs.applications.dft.converters.plovasp.proj_shell import ProjectorShell
|
||||
from pytriqs.applications.dft.converters.plovasp.proj_group import ProjectorGroup
|
||||
from converters.plovasp.vaspio import VaspData
|
||||
from converters.plovasp.elstruct import ElectronicStructure
|
||||
from converters.plovasp.inpconf import ConfigParameters
|
||||
from converters.plovasp.proj_shell import ProjectorShell
|
||||
from converters.plovasp.proj_group import ProjectorGroup
|
||||
from pytriqs.archive import HDFArchive
|
||||
import mytest
|
||||
|
||||
|
@ -4,11 +4,11 @@ import rpath
|
||||
_rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.vaspio import VaspData
|
||||
from pytriqs.applications.dft.converters.plovasp.elstruct import ElectronicStructure
|
||||
from pytriqs.applications.dft.converters.plovasp.inpconf import ConfigParameters
|
||||
from pytriqs.applications.dft.converters.plovasp.proj_shell import ProjectorShell
|
||||
from pytriqs.applications.dft.converters.plovasp.proj_group import ProjectorGroup
|
||||
from converters.plovasp.vaspio import VaspData
|
||||
from converters.plovasp.elstruct import ElectronicStructure
|
||||
from converters.plovasp.inpconf import ConfigParameters
|
||||
from converters.plovasp.proj_shell import ProjectorShell
|
||||
from converters.plovasp.proj_group import ProjectorGroup
|
||||
import mytest
|
||||
|
||||
################################################################################
|
||||
|
@ -4,11 +4,11 @@ import rpath
|
||||
_rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.vaspio import VaspData
|
||||
from pytriqs.applications.dft.converters.plovasp.elstruct import ElectronicStructure
|
||||
from pytriqs.applications.dft.converters.plovasp.inpconf import ConfigParameters
|
||||
from pytriqs.applications.dft.converters.plovasp.proj_shell import ProjectorShell
|
||||
from pytriqs.applications.dft.converters.plovasp.proj_group import ProjectorGroup
|
||||
from converters.plovasp.vaspio import VaspData
|
||||
from converters.plovasp.elstruct import ElectronicStructure
|
||||
from converters.plovasp.inpconf import ConfigParameters
|
||||
from converters.plovasp.proj_shell import ProjectorShell
|
||||
from converters.plovasp.proj_group import ProjectorGroup
|
||||
from pytriqs.archive import HDFArchive
|
||||
import mytest
|
||||
|
||||
|
@ -4,11 +4,11 @@ import rpath
|
||||
_rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.vaspio import VaspData
|
||||
from pytriqs.applications.dft.converters.plovasp.elstruct import ElectronicStructure
|
||||
from pytriqs.applications.dft.converters.plovasp.inpconf import ConfigParameters
|
||||
from pytriqs.applications.dft.converters.plovasp.proj_shell import ProjectorShell
|
||||
from pytriqs.applications.dft.converters.plovasp.proj_group import ProjectorGroup
|
||||
from converters.plovasp.vaspio import VaspData
|
||||
from converters.plovasp.elstruct import ElectronicStructure
|
||||
from converters.plovasp.inpconf import ConfigParameters
|
||||
from converters.plovasp.proj_shell import ProjectorShell
|
||||
from converters.plovasp.proj_group import ProjectorGroup
|
||||
import mytest
|
||||
|
||||
################################################################################
|
||||
|
@ -7,7 +7,7 @@ _rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import mytest
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.vaspio import Doscar
|
||||
from converters.plovasp.vaspio import Doscar
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
@ -7,7 +7,7 @@ _rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import mytest
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.vaspio import Eigenval
|
||||
from converters.plovasp.vaspio import Eigenval
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
@ -7,7 +7,7 @@ _rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import mytest
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.vaspio import Kpoints
|
||||
from converters.plovasp.vaspio import Kpoints
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
@ -7,7 +7,7 @@ _rpath = os.path.dirname(rpath.__file__) + '/'
|
||||
|
||||
import mytest
|
||||
import numpy as np
|
||||
from pytriqs.applications.dft.converters.plovasp.vaspio import Poscar
|
||||
from converters.plovasp.vaspio import Poscar
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
@ -22,7 +22,7 @@
|
||||
from pytriqs.archive import *
|
||||
from pytriqs.gf import *
|
||||
from pytriqs.gf.tools import *
|
||||
from pytriqs.applications.dft.sumk_dft_tools import *
|
||||
from sumk_dft_tools import *
|
||||
from pytriqs.utility.comparison_tests import *
|
||||
import numpy as np
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
from pytriqs.archive import *
|
||||
from pytriqs.gf import *
|
||||
from pytriqs.applications.dft.sumk_dft import *
|
||||
from pytriqs.applications.dft.converters.wien2k_converter import *
|
||||
from sumk_dft import *
|
||||
from converters.wien2k_converter import *
|
||||
from pytriqs.operators.util import set_operator_structure
|
||||
from pytriqs.utility.comparison_tests import *
|
||||
from pytriqs.utility.h5diff import h5diff
|
||||
|
@ -20,9 +20,9 @@
|
||||
################################################################################
|
||||
|
||||
from numpy import *
|
||||
from pytriqs.applications.dft.converters.wien2k_converter import *
|
||||
from pytriqs.applications.dft.sumk_dft import *
|
||||
from pytriqs.applications.dft.sumk_dft_tools import *
|
||||
from converters.wien2k_converter import *
|
||||
from sumk_dft import *
|
||||
from sumk_dft_tools import *
|
||||
from pytriqs.utility.comparison_tests import *
|
||||
from pytriqs.utility.h5diff import h5diff
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
################################################################################
|
||||
|
||||
from pytriqs.archive import *
|
||||
from pytriqs.applications.dft.sumk_dft_tools import SumkDFTTools
|
||||
from sumk_dft_tools import SumkDFTTools
|
||||
import pytriqs.utility.mpi as mpi
|
||||
from pytriqs.utility.comparison_tests import *
|
||||
from pytriqs.utility.h5diff import h5diff
|
||||
|
@ -21,7 +21,7 @@
|
||||
################################################################################
|
||||
|
||||
|
||||
from pytriqs.applications.dft.converters import *
|
||||
from converters import *
|
||||
from pytriqs.archive import *
|
||||
from pytriqs.utility.h5diff import h5diff
|
||||
import pytriqs.utility.mpi as mpi
|
||||
|
@ -21,11 +21,12 @@
|
||||
################################################################################
|
||||
|
||||
from pytriqs.archive import *
|
||||
from pytriqs.applications.dft.converters import Wien2kConverter
|
||||
from pytriqs.utility.comparison_tests import *
|
||||
from pytriqs.utility.h5diff import h5diff
|
||||
import pytriqs.utility.mpi as mpi
|
||||
|
||||
from converters import Wien2kConverter
|
||||
|
||||
Converter = Wien2kConverter(filename='SrVO3')
|
||||
Converter.hdf_file = 'wien2k_convert.out.h5'
|
||||
Converter.convert_dft_input()
|
||||
|
Loading…
Reference in New Issue
Block a user