3
0
mirror of https://github.com/triqs/dft_tools synced 2024-10-31 19:23:45 +01:00
Commit Graph

633 Commits

Author SHA1 Message Date
Manuel
a8c7569830 change del to with when reading hdf 2018-12-06 17:28:49 -05:00
Oleg Peil
64605e3267 Fixed VaspConverter to read ion sorts properly 2018-12-04 12:52:02 -05:00
Oleg Peil
19ce8a83e8 Modified check and output of projectors to a pg-file 2018-12-04 12:52:02 -05:00
Oleg Peil
0fa24a28ef Modified ProjectorShell object accordingly
* Modified ProjectorShell to retrieve dictionary 'ions' from
  the input and construct a list of equivalence classes (ion sorts).
2018-12-04 12:52:02 -05:00
Oleg Peil
7471691219 Added possibility to specify equivalent groups of ions
* Added a new input format for the list of ions. It is now possible
  to group ions (like this [1  2]  [5  6]) that are considered
  equivalent in the solver. This has required changing the internal
  variable 'ion_list' to a dictionary 'ions' which can later be
  enhanced by other features (such as specifying ions by element name).
2018-12-04 12:52:02 -05:00
Gernot J. Kraberger
9076baf9d6 sumk_dft: split transform_to_sumk_blocks from put_Sigma
this is done in a backward-compatible manner
2018-10-08 21:29:49 +02:00
Gernot J. Kraberger
d8a2693123 block_structure: introduce space parameter
in methods convert_gf, create_gf, check_gf
2018-10-08 21:29:49 +02:00
Gernot J. Kraberger
ef979199af sumk_dft: split transform_to_solver_blocks from extract_G_loc
this is done in a backward-compatible manner
2018-10-08 21:29:49 +02:00
Gernot J. Kraberger
d0f0c20865 change isinstance for new TRIQS
this fixes test analyse_block_structure_from_gf
2018-10-08 21:29:49 +02:00
Gernot J. Kraberger
f0de5c62b5 block_structure: add gf_struct_***_list and _dict
now sumk is given in the list format and
solver is given in the dict format
2018-10-08 21:29:49 +02:00
Gernot J. Kraberger
2b490d1485 block_structure: convert_gf: add G_out, let G_struct be sumk 2018-10-08 21:29:49 +02:00
Gernot J. Kraberger
6c908e9c6e block_structure: add check_gf method 2018-10-08 21:29:49 +02:00
Manuel
ba0cfa9013 Add doc to VASP converter concerning block structure 2018-07-09 10:50:36 -04:00
Manuel
8a53a80e1e Fix a few documentation issue of the VASP converter 2018-07-03 14:44:03 -04:00
Manuel
ad3a23196a Replace pytriqs with python.
There are still some more occurances of pytriqs.
        Is on my list to be checked.
2018-07-02 19:16:50 -04:00
Nils Wentzell
1bab92c721 Merge tag '1.5'
Release 1.5
2018-05-26 23:56:46 +02:00
Manuel
641dff8d01 Error message fix for wien2k_converter (issue #93) 2018-05-24 16:51:25 -04:00
Manuel
d0ea51a1f5 Add make_copies in BlockGf construction. 2018-05-02 16:07:51 -04:00
Manuel
07397ca42e Merge remote-tracking branch 'gernot/analyze_block_structure_from_gf' into analyze_block_structure_from_gf 2018-05-02 11:40:38 -04:00
Nils Wentzell
9d87d0be15 Updating import directives, minor correction to commit 2018-05-01 11:55:31 +02:00
leonid@cpht.polytechnique.fr
5e17d333ee thermal cond. added to conductivity_and_seebeck 2018-04-27 12:14:50 +02:00
Gernot J. Kraberger
f8731f1bfe Fix test
the testing threshold has to be more generous than the
analyzing threshold
2018-04-03 17:11:59 +02:00
Gernot J. Kraberger
086573950b bugfix: blocks get added twice
Whenever both G and G^T support a symmetry,
the block is added twice. This commit prevents that...
2018-03-30 15:46:40 +02:00
Gernot J. Kraberger
2c6149228a _get_hermitian_quantity_from_gf to avoid code duplication 2018-03-28 16:28:52 +02:00
Nils Wentzell
f2d7e84bdd Major update and Cleaning
-consistent indends in all cmake files
-add static analyzer checks with both cppcheck and clang-tidy
-add dynamic analyzer checks with Address Sanitizer and option ASAN
-add dynamic analyzer checks with Undefined Behavior Sanitizer and option UBSAN
-Further Cleaning and Comments
2018-03-25 19:21:18 +02:00
Nils Wentzell
6bf4afd316 Adding cmake config files to install targets, Major cleaning 2018-03-23 16:59:38 +01:00
Nils Wentzell
2b76c51f12 First draft of the triqs application skeleton 2018-03-22 18:16:10 +01:00
Gernot J. Kraberger
8d6d8b53c5 SumkDFT: analyze_block_structure_from_gf for Gf Re/Im Time/Freq 2018-03-19 11:09:31 +01:00
Gernot J. Kraberger
a63169e45f SumkDFT: check the supplied gf for every shell
in analyse_block_structure_from_gf and
analyse_deg_shells
2018-03-01 16:09:24 +01:00
Gernot J. Kraberger
318c5a36e7 SumkDFT: adapt symm_deg_gf to work with the new deg_shells 2018-02-28 14:24:30 +01:00
Gernot J. Kraberger
25218746f4 SumkDFT: analyse_block_structure_from_gf 2018-02-28 14:24:30 +01:00
Gernot J. Kraberger
a8d86fd198 BlockStructure: fix bug with bool comparison 2018-02-28 14:24:30 +01:00
Gernot J. Kraberger
3dbc360173 BlockStructure: update test 2018-02-28 14:24:30 +01:00
Gernot J. Kraberger
7e82b3eee5 BlockStructure: add deg_shells in str function 2018-02-28 14:24:30 +01:00
Gernot J. Kraberger
c1daf2f789 BlockStructure: show warnings only when above threshold 2018-02-28 14:24:30 +01:00
Gernot J. Kraberger
ad2ee87bc7 add deg_shells to block_structure 2018-02-28 14:24:29 +01:00
Nils Wentzell
7599336e55 Fixed a bug in reading scale from POSCAR in PLOVasp 2018-02-23 10:30:16 +01:00
Nils Wentzell
586958eea9 Fixing install of python files after cmake changes 2018-02-14 16:22:11 -05:00
Dylan Simon
91ce2eef4b Fix use of numpy.full on older numpy
Was failing test srvo3_transp on centos:
  File "/home/build/dft_tools/python/sumk_dft_tools.py", line 947, in <dictcomp>
    for direction in self.directions}
