Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
kwant
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
93
Issues
93
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kwant
kwant
Commits
3a8807c0
Commit
3a8807c0
authored
Jan 08, 2019
by
Joseph Weston
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format docstrings
parent
794dd08c
Hide whitespace changes
Inline
Sidebyside
Showing
1 changed file
with
11 additions
and
11 deletions
+11
11
dispersion.py
kwant/physics/dispersion.py
+11
11
No files found.
kwant/physics/dispersion.py
View file @
3a8807c0
...
...
@@ 74,16 +74,14 @@ class Bands:

k : float
momentum
derivative_order : {0, 1, 2}, optional
Maximal derivative order to calculate. Default is zero.
return_eigenvectors : bool, optional
if set to `True` return the eigenvectors as last tuple element.
By default, no eigenvectors are returned.
Returns



energies : numpy float array, size ``nbands``
energies :math:`E`
velocities : numpy float array, size ``nbands``
...
...
@@ 93,18 +91,18 @@ class Bands:
eigenvectors : numpy float array, size ``nbands x nbands``
eigenvectors
The number of retur
ed elements varies. If `derivative_order > 0
`
we return all derivatives up to the order `
derivative_order
`,
and total the number of returned elements is `
derivative_order + 1
`
If
'return_eigenvectors=True'
, in addition the eigenvectors are
The number of retur
ned elements varies. If ``derivative_order > 0`
`
we return all derivatives up to the order `
`derivative_order`
`,
and total the number of returned elements is `
`derivative_order + 1`
`
If
``return_eigenvectors`` is True
, in addition the eigenvectors are
returned as the last element. In that case, the total number of
returned elements is `
derivative_order + 2
`.
returned elements is `
`derivative_order + 2`
`.
Notes

*
All the output arrays are sorted from the lowest energy band
to the highest.
*
The curvature `E''` can be only calculated for nondegenerate bands.
* All the output arrays are sorted from the lowest energy band
to the highest.
* The curvature `E''` can be only calculated for nondegenerate bands.
"""
# Equation to solve is
# (V^\dagger e^{ik} + H + V e^{ik}) \psi = E \psi
...
...
@@ 137,6 +135,7 @@ class Bands:
ph1p
=
eigenvectors
.
conjugate
()
.
transpose
()
@
h1
@
eigenvectors
velocities
=
np
.
diag
(
ph1p
)
.
real
output
+=
(
velocities
,)
if
derivative_order
>=
2
:
# compute curvatures
# ediff_{i,j} = 1 / (E_i  E_j) if i != j, else 0
ediff
=
energies
.
reshape
((

1
,
1
))

energies
.
reshape
((
1
,

1
))
...
...
@@ 149,6 +148,7 @@ class Bands:
# np.diag(eigenvectors.conjugate().transpose() @ h2 @ eigenvectors
# + 2 * ediff @ np.abs(ph1p)**2).real
output
+=
(
curvatures
,)
if
derivative_order
>
2
:
raise
NotImplementedError
(
'Derivatives of the energy dispersion '
+
'only implemented up to second order.'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment