-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_offset.py
More file actions
101 lines (75 loc) · 4.45 KB
/
Copy pathplot_offset.py
File metadata and controls
101 lines (75 loc) · 4.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.ticker import (MultipleLocator, FormatStrFormatter, AutoMinorLocator)
plt.rcParams['font.size'] = '11.5'
plt.rcParams['lines.linewidth'] = 1.5
#gaps_ep = [1.458,1.454,1.445,1.430,1.410,1.385,1.357,1.320,1.278,1.236,1.191,1.145,1.100,1.054,1.008,0.963,0.916,0.870,0.825,0.780]
d=8.0
sc=2
smearing=0.01
inter=0.0
path='data/'
S_nsc, Anderson_nsc, gaps_nsc = np.loadtxt(f'{path}data_nsc_AB_kd{d}_dist{inter}_smearing{smearing}_scissors{sc}.dat', delimiter=' ', unpack=True)
d=8.0
S_sc, Anderson_sc, gaps_sc = np.loadtxt( f'{path}data_sc_AB_kd{d}_dist{inter}_smearing{smearing}_scissors{sc}.dat', delimiter=' ', unpack=True)
smearing=0.0
S_sc2, Anderson_sc2, gaps_sc2 = np.loadtxt( f'{path}data_sc_AB_kd{d}_dist{inter}_smearing{smearing}_scissors{sc}.dat', delimiter=' ', unpack=True)
smearing=0.01
S_ep, Anderson_ep, gaps_ep = np.loadtxt( f'{path}data_sc_AB_kd{d}_dist{inter}_smearing{smearing}_scissors{sc}_EP.dat', delimiter=' ', unpack=True)
S_epPW, Anderson_epPW, gaps_epPW = np.loadtxt( f'{path}data_sc_AB_kd{d}_dist{inter}_smearing{smearing}_scissors{sc}_EP-PW.dat', delimiter=' ', unpack=True)
S_epLin, Anderson_epLin, gaps_epLin = np.loadtxt( f'{path}data_sc_AB_kd{d}_dist{inter}_smearing{smearing}_scissors{sc}_EP-linR.dat', delimiter=' ', unpack=True)
S_epLinL, Anderson_epLinL, gaps_epLinL = np.loadtxt( f'{path}data_sc_AB_kd{d}_dist{inter}_smearing{smearing}_scissors{sc}_EP-linL.dat', delimiter=' ', unpack=True)
#d=k=3
#S, Anderson, gaps_sc = np.loadtxt(f'jj_new2_k{k}.dat', delimiter=' ', unpack=True)
fig1, axs1 = plt.subplots(1, 1, tight_layout=True)
fig1s, axs1s = plt.subplots(1, 1, tight_layout=True)
f=1.2
fig1.set_size_inches(f*4, f*3)
f=1.28
fig1s.set_size_inches(f*4, f*3)
axs1.plot(S_sc, Anderson_sc, c='gray', ls='--',label="Anderson's rule")
axs1s.plot(S_sc, Anderson_sc, c='gray', ls='--',label="Anderson's rule")
axs1.plot(S_nsc, gaps_nsc - 0*(gaps_nsc[0] + gaps_sc[0]), c='tab:orange', label='LAPS (One-shot)')
axs1.plot(S_sc, gaps_sc, c='g', label='LAPS')
axs1s.plot(S_sc, gaps_sc, c='g', label='LAPS')
#axs1.plot(S_sc2, gaps_sc2, c='k', ls='--', label='scs no smearing')
axs1s.plot(S_sc, gaps_ep, c='tab:blue', label='Step potential (LCAO)')
axs1s.plot(S_sc, gaps_epPW, c='tab:red',ls='-.', label='Step potential (PW)')
#axs1.plot(S_sc, gaps_epLin, c='brown',ls='-.', label='External potential Ramp')
#axs1.plot(S_sc, gaps_epLinL, c='brown',ls='--', label='External potential RampL')
print(S_sc)
list3=[0,6,16]
axs1.scatter(S_sc[list3], gaps_sc[list3], s=60, edgecolors='k', facecolors='none')
axs1.annotate('1:', (S_sc[list3[0]]+0.03, gaps_sc[list3[0]]+0.02))
axs1.annotate('2:', (S_sc[list3[1]]+0.03, gaps_sc[list3[1]]+0.02))
axs1.annotate('3:', (S_sc[list3[2]]+0.03, gaps_sc[list3[2]]+0.02))
axs1.text(0.1, 0.9, 'Hybridization')
axs1.text(0.4, 0.2, 'Hybridization and \n charge transfer')
axs1.arrow(0.35, 1.04, 0.15, 0.15, width=0.004, head_width = 0.05, length_includes_head=True, color='tab:orange')
axs1.arrow(0.74, 0.46, 0.50, 0.50, width=0.004, head_width = 0.05, length_includes_head=True, color='g')
#axs1.text(0.5, 1.72, 'Hybridization')
#axs1.text(1.0, 1.45, 'Hybridization and \n charge transfer')
#axs1.arrow(0.35, 1.04, 0.15, 0.15, width=0.004, head_width = 0.05, length_includes_head=True, color='tab:orange')
#axs1.arrow(1.37, 1.39, -0.24, -0.24, width=0.004, head_width = 0.05, length_includes_head=True, color='g')
axs1.set_xlim(0,Anderson_nsc[0])
axs1.set_ylim(0,Anderson_nsc[0])
axs1s.set_xlim(0,Anderson_nsc[0])
axs1s.set_ylim(0,Anderson_nsc[0])
axs1.xaxis.set_minor_locator(AutoMinorLocator(5))
axs1.yaxis.set_minor_locator(AutoMinorLocator(5))
axs1s.xaxis.set_minor_locator(AutoMinorLocator(5))
axs1s.yaxis.set_minor_locator(AutoMinorLocator(5))
axs1.set_xlabel('Band offset, $\Delta \epsilon_s$ (eV)')
axs1.set_ylabel('Band gap (eV)')
axs1s.set_xlabel('Band offset, $\Delta \epsilon_s$ (eV)')
axs1s.set_ylabel('Band gap (eV)')
axs1s.annotate('$V_{\mathrm{step}} (z)$', (0.8, 1.6))
axs1.legend(edgecolor='k',frameon=True)
axs1s.legend(edgecolor='k',frameon=True, loc=3)
axs1s.set_title('MoS$_2$-BL',loc='left')
fig1.savefig(f'2mos2_s_AB_k{d}_dist{inter}_smearing{smearing}_scissors{sc}.pdf')
fig1.savefig(f'2mos2_s_AB_k{d}_dist{inter}_smearing{smearing}_scissors{sc}.png', dpi=200)
fig1s.savefig(f'2mos2_s_AB_k{d}_dist{inter}_smearing{smearing}_scissors{sc}_EP.pdf')
fig1s.savefig(f'2mos2_s_AB_k{d}_dist{inter}_smearing{smearing}_scissors{sc}_EP.png', dpi=200)
#####################
plt.show()