AttributeError: 'module' object has no attribute 'full'
2018-02-13 15:42:09 -05:00
Manuel
1158e2cacc Fix installation of python sources in CMakeLists 2018-02-06 16:44:11 -05:00
Manuel
f9cc1b082c Merge branch '_wip_cmake' into unstable 2018-01-22 19:03:35 -05:00
Olivier Parcollet
1a0ba43f8d Continued 2018-01-22 17:37:27 -05:00
Olivier Parcollet
ae548d48da WIP 2017-12-07 15:56:05 +01:00
Gernot J. Kraberger
78b8b1d0ee Fix default value of filename in calc_density_correction 2017-10-24 09:57:32 +02:00
Gernot J. Kraberger
d00575632c Fix default value of filename in calc_density_correction 2017-10-24 09:49:54 +02:00
mzingl
d181378115 Merge pull request #77 from HugoStrand/unstable
[sumk] gf.N1 deprecation warning fix
2017-10-17 20:03:12 +02:00
Manuel Zingl
e5cd5c5aba Fix bug in writing qdmft file 2017-10-16 10:15:20 +02:00
Manuel Zingl
3f7b9f6843 Fix bug in writing of qdmft file 2017-10-16 10:12:32 +02:00
Hugo U. R. Strand
56480d50c5 [sumk] gf.N1 deprecation warning fix 2017-10-04 17:50:20 -04:00
Oleg E. Peil
8f28fcf41f Fixed issue #75 2017-08-17 16:31:01 +02:00
Oleg E. Peil
974aa08e14 Fixed a bug in reading scale from POSCAR in PLOVasp 2017-04-20 13:58:24 +02:00
Olivier Parcollet
d7d720141e Port to new Python interface for Gf
- Minor changes
- tests are ok
2017-04-06 09:25:17 +02:00
Hiroshi Shinaoka
129ae1e068 Fixed bugs. The latest numpy accepts only an integer as an index. 2017-03-17 21:05:09 +09:00
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
Oleg E. Peil
f994b82704 Rearranged and fixed some tests
First of all, suite '_plotools' is now split into three separate suites
'_plotools', '_proj_shell', '_proj_group', following the changes made
into the structure of the code.
Second, the two tests in 'test_projshells.py' have been fixed to conform
to the recent modifications in the code and input files.
2015-11-18 12:38:04 +01:00
Oleg E. Peil
401d416d4d Fixed 'plotools.py' and restructured 'proj_group.py'
Added missing import of ProjectorGroup and ProjectorShell to
'plotools.py'.
Moved separate routines 'orthogonalize_projector_matrix()'
and 'select_bands()' into class ProjectorGroup because these
routines are anyway not used elsewhere outside this class.
2015-11-13 19:09:25 +01:00
Oleg E. Peil
61395b12fa Restructured the source files
The classes ProjectorShell and ProjectorGroup are now defined in
different source files. This makes 'plotools.py' only contain
routines that control the data flows, including consistency checks
and output.
2015-11-13 18:15:21 +01:00
Oleg E. Peil
b285f37eca Added some new tests
New tests for the recently implemented parsers (for DOSMESH, EWINDOW,
and TRANSFILE) have been added.
2015-11-13 14:38:20 +01:00
Oleg E. Peil
8a718ea906 Fixed 'inpconf' tests after the recent changes
Some of the options of the config-file has been modified.
The tests have been adapted accordingly.
2015-11-13 13:54:26 +01:00
Oleg E. Peil
a61e0b2526 Fixed a problem with missing nc_flag property
The ProjectorShell class must inheret 'nc_flag' from somewhere.
This is now done by passing it to the class constructor in
'generate_plo()'.
2015-11-11 20:30:49 +01:00
Oleg E. Peil
453c8531c9 Replaced options EMIN, EMAX with EWINDOW
It did not make much sense to keep two independent options to
define an energy range. Now the energy window is directly defined
by two floats.
2015-11-11 18:58:38 +01:00
Oleg E. Peil
5ec3e881cd Added transformation matrices to ProjectorShell
Matrices parsed by the config-parser are interpreted as transformation
matrices for each ion in the shell. If only one matrix is defined
(by TRANSFORM) it is copied for every ion.
Whether a matrix is real or complex is derived from its dimensions
consistently with other parameters of the shell (such as 'nm = 2*l + 1').
Transformation matrices are stored as complex in any case.
2015-11-11 12:43:51 +01:00
Oleg E. Peil
cefaf9dda4 Added TRANSFILE option to the config-parser
TRANSFILE option provides a filename containing transformation
matrices for all ions of a projected shell.
The parser simply reads the numbers into a 2d-array which is left
for interpretation at a later stage.
2015-11-11 11:36:09 +01:00
Oleg E. Peil
7e13c1cb5b Fixed inequivalent shell determination
It was incorrect to ascribe VASP atomic sort to corr_shell['sort'],
the latter having a different meaning. According to the terminology of
Wien2k a sort determines an equivalence class of atoms.
Since the implementation at the moment does not support symmetries
the atom index is now used as a 'sort' index to make sure that all shells
remain inequivalent.
2015-11-10 19:16:41 +01:00
Oleg E. Peil
0eb574b5c8 Added DOSMESH option to section [General]
If option DOSMESH is specified a projected DOS for each shell
will be output. Energy mesh parameters are given in DOSMESH as

