Skip to content

Commit

Permalink
PythTB 1.7.2
Browse files Browse the repository at this point in the history
1 August 2017

- Added support for deleting orbitals

- Display function now prints hopping distances
  • Loading branch information
beddalumia committed Aug 26, 2021
1 parent dce759c commit 729cd26
Show file tree
Hide file tree
Showing 24 changed files with 141 additions and 61 deletions.
2 changes: 1 addition & 1 deletion PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pythtb
Version: 1.7.1
Version: 1.7.2
Summary: Simple solver for tight binding models for use in condensed matter physics and materials science.
Home-page: http://www.physics.rutgers.edu/pythtb
Author: Sinisa Coh and David Vanderbilt
Expand Down
2 changes: 1 addition & 1 deletion examples/0dim.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from __future__ import print_function
from pythtb import * # import TB model class
import numpy as np
import pylab as plt
import matplotlib.pyplot as plt

# define lattice vectors
lat=[[1.0,0.0,0.0],[0.0,1.0,0.0],[0.0,0.0,1.0]]
Expand Down
3 changes: 2 additions & 1 deletion examples/3site_cycle.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from __future__ import print_function
from pythtb import * # import TB model class
import numpy as np
import pylab as plt
import matplotlib.pyplot as plt

# define lattice vectors
lat=[[1.0]]
Expand Down Expand Up @@ -101,6 +101,7 @@
ax_band.set_title("Band structure")
ax_band.set_xlabel("Path in k-vector")
ax_band.set_ylabel("Band energies")
ax_band.set_xlim(0.0,1.0)
fig_band.tight_layout()
fig_band.savefig("3site_band.pdf")
# finish plot for Wannier center
Expand Down
2 changes: 1 addition & 1 deletion examples/3site_cycle_fin.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from __future__ import print_function
from pythtb import * # import TB model class
import numpy as np
import pylab as plt
import matplotlib.pyplot as plt

# define function to construct model
def set_model(t,delta,lmbd):
Expand Down
4 changes: 2 additions & 2 deletions examples/buckled_layer.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from __future__ import print_function
from pythtb import * # import TB model class
import numpy as np
import pylab as plt
import matplotlib.pyplot as plt

# real space is 3D
# define lattice vectors
Expand Down Expand Up @@ -74,7 +74,7 @@
ax.set_ylabel("Band energy")

# specify horizontal axis details
ax.set_xlim([0,k_node[-1]])
ax.set_xlim(k_node[0],k_node[-1])
# put tickmarks and labels at node positions
ax.set_xticks(k_node)
ax.set_xticklabels(label)
Expand Down
4 changes: 2 additions & 2 deletions examples/checkerboard.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from __future__ import print_function
from pythtb import * # import TB model class
import numpy as np
import pylab as plt
import matplotlib.pyplot as plt

# define lattice vectors
lat=[[1.0,0.0],[0.0,1.0]]
Expand Down Expand Up @@ -55,7 +55,7 @@
fig, ax = plt.subplots()

# specify horizontal axis details
ax.set_xlim([0,k_node[-1]])
ax.set_xlim(k_node[0],k_node[-1])
ax.set_xticks(k_node)
ax.set_xticklabels(label)
for n in range(len(k_node)):
Expand Down
2 changes: 1 addition & 1 deletion examples/cone.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from __future__ import print_function
from pythtb import * # import TB model class
import numpy as np
import pylab as plt
import matplotlib.pyplot as plt

# define lattice vectors
lat=[[1.0,0.0],[0.5,np.sqrt(3.0)/2.0]]
Expand Down
Empty file modified examples/edge.py
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions examples/graphene.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from __future__ import print_function
from pythtb import * # import TB model class
import numpy as np
import pylab as plt
import matplotlib.pyplot as plt

# define lattice vectors
lat=[[1.0,0.0],[0.5,np.sqrt(3.0)/2.0]]
Expand Down Expand Up @@ -64,7 +64,7 @@
fig, ax = plt.subplots()
# specify horizontal axis details
# set range of horizontal axis
ax.set_xlim([0,k_node[-1]])
ax.set_xlim(k_node[0],k_node[-1])
# put tickmarks and labels at node positions
ax.set_xticks(k_node)
ax.set_xticklabels(label)
Expand Down
4 changes: 2 additions & 2 deletions examples/haldane.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from __future__ import print_function
from pythtb import * # import TB model class
import numpy as np
import pylab as plt
import matplotlib.pyplot as plt

# define lattice vectors
lat=[[1.0,0.0],[0.5,np.sqrt(3.0)/2.0]]
Expand Down Expand Up @@ -66,7 +66,7 @@
fig, ax = plt.subplots()
# specify horizontal axis details
# set range of horizontal axis
ax.set_xlim([0,k_node[-1]])
ax.set_xlim(k_node[0],k_node[-1])
# put tickmarks and labels at node positions
ax.set_xticks(k_node)
ax.set_xticklabels(label)
Expand Down
3 changes: 2 additions & 1 deletion examples/haldane_bp.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from __future__ import print_function
from pythtb import * # import TB model class
import numpy as np
import pylab as plt
import matplotlib.pyplot as plt

