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

27 Commits

Author SHA1 Message Date
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
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
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 E. Peil
89ab594253 Added test output files forgotten in the previous commit 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
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
82cc06d41e Added a test suite for module 'vaspio' 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
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
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
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