DOSMESH = [EMIN  EMAX]  N_POINTS

The parameters in the brackets [] are optional. If only the number
of points is specified the energy range is taken to be the same
as the projection energy window.
2015-11-10 16:40:46 +01:00
Oleg E. Peil
bf34d968cc Added orbital labels to 'proj_params'
When PROJCAR is read it assigns the orbitals by their corresponding
labels. These labels are now added to the dictionary 'proj_params'.
Although they are not used currently they can be handy when it comes
to identifying the character of the orbitals.
Also, the order of orbital labels for p- and d-orbitals was changed
to conform to the convention of the old PROCAR file.
2015-11-10 15:32:15 +01:00
Oleg E. Peil
63eb4c2089 Fixed a bug in 'density_of_states()'
Fixed the wrong index order in 'w_k' inside the loop evaluating
DOS.
2015-11-10 14:09:40 +01:00
Oleg E. Peil
d3dd546cee Fixed a bug in 'shell.density_matrix()' and added some output
The first two indices in 'proj_win[...]' were incorrect in
the density matrix routine.
Added output on the processed shells.
2015-11-10 12:24:14 +01:00
Oleg E. Peil
fa420924af Fixed a bug in 'debug_density_matrix()'
The on-site blocks of the large (for all orbitals) desnity matrix
were incorrectly copied for the output.
2015-11-10 12:07:13 +01:00
Priyanka Seth
f93fd828c0 Added a wrapper function set_Sigma for more standard API 2015-11-02 11:43:53 +01:00
Oleg E. Peil
cb745fff9f Commented out debug prints in 'vasp_converter.py' 2015-10-22 20:13:58 +02:00
Oleg E. Peil
2b71180e8e Added calculation of DOS to plotools.py
Added a function that allows one to get the non-interacting projected DOS for
newly generated projectors. The DOS is calculated with analytical tetrahedron
integration added previously.
At the moment, the DOS is generated and output for debugging purposes
after the projectors are generated. Eventually, there should be an
option in the input config file requesting the output of DOS for a given
energy mesh.
2015-10-22 16:15:49 +02:00
Oleg E. Peil
9c7e63ebae Reshuffled some files, added .gitignore 2015-10-21 11:54:22 +02:00
Oleg E. Peil
99713edbc4 Fixed band selection indices for projectors
There was an inconsistency in the convention on the position of the
subarray corresponding to projectors within the selected window.
In some cases the subarray was defined from 0 to ib_max, in other cases
it was from 'ib1 - ib_min' to 'ib2 - ib_min'.
Now the global convention is that the projectors for a given window
are stored in a slice '0:ib_max', where 'ib_max = ib2 - ib1 + 1'.
2015-10-20 17:37:17 +02:00
Oleg E. Peil
8a71cbe6b0 Fixed bugs related to indices ib_min, ib_max
There was a mess with indices 'ib_min', 'ib_max' indicating the
selected window. First of all their old names 'nb_min', 'nb_max' were
confusing and because of that they were sometimes incorrectly used as
the maximum size of the window and sometimes as a maximum band index.
Now the convention is more clear: 'ib_min', 'ib_max' correspond to the
minimum/maximum band indices (in terms of original VASP indices) and
'nb_max == ib_max - ib_min + 1' is the maximum number of bands within
the window.
2015-10-20 12:36:57 +02:00
Oleg E. Peil
5f9b884944 Fixed output of eigenvalues of *.pgX file
The eigenvalues output to a *.pgX file were the raw eigenvalues
from VASP. Now the Fermi level is subtracted as it is expected in
the converter.
2015-10-20 12:02:46 +02:00
Oleg E. Peil
67b78c1499 Added some debug output to plotools.py
Added output of density and overlap matrices to plotools.py.
If one defines a very large window (spanning all bands) one can
compare this output with the one produced by 'debug_density_matrix()'
in class ElectronicStructure.
For a small window, the overlap gives an idea of symmetry-related
degeneracies and of how strong the states are going to be renormalized
by the orthogonalization routine.
2015-10-16 18:10:48 +02:00
Oleg E. Peil
54b9857aa5 Added density and overlap matrix output ot ElStruct
The new method in ElectronicStructure allows one to output
denisty and overlap matrices originating from the raw projectors
read from PROJCAR (LOCPROJ). This output is mainly intended for debug purposes.
2015-10-16 16:27:49 +02:00
Oleg E. Peil
82694a4c51 Merge branch 'vasp' of ssh://github.com/TRIQS/dft_tools into vasp 2015-10-16 15:56:49 +02:00
Oleg E. Peil
87b00f61b1 Added a format check for EIGENVAL to vaspio.py
Added a check to 'vaspio.py' testing that the number of columns
implies that the Fermi weights are present in EIGENVAL. This check ensures
that the new format (starting from VASP 5.4) of the file is used.

