3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-07 14:43:49 +01:00
dft_tools/doc/guide/conversion.rst

117 lines
6.0 KiB
ReStructuredText
Raw Normal View History

.. _conversion:
2013-08-07 16:40:18 +02:00
Converting DFT data to a hdf archive
====================================
.. warning::
TO BE UPDATED!
EXPLAIN CONCEPT OF CONVERSION
Wien2k + dmftproj
-----------------
LISTING OF FILES NECESSARY FOR EACH SUBGROUP
2013-08-07 16:40:18 +02:00
2015-03-11 14:35:28 +01:00
The basic function of the interface to the Wien2k program package is to take
the output of the program that constructs the projected local orbitals
(:program:`dmftproj`, for documentation see
:download:`TutorialDmftproj.pdf <images_scripts/TutorialDmftproj.pdf>`),
2015-03-11 14:35:28 +01:00
and to store all the necessary information into an hdf5 file. This latter file
is then used to do the DMFT calculation. The reason for this structure is that
this enables the user to have everything that is necessary to reproduce the
calculation in one single hdf5 archive.
2013-08-07 16:40:18 +02:00
2015-02-06 10:24:58 +01:00
As explained above, this interface produces an hdf5 archive out of the files that
2013-08-07 16:40:18 +02:00
were written by the band structure package :program:`Wien2k/dmftproj`.
For this purpose we
use the python module :class:`Wien2kConverter`. It is initialised as::
from pytriqs.applications.dft.converters.wien2k_converter import *
Converter = Wien2kConverter(filename = material_of_interest)
The only necessary parameter to this construction is the parameter `filename`.
It has to be the root of the files produces by dmftproj. For example, if you did a
calculation for TiO, the :program:`Wien2k` naming convention is that all files are called
:file:`TiO.*`, so you would give `filename = "TiO"`. The constructor opens
2015-02-06 10:24:58 +01:00
an hdf5 archive, named :file:`material_of_interest.h5`, where all the data is stored.
2013-08-07 16:40:18 +02:00
2015-03-11 14:35:28 +01:00
These are the parameters to the Constructor:
========================= ============================ ===========================================================================
Name Type, Default Meaning
========================= ============================ ===========================================================================
filename String Material being studied, corresponding to the :program:`Wien2k` file names.
The constructor stores the data in the hdf5 archive :file:`material_of_interest.h5`.
dft_subgrp String, dft_input hdf5 subgroup containing required DFT data
symmcorr_subgrp String, dft_symmcorr_input hdf5 subgroup containing all necessary data to apply
the symmetry operations in the DMFT loop
repacking Boolean, False Does the hdf5 file already exist and should the :program:`h5repack` be
invoked to ensures a minimal archive file size?
Note that the :program:`h5repack` must be in your path variable!
========================= ============================ ===========================================================================
2013-08-07 16:40:18 +02:00
After initialising the interface module, we can now convert the input text files into the
2015-02-06 10:24:58 +01:00
hdf5 archive by::
2013-08-07 16:40:18 +02:00
Converter.convert_dft_input()
2013-08-07 16:40:18 +02:00
2014-11-18 11:30:26 +01:00
This reads all the data, and stores it in the subgroup `dft_subgrp`, as discussed above.
2013-08-07 16:40:18 +02:00
In this step, the files :file:`material_of_interest.ctqmcout` and :file:`material_of_interest.symqmc`
have to be present in the working directory.
2015-02-06 10:24:58 +01:00
After this step, all the necessary information for the DMFT loop is stored in the hdf5 archive, where
the string variable `Converter.hdf_file` gives the file name of the archive.
2014-11-18 11:30:26 +01:00
You can now proceed with :ref:`DFTDMFTmain`.
2013-08-07 16:40:18 +02:00
A general H(k)
--------------
LISTING OF FILES NECESSARY, NAME OF CONVERTER
2013-08-07 16:40:18 +02:00
Data for post-processing
------------------------
In order to calculate some properties using the DMFT self energy, several other routines are
used in order to convert the necessary input from :program:`Wien2k/dmftproj`. For instance, for
calculating the partial density of states or partial charges consistent with the definition
of :program:`Wien2k`, you have to use::
Converter.convert_parproj_input()
This reads the files :file:`material_of_interest.parproj` and :file:`material_of_interest.sympar`.
Again, there are two optional parameters
2015-03-11 14:35:28 +01:00
========================= ============================ ===========================================================================
Name Type, Default Meaning
========================= ============================ ===========================================================================
parproj_subgrp String, dft_parproj_input hdf5 subgroup containing partial projectors data.
symmpar_subgrp String, dft_symmpar_input hdf5 subgroup containing symmetry operations data.
========================= ============================ ===========================================================================
2013-08-07 16:40:18 +02:00
Another routine of the class allows to read the input for plotting the momentum-resolved
spectral function. It is done by::
Converter.convert_bands_input()
2014-09-22 19:21:10 +02:00
The optional parameter that controls where the data is stored is `bands_subgrp`,
2015-02-06 10:24:58 +01:00
with the default value `dft_bands_input`. Note however that you need to run "dmftproj -band" to produce the
necessary outband file. The casename.indmftpr file needs an additional line with E_fermi
(obtainable from casename.qtl).
2013-08-07 16:40:18 +02:00
After having converted this input, you can further proceed with the :ref:`analysis`.
MPI issues
----------
The interface package is written such that all the operations are done only on the master node.
2014-11-18 11:30:26 +01:00
The broadcasting to the nodes has to be done by hand. The :class:`SumkDFT`, described in the
2013-08-07 16:40:18 +02:00
following section, takes care of this automatically.
Interfaces to other packages
----------------------------
Because of the modular structure, it is straight forward to extend the TRIQS package
in order to work with other band-structure codes. The only necessary requirement is that
2015-02-06 10:24:58 +01:00
the interface module produces an hdf5 archive, that stores all the data in the specified
2013-08-07 16:40:18 +02:00
form. For the details of what data is stored in detail, see the reference manual.