Commit Graph

380 Commits

Author SHA1 Message Date
Oleg Peil 8378013faa Merge branch 'master' into vasp
Conflicts:
	doc/guide/dftdmft_selfcons.rst
	python/CMakeLists.txt
	python/converters/__init__.py
	python/sumk_dft.py
	test/CMakeLists.txt
2017-01-27 12:19:03 +01:00
Oleg E. Peil 776e0a31d1 Fixed a type in POSCAR read routine 2016-12-31 14:55:25 +01:00
Oleg E. Peil 05f9ba5e8a Fixed a bug in density correction calculation (GK) 2016-12-31 14:46:51 +01:00
Oleg E. Peil ac46611e51 Fixed freezing issue in CSC run; better exception handling
In some MPI implementations the self-consistent run of `sc_dmft.py`
resulted in random freezings. This issue was fixed by polling the
VASP lock file only on the master node.

Also, better exception handling is implemented, allowing all nodes
to exit properly in case of error.
2016-12-31 14:42:43 +01:00
Oleg E. Peil 61f11bcff4 Fixed a small typo in sc_dmft.py 2016-12-31 11:13:29 +01:00
Oleg E. Peil 0de5b930f1 Removed k-phases from projectors and fixed tests
The k-phases turned out to be already included at VASP level.
The previous changes are commented out. However, the dependence
of `ProjectorShell` on `kmesh` and `struct` remains and the tests
are fixed accordingly.
2016-12-31 10:51:38 +01:00
Manuel Zingl aad9a916aa Add option to pass delta for dichotomy to calc_mu 2016-11-03 11:57:20 +01:00
Gernot J. Kraberger bb83c886fd fix bug in d8483a0 when n_corr != n_inequiv 2016-10-03 16:56:04 +02:00
Gernot J. Kraberger a64f778179 complex spectral function and dos_*_basis
dos_wannier_basis and dos_parproj_basis now
return a complex spectral function as the
orbital-resolved DOS; the files have now 3
columns: omega, real, imag
2016-09-22 18:32:45 +02:00
Manuel Zingl 71f33af395 [doc] Fix a few links 2016-09-13 15:20:21 +02:00
Gernot J. Kraberger e4af7dbd1b BlockStructure class for manipulating GF structures
BlockStructure stores gf_struct_solver and gf_struct_sumk
and the mappings between them. It allows to modify it, and
save it to HDF (see issue #67).
2016-09-13 11:57:48 +02:00
Oleg E. Peil 0ae83d18b3 Added site-dependent phases to projectors
Now the projectors are defined in agreement with the formulas
in Amadon et al. Specifically, the phase exp(-i k Q) for site Q
is included.
2016-09-13 11:47:13 +02:00
Gernot J. Kraberger d8483a0bb1 added Hloc check in analyse_block_structure 2016-09-12 15:29:32 +02:00
Manuel Zingl 3430ba2231 Read parproj for spaghetti only if ishell is not None 2016-09-08 12:02:32 +02:00
aichhorn c4b4620b36 Updated documentation of the hk converter 2016-08-29 10:27:33 +02:00
Gernot J. Kraberger d419f1a37d fixed bug when calling extract_G_loc for re freq without broadening 2016-08-23 15:40:58 +02:00
Oleg E. Peil 1fa0ab67b0 Fixed function name that has been changed in atm-lib 2016-08-09 13:15:24 +02:00
Oleg E. Peil 4d69dfd3ae Fixed a typo in variable 'atmlib_present' 2016-08-09 12:35:06 +02:00
Gernot J. Kraberger 03ea26ec6f fixed density_matrix for spin-polarized input
matrix dimension is spin-dependent
2016-07-19 16:56:52 +02:00
Manuel Zingl 1c29776727 [doc] Restructuring doc II
* Committing missing files of last commit
    * Correcting typos
    * Modifications according to issue #56
2016-07-08 12:04:31 +02:00
Igor Krivenko 4d74db5cdb Corrected version.py 2016-06-09 18:11:55 +02:00
Gernot Kraberger 224c8d0bf3 [doc] corrected error in eff_atomic_levels doc
it returns something gf_struct_sumk like rather than gf_struct_solver
like
2016-05-11 17:00:52 +02:00
Oleg E. Peil e5bb2d1b80 Fixed a bug in the calculation of the total energy
In the calculation of the Hamiltonian correction to the total energy
the arrays were not always aligned if the number of bands varied inside
the energy window.
2016-05-10 11:48:28 +02:00
Oleg E. Peil 6d1891a99a Fixed problems with SC script
* Fixed obvious bugs:
  -- forgotten 'import re'
  -- import user script by name from string
  -- 'import converter' instead of 'import plovasp...'

* Number of iterations provided by the bash-script now has
an affect.

* Added a possibility to specify an alternative cfg-file
2016-05-10 11:47:58 +02:00
Priyanka Seth 8ec3811d71 [doc] add line for doc compilation 2016-05-09 10:23:57 +02:00
Priyanka Seth 390e8564b7 Minor clean up, pep-ified to allow doc compilation to run smoothly 2016-05-09 10:19:56 +02:00
Priyanka Seth 15789aa0d6 [version] Added version info to cmake, fix #61 2016-05-05 18:56:32 +02:00
Priyanka Seth ab265f83cb [doc] attempt at fixing doc 2016-05-05 16:32:16 +02:00
Manuel Zingl c5a9c9dfbb Modified sumk_dft to work also on real axis
extract_G_loc(), total_density(), and calc_mu() support
        now real frequency data, which is necessary for DMFT
        when a real frequency impurity solver is used.
2016-04-20 19:01:29 +02:00
Manuel Zingl 7fe5f0222c [transp] Check if case.outputs was converted
The wien2kconverter reads case.outputs only if present.
        Thus the transport code has to check if the necessary data
        is in the dft_misc_input subgroup.
2016-04-20 14:22:02 +02:00
Oleg E. Peil 8b6ec2df6c Fixed test case 'two_site' and added example 'two_site'
The test case 'two_site' can now be remade using the example
'two_site'.
2016-03-24 21:37:20 +01:00
Oleg E. Peil 7771e415e7 Added 'site_diag=False' option to 'density_matrix()' 2016-03-24 21:36:00 +01:00
Oleg E. Peil 96104cf10d Fixed example and test case 'simple'
The test input files have been adapted to the new format
of LOCPROJ.
2016-03-24 20:11:57 +01:00
Oleg E. Peil 2bb45c775c Fixed 'proj_shell' test suite
This test suite is based on V d-projectors in SrVO3.
The data have been recalculated to obtain the correct format
of LOCPROJ.

Also, some small but important changes are introduced to
the LOCPROJ parser and class ElectronicStructure.
Specifically, eigenvalues, Fermi-weights, and Fermi level are
now read from LOCPROJ instead of EIGENVAL and DOSCAR.
Besides, LOCPROJ now provides the value of NCDIJ instead of
NSPIN.

Basically, with these changes EIGENVAL and DOSCAR are no longer
needed. Although corresponding parseres will remain in 'vaspio.py'
they will not be used for standard operations.
2016-03-24 19:34:29 +01:00
Oleg E. Peil a347360302 Cleaned up example 'simple' 2016-03-24 18:02:58 +01:00
Oleg E. Peil f07afa50ff Fixed 'atm' test
To make it work one has to create a symlink in 'dft/converters/plovasp'
pointing to the built library 'atm.so'.
Also, one has to use 'from <modulename> import <function>' inside
the test itself to avoid problems with module name substitutions.
2016-03-24 14:30:50 +01:00
Oleg E. Peil 041d1c6c40 Added calculation of GAMMA to SumkDFT
Function 'calc_density_correction()' has now two options.
VASP-type calculations include not only a density-matrix correction
(which is defined differently compared to Wien2K) but also a correction
to the band energy.
2016-03-16 16:18:52 +01:00
Oleg E. Peil daf40074b2 Added a charge self-consistency script
The charge self-consistency script is run from bin directory.
The corresponding Python script 'sc_dmft.py' has been modified
accordingly.
2016-03-11 18:49:29 +01:00
Oleg E. Peil ea87d5bf11 Fixed module and library paths
In version 1.4 all python applications moved from the root python
library to `pytriqs/` subdirectory.
2016-03-11 12:14:31 +01:00
Oleg E. Peil edf5038140 Added a shell script for running PLOVasp converter
The script simply runs pytriqs with an auto-executable module
`plovasp.converter`.
2016-03-11 11:35:19 +01:00
Oleg E. Peil 9401bed308 Merge branch 'vasp' of https://github.com/TRIQS/dft_tools into vasp 2016-03-11 10:09:33 +01:00
Oleg E. Peil dc7614b0aa Moved the main script to function 'main()' 2016-03-11 10:01:24 +01:00
Oleg E. Peil f142db96fb Merge branch 'master' into vasp
Conflicts:
	CMakeLists.txt
	python/CMakeLists.txt
	python/converters/__init__.py
	test/CMakeLists.txt
2016-03-11 09:53:24 +01:00
Oleg E. Peil 3ce88a9457 Modified import of ATM to make it optional
Now, if the PLOVasp cannot import `atm.so` it will issue a warning
and only fail when `density_of_states()` routine is invoked.
2016-03-10 16:53:17 +01:00
Oleg E. Peil b47cc2f4d3 Fixed import of 'converter_tools' in 'vasp_converter' 2016-03-10 12:06:27 +01:00
Oleg E. Peil 30dc760dcb Moved PLOVasp tests to root 'test' directory
Appropriate modifications to CMakeLists have also been made.
2016-03-10 11:45:53 +01:00
Oleg E. Peil 68ba0f3751 Fixed CMakeLists to make 'atm.so' installable 2016-03-09 20:03:02 +01:00
Oleg E. Peil afb1134cb1 Added wrapper description file for ATM
Wrapper description file 'atm_desc.py' is needed to generate
a Python wrapper over the ATM library. Corresponding CMakeLists.txt
has also been added.
2016-03-09 19:04:05 +01:00
Priyanka Seth 058e8e968f [wannier] few minor tidying changes while reading through 2016-02-23 15:10:22 +01:00
Gabriele Sclauzero 0d3e59a73c [wannier90] First commit with working version
Implements the Wannier90 converter, provides related docs and a test
2016-02-17 12:01:21 +01:00
Oleg E. Peil 45ed1ba0fc Added output of local Hamiltonian
The local Hamiltonian is now output after the density matrix.
This is mainly needed for debug purposes. At a later stage the
output should be better formatted and controlled.
2016-02-09 13:48:39 +01:00
Oleg E. Peil 3176780d37 Added evaluation of local Hamiltonian
Added a method for evaluating the local Hamiltonian corresponding
to a given projected shell.
2016-02-09 13:40:45 +01:00
Priyanka Seth 3e4b74225c Able to get dft_tools hash now 2016-02-07 10:43:23 +01:00
Olivier Parcollet 69bbe87234 Fix #43 2016-02-05 15:25:10 +01:00
Olivier Parcollet 1434193a38 [cmake] Fix broken tests after change in TRIQS install macros
- After the change in main lib, need to put explicitely the
  sitecustomize file
2016-02-04 08:28:47 +01:00
Oleg E. Peil bda2e5e2a3 Added copyright disclaimers to PLOVasp sources 2016-02-01 14:06:41 +01:00
Oleg E. Peil eece11b297 Added self-consistency scripts
At the main SC script 'sc_dmft.py' requires importing a user DMFT
script as a module. Ideally, this should be implemented in a different
way so that the user script imports a function from the self-consistent
script.
2016-02-01 13:44:08 +01:00
Oleg E. Peil a0645b8275 Fixed the wrong name of the config file 2016-01-22 15:59:12 +01:00
Oleg E. Peil 2e1633c037 Added an example of Ce HF calculation 2015-12-18 17:51:26 +01:00
Oleg E. Peil e8dff08fcf Added a possibility to read EFERMI from LOCPROJ
Noramlly, the Fermi energy is read from DOSCAR. However, this does
not work in case of a self-consistent calculation in which DOSCAR
is not written between iterations. One of the options is
to modify slightly the output to LOCPROJ and add EFERMI to the
first line.
2015-12-18 17:45:12 +01:00
Oleg E. Peil 3478db8a90 Modified main routine to make it importable
It is now possible to import a function
'generate_and_output_as_text()' from another Python script
to process VASP data.
2015-12-16 16:02:12 +01:00
Priyanka Seth 90dafa478a Adapt to complex g(tau)
* Fix sumk to work with pos and neg imfreqs mesh
* Checked that GF.data is only used and modified for GfReFreq quantities
2015-12-12 14:30:06 +01:00
Oleg E. Peil fe88b37515 Fixed a bug in determining dimensions in converter
Since 'n_orbitals' can be a 2D array in case of spin-polarized
calculations, one should use 'numpy.max' instead of 'max' to
extract the maximum number of bands.
2015-12-11 10:57:48 +01:00
Oleg E. Peil 41b3b63744 Modified input of eigenvalues and Fermi weights
In the new version of VASP LOCPROJ contains the eigenvalues and
Fermi weights. Also, during a charge self-consistency calculation
the file EIGENVAL is not written at intermediate iterations. It is,
thus, preferential to use LOCPROJ to get the named data.
At the moment, EIGENVAL will still be used if it is complete but
in the future this dependence should be removed completely.
2015-12-11 10:54:51 +01:00
Oleg E. Peil 3e63c0f0f5 Improved output of the density matrix 2015-12-09 11:55:29 +01:00
Oleg E. Peil b02d13ebd8 Fixed the output of band indices to vasp.pgX
The band indices should be converted to Fortran convention,
i.e. starting from 1, in the output files because the are
used in the density matrix file which is read by a Fortran code.
2015-12-04 19:55:37 +01:00
Oleg E. Peil 85a83db1cb Added writing of 'band_window' to 'dft_misc_input'
In VASP implementation of charge self-consistency we need
band indices to construct the density matrix correction.
2015-12-04 15:29:19 +01:00
Oleg E. Peil 34bc2b6225 Modified LOCPROJ parser to conform to new format
The format of LOCPROJ has been modified again (in VASP 5.4.2
build from Dec 02, 2015).
Now, there is an additional line before each projector block
providing the spin, k-, and band indices, as well as
eigenvalues and Fermi weights.
2015-12-04 12:08:33 +01:00
Oleg E. Peil 1bfacd3883 Fixed the input of f-state projectors from LOCPROJ 2015-12-03 14:19:08 +01:00
Priyanka Seth cbcb4c929f Switch to a new CMake macro triqs_prepare_local_pytriqs() 2015-12-02 17:00:08 +01:00
Oleg E. Peil 3e19c3d7bb Added storing of Fermi weights to 'dft_misc_input' 2015-12-02 12:23:23 +01:00
Oleg E. Peil e35c6fd5c0 Fixed some files in examples
Scripts 'run_plovasp.sh' have been replaced by a template in which
the path must be set by the user.
Also, .gitignore has been added to example 'lunio3'.
2015-12-01 13:24:58 +01:00
Oleg E. Peil 22da0dae4a Added example on SrVO3 2015-12-01 13:19:24 +01:00
Oleg E. Peil 921bba0c1a Added a spin factor to density matrix in 'elstruct.py' 2015-12-01 11:18:44 +01:00
Oleg E. Peil 3620784798 Replaced R- and C-TRANSFORM with TRANSFORM option
Also, some tests were modified accordingly.
2015-11-30 20:24:34 +01:00
Oleg E. Peil f0fae2b10a Fixed tests to pass with new LOCPROJ 2015-11-30 20:18:17 +01:00
Oleg E. Peil 3ccb047329 Fixed example 'simple' and corresponding tests
The calculation of the example was redone to generate LOCPROJ
in a new format (valid starting from VASP 5.4.2).
2015-11-30 19:52:38 +01:00
pdelange b3e62640da [PATCH] fixed a missing mpi.reduce_all in spaghetti function from sumk_dft_tools 2015-11-30 17:19:36 +01:00
Priyanka Seth cff294e1b2 Added shell info to filename for spaghetti. 2015-11-30 17:19:04 +01:00
Oleg E. Peil 1fd2a1af6a Added a parser for the new LOCPROJ (VASP >= 5.4.2) 2015-11-27 15:38:51 +01:00
Oleg E. Peil 46b3dd0667 Renamed module 'c/vasp' to 'c/plovasp' 2015-11-27 10:52:07 +01:00
Oleg E. Peil 0d65f38a61 Moved PLOVasp files to converters/plovasp 2015-11-27 10:48:15 +01:00
Oleg E. Peil 7db721c8d1 Optimized slightly orthogonalization routine
At one step of the orthogonaliztion procedure two matrix multiplications
have been replaced with one matrix multiplication and a element-wise
multiplication of a vector and a matrix.
2015-11-21 14:23:30 +01:00
Oleg E. Peil b2b25a9fd0 Fixed tests that because of the new default NORMION value 2015-11-20 18:59:46 +01:00
Oleg E. Peil 183c115870 Added docstrings to modules 2015-11-20 18:54:51 +01:00
Oleg E. Peil 0d53712761 Changed the default behavior of NORMION option
Now, NORMION is True by default, in accordance with the documentation.
2015-11-20 18:10:14 +01:00
Oleg E. Peil 9258054057 Added an example on LuNiO3
The example allows one to get an idea of how to define projectors
in case of a complex system with several atoms per unit cell.
2015-11-20 18:08:14 +01:00
Oleg E. Peil 770e9f5afc Added transformation of projectors
Now the matrices read from the input files are actually applied
to projectors.
Also, improved the debug output in 'plotools.py'.
2015-11-20 16:58:36 +01:00
Oleg E. Peil 63de4f68a8 Added input of Fermi weights, cleaned-up the code 2015-11-19 16:32:50 +01:00
Oleg E. Peil f544825684 Added output of Fermi weights to output files
Fermi weights are output next to eigenvalues. They will be needed
for the calculation of the KS density matrix in the charge
self-consistency implementation.
2015-11-19 16:06:25 +01:00
Oleg E. Peil b85b62d693 Removed a redundant dependency of ProjectorGroup on 'ferw' 2015-11-19 16:01:05 +01:00
Oleg E. Peil 5585e81f7d Added two tests for 'get_block_matrix_map()'
Two tests have been added for testing the basic functionality with
NORMION being either False or True.
2015-11-19 15:56:30 +01:00
Oleg E. Peil 81825fcdf2 Fixed some errors introduced in the previous commit 2015-11-19 14:56:34 +01:00
Oleg E. Peil 72d030c5c5 Restructured 'orthogonalization()'
The part responsible for generating a mapping between the shell/ions
and block projector matrices has now been relocated to a separate
method 'get_block_matrix_map()'. This simplifies the source code
and makes testing easier.
2015-11-19 14:48:45 +01:00
Oleg E. Peil c426946803 Added implementation for NORMION = True
The mapping for NORMION = True has been implemented.
Also, the orthogonalization loop has been fixed. First of all,
orthogonalization should be done separately for each block map 'bl_map'.
Second, one has to take into account that the orbital dimensions of the
block matrix can vary from block to block. To make that the overlap
matrix is non-singular one, thus, has to pass to
'orthogonalize_projector_matrix()' only a view of a submatrix of 'pmat'
corresponding to the current block.

Two tests to check the simplest cases have been added.
2015-11-19 12:11:55 +01:00
Oleg E. Peil b3e1dd915a Refactored mapping onto block matrix in 'orthogonalize()'
The implementation of the mapping of a set of projectors (belonging
to different shells and ions) onto a block matrix in the
orthogonalization routine has been generalized. Now, an implementation
of the choice between the full orthogoanlization and per-site one
is straightforward: it is just a matter of defining a proper mapping.
The mapping scheme itself is described in the doc-string of method
'ProjectorGroup.orthogonalize()'
2015-11-19 11:47:59 +01:00
Oleg E. Peil 79f4c33458 Removed files accidentally added in the previous commit 2015-11-18 19:05:48 +01:00
Oleg E. Peil 61cb087561 Added a test to '_proj_group' test suite
Added a test comparing two-site density and overlap matrices.
2015-11-18 19:02:21 +01:00
Oleg E. Peil 4af8406b4c Fixed tests for ProjectorGroup
The tests have been modified to conform to the recent input and code
changes.
2015-11-18 15:46:58 +01:00
Oleg E. Peil c1b3000c00 Fixed a bug in the orthogonalization routine
There was a very nasty bug in the preparation of the block matrix
'p_mat'. The point is that this matrix is created once for all k-points
with the band dimension being the maximum possible. However, only
a part of the matrix is used at every k-point but the orthogonalization
is done for the whole matrix. The problem was that if the number of
bands for a given k-point was smaller than that for the next k-point
them for the next k-point some part of 'p_mat' still contained data from
the previous step, which messed up the orthonormalization. Now, 'p_mat'
is set to zero at each step of the loop.
Also, property 'nion' was added to ProjectorShell since it is used
very often.
2015-11-18 15:17:51 +01:00