3
0
mirror of https://github.com/triqs/dft_tools synced 2024-06-24 06:02:24 +02:00
Commit Graph

30 Commits

Author SHA1 Message Date
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
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
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
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