Corresponding test is added to the suite.
2015-10-16 11:59:02 +02:00
Oleg E. Peil
dda331b986 Fixed 'vaspio' tests
Added 'rpath.py' module to determine the current directory.

Also fixed the test example for EIGENVAL: VASP 5.4 uses a format
with Fermi weights output (unlike previous versions).
2015-10-16 11:52:33 +02:00
Oleg E. Peil
3aba5f4135 Added a doc-string to rpath.py 2015-10-16 11:22:38 +02:00
Oleg E. Peil
c8badb39ff Fixed 'inpconf' tests
Originally, the tests worked only when run from their respective
directory. If one tries to run them from another directory (which happens
when test discovery is used) the tests were not able to find the input files.
Now, a dummy module 'rpath' is added to all tests whose sole role is
to obtain the current path.
2015-10-16 11:16:48 +02:00
Oleg E. Peil
be21838e30 Modified ProjectedShell to conform to new projectors
The new projector input requires a different approach of selecting
the projectors for each shell. Specifically, for each site/orbital
index defined for a given shell one has to look for the corresponding
input projector (from PROJCAR).

Also, small fixes were required to make 'ferw' array index order
consistent with what is expected in ProjectorShell. This order might
eventually be modified.
2015-10-15 13:26:48 +02:00
Oleg E. Peil
fb3bc8eeff Added consistency check for the number of sites
'check_data_consistency' now first checks that site indices in
projected shells do not exceed the number of ions in the structure.
2015-10-15 11:44:50 +02:00
Oleg E. Peil
f96e4dfe9e Added consistency check of projector characters
Since in the new implementation the projectors produced by VASP
are output only for selected functions it is necessary to check
that input cfg-file specifies only those projectors that were selected
in the INCAR file. The consistency routine checks for every shell
and site/orbital character that a corresponding projector is present
in PROJCAR.
2015-10-14 19:32:12 +02:00
Oleg E. Peil
89b7a95a8b Renamed 'params' to 'proj_params' in class Plocar 2015-10-14 17:44:01 +02:00
Oleg E. Peil
f457f5cc7a Modified ElectronicStructure for new projectors
Some necessary modifications to class ElectronicStructure in order
to conform the modified projector input. In particular, the dimensions
of the projector array are now taken directly from the array,
and the old dictionary 'params' is replaced with a list 'proj_params'
containing information on the character of projectors.
2015-10-14 17:36:39 +02:00
Oleg E. Peil
4cc989fbea Fixed class ElectronicStructure
Small fixes to accord with the changes of Vaspio:
* 'nspin' is now taken from Eigenval.ispin
* 'nc_flag' is now determined from the value of 'ncdij' read from DOSCAR
* 'ferw' is now taken from Eigenval
2015-10-14 16:22:10 +02:00
Oleg E. Peil
65fc129cd1 Fixed parsing of EIGENVAL to accord with the new format
In recent version of VASP the output in EIGENVAL includes also
Fermi weights. The parser in class 'Eigenval' has been modified
accordingly.
2015-10-14 16:15:14 +02:00
Oleg E. Peil
66fac2f1bd Added preliminary PROJCAR parser to vaspio
This python-parser is a prototype of a future parser that will probably
be using only LOCPROJ (which is going to be modified).
At the moment, one has to use the first line of LOCPROJ to determine
the array dimensions and parse PROJCAR because it contains relevant information
on projectors (such as site and orbital character).

Note that in the previous implementation relying on the binary PLOCAR-file
the Fermi weights were taken from PLOCAR. In the current version of VASP
(>=5.4.1) the Fermi weights can read in from EIGENVAL.
2015-10-14 15:58:45 +02:00
Oleg E. Peil
8064c9604d Moved 'vasp_converter.py' to 'converters' 2015-10-13 11:36:43 +02:00
Oleg E. Peil
819fc987f0 Reshuffled files after repository merge
The files from the original vasp-interface repository are reshuffled in
accord with the directory structure of dft_tools. Some of the directories,
such as 'test' (unit tests for the interface), 'examples' (simple examples for
the development purposes) are temporarily placed into 'python/vasp' directory
to avoid confusion with integral tests and examples of dft_tools.
2015-10-13 11:27:55 +02:00
Oleg E. Peil
77a169d242 Fixed small bugs and typos in vasp_converter
VaspConverter is fixed to run and successfully produce some *.h5-file.
Consistency of this file is to be determined later.
2015-10-11 14:03:14 +02:00
Oleg E. Peil
fada2af703 Fixed imports in vasp_converter
Import of 'json' is fixed to conform python distributions without
'simplejson'.
Also, the full path is used for 'converter_tools' for the moment while
'vasp_converter' is not part of 'dft_tools'.
2015-10-11 14:03:14 +02:00
Oleg.Peil
2346b43950 Fixed import of 'json'
It seems that not all distributions of python come with a 'simplejson' module.
Now, if this module is not found the import falls back to module 'json'.
2015-10-11 14:03:14 +02:00
Oleg E. Peil
53de9b3962 Added preliminary implementation of misc and symmetry input
At the moment, symmetries are not supported by the interface.
Instead, some dummy parameters are generated and the symmetry is turned off.
'misc_input' is only partially implemented because it contains
some data which is not required for the correct functioning of DftTools.
2015-10-11 14:03:14 +02:00
Oleg E. Peil
57b0d5735a Replaced 'python' with 'pytriqs' in 'run_build.sh' 2015-10-11 14:03:13 +02:00
Oleg E. Peil
84061edc4b Added a preliminary version of VaspConverter
This preliminary version is untested and might not even run.
Here, almost all relevant input (apart from symmetries and miscellaneous)
is implemented and conventions adpoted in DftTools are accomodated.
2015-10-11 14:03:13 +02:00
Oleg E. Peil
d70dca3dd7 Fixed 'nelect_window()' in ProjectorGroup
Method 'nelect_window()' now correctly takes into account a subset
of bands selected by the energy window.
Also, the number of electrons is now output to a '*.grX' file.
2015-10-11 14:03:13 +02:00
Oleg E. Peil
f89ea4c639 Added output of ion sort corresponding to a shell
The data for a projected shell (output to a '*.pgX' file) contains
now the ion sort corresponding to this shell.

