Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jukkr
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kkr
jukkr
Commits
ec885649
Commit
ec885649
authored
3 years ago
by
Philipp Rüssmann
Browse files
Options
Downloads
Patches
Plain Diff
Fix BdG tests
parent
4a790dda
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/KKRhost/tools/test_verify_BdG.py
+11
-12
11 additions, 12 deletions
tests/KKRhost/tools/test_verify_BdG.py
with
11 additions
and
12 deletions
tests/KKRhost/tools/test_verify_BdG.py
+
11
−
12
View file @
ec885649
...
...
@@ -22,14 +22,14 @@ class Test_BdG():
"""
path0
=
'
test_run26_hybrid_4_1/eh_symm/
'
print
(
'
t^ee(E+i0+) = -t^hh(E+i0+)
?
'
)
print
(
'
Check if
t^ee(E+i0+) =
=
-t^hh(E+i0+)
:
'
)
tmat
=
load
(
path0
+
'
tmat_atom_001_energ_001.npy
'
)
check_ehsymm
(
tmat
)
print
(
'
Gref
'
)
gref
=
load
(
path0
+
'
ginp.npy
'
)[:,:,
-
1
]
print
(
'
\n
Check
Gref
:
'
)
gref
=
load
(
path0
+
'
ginp
_energ_001
.npy
'
)[:,:,
-
1
]
check_ehsymm
(
gref
)
print
(
'
G
'
)
gmat
=
load
(
path0
+
'
gmat.npy
'
)
print
(
'
\n
Check Gmat:
'
)
gmat
=
load
(
path0
+
'
gmat
_001_energ_001
.npy
'
)
check_ehsymm
(
gmat
)
def
test_27_BdG1_eh_sym_and_gap
(
self
):
...
...
@@ -55,12 +55,11 @@ class Test_BdG():
#pcolormesh(k, e, dqh, shading='nearest')
#colorbar()
#title('BdG=0, hh')
dm
=
(
dqe
-
dqh
[::
-
1
]).
max
()
ds
=
(
dqe
-
dqh
[::
-
1
]).
std
()
print
(
'
ehsymm
'
,
dm
,
ds
)
assert
dm
<
0.0002
assert
ds
<
1e-5
d
=
abs
(
dqe
-
dqh
[::
-
1
])
dm
=
d
.
max
()
print
(
'
ehsymm
'
,
dm
,
dm
/
dqe
[
d
==
dm
])
assert
dm
/
dqe
[
d
==
dm
]
<
2e-4
gz
=
(
dqe
[
1
]).
max
()
/
(
dqe
[
0
]).
max
()
print
(
'
gapzero
'
,
gz
)
assert
gz
<
0.012
...
...
@@ -125,5 +124,5 @@ def check_BdG1_block_charges(testpath, eps=10**-14):
def
check_ehsymm
(
m
):
d
=
sum
(
abs
(
m
[:
16
,:
16
]
+
conjugate
(
m
[
16
:
32
,
16
:
32
])))
print
(
'
absdiff, reldiff=
'
,
d
,
d
/
sum
(
abs
(
m
[:
16
,:
16
])))
print
(
'
absdiff, reldiff=
'
,
d
,
d
/
sum
(
abs
(
m
[:
16
,:
16
]))
,
'
(threshold=1e-13)
'
)
assert
d
<
10
**-
13
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment