diff --git a/doc/guide/Sr2RuO4/calculate_dos_wannier_basis.py b/doc/guide/Sr2RuO4/calculate_dos_wannier_basis.py index 7cb8462a..98c395d1 100644 --- a/doc/guide/Sr2RuO4/calculate_dos_wannier_basis.py +++ b/doc/guide/Sr2RuO4/calculate_dos_wannier_basis.py @@ -1,4 +1,4 @@ -from triqs_dft_tools.converters.wien2k_converter import Wien2kConverter +from triqs_dft_tools.converters.wien2k import Wien2kConverter from triqs_dft_tools import SumkDFTTools filename = 'Sr2RuO4' diff --git a/doc/guide/analysis.rst b/doc/guide/analysis.rst index eb391d82..b511be78 100644 --- a/doc/guide/analysis.rst +++ b/doc/guide/analysis.rst @@ -128,7 +128,7 @@ Momentum resolved spectral function (with real-frequency self energy) Another quantity of interest is the momentum-resolved spectral function, which can directly be compared to ARPES experiments. First we have to execute `lapw1`, `lapw2 -almd` and :program:`dmftproj` with the `-band` -option and use the :meth:`convert_bands_input ` +option and use the :meth:`convert_bands_input ` routine, which converts the required files (for a more detailed description see :ref:`conversion`). The spectral function is then calculated by typing:: SK.spaghettis(broadening=0.01,plot_shift=0.0,plot_range=None,ishell=None,save_to_file='Akw_') diff --git a/doc/guide/conv_generalhk.rst b/doc/guide/conv_generalhk.rst index de6da36b..5453850d 100644 --- a/doc/guide/conv_generalhk.rst +++ b/doc/guide/conv_generalhk.rst @@ -87,7 +87,7 @@ matrix of the imaginary part, and then move on to the next :math:`\mathbf{k}`-po The converter itself is used as:: - from triqs_dft_tools.converters.hk_converter import * + from triqs_dft_tools.converters.hk import * Converter = HkConverter(filename = hkinputfile) Converter.convert_dft_input() diff --git a/doc/guide/conv_vasp.rst b/doc/guide/conv_vasp.rst index 0798ab87..2942639a 100644 --- a/doc/guide/conv_vasp.rst +++ b/doc/guide/conv_vasp.rst @@ -183,7 +183,7 @@ Running the VASP converter The actual conversion to a h5-file is performed with the orthonormalized projector functions readable by the :ref:`VaspConverter` in the same fashion as with the other `DFTTools` converters:: - from triqs_dft_tools.converters.vasp_converter import * + from triqs_dft_tools.converters.vasp import * Converter = VaspConverter(filename = 'vasp') Converter.convert_dft_input() diff --git a/doc/guide/conv_wien2k.rst b/doc/guide/conv_wien2k.rst index 61d387ab..342726b5 100644 --- a/doc/guide/conv_wien2k.rst +++ b/doc/guide/conv_wien2k.rst @@ -94,9 +94,9 @@ directory name): Now we convert these files into an hdf5 file that can be used for the DMFT calculations. For this purpose we -use the python module :class:`Wien2kConverter `. It is initialized as:: +use the python module :class:`Wien2kConverter `. It is initialized as:: - from triqs_dft_tools.converters.wien2k_converter import * + from triqs_dft_tools.converters.wien2k import * Converter = Wien2kConverter(filename = case) The only necessary parameter to this construction is the parameter `filename`. diff --git a/doc/guide/transport.rst b/doc/guide/transport.rst index 2aa1d1e5..69db4753 100644 --- a/doc/guide/transport.rst +++ b/doc/guide/transport.rst @@ -52,13 +52,13 @@ real-frequency self energy. it is crucial to perform the analytic continuation in such a way that the real-frequency self energy is accurate around the Fermi energy as low-energy features strongly influence the final results. -Besides the self energy the Wien2k files read by the transport converter (:meth:`convert_transport_input `) are: +Besides the self energy the Wien2k files read by the transport converter (:meth:`convert_transport_input `) are: * :file:`.struct`: The lattice constants specified in the struct file are used to calculate the unit cell volume. * :file:`.outputs`: In this file the k-point symmetries are given. * :file:`.oubwin`: Contains the indices of the bands within the projected subspace (written by :program:`dmftproj`) for each k-point. * :file:`.pmat`: This file is the output of the Wien2k optics package and contains the velocity (momentum) matrix elements between all bands in the desired energy window for each k-point. How to use the optics package is described below. - * :file:`.h5`: The hdf5 archive has to be present and should contain the dft_input subgroup. Otherwise :meth:`convert_dft_input ` needs to be called before :meth:`convert_transport_input `. + * :file:`.h5`: The hdf5 archive has to be present and should contain the dft_input subgroup. Otherwise :meth:`convert_dft_input ` needs to be called before :meth:`convert_transport_input `. Wien2k optics package @@ -84,7 +84,7 @@ Using the transport code First we have to read the Wien2k files and store the relevant information in the hdf5 archive:: - from triqs_dft_tools.converters.wien2k_converter import * + from triqs_dft_tools.converters.wien2k import * from triqs_dft_tools.sumk_dft_tools import * Converter = Wien2kConverter(filename='case', repacking=True) @@ -92,7 +92,7 @@ First we have to read the Wien2k files and store the relevant information in the SK = SumkDFTTools(hdf_file='case.h5', use_dft_blocks=True) -The converter :meth:`convert_transport_input ` +The converter :meth:`convert_transport_input ` reads the required data of the Wien2k output and stores it in the `dft_transp_input` subgroup of your hdf file. Additionally we need to read and set the self energy, the chemical potential and the double counting:: diff --git a/doc/reference/converters.rst b/doc/reference/converters.rst index 122dbd9c..ba448810 100644 --- a/doc/reference/converters.rst +++ b/doc/reference/converters.rst @@ -5,20 +5,20 @@ Converters Wien2k Converter ---------------- -.. autoclass:: triqs_dft_tools.converters.wien2k_converter.Wien2kConverter +.. autoclass:: triqs_dft_tools.converters.wien2k.Wien2kConverter :members: :special-members: :show-inheritance: H(k) Converter -------------- -.. autoclass:: triqs_dft_tools.converters.hk_converter.HkConverter +.. autoclass:: triqs_dft_tools.converters.hk.HkConverter :members: :special-members: Wannier90 Converter ------------------- -.. autoclass:: triqs_dft_tools.converters.wannier90_converter.Wannier90Converter +.. autoclass:: triqs_dft_tools.converters.wannier90.Wannier90Converter :members: :special-members: @@ -53,7 +53,7 @@ PLOVASP reference, the classes / functions are sorted the way the converter uses VASP Converter ------------------- .. _refVASPconverter: -.. autoclass:: triqs_dft_tools.converters.vasp_converter.VaspConverter +.. autoclass:: triqs_dft_tools.converters.vasp.VaspConverter :members: :special-members: diff --git a/doc/tutorials/images_scripts/Ce-gamma.py b/doc/tutorials/images_scripts/Ce-gamma.py index 731c2a74..599be898 100644 --- a/doc/tutorials/images_scripts/Ce-gamma.py +++ b/doc/tutorials/images_scripts/Ce-gamma.py @@ -1,5 +1,5 @@ from triqs_dft_tools.sumk_dft import * -from triqs_dft_tools.converters.wien2k_converter import * +from triqs_dft_tools.converters.wien2k import * from triqs.applications.impurity_solvers.hubbard_I.hubbard_solver import Solver import os diff --git a/doc/tutorials/images_scripts/Ce-gamma_DOS.py b/doc/tutorials/images_scripts/Ce-gamma_DOS.py index d7420c0e..b3285dcf 100644 --- a/doc/tutorials/images_scripts/Ce-gamma_DOS.py +++ b/doc/tutorials/images_scripts/Ce-gamma_DOS.py @@ -1,5 +1,5 @@ from triqs_dft_tools.sumk_dft_tools import * -from triqs_dft_tools.converters.wien2k_converter import * +from triqs_dft_tools.converters.wien2k import * from triqs.applications.impurity_solvers.hubbard_I.hubbard_solver import Solver # Creates the data directory, cd into it: diff --git a/doc/tutorials/images_scripts/Sr2MgOsO6_noSOC.py b/doc/tutorials/images_scripts/Sr2MgOsO6_noSOC.py index 2f906070..ef2fd5df 100644 --- a/doc/tutorials/images_scripts/Sr2MgOsO6_noSOC.py +++ b/doc/tutorials/images_scripts/Sr2MgOsO6_noSOC.py @@ -8,7 +8,7 @@ from triqs_cthyb import * import triqs.utility.mpi as mpi # Convert the input -from triqs_dft_tools.converters.wien2k_converter import * +from triqs_dft_tools.converters.wien2k import * Converter = Wien2kConverter(filename = "Sr2MgOsO6_noSOC") Converter.convert_dft_input() diff --git a/doc/tutorials/images_scripts/converter.py b/doc/tutorials/images_scripts/converter.py index 8bdabb9b..bef29d99 100644 --- a/doc/tutorials/images_scripts/converter.py +++ b/doc/tutorials/images_scripts/converter.py @@ -1,3 +1,3 @@ -from triqs_dft_tools.converters.vasp_converter import * +from triqs_dft_tools.converters.vasp import * Converter = VaspConverter(filename = 'nio') Converter.convert_dft_input() diff --git a/doc/tutorials/images_scripts/dft_dmft_cthyb.py b/doc/tutorials/images_scripts/dft_dmft_cthyb.py index 5bf19960..9d8ae67b 100644 --- a/doc/tutorials/images_scripts/dft_dmft_cthyb.py +++ b/doc/tutorials/images_scripts/dft_dmft_cthyb.py @@ -4,7 +4,7 @@ from h5 import HDFArchive from triqs_cthyb import * from triqs.gf import * from triqs_dft_tools.sumk_dft import * -from triqs_dft_tools.converters.wien2k_converter import * +from triqs_dft_tools.converters.wien2k import * dft_filename='SrVO3' beta = 40 @@ -49,7 +49,7 @@ p["fit_min_n"] = 30 p["fit_max_n"] = 60 # If conversion step was not done, we could do it here. Uncomment the lines it you want to do this. -#from triqs_dft_tools.converters.wien2k_converter import * +#from triqs_dft_tools.converters.wien2k import * #Converter = Wien2kConverter(filename=dft_filename, repacking=True) #Converter.convert_dft_input() #mpi.barrier() diff --git a/doc/tutorials/images_scripts/nio_csc.py b/doc/tutorials/images_scripts/nio_csc.py index 06874019..849b8b30 100644 --- a/doc/tutorials/images_scripts/nio_csc.py +++ b/doc/tutorials/images_scripts/nio_csc.py @@ -11,7 +11,7 @@ from triqs.operators.util.U_matrix import * from triqs_cthyb import * import triqs_cthyb.version as cthyb_version import triqs_dft_tools.version as dft_tools_version -from triqs_dft_tools.converters.vasp_converter import * +from triqs_dft_tools.converters.vasp import * import warnings diff --git a/doc/tutorials/sr2mgoso6_nosoc.rst b/doc/tutorials/sr2mgoso6_nosoc.rst index 21829da8..4bbd3684 100644 --- a/doc/tutorials/sr2mgoso6_nosoc.rst +++ b/doc/tutorials/sr2mgoso6_nosoc.rst @@ -57,9 +57,9 @@ At the end of the run you see the density matrix in Wannier space: As you can see, there are off-diagonal elements between the :math:`d_{x^2-y^2}` and the :math:`d_{xy}` orbital. We convert the output to the hdf5 archive, using -the python module :class:`Wien2kConverter `. A simple python script doing this is:: +the python module :class:`Wien2kConverter `. A simple python script doing this is:: - from triqs_dft_tools.converters.wien2k_converter import * + from triqs_dft_tools.converters.wien2k import * Converter = Wien2kConverter(filename = "Sr2MgOsO6_noSOC") Converter.convert_dft_input() diff --git a/doc/tutorials/sr2mgoso6_soc.rst b/doc/tutorials/sr2mgoso6_soc.rst index 3bb58c60..847a375c 100644 --- a/doc/tutorials/sr2mgoso6_soc.rst +++ b/doc/tutorials/sr2mgoso6_soc.rst @@ -58,9 +58,9 @@ At the end of the run you see the density matrix in Wannier space: As you can see, there are a lot of off-diagonal elements now, in particular also off-diagonal in spin space. This is just telling us that spin is not a good quantum number any more in the presence of SOC. We convert the output to the hdf5 archive, using -the python module :class:`Wien2kConverter `. A simple python script doing this is:: +the python module :class:`Wien2kConverter `. A simple python script doing this is:: - from triqs_dft_tools.converters.wien2k_converter import * + from triqs_dft_tools.converters.wien2k import * Converter = Wien2kConverter(filename = "Sr2MgOsO6_SOC") Converter.convert_dft_input() diff --git a/doc/tutorials/srvo3.rst b/doc/tutorials/srvo3.rst index a9dcee2b..49ebb0c4 100644 --- a/doc/tutorials/srvo3.rst +++ b/doc/tutorials/srvo3.rst @@ -51,10 +51,10 @@ Then :program:`dmftproj` is executed in its default mode (i.e. without spin-pola dmftproj This program produces the necessary files for the conversion to the hdf5 file structure. This is done using -the python module :class:`Wien2kConverter `. +the python module :class:`Wien2kConverter `. A simple python script that initialises the converter is:: - from triqs_dft_tools.converters.wien2k_converter import * + from triqs_dft_tools.converters.wien2k import * Converter = Wien2kConverter(filename = "SrVO3") After initializing the interface module, we can now convert the input diff --git a/doc/tutorials/svo_vasp/svo_notebook.ipynb b/doc/tutorials/svo_vasp/svo_notebook.ipynb index 7462f910..87c60afb 100644 --- a/doc/tutorials/svo_vasp/svo_notebook.ipynb +++ b/doc/tutorials/svo_vasp/svo_notebook.ipynb @@ -247,7 +247,7 @@ ], "source": [ "# import VASPconverter\n", - "from triqs_dft_tools.converters.vasp_converter import *\n", + "from triqs_dft_tools.converters.vasp import *\n", "\n", "\n", "# create Converter\n", diff --git a/python/triqs_dft_tools/converters/__init__.py b/python/triqs_dft_tools/converters/__init__.py index fa9c5276..8900eeec 100644 --- a/python/triqs_dft_tools/converters/__init__.py +++ b/python/triqs_dft_tools/converters/__init__.py @@ -20,10 +20,10 @@ # ########################################################################## -from .wien2k_converter import Wien2kConverter -from .hk_converter import HkConverter -from .vasp_converter import VaspConverter -from .wannier90_converter import Wannier90Converter +from .wien2k import Wien2kConverter +from .hk import HkConverter +from .vasp import VaspConverter +from .wannier90 import Wannier90Converter __all__ =['Wien2kConverter','HkConverter','Wannier90Converter','VaspConverter'] diff --git a/python/triqs_dft_tools/converters/hk_converter.py b/python/triqs_dft_tools/converters/hk.py similarity index 100% rename from python/triqs_dft_tools/converters/hk_converter.py rename to python/triqs_dft_tools/converters/hk.py diff --git a/python/triqs_dft_tools/converters/vasp_converter.py b/python/triqs_dft_tools/converters/vasp.py similarity index 100% rename from python/triqs_dft_tools/converters/vasp_converter.py rename to python/triqs_dft_tools/converters/vasp.py diff --git a/python/triqs_dft_tools/converters/wannier90_converter.py b/python/triqs_dft_tools/converters/wannier90.py similarity index 100% rename from python/triqs_dft_tools/converters/wannier90_converter.py rename to python/triqs_dft_tools/converters/wannier90.py diff --git a/python/triqs_dft_tools/converters/wien2k_converter.py b/python/triqs_dft_tools/converters/wien2k.py similarity index 99% rename from python/triqs_dft_tools/converters/wien2k_converter.py rename to python/triqs_dft_tools/converters/wien2k.py index 173cb214..b45ffa72 100644 --- a/python/triqs_dft_tools/converters/wien2k_converter.py +++ b/python/triqs_dft_tools/converters/wien2k.py @@ -251,7 +251,7 @@ class Wien2kConverter(ConverterTools): for it in things_to_set: setattr(self, it, locals()[it]) except StopIteration: # a more explicit error if the file is corrupted. - raise IOError("Wien2k_converter : reading file %s failed!" % self.dft_file) + raise IOError("wien2k : reading file %s failed!" % self.dft_file) R.close() # Reading done! @@ -472,7 +472,7 @@ class Wien2kConverter(ConverterTools): except KeyError: raise IOError("convert_bands_input : Needed data not found in hdf file. Consider calling convert_dft_input first!") except StopIteration: # a more explicit error if the file is corrupted. - raise IOError("Wien2k_converter : reading file %s failed!" % self.band_file) + raise IOError("wien2k : reading file %s failed!" % self.band_file) # Reading done! @@ -496,7 +496,7 @@ class Wien2kConverter(ConverterTools): - symmetries from :file:`case.outputs`, if those Wien2k files are present and stores the data in the hdf5 archive. - This function is automatically called by :meth:`convert_dft_input `. + This function is automatically called by :meth:`convert_dft_input `. """ @@ -779,7 +779,7 @@ class Wien2kConverter(ConverterTools): next(R) # imaginary part except StopIteration: # a more explicit error if the file is corrupted. - raise IOError("Wien2k_converter : reading file %s failed!" %symm_file) + raise IOError("wien2k : reading file %s failed!" %symm_file) R.close() # Reading done! diff --git a/test/python/basis_transformation.py b/test/python/basis_transformation.py index 3821dd00..8f0abcea 100644 --- a/test/python/basis_transformation.py +++ b/test/python/basis_transformation.py @@ -17,7 +17,7 @@ def call_diagonalize(SK): SK.block_structure.transformation = None return t_sumk_eal, t_solver_eal, t_sumk_dm, t_solver_dm -SK = SumkDFT(hdf_file = 'SrVO3.h5', use_dft_blocks=True) +SK = SumkDFT(hdf_file = 'SrVO3.ref.h5', use_dft_blocks=True) # only eal and dm are allowed SK.block_structure.transformation = None @@ -71,7 +71,7 @@ for dmi in dm: # Test convert_operator -SK = SumkDFT(hdf_file = 'SrVO3.h5', use_dft_blocks=True) +SK = SumkDFT(hdf_file = 'SrVO3.ref.h5', use_dft_blocks=True) BS = SK.block_structure from triqs.operators.util import h_int_slater, U_matrix, t2g_submatrix, transform_U_matrix @@ -93,7 +93,7 @@ H3 = BS.convert_operator(h_int_slater(spin_names=['up','down'], orb_names=[0,1,2 for op in H3: for c_op in op[0]: assert(BS.gf_struct_solver_dict[0][c_op[1][0]][c_op[1][1]] is not None) # This crashes with a key error if the operator structure is not the solver structure - + U_trafod = transform_U_matrix(U3x3, BS.transformation[0]['up'].conjugate()) # The notorious .conjugate() H4 = h_int_slater(spin_names=['up','down'], orb_names=range(3), U_matrix=U_trafod, map_operator_structure=BS.sumk_to_solver[0]) assert( H4 == H3 ) # check that convert_operator does the same as transform_U_matrix diff --git a/test/python/srvo3_Gloc.py b/test/python/srvo3_Gloc.py index 1062ec9e..d3d89577 100644 --- a/test/python/srvo3_Gloc.py +++ b/test/python/srvo3_Gloc.py @@ -22,7 +22,7 @@ from h5 import * from triqs.gf import * from triqs_dft_tools.sumk_dft import * -from triqs_dft_tools.converters.wien2k_converter import * +from triqs_dft_tools.converters.wien2k import * from triqs.operators.util import set_operator_structure from triqs.utility.comparison_tests import * from triqs.utility.h5diff import h5diff diff --git a/test/python/srvo3_transp.py b/test/python/srvo3_transp.py index d8b6356a..278457e3 100644 --- a/test/python/srvo3_transp.py +++ b/test/python/srvo3_transp.py @@ -20,7 +20,7 @@ ################################################################################ from numpy import * -from triqs_dft_tools.converters.wien2k_converter import * +from triqs_dft_tools.converters.wien2k import * from triqs_dft_tools.sumk_dft import * from triqs_dft_tools.sumk_dft_tools import * from triqs.utility.comparison_tests import * diff --git a/test/python/test_w90_ef.py b/test/python/test_w90_ef.py index 7a490992..bdf64d60 100644 --- a/test/python/test_w90_ef.py +++ b/test/python/test_w90_ef.py @@ -2,7 +2,7 @@ import unittest import numpy as np import sys sys.path.insert(1, '../python/converters/') -from triqs_dft_tools.converters.wannier90_converter import Wannier90Converter +from triqs_dft_tools.converters.wannier90 import Wannier90Converter from triqs_dft_tools import SumkDFT class test_w90_conv(unittest.TestCase):