Also, 'check_data_consistency()' was fixed by correcting the
reference to list 'type_of_ion' (which is now copied to ElectronicStructure).
2015-10-11 14:03:13 +02:00
Oleg E. Peil
f2e4c2f866 Added 'type_of_ion' list to ElectronicStructure 2015-10-11 14:03:13 +02:00
Oleg E. Peil
68fbc15891 Fixed test setup for 'test_projgroups.py'
The parameter set of 'ProjectorGroup' constructor was modified.
Now the call in the test case has been fixed accordingly.
2015-10-11 14:03:13 +02:00
Oleg E. Peil
1f57cd1935 Added consistency check for projected shells
Added a check to 'check_data_consistency()' that verifies
that each shell contains only one sort of ions.

Also added a non-functioning test (implementation is commented)
for the function.
It requires a full set of VASP files for an example with multiple atom sorts.
2015-10-11 14:03:13 +02:00
Oleg E. Peil
36c928a4b5 Fixed the previous commit
The implementation of option 'read_all' was missing in the previous commit.
2015-10-11 14:03:13 +02:00
Oleg E. Peil
33ab7ff2a0 Added an option 'read_all' to VaspData.__init__() 2015-10-11 14:03:13 +02:00
Oleg E. Peil
0cec37f3fc Added 'type_of_ion' list to class Poscar
A list 'type_of_ion' mapping ion index to their types is added
to class Poscar. A corresponding test is also added.
2015-10-11 14:03:13 +02:00
Oleg E. Peil
529c7bc9d5 Fixed the determination of parameter 'shell.ndim'
Parameter 'ndim' of class 'ProjectedShell' was calculated
incorrectly, giving the value of 6 for a d-shell.
2015-10-11 14:03:13 +02:00
Oleg E. Peil
7256907c72 Added input of a ctrl-file to the converter
Implemented a basic input of a ctrl-file. First, the JSON-header is
read and parsed, then k-points and their weights are read in.
2015-10-11 14:03:13 +02:00
Oleg Peil
1e01003653 Added 'conv_example.py' to test the converter.
The script is supposed to be part of the test example for
the converter.
2015-10-11 14:03:13 +02:00
Oleg Peil
327f100a64 Fixed the name of function 'generate_plo()'
The function 'generate_ortho_plos()' is renamed to
'generate_plo()', which fixes the partially faulty merge.
2015-10-11 14:03:13 +02:00
Oleg Peil
7b2e2a3b6e Implemented 'read_header_and_data()' and 'read_data()'
'read_data()' is a generator interpreting a file as a sequence of
floats. Lines starting with '#' are ignored.
'read_header_and_data()' reads the header string until a line
"# END ...", initializes a generator 'read_data()', and returns
them.
2015-10-11 14:03:13 +02:00
Oleg Peil
8179b74178 Added the main converter script 'vasp_converter.py'
'vasp_converter.py' is based on the existing 'wien2k_converter.py'.
Methods 'read_header_and_data()' and 'read_data()' for reading input files
are added. The first method returns a JSON-header and a generator 'read_data()'
returning floats from the plain-data part of the file.
2015-10-11 14:03:13 +02:00
Michel Ferrero
dd33621e7c Merge ../bare_plovasp into dev
Conflicts:
	python/converters/vasp/python/main.py
	python/converters/vasp/python/plotools.py
