Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MeanFi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Quantum Tinkerer
MeanFi
Commits
7810a027
Commit
7810a027
authored
11 months ago
by
Johanna Zijderveld
Browse files
Options
Downloads
Patches
Plain Diff
delete another doubled up function
parent
7998a44b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4
Interface refactoring
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
codes/kwant_helper/utils.py
+0
-22
0 additions, 22 deletions
codes/kwant_helper/utils.py
with
0 additions
and
22 deletions
codes/kwant_helper/utils.py
+
0
−
22
View file @
7810a027
...
...
@@ -6,28 +6,6 @@ import inspect
from
copy
import
copy
def
get_fermi_energy
(
vals
,
filling
):
"""
Compute Fermi energy for a given filling factor.
vals : nd-array
Collection of eigenvalues on a grid.
filling : int
Number of electrons per cell.
"""
norbs
=
vals
.
shape
[
-
1
]
vals_flat
=
np
.
sort
(
vals
.
flatten
())
ne
=
len
(
vals_flat
)
ifermi
=
int
(
round
(
ne
*
filling
/
norbs
))
if
ifermi
>=
ne
:
return
vals_flat
[
-
1
]
elif
ifermi
==
0
:
return
vals_flat
[
0
]
else
:
fermi
=
(
vals_flat
[
ifermi
-
1
]
+
vals_flat
[
ifermi
])
/
2
return
fermi
def
builder2h_0
(
builder
,
params
=
{},
return_data
=
False
):
"""
Constructs a tight-binding model dictionary from a `kwant.Builder`.
...
...
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