mirror of
https://github.com/triqs/dft_tools
synced 2024-09-01 16:53:43 +02:00
Removed a redundant dependency of ProjectorGroup on 'ferw'
This commit is contained in:
parent
5585e81f7d
commit
b85b62d693
@ -86,7 +86,7 @@ def generate_plo(conf_pars, el_struct):
|
|||||||
|
|
||||||
pgroups = []
|
pgroups = []
|
||||||
for gr_par in conf_pars.groups:
|
for gr_par in conf_pars.groups:
|
||||||
pgroup = ProjectorGroup(gr_par, pshells, eigvals, el_struct.ferw)
|
pgroup = ProjectorGroup(gr_par, pshells, eigvals)
|
||||||
pgroup.orthogonalize()
|
pgroup.orthogonalize()
|
||||||
print "Density matrix:"
|
print "Density matrix:"
|
||||||
dm, ov = pshells[pgroup.ishells[0]].density_matrix(el_struct)
|
dm, ov = pshells[pgroup.ishells[0]].density_matrix(el_struct)
|
||||||
|
@ -24,7 +24,7 @@ class ProjectorGroup:
|
|||||||
- eigvals (numpy.array) : array of KS eigenvalues
|
- eigvals (numpy.array) : array of KS eigenvalues
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, gr_pars, shells, eigvals, ferw):
|
def __init__(self, gr_pars, shells, eigvals):
|
||||||
"""
|
"""
|
||||||
Constructor
|
Constructor
|
||||||
"""
|
"""
|
||||||
|
@ -61,7 +61,7 @@ class TestBlockMap(mytest.MyTestCase):
|
|||||||
for sh_par in self.pars.shells:
|
for sh_par in self.pars.shells:
|
||||||
shells.append(ProjectorShell(sh_par, self.mock_plo, self.mock_proj_params, 0))
|
shells.append(ProjectorShell(sh_par, self.mock_plo, self.mock_proj_params, 0))
|
||||||
|
|
||||||
proj_gr = ProjectorGroup(self.pars.groups[0], shells, self.mock_eigvals, 0)
|
proj_gr = ProjectorGroup(self.pars.groups[0], shells, self.mock_eigvals)
|
||||||
|
|
||||||
proj_gr.normion = False
|
proj_gr.normion = False
|
||||||
block_maps, ndim = proj_gr.get_block_matrix_map()
|
block_maps, ndim = proj_gr.get_block_matrix_map()
|
||||||
@ -85,7 +85,7 @@ class TestBlockMap(mytest.MyTestCase):
|
|||||||
for sh_par in self.pars.shells:
|
for sh_par in self.pars.shells:
|
||||||
shells.append(ProjectorShell(sh_par, self.mock_plo, self.mock_proj_params, 0))
|
shells.append(ProjectorShell(sh_par, self.mock_plo, self.mock_proj_params, 0))
|
||||||
|
|
||||||
proj_gr = ProjectorGroup(self.pars.groups[0], shells, self.mock_eigvals, 0)
|
proj_gr = ProjectorGroup(self.pars.groups[0], shells, self.mock_eigvals)
|
||||||
|
|
||||||
proj_gr.normion = True
|
proj_gr.normion = True
|
||||||
block_maps, ndim = proj_gr.get_block_matrix_map()
|
block_maps, ndim = proj_gr.get_block_matrix_map()
|
||||||
|
@ -35,10 +35,9 @@ class TestProjectorGroup(mytest.MyTestCase):
|
|||||||
|
|
||||||
efermi = vasp_data.doscar.efermi
|
efermi = vasp_data.doscar.efermi
|
||||||
self.eigvals = vasp_data.eigenval.eigs - efermi
|
self.eigvals = vasp_data.eigenval.eigs - efermi
|
||||||
ferw = vasp_data.eigenval.ferw
|
|
||||||
|
|
||||||
self.proj_sh = ProjectorShell(self.pars.shells[0], vasp_data.plocar.plo, vasp_data.plocar.proj_params, 0)
|
self.proj_sh = ProjectorShell(self.pars.shells[0], vasp_data.plocar.plo, vasp_data.plocar.proj_params, 0)
|
||||||
self.proj_gr = ProjectorGroup(self.pars.groups[0], [self.proj_sh], self.eigvals, ferw)
|
self.proj_gr = ProjectorGroup(self.pars.groups[0], [self.proj_sh], self.eigvals)
|
||||||
|
|
||||||
# Scenario 1
|
# Scenario 1
|
||||||
def test_ortho(self):
|
def test_ortho(self):
|
||||||
|
@ -36,10 +36,9 @@ class TestSelectBands(mytest.MyTestCase):
|
|||||||
|
|
||||||
efermi = vasp_data.doscar.efermi
|
efermi = vasp_data.doscar.efermi
|
||||||
self.eigvals = vasp_data.eigenval.eigs - efermi
|
self.eigvals = vasp_data.eigenval.eigs - efermi
|
||||||
ferw = vasp_data.eigenval.ferw
|
|
||||||
|
|
||||||
self.proj_sh = ProjectorShell(self.pars.shells[0], vasp_data.plocar.plo, vasp_data.plocar.proj_params, 0)
|
self.proj_sh = ProjectorShell(self.pars.shells[0], vasp_data.plocar.plo, vasp_data.plocar.proj_params, 0)
|
||||||
self.proj_gr = ProjectorGroup(self.pars.groups[0], [self.proj_sh], self.eigvals, ferw)
|
self.proj_gr = ProjectorGroup(self.pars.groups[0], [self.proj_sh], self.eigvals)
|
||||||
|
|
||||||
# Scenario 1
|
# Scenario 1
|
||||||
def test_correct(self):
|
def test_correct(self):
|
||||||
|
@ -37,10 +37,9 @@ class TestProjectorGroupTwoSite(mytest.MyTestCase):
|
|||||||
|
|
||||||
efermi = vasp_data.doscar.efermi
|
efermi = vasp_data.doscar.efermi
|
||||||
self.eigvals = vasp_data.eigenval.eigs - efermi
|
self.eigvals = vasp_data.eigenval.eigs - efermi
|
||||||
ferw = vasp_data.eigenval.ferw
|
|
||||||
|
|
||||||
self.proj_sh = ProjectorShell(self.pars.shells[0], vasp_data.plocar.plo, vasp_data.plocar.proj_params, 0)
|
self.proj_sh = ProjectorShell(self.pars.shells[0], vasp_data.plocar.plo, vasp_data.plocar.proj_params, 0)
|
||||||
self.proj_gr = ProjectorGroup(self.pars.groups[0], [self.proj_sh], self.eigvals, ferw)
|
self.proj_gr = ProjectorGroup(self.pars.groups[0], [self.proj_sh], self.eigvals)
|
||||||
|
|
||||||
# Scenario 1
|
# Scenario 1
|
||||||
def test_ortho(self):
|
def test_ortho(self):
|
||||||
|
@ -37,11 +37,10 @@ class TestProjectorShell(mytest.MyTestCase):
|
|||||||
|
|
||||||
efermi = vasp_data.doscar.efermi
|
efermi = vasp_data.doscar.efermi
|
||||||
eigvals = vasp_data.eigenval.eigs - efermi
|
eigvals = vasp_data.eigenval.eigs - efermi
|
||||||
ferw = vasp_data.eigenval.ferw
|
|
||||||
emin, emax = self.pars.groups[0]['ewindow']
|
emin, emax = self.pars.groups[0]['ewindow']
|
||||||
|
|
||||||
self.proj_sh = ProjectorShell(self.pars.shells[0], vasp_data.plocar.plo, vasp_data.plocar.proj_params, 0)
|
self.proj_sh = ProjectorShell(self.pars.shells[0], vasp_data.plocar.plo, vasp_data.plocar.proj_params, 0)
|
||||||
self.proj_gr = ProjectorGroup(self.pars.groups[0], [self.proj_sh], eigvals, ferw)
|
self.proj_gr = ProjectorGroup(self.pars.groups[0], [self.proj_sh], eigvals)
|
||||||
|
|
||||||
# Scenario 1
|
# Scenario 1
|
||||||
def test_example(self):
|
def test_example(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user