Merged old version of output with the new one
2015-10-11 14:00:35 +02:00
Oleg E. Peil
586b11c93f Added output of projector groups
The output of projected-group files is implemented. The data is stored
into files <basename>.pg<Ng>, where 'Ng' starts from 1.
2015-10-11 13:57:46 +02:00
Oleg E. Peil
2472341cd0 Added output of the header of a PLO-group file
The basic header for PLO-group file (now called '<basename>.pg<Ng>')
is implemented.
Also, fixed the wrong imported function name in 'main.py'.
2015-10-11 13:57:46 +02:00
Oleg E. Peil
207c637be2 Restructured text-output routines
'main()' now calls a function 'output_as_text()' responsible for storing
both a ctrl- and plo-files ('ctrl_output()' and 'plo_output()', respectively).
2015-10-11 13:57:46 +02:00
Oleg E. Peil
99f87cc70f Added output of k-points
The header of the ctrl-file is terminated by a line "#END OF HEADER"
followed by a dump of k-points with weights.
2015-10-11 13:57:46 +02:00
Oleg E. Peil
d794bfa0f5 Added output of a basic header into a ctrl-file
Added function 'ctrl_ouput()' which stores data common for all correlated
shells into a file '<basename>.ctrl'.
At the moment, only a very basic header is output.
The signature of 'plo_output()' is also modified to include an instance
of class 'ElectronicStructre' containing important information on
the lattice structure, Efermi, and k-points.
2015-10-11 13:57:46 +02:00
Oleg E. Peil
4c18c6e09c Added the parser of section [General]
Parsing of two optional parameters (BASENAME and EFERMI) from section [General] from the config-file
is implemented. If this section is not found the parameters are set to their
default values, which is 'vasp' for BASENAME and nothing for EFERMI.
Appropriate test is added to the 'inpconf' test suite.
2015-10-11 13:57:46 +02:00
Oleg E. Peil
4bbafa239e Added documentation on the output file formats
A description of the output file formats is added to the documentation.
In particular, the outline of JSON headers for projector-group (*.plog<Ng>)
and control (*.ctrl) files are given.
2015-10-11 13:57:46 +02:00
Oleg E. Peil
db16a8438d Restructed test directory
The names of the test suites have been prefixed with an underscore
to avoid name conflicts with corresponding modules.
Also an attempt to make a scan of all tests has been made by
creating a 'test_all.py' script that is supposed to discover all
test cases and run them. Unfortunately, this does not work as expected
because many tests use input files assumed to be found in the current
directory, which is not true if the tests are run from a different
(parent) directory.

This can be fixed by either forcing the change of directory (but it
seems that 'unittest' does not have this functionality) or
prepending input file names with the current module directory.
2015-10-11 13:57:46 +02:00
Oleg Peil
bb010d200b Added output of k-points
Subroutine 'kpoints_output()' is added to 'plotools.py' and is invoked
from 'main.py'.
K-points are output in a separate file <basename>.kpoints that is
common to all PLO groups. If present, tetrahedron data is also stored.
2015-10-11 13:55:49 +02:00
Oleg Peil
33f9e75857 Changed 'generate_ortho_plos()' to 'generate_plo()'
Generation and orthogonalization of PLOs should be separated
because some quantities (such as the LDA density matrix) are calculated
using the original raw projectors.
The orthogonalization routine is now called from 'main.py'.
2015-10-11 13:55:48 +02:00
Oleg Peil
b325028efd Fixed the calculation of 'nelect'
In the previous commit the calculation of 'nelect' was implemented
incorrectly. The sum over k-points must also contain k-weights
and a spin factor (2.0 for ns = 1).

The calculation of 'nelect' is now implemented as a separate method
of ProjectorGroup.
2015-10-11 13:55:48 +02:00
Oleg Peil
b78a06d36f Added output of PLO groups
Output of PLO groups into a text file is added to 'plo_output()'.
The file format is provisional and can change in future versions.

Also, an attribute 'nelect' providing the number of electrons in
the selected energy window is added to ProjectorGroup.
2015-10-11 13:55:48 +02:00
Oleg Peil
6ab916d2d0 Added (empty) function 'plo_output()' 2015-10-11 13:55:05 +02:00
Oleg Peil
b6250477f2 Fixed 'generate_ortho_plos()' to produce orthogonalized PLOs 2015-10-11 13:55:05 +02:00
Oleg Peil
d0a75edec3 Added a simplest workflow to 'main.py'
Simplest workflow: read config-file, vasp data, generate PLOs,
and output them to text files.
2015-10-11 13:55:05 +02:00
Oleg Peil
bec28dbefd Added examples directory with one example 'simple'
Apart from their direct purpose as a help to users, examples may serve
as integrity tests. Eventually, one can convert them into a test suite.
2015-10-11 13:55:05 +02:00
Oleg E. Peil
5d8423a30e Added preliminary 'main.py' 2015-10-11 13:55:05 +02:00
Oleg E. Peil
89ab594253 Added test output files forgotten in the previous commit 2015-10-11 13:55:05 +02:00
Oleg E. Peil
4c920b8312 Added some documentation on PLOtools
The documentation has been slightly rewritten and extended to follow
the recent changes. The modifications include:

- ProjectorSet class is now replaced by ProjectorShell
- the workflow has been refined
- the electronic structure part is represented by class ElectronicStructure
2015-10-11 13:55:05 +02:00
Oleg E. Peil
3317371762 Added calculation of density matrices for a shell
A method 'density_matrix()' for evaluating a density matrix of a given shell
has been added to class ProjectorShell. It requires an ElectronicStructure
object as an input an by default produces a site- and spin-diagonal
part of the density matrix using the Fermi-weights obtained directly from VASP.
Ideally, this density matrix should coincide with the one calculated
within VASP itself (inside the LDA+U module).

Corresponding sanity test has been added, which shows only that the
calculation does not crash. Real numerical tests are needed.
2015-10-11 13:55:05 +02:00
Oleg E. Peil
ad6b3ab708 Added class ElectronicStructure
Class ElectronicStructure is intended for the internal representation
of the band structure and raw projector data from VASP.
In addition, its purpose is to perform a simple consistency check
of the input VASP data (as they are read from different files).
2015-10-11 13:55:05 +02:00
Oleg E. Peil
0c4e3ad006 Changed order of indices of 'proj_arr' array
When a ProjectorShell is created it creates a view of the full
projector array with orbital 'ilm' and band 'ib' indices interchanged.
The reason for this is that this corresponds more naturally to the
definition of the projector P_{m\nu} and also allows for multiplications
of projector matrices without additional transposition.

