3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-21 20:03:41 +01:00

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.
This commit is contained in:
Oleg E. Peil 2015-12-11 10:57:48 +01:00
parent 41b3b63744
commit fe88b37515

View File

@ -227,7 +227,7 @@ class VaspConverter(ConverterTools):
# Projectors # Projectors
# print n_orbitals # print n_orbitals
# print [crsh['dim'] for crsh in corr_shells] # print [crsh['dim'] for crsh in corr_shells]
proj_mat = numpy.zeros([n_k, n_spin_blocs, n_corr_shells, max([crsh['dim'] for crsh in corr_shells]), max(n_orbitals)], numpy.complex_) proj_mat = numpy.zeros([n_k, n_spin_blocs, n_corr_shells, max([crsh['dim'] for crsh in corr_shells]), numpy.max(n_orbitals)], numpy.complex_)
# TODO: implement reading from more than one projector group # TODO: implement reading from more than one projector group
# In 'dmftproj' each ion represents a separate correlated shell. # In 'dmftproj' each ion represents a separate correlated shell.