# define lattice vectors
lat=[[1.0,0.0],[0.5,np.sqrt(3.0)/2.0]]
Expand Down Expand Up @@ -75,6 +75,7 @@
ax.set_title("Berry phase for lower (red), top (green), both bands (blue)")
ax.set_xlabel(r"$k_y$")
ax.set_ylabel(r"Berry phase along $k_x$")
ax.set_xlim(0.,1.)
ax.set_ylim(-7.,7.)
ax.yaxis.set_ticks([-2.*np.pi,-np.pi,0.,np.pi,2.*np.pi])
ax.set_yticklabels((r'$-2\pi$',r'$-\pi$',r'$0$',r'$\pi$', r'$2\pi$'))
Expand Down
2 changes: 1 addition & 1 deletion examples/haldane_fin.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from __future__ import print_function
from pythtb import * # import TB model class
import numpy as np
import pylab as plt
import matplotlib.pyplot as plt

# define lattice vectors
lat=[[1.0,0.0],[0.5,np.sqrt(3.0)/2.0]]
Expand Down
4 changes: 2 additions & 2 deletions examples/haldane_hwf.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from __future__ import print_function
from pythtb import * # import TB model class
import numpy as np
import pylab as plt
import matplotlib.pyplot as plt

# set model parameters
delta=-0.2
Expand Down Expand Up @@ -128,7 +128,7 @@

# label both axes
for ax in [ax1,ax2]:
ax.set_xlim([0.,k_node[-1]])
ax.set_xlim(k_node[0],k_node[-1])
ax.set_xticks(k_node)
ax.set_xticklabels(k_label)

Expand Down
4 changes: 3 additions & 1 deletion examples/kane_mele.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from __future__ import print_function
from pythtb import * # import TB model class
import numpy as np
import pylab as plt
import matplotlib.pyplot as plt

def get_kane_mele(topological):
"Return a Kane-Mele model in the normal or topological phase."
Expand Down Expand Up @@ -93,6 +93,7 @@ def get_kane_mele(topological):
ax1.set_title("Kane-Mele: "+top_index+" phase")
ax1.set_xticks(k_node)
ax1.set_xticklabels(label)
ax1.set_xlim(k_node[0],k_node[-1])
for n in range(len(k_node)):
ax1.axvline(x=k_node[n],linewidth=0.5, color='k')
ax1.set_xlabel("k-space")
Expand Down Expand Up @@ -127,6 +128,7 @@ def get_kane_mele(topological):
ax2.set_ylabel('Wannier center along x')
ax2.set_xlabel(r'$k_y$')
ax2.set_xticks([0.0,0.5,1.0])
ax2.set_xlim(0.0,1.0)
ax2.set_xticklabels([r"$0$",r"$\pi$", r"$2\pi$"])
ax2.axvline(x=.5,linewidth=0.5, color='k')
ax2.set_title("1D Wannier centers: "+top_index+" phase")
Expand Down
3 changes: 2 additions & 1 deletion examples/simple.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# by Sinisa Coh and David Vanderbilt (see gpl-pythtb.txt)

from pythtb import * # import TB model class
import pylab as plt
import matplotlib.pyplot as plt

# specify model
lat=[[1.0]]
Expand All @@ -29,6 +29,7 @@
ax.set_ylabel("Band energy")
ax.set_xticks(k_node)
ax.set_xticklabels(k_label)
ax.set_xlim(k_node[0],k_node[-1])
for n in range(len(k_node)):
ax.axvline(x=k_node[n], linewidth=0.5, color='k')
fig.tight_layout()
Expand Down
2 changes: 1 addition & 1 deletion examples/supercell.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from __future__ import print_function
from pythtb import * # import TB model class
import numpy as np
import pylab as plt
import matplotlib.pyplot as plt

# define lattice vectors
lat=[[1.0,0.0],[0.5,np.sqrt(3.0)/2.0]]
Expand Down
4 changes: 2 additions & 2 deletions examples/trestle.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from __future__ import print_function
from pythtb import * # import TB model class
import numpy as np
import pylab as plt
import matplotlib.pyplot as plt

# define lattice vectors
lat=[[2.0,0.0],[0.0,1.0]]
Expand Down Expand Up @@ -52,7 +52,7 @@
# First make a figure object
fig, ax = plt.subplots()
# specify horizontal axis details
ax.set_xlim([0,k_node[2]])
ax.set_xlim(k_node[0],k_node[-1])
ax.set_xticks(k_node)
ax.set_xticklabels(k_label)
ax.axvline(x=k_node[1],linewidth=0.5, color='k')
Expand Down
Empty file modified examples/visualize.py
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion examples/w90.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from __future__ import print_function
from pythtb import * # import TB model class
import pylab as plt
import matplotlib.pyplot as plt

# read output from Wannier90 that should be in folder named "example_a"
# see instructions above for how to obtain the example output from Wannier90
Expand Down
2 changes: 1 addition & 1 deletion examples/w90_quick.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# by Sinisa Coh and David Vanderbilt (see gpl-pythtb.txt)

from pythtb import * # import TB model class
import pylab as plt
import matplotlib.pyplot as plt

# read output from Wannier90 that should be in folder named "example_a"
# see instructions above for how to obtain the example output from
Expand Down
Loading

1 comment on commit 729cd26

@beddalumia
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, looking at code (pythtb.py intestation), it seems that the release date is not the 1st of August, but the 25th.

Fixed in merge-commit + tag-description + release-log :)

Please sign in to comment.