The tests have been modified accordingly.
2015-10-11 13:55:04 +02:00
Oleg E. Peil
a0e9d1a18e Added a test suite for ProjectorGroup class
A preliminary test suite for class 'ProjectorGroup' was added.
Currently, only a simplest test is performed testing that
after the input is processed the resulting projectors selected
within a given energy window are corret.
2015-10-11 13:55:04 +02:00
Oleg E. Peil
9bbd71afb9 Fixed a bug in 'inpconf.py'
The problem was that when one shell was specified without an explicit
group the created automatic group was lacking the default values for
parameters 'normalize' and 'normion'. The current design, however,
assumes that they must always be set.
2015-10-11 13:55:04 +02:00
Oleg E. Peil
5c3b3d0b8d Added several tests
Tests for 'select_bands()' and class 'ProjectorShell' have been added.
The function and class methods have been fixed accordingly to pass
the tests.
2015-10-11 13:55:04 +02:00
Oleg E. Peil
90c93c4693 Fixed a bug in 'inpconf.py', added a corresponding test 2015-10-11 13:55:04 +02:00
Oleg E. Peil
b05d176f39 Fixed 'vaspio.py' to pass the tests' 2015-10-11 13:55:04 +02:00
Oleg E. Peil
82cc06d41e Added a test suite for module 'vaspio' 2015-10-11 13:55:04 +02:00
Oleg E. Peil
36aadf6ff4 Removed redundant index reassignments in 'c_plocar_io.c' 2015-10-11 13:55:04 +02:00
Oleg E. Peil
46474c0b3e Modified 'c_plocar_io.c' to conform Numpy 1.7 API 2015-10-11 13:55:04 +02:00
Oleg E. Peil
7e894d98f6 Added a small test suite for 'c_plocar_io' module 2015-10-11 13:55:04 +02:00
Oleg E. Peil
19a30034f5 * Replaced direct compilation in Makefile by 'setup.py' from 'distutils'
* NO_DEPRECATED_API flag was added and now 'c_plocar_io.c' does not compile
2015-10-11 13:55:04 +02:00
Oleg E. Peil
f0ae1c9927 Added untested 'ProjectorGroup' class (including orthogonalization routine) 2015-10-11 13:55:04 +02:00
Oleg E. Peil
ba015d4b62 Added untested version of 'ProjectorShell' class 2015-10-11 13:55:04 +02:00
Oleg E. Peil
74ef3ca93e Added defulats to optional group parameters 2015-10-11 13:55:04 +02:00
Oleg E. Peil
9d4fb22572 Rearranged test cases for 'inpconf.py'.
A single-file test suite for 'inpconf.py' is split into several files,
each containing a separate TestCase class. In addition, all test cases
are derived from class ArrayTestCase (in turn derived from TestCase)
which contains a numpy-array equality method.
2015-10-11 13:55:04 +02:00
Oleg E. Peil
a58ec59c9c Added Scenario 5 to 'test_parse_input()' and fixed 'inpconf.py' to pass it 2015-10-11 13:55:04 +02:00
Oleg E. Peil
74a1ad280d Added Scenario 4 to 'test_parse_input()' (test10.cfg) 2015-10-11 13:55:04 +02:00
Oleg E. Peil
bcc20a0399 * Added Scenario 3 to 'test_parse_input()' (test9.cfg)
* Fixed 'parse_input()' to pass the test
2015-10-11 13:55:04 +02:00
Oleg E. Peil
8928fa3118 * Added Scenario 2 to 'test_input()' (test8.cfg)
* Removed group parameter 'shells' from a dict of required parameters
   for a single [Shell] section
2015-10-11 13:55:04 +02:00
Oleg E. Peil
8b60a91e49 Completed 'test_parse_groups()' 2015-10-11 13:55:04 +02:00
Oleg E. Peil
3516ebd285 * Replaced 'test_groups_shells_consistency()' with 'test_parse_input()'
* Fixed Scenario 1 of 'test_parse_input()'
  * Fixed Scenario 1 of 'test_parse_groups()'
2015-10-11 13:55:04 +02:00
Oleg E. Peil
d2fe6d50e8 * Fixed tests for the modified version of 'parse_shells()'
* Removed redundant prints in 'parse_shells()'
2015-10-11 13:55:04 +02:00
Oleg Peil
76d0b4a6bb Small syntax fix in inpconf.py 2015-10-11 13:55:04 +02:00
Oleg Peil
0816d45d59 * Added (empty) function 'parse_general()' * Completed 'parse_input()' 2015-10-11 13:55:03 +02:00
Oleg Peil
9ab6116b28 * Completed group parser
* Added a consistency check for groups and shells
 * Added scenario descriptions to the test suite
2015-10-11 13:55:03 +02:00
Oleg Peil
0d1ef0ac97 Small fixes in config.rst 2015-10-11 13:55:03 +02:00
Oleg Peil
f393168d16 * Added a test 'parse_groups()'
* Added to docs for config-file a description of all features that
    are implemented or under active development
2015-10-11 13:55:03 +02:00
Oleg Peil
bd6198d264 * Restructured the directory structure * Added some half-day long development including tests 2015-10-11 13:55:03 +02:00
Oleg Peil
e85d3b4f2b Initial commit 2015-10-11 13:55:03 +02:00
Manuel Zingl
29d2bf8d50 sigma_from_file changed to read function of gf
build_sigma_from_txt.py deleted as reading a gf
        from a file is now implemented in gf.local.tools
