3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-06 22:23:52 +01:00
Commit Graph

132 Commits

Author SHA1 Message Date
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
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
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
63de4f68a8 Added input of Fermi weights, cleaned-up the code 2015-11-19 16:32:50 +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
cb745fff9f Commented out debug prints in 'vasp_converter.py' 2015-10-22 20:13:58 +02:00
Oleg E. Peil
9c7e63ebae Reshuffled some files, added .gitignore 2015-10-21 11:54:22 +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