2015-09-17 10:03:07 +02:00
Manuel Zingl
cf7628065b Some changes in the usage of build_sigma_from_txt. 2015-08-24 14:47:08 +02:00
Manuel Zingl
61747745f4 New test added for build_sigma_from_txt.py 2015-08-21 12:24:54 +02:00
Manuel Zingl
00a775a93d analysis.rst done. Minor change in transport.rst
I also described how one can read a self energy form a data
        file. However, this needs to be tested and also included
        in the reference manual. Maybe the function should move
        back into sumk_dft_tools!?
2015-08-20 15:46:14 +02:00
Manuel Zingl
929b459681 Removes work around for issue #41 2015-08-10 16:14:51 +02:00
Manuel Zingl
b6e33ecc23 Add more integrators for the transport integral
It is now possible to use trapz, simps and quadl (with cubic
        spline) to perform the omega integration needed in the transport code.
2015-07-28 17:21:13 +02:00
Manuel Zingl
6ecbf6720d Fix converter bug occuring in sp case.
max(n_orbitals) changed to numpy.max(n_orbitals)
2015-07-16 12:27:01 +02:00
Manuel Zingl
ea7d0b1e81 Workaround for issue #41 2015-07-14 09:26:04 +02:00
Priyanka Seth
335dee2042 Fixes a bug when reading case.oubwin
Code does not crash anymore if number of k-points differ
    in case.oubwin and case.klist. Added a warning.
2015-07-07 15:26:04 +02:00
Manuel Zingl
60c6466ace Some changes wien2k_converter
convert_bands_input and convert_parproj_input can now be called
    without calling convert_dft_input directly before.
2015-07-07 15:08:53 +02:00
Priyanka Seth
b24a836372 [sumk] import itertools for product 2015-07-02 15:17:33 +02:00
pdelange
6eef3bd172 fixed analyze_block_structure in sumk
was buggy when the number of off-diagonal elements was larger than the number of orbitals
2015-06-26 18:59:39 +02:00
Priyanka Seth
86b1461c52 Moved U_matrix to TRIQS library 2015-06-17 18:19:30 +02:00
Manuel Zingl
8bfc950cb1 [transport] Replacing Im(G) by 1/(2i)*(G-G^dag) 2015-05-27 10:43:40 +02:00
Oleg.Peil
0aed9c681f Fixed a small mistake in the calculation of cell volume
There was an obious typo in the formula for cell volume

vol_c = a * b * c * numpy.sqrt(1 + 2 * c_al * c_be * c_ga - c_al ** 2 - c_be ** 2 - c_ga ** 2),

where instead of 'c_be ** 2' there was 'c_be * 82'.
2015-05-02 13:16:24 +02:00
Manuel Zingl
aef5072cad Fixes a little bug in wien2k_converter.py 2015-04-30 19:05:24 +02:00
Priyanka Seth
79b4b426a8 Modify HDFArchive calls to 'r' where possible to handle corrupt files 2015-04-27 13:12:28 +02:00
Priyanka Seth
8dc42b08ae [doc] New documentation
* restructuring
* added user reference
* started working on user guide
* added schematic to structure
2015-04-21 14:31:15 +02:00
Manuel Zingl
3d577c294e Fix for previous bugfix 2015-04-15 15:35:03 +02:00
Priyanka Seth
a2dae173cf Fixed bug in lattice gf that appeared when dc was not used 2015-04-15 09:48:31 +02:00
Priyanka Seth
87523ef231 Fixed bug in cal_density_correction 2015-04-14 18:19:59 +02:00
Manuel Zingl
b42a51fe17 Correcting another bug in dos_*_basis
om_mesh was wrongly determined to zero (due to integer division...)
if no Sigma was given.
2015-04-14 15:44:07 +02:00
Manuel Zingl
8d0bc912af Corrects bug in dos_wannier_basis 2015-04-14 14:45:32 +02:00
Priyanka Seth
74a19b72df Fixed bug in mesh construction of lattice GF. 2015-04-13 15:11:04 +02:00
Priyanka Seth
e387f3ed21 [tools] Parallelize k sum in spaghettis 2015-04-04 12:41:25 +02:00
Priyanka Seth
ceaabf50ae [sumk_dft_tools] Add option to pass specific file name in spaghettis. 2015-04-04 12:40:36 +02:00
Priyanka Seth
8b8ab0da3d Removed invert_Akw and fermi surface calculation from sumk_dft_tools 2015-04-04 12:40:26 +02:00
Manuel Zingl
54caa08069 Fixes two bugs in dos_*_basis
1.) Missing minus
2.) wrong summation index i -> iom
2015-03-30 17:49:46 +02:00
Priyanka Seth
335fd6cbc6 [converter] fix bug in misc_converter 2015-03-22 18:15:05 +01:00
Priyanka Seth
9585f6f482 [converter] removed n_k consistency check 2015-03-18 10:30:01 +01:00
Priyanka Seth
74b676f841 Clean up of sumk_dft_tools 2015-03-14 20:16:04 +01:00
Priyanka Seth
460219fb16 Fix subgroup name in clear_h5_output.py 2015-03-12 11:01:02 +01:00
Priyanka Seth
d30abdd20e [sumk] total_density, extract_G_loc and lattice_gf have same options 2015-03-11 23:53:47 +01:00
Priyanka Seth
cff9015362 [converter] rm debug statement 2015-03-11 17:52:41 +01:00
Manuel Zingl
1fbdf8bf38 Fix for issue #32 2015-03-03 18:43:50 +01:00
Manuel Zingl
a24c7869b1 Corrects a bug in convert_misc_input 2015-02-24 18:14:05 +01:00
Manuel Zingl
8db46b16b5 Reading misc_input files only if present 2015-02-20 15:15:17 +01:00