Figures normal state¶

helper functions¶

In [1]:
from util import *
from pprint import pprint
Version of workflow: 0.7.2
In [2]:
# helper functions
def plot_bs(bs_BdG0, show=True, xlim=None, axhline=True, escale=-1., clim=1e3, title='Bi2Te3-xTe2', empty_ticks=False, no_yticks=False,
             colorbar=False, diffplot=True, BTfree=False,  Bi2=False,  XTe2=False, verbose=False, ylim=None,
             s0 = 1, vmin = -500, vmax = 500, smin = 200
            ):
    
    from matplotlib.colors import LinearSegmentedColormap
    
    if not bs_BdG0.is_terminated:
        if verbose:
            print('bs not done yet', title)
        return
    
    # load data
    data = load_data(bs_BdG0, verbose=verbose)
    if len(data)<7:
        e, k, klbl, dBi2Te3, dBi2Te3_free, dXTe2 = data
        dall = dBi2Te3 + dBi2Te3_free + dXTe2
    else:
        e, k, klbl, dBi2Te3, dBi2Te3_free, dXTe2, dBi2 = data
        dall = dBi2Te3 + dBi2Te3_free + dXTe2 + dBi2
    if verbose:
        print('loaded data')
        
    e = e.copy() * escale
    
    
    e, k = np.meshgrid(e, k)

    
    d1 = np.sum(dBi2Te3[:,:,4:], axis=-1)
    d1_free = np.sum(dBi2Te3_free[:,:,4:], axis=-1)
    d2 = np.sum(dXTe2[:,:,4:], axis=-1)
    if 'dBi2' in locals():
        d3 = np.sum(dBi2[:,:,4:], axis=-1)
    else:
        d3 = np.zeros_like(d1)
    
    
    # plot bandstructure
    if diffplot:
        # d1 = np.sum(dBi2Te3[:,:,4:], axis=-1)
        # d2 = np.sum(dXTe2[:,:,4:], axis=-1)
        # plt.pcolormesh(k, e, d1-d2, cmap='seismic')
        
        c = (d1-d2).transpose().reshape(-1)
        s = (d1+d2+d3).transpose().reshape(-1)
        m = np.where(abs(s)>smin); s = s[m]; s /= s.max(); s *= s0
        cmap = LinearSegmentedColormap.from_list('BlueGreyRed', ['Blue', 'Grey', 'Red'])
        plt.scatter(k.reshape(-1)[m], e.reshape(-1)[m], c=c[m], s=s, cmap=cmap, vmin=vmin, vmax=vmax, rasterized=True)
    
    elif BTfree:
        # plt.pcolormesh(k, e, np.sum(dBi2Te3_free[:,:,4:], axis=-1), cmap='binary')
        
        c = (d1_free).transpose().reshape(-1); s = c
        m = np.where(abs(s)>smin); s = s[m]; s /= s.max(); s *= s0
        plt.scatter(k.reshape(-1)[m], e.reshape(-1)[m], c=c[m], s=s, cmap='binary', vmin=0, vmax=vmax, rasterized=True)
        
    elif XTe2:
        # plt.pcolormesh(k, e, np.sum(dXTe2[:,:,4:], axis=-1), cmap='binary')
        c = (d2).transpose().reshape(-1); s = c
        m = np.where(abs(s)>smin); s = s[m]; s /= s.max(); s *= s0
        plt.scatter(k.reshape(-1)[m], e.reshape(-1)[m], c=c[m], s=s, cmap='binary', vmin=0, vmax=vmax, rasterized=True)
    elif Bi2 and 'dBi2' in locals():
        # plt.pcolormesh(k, e, np.sum(dBi2[:,:,4:], axis=-1), cmap='binary')
        c = (d3).transpose().reshape(-1); s = c
        m = np.where(abs(s)>smin); s = s[m]; s /= s.max(); s *= s0
        plt.scatter(k.reshape(-1)[m], e.reshape(-1)[m], c=c[m], s=s, cmap='binary', vmin=0, vmax=vmax, rasterized=True)
    else:
        return
    
    # labels etc
    if colorbar:
        plt.colorbar()
    plt.clim(-clim, clim)
    if not diffplot:
        plt.clim(0, clim)
    if klbl is not None:
        plt.xticks([i[0] for i in klbl], [i[1].replace('GAMMA', '$\Gamma$') for i in klbl])
        if empty_ticks:
            plt.xticks([i[0] for i in klbl], ['' for i in klbl])
    if no_yticks:
        plt.yticks([i for i in np.linspace(-1, 1, 11)], ['' for i in np.linspace(-1, 1, 11)])
    else:
        plt.yticks([i for i in np.linspace(-1, 1, 11)])
    if axhline:
        plt.axhline(0, ls='--', lw=1, color='k')
    if xlim is not None:
        plt.xlim(xlim[0], xlim[1])
    elif klbl is not None:
        plt.xlim(klbl[0][0], klbl[-1][0])
    if ylim is not None:
        plt.ylim(ylim[0], ylim[1])
    plt.title(title)

    if show:
        plt.show()
        
def plot_bs_all(bs_PtTe2, bs_PdTe2, bs_NbTe2, bs_TiTe2, bs_PtTe2_Bi2, bs_PdTe2_Bi2, bs_NbTe2_Bi2, bs_TiTe2_Bi2,
                ylim = (-1,1), xlim=None, clim = 1e3,
                colorbar=False, diffplot=True, BTfree=False, XTe2=False, Bi2=False, verbose=False, suptitle=None, show=True):
    
    pkwargs = dict(colorbar=colorbar, diffplot=diffplot, BTfree=BTfree, Bi2=Bi2, XTe2=XTe2, verbose=verbose,
                   show=False, clim = clim, s0 = 3, vmin = -500, vmax = 500, smin = 300, ylim=ylim, xlim=xlim,
                  )
    
    plt.figure(figsize=(16,9))
    plt.subplot(2,4,1)
    plot_bs(bs_PtTe2, title='PtTe$_2$/Bi$_2$Te$_3$', empty_ticks=True, **pkwargs)
    
    plt.subplot(2,4,2)
    plot_bs(bs_PdTe2, title='PdTe$_2$/Bi$_2$Te$_3$', empty_ticks=True, no_yticks=True, **pkwargs)
    
    plt.subplot(2,4,3)
    plot_bs(bs_NbTe2, title='NbTe$_2$/Bi$_2$Te$_3$', empty_ticks=True, no_yticks=True, **pkwargs)
    
    plt.subplot(2,4,4)
    plot_bs(bs_TiTe2, title='TiTe$_2$/Bi$_2$Te$_3$', empty_ticks=True, no_yticks=True, **pkwargs)
    
    plt.subplot(2,4,5)
    plot_bs(bs_PtTe2_Bi2, title='PtTe$_2$/Bi$_2$/Bi$_2$Te$_3$', **pkwargs)
    
    plt.subplot(2,4,6)
    plot_bs(bs_PdTe2_Bi2, title='PdTe$_2$/Bi$_2$/Bi$_2$Te$_3$', no_yticks=True, **pkwargs)
    
    plt.subplot(2,4,7)
    plot_bs(bs_NbTe2_Bi2, title='NbTe$_2$/Bi$_2$/Bi$_2$Te$_3$', no_yticks=True, **pkwargs)
    
    plt.subplot(2,4,8)
    plot_bs(bs_TiTe2_Bi2, title='TiTe$_2$/Bi$_2$/Bi$_2$Te$_3$', no_yticks=True, **pkwargs)
    

    if suptitle is not None:
        plt.suptitle(suptitle)
    plt.tight_layout()
    
    if show:
        plt.show()
In [3]:
def get_data_all(calcs):
    ds_at_all= []
    for calc in calcs:
        if calc.is_finished_ok:
            denlm_at = []
            ds_at = []
            from tqdm import tqdm
            for iat in tqdm(range(len(find_parent_structure(calc).sites))):
                with calc.outputs.retrieved.open('den_lm_ns_%0.3i.npy'%(iat+1), 'rb') as _f:
                    denlm_at.append(np.load(_f))
                ds_at.append(np.sum([-np.imag(denlm_at[-1][32:, :32][:16, 16:][i,i]) for i in range(16)]))
            ds_at = np.array(ds_at)
            denlm_at = np.array(denlm_at)
            ds_at = ds_at[[2, 1, 0]+list(range(3, len(ds_at)))] # reorder left vacuum (wrong z order in structure and thus inputcard)
            ds_at_all.append(ds_at)
    return ds_at_all
In [4]:
def get_adens_data(calcs, iBi2_list, iBi2):
    ds_at_all = get_data_all(calcs)
    dmean = []
    for i, ds in enumerate(ds_at_all):
        if iBi2_list is not None:
            iBi2 = iBi2_list[i]
        if iBi2<1:
            dmean.append([np.mean(ds[3:6]), 0, np.mean(ds[6:6+5]), np.mean(ds[6+5:6+10]), np.mean(ds[6+10:6+15])])
        else:
            dmean.append([np.mean(ds[3:6]), np.mean(ds[6:8]), np.mean(ds[8:8+5]), np.mean(ds[8+5:8+10]), np.mean(ds[8+10:8+15])])
    dmean = np.array(dmean)
    return ds_at_all, dmean


def plot_adens_decay(calcs, iBi2 = 0, iBi2_list=None, scale = [1., 1., 1., 1.], all_layers=False, normalize=True, verbose=False, show=True, names=None, average_line=False):
    ds_at_all, dmean = get_adens_data(calcs, iBi2_list, iBi2)
    
    if verbose:
        print(ds_at_all, dmean)

    if all_layers:
        plt.figure()
        plt.title('Decay of anomalous density')
        for i, ds in enumerate(ds_at_all):
            if normalize:
                plt.plot(scale[i]*ds/np.sum(ds[:6]), 'o-')
            else:
                plt.plot(scale[i]*ds, 'o-')
        # plt.ylim(0, 1e-5)

        plt.ylabel('$\overline{\chi}$ (arb. units)')

        plt.twinx()
        for i, ds in enumerate(ds_at_all):
            if normalize:
                plt.plot(scale[i]*ds/np.sum(ds[:6]), ls='--')
            else:
                plt.plot(scale[i]*ds, ls='--')
        plt.yscale('log')
        # plt.ylim(1e-9)

        plt.axvline(2.5, color='grey', ls=':')
        plt.axvline(21.5, color='grey', ls=':')
        plt.ylabel('$\overline{\chi}$ (arb. units)')
        plt.xlabel('layer index')
        if show:
            plt.show()
    else:
        plt.figure()
        plt.title('Normalized decay of anomalous density, region-integrated')

        if names is None:
            names = ['PtTe$_2$', 'PdTe$_2$', 'NbTe$_2$', 'TiTe$_2$']
        for i, d in enumerate(dmean):
            if normalize:
                d /= d[0]
            d *= scale[i]
            plt.bar(np.arange(len(d))-0.15+i*0.1, d, width=0.2, label=names[i])
            if average_line:
                plt.axhline(d[-3:].sum(), color=f'C{i}', ls='--')
            print(d, d[-3:].sum())
        plt.yscale('log')
        plt.legend()
        plt.ylabel('$\overline{\chi}$ (arb. units)')
        plt.xticks(range(5), ['XTe$_2$', 'Bi$_2$', '(Bi$_2$Te$_3$)$^{(1)}$', '(Bi$_2$Te$_3$)$^{(2)}$', '(Bi$_2$Te$_3$)$^{(3)}$'])
        if show:
            plt.show()

decay of anomalous density¶

In [5]:
BdG0_PtTe2 = orm.load_node('5d1c6b7c-8063-4c7c-8303-b019375441ac')
BdG0_PtTe2_nTI = orm.load_node('b819aa78-e0d8-4d34-9c51-e443bc935a6b')
BdG0_PdTe2 = orm.load_node('4625f596-713a-4bf0-91ac-135dfadfcdce')
BdG0_PdTe2_nTI = orm.load_node('687c84d4-b95d-4e47-911a-7a4e75439df1')
BdG0_NbTe2 = orm.load_node('bcd6f4bf-cd5e-44cb-a92f-7ab43950895b')
BdG0_NbTe2_nTI = orm.load_node('3d6ba41c-59e6-407d-b77b-d80184fbe956')
BdG0_TiTe2 = orm.load_node('119c6cf4-f405-44ba-a7ca-04bea0ac0a3f')
BdG0_TiTe2_nTI = orm.load_node('86145f11-305a-4641-84e9-fdc1fa13eba1')

BdG0_PtTe2_Bi2 = orm.load_node('1e2b9d7e-ee41-43e4-a898-8ac68b2c378f')
BdG0_PtTe2_Bi2_nTI = BdG0_PtTe2_Bi2 # same calculation
BdG0_PdTe2_Bi2 = orm.load_node('c2360b63-a9ea-4cc8-86e6-ea0a7d4e8682')
BdG0_PdTe2_Bi2_nTI = BdG0_PdTe2_Bi2 # same calculation
BdG0_NbTe2_Bi2 = orm.load_node('4ef2a45f-0c76-480e-8758-fb349760f0c1')
BdG0_NbTe2_Bi2_nTI = orm.load_node('1f4df7aa-189a-43b3-a2c2-9a2b11831882')
BdG0_TiTe2_Bi2 = orm.load_node('0995c730-564a-46cb-a17a-343918272b1c')
BdG0_TiTe2_Bi2_nTI = orm.load_node('d95c59ed-e239-4f58-bc7e-3e78b26fafe1')
In [6]:
plot_adens_decay(calcs = [BdG0_NbTe2_Bi2_nTI, BdG0_TiTe2_Bi2_nTI, BdG0_PdTe2_nTI, BdG0_PtTe2_nTI],
                 iBi2_list=[1,1,0,0], normalize=False,
                 scale = [1., 1., 1., 1.],
                 names = ['NbTe$_2$ + Bi$_2$', 'TiTe$_2$ + Bi$_2$', 'PdTe$_2$', 'PtTe$_2$'],
                 show=False)
plt.title('')
plt.savefig('plots/adens_decay.pdf')
plt.show()
100%|██████████| 26/26 [00:00<00:00, 55.02it/s]
100%|██████████| 26/26 [00:00<00:00, 54.01it/s]
100%|██████████| 24/24 [00:00<00:00, 56.53it/s]
100%|██████████| 24/24 [00:00<00:00, 56.41it/s]
[2.16032113e-04 1.50640143e-05 3.49416754e-06 4.27309555e-07
 1.05001340e-07] 4.026478431427511e-06
[1.58528687e-04 1.23717607e-05 2.87899127e-06 4.90773645e-07
 1.99699064e-07] 3.569463983113449e-06
[6.90992852e-05 0.00000000e+00 6.57290652e-06 7.01805969e-07
 1.65561986e-07] 7.44027447471957e-06
[6.93305380e-05 0.00000000e+00 6.68812487e-06 8.07133557e-07
 1.99698468e-07] 7.694956894367943e-06
No description has been provided for this image
In [7]:
plot_adens_decay(calcs = [BdG0_NbTe2_Bi2, BdG0_TiTe2_Bi2, BdG0_PdTe2, BdG0_PtTe2],
                 iBi2_list=[1,1,0,0], normalize=False,
                 scale = [1., 1., 1., 1.],
                 names = ['NbTe$_2$ + Bi$_2$', 'TiTe$_2$ + Bi$_2$', 'PdTe$_2$', 'PtTe$_2$'],
                 show=False)
plt.title('')
plt.savefig('plots/adens_decay_neutral_TI.pdf')
plt.show()
100%|██████████| 26/26 [00:00<00:00, 55.63it/s]
100%|██████████| 26/26 [00:00<00:00, 57.18it/s]
100%|██████████| 24/24 [00:00<00:00, 53.52it/s]
100%|██████████| 24/24 [00:00<00:00, 49.99it/s]
[2.12871694e-04 9.98953684e-06 2.12941380e-06 5.05702002e-07
 2.55959934e-07] 2.891075736368248e-06
[1.57438530e-04 1.23544636e-05 2.40216782e-06 3.15833219e-07
 4.70777069e-08] 2.765078741373514e-06
[6.41081238e-05 0.00000000e+00 6.89791277e-06 1.23596198e-06
 6.52962296e-07] 8.786837044021127e-06
[5.37851227e-05 0.00000000e+00 4.95603272e-06 5.78462249e-07
 2.23434591e-07] 5.7579295561938355e-06
No description has been provided for this image
In [9]:
'Delta_BdG=', {k:v for k,v in BdG0_NbTe2_Bi2_nTI.inputs.parameters.get_dict().items() if 'BDG' in k.upper()}['<DELTA_BDG>']*RY_TO_EV*1000, 'meV'
Out[9]:
('Delta_BdG=', 1.3605693122994, 'meV')

DOS¶

In [14]:
def load_dos_data(dos_BdG0):
    from tqdm import tqdm
    from masci_tools.util.constants import RY_TO_EV

    calc = dos_BdG0.get_outgoing(node_class=orm.CalcJobNode).first().node
    ef = calc.inputs.parent_folder.get_incoming(node_class=orm.CalcJobNode).first().node.outputs.output_parameters['fermi_energy']
    ret = calc.outputs.retrieved
    dosnames = [i for i in ret.list_object_names() if 'dos.atom' in i and '_' not in i]
    # dosnames
    dall = []
    for iatom in tqdm(range(1, 25)):
        fname = 'dos.atom'+str(iatom)
        with ret.open(fname) as _f:
            tmp = np.loadtxt(_f)
        # print(tmp.sum(axis=0))
        # add hole contribution
        fname = 'dos.atom'+str(iatom)+'_hole'
        with ret.open(fname) as _f:
            tmp[:,1:] += np.loadtxt(_f)[:,1:]
        # print(tmp.sum(axis=0))
        dall.append(tmp)
    dall = np.array(dall)

    e = dall[0][:,0]
    e = (e[len(e)//2:]-ef)*RY_TO_EV
    # e /= Delta0

    dall_eh = []
    for iatom in tqdm(range(1, 25)):
        fname = 'dos.atom'+str(iatom)+'_eh'
        with ret.open(fname) as _f:
            tmp = np.loadtxt(_f)
        dall_eh.append(tmp)
    dall_eh = np.array(dall_eh)

    return e, dall, dall_eh
In [15]:
# load data nodes
dos_PtTe2_nTI = orm.load_node('402aa788-569a-4102-953d-051efb2210ff')
dos_PdTe2_nTI = orm.load_node('139f9031-28f2-4226-8895-cb000b28954c')
dos_NbTe2_Bi2_nTI = orm.load_node('2b3d73e8-23be-4cd3-ad29-15dacd90231e')
dos_TiTe2_Bi2_nTI = orm.load_node('837e0f21-7304-40e3-9615-d3dedcdeaf08')
In [16]:
def plot_dos_BdG(dos_BdG0, icolor=0, color=None, show_eh=False, show_ee=True, show_layers=False, norm=True, label=None, iBi2 = 1, BTonly=False, xfac=1., lw=3):
    
    e, dall, dall_eh = load_dos_data(dos_BdG0)
    e *= xfac

    if color is None:
        color=f'C{icolor}'
    if show_ee:
        dd = np.sum(dall[:, len(e):, 1], axis=0)/RY_TO_EV
        if norm:
            dd /= dd.max()
        if label is None:
            label = 'ee'
        # print(dd)
        plt.plot(e, dd, label=label, color=color, ls='-', lw=lw)
    if show_eh:
        dd = -np.sum(dall_eh[:, len(e):, 1], axis=0)/RY_TO_EV
        if norm:
            dd /= dd.max()
        if label is None:
            label = 'eh'
        plt.plot(e, dd, label=label, color=color, ls='--', lw=lw)
    # plt.legend()
    
    if show_layers:

        # norm = True
        second_y = False
        Delta0 = 1

        lw = 2

        plt.figure(figsize=(16,6))

        plt.subplot(1,2,1)

        dd = np.sum(dall[:, len(e):, 1], axis=0)/RY_TO_EV
        if norm: dd /= np.sum(dd)
        if not BTonly: plt.plot(e, dd, label='sum', color='C0', lw=3)
        dd = np.sum(dall[:6, len(e):, 1], axis=0)/RY_TO_EV
        if norm: dd /= np.sum(dd)
        if not BTonly: plt.plot(e, dd, label='XTe2', color='C1', lw=lw)
        if second_y:
            plt.twinx()
        if iBi2>0:
            dd = np.sum(dall[6:8, len(e):, 1], axis=0)/RY_TO_EV
            if norm: dd /= np.sum(dd)
            if not BTonly: plt.plot(e, dd, label='Bi2', color='C2', lw=lw)
        dd = np.sum(dall[6+2*iBi2:11+2*iBi2, len(e):, 1], axis=0)/RY_TO_EV
        if norm: dd /= np.sum(dd)
        plt.plot(e, dd, label='BT1', color='C3', lw=lw)
        dd = np.sum(dall[11+2*iBi2:16+2*iBi2, len(e):, 1], axis=0)/RY_TO_EV
        if norm: dd /= np.sum(dd)
        plt.plot(e, dd, label='BT2', color='C4', lw=lw)
        dd = np.sum(dall[16+2*iBi2:, len(e):, 1], axis=0)/RY_TO_EV
        if norm: dd /= np.sum(dd)
        plt.plot(e, dd, label='BT3', color='C5', lw=lw)

        plt.xlim(0, 0.005/Delta0)
        plt.xlabel('$(E-E_\mathrm{F})/\Delta_0$')

        if norm:
            plt.ylabel('normalized DOS (arb. u.)')
        else:
            plt.ylabel('DOS (1/eV)')

        plt.axvline(0.0024/Delta0, color='k', ls='--')

        plt.ylim(0)
        plt.legend()


        plt.subplot(1,2,2)

        dd = -np.sum(dall_eh[:, len(e):, 1], axis=0)/RY_TO_EV
        if norm: dd /= np.sum(dd)
        if not BTonly: plt.plot(e, dd, label='sum', color='C0', lw=3)
        dd = -np.sum(dall_eh[:6, len(e):, 1], axis=0)/RY_TO_EV
        if norm: dd /= np.sum(dd)
        if not BTonly: plt.plot(e, dd, label='XTe2', color='C1', lw=lw)
        if second_y:
            plt.twinx()
        if iBi2>0:
            dd = -np.sum(dall_eh[6:8, len(e):, 1], axis=0)/RY_TO_EV
            if norm: dd /= np.sum(dd)
            if not BTonly: plt.plot(e, dd, label='Bi2', color='C2', lw=lw)
        dd = -np.sum(dall_eh[6+2*iBi2:11+2*iBi2, len(e):, 1], axis=0)/RY_TO_EV
        if norm: dd /= np.sum(dd)
        plt.plot(e, dd, label='BT1', color='C3', lw=lw)
        dd = -np.sum(dall_eh[11+2*iBi2:16+2*iBi2, len(e):, 1], axis=0)/RY_TO_EV
        if norm: dd /= np.sum(dd)
        plt.plot(e, dd, label='BT2', color='C4', lw=lw)
        dd = -np.sum(dall_eh[16+2*iBi2:, len(e):, 1], axis=0)/RY_TO_EV
        if norm: dd /= np.sum(dd)
        plt.plot(e, dd, label='BT3', color='C5', lw=lw)

        plt.xlim(0, 0.005/Delta0)
        plt.xlabel('$(E-E_\mathrm{F})/\Delta_0$')

        if norm:
            plt.ylabel('normalized DOS (arb. u.)')
        else:
            plt.ylabel('DOS (1/eV)')

        plt.axvline(0.0024/Delta0, color='k', ls='--')
        plt.ylim(0)
In [17]:
Nbcolor = '#71ac48'
Ticolor = '#ee9050'
Pdcolor = '#ff3737'
Ptcolor = '#8736c0'
xfac = 1000 # eV to meV
D0 = 1e-4*RY_TO_EV * ((np.sqrt(4*np.pi))/np.pi) * 2 * 1000
lw=3

plt.figure(figsize=(8,6))

norm = True

plt.subplot(2,2,1)

plot_dos_BdG(dos_NbTe2_Bi2_nTI, label='NbTe$_2$/Bi$_2$', color=Nbcolor, norm=norm, xfac=xfac, lw=lw)
plt.xlim(0, 0.005*xfac)
plt.ylim(0)

plot_dos_BdG(dos_TiTe2_Bi2_nTI, label='TiTe$_2$/Bi$_2$', color=Ticolor, norm=norm, xfac=xfac, lw=lw)
plt.xlim(0, 0.005*xfac)
plt.ylim(0)

plt.subplot(2,2,2)

plot_dos_BdG(dos_PtTe2_nTI, label='PtTe$_2$', color=Ptcolor, norm=norm, xfac=xfac, lw=lw)
plt.xlim(0, 0.005*xfac)
plt.ylim(0)

plot_dos_BdG(dos_PdTe2_nTI, label='PdTe$_2$', color=Pdcolor, norm=norm, xfac=xfac, lw=lw)
plt.xlim(0, 0.005*xfac)
plt.ylim(0)

plt.subplot(2,2,3)

plot_dos_BdG(dos_NbTe2_Bi2_nTI, label='NbTe$_2$/Bi$_2$', color=Nbcolor, show_eh=True, show_ee=False, norm=norm, xfac=xfac, lw=lw)
plt.xlim(0, 0.005*xfac)
plt.ylim(0)

plot_dos_BdG(dos_TiTe2_Bi2_nTI, label='TiTe$_2$/Bi$_2$', color=Ticolor, show_eh=True, show_ee=False, norm=norm, xfac=xfac, lw=lw)
plt.xlim(0, 0.005*xfac)
plt.ylim(0)

plt.subplot(2,2,4)

plot_dos_BdG(dos_PtTe2_nTI, label='PtTe$_2$', color=Ptcolor, show_eh=True, show_ee=False, norm=norm, xfac=xfac, lw=lw)
plt.xlim(0, 0.005*xfac)
plt.ylim(0)

plot_dos_BdG(dos_PdTe2_nTI, label='PdTe$_2$', color=Pdcolor, show_eh=True, show_ee=False, norm=norm, xfac=xfac, lw=lw)
plt.xlim(0, 0.005*xfac)
plt.ylim(0)

for i in range(4):
    plt.subplot(2,2,1+i)
    plt.ylim(0, 1.25)
    # plt.ylim(0, 20)
    plt.legend(loc=4)
    if i==0:
        plt.ylabel('normalized DOS', fontsize='large')
    if i==2:
        plt.ylabel('norm. anomalous DOS', fontsize='large')
    if i in [2,3]:
        plt.xlabel('$E-E_\mathrm{F}$ (meV)', fontsize='large')
        
    if i<2:
        plt.xticks(range(6), ['' for i in range(6)])
    if i in [1,3]:
        plt.yticks(np.arange(7)*0.2, ['' for i in range(7)])
    else:
        plt.yticks(np.arange(7)*0.2)
        
for i0 in [0,2]:
    plt.subplot(2,2,1+i0)

    plt.annotate(text='', xy=(0.00245*xfac, 1.02), xytext=(0.00245*xfac, 1.22),
                 arrowprops=dict(facecolor=Ticolor, shrink=0.05))

    plt.annotate(text='', xy=(0.00302*xfac, 1.02), xytext=(0.00302*xfac, 1.22),
                 arrowprops=dict(facecolor=Nbcolor, shrink=0.05))
    plt.axvline(D0, color='grey', ls=':', lw=2)


    plt.subplot(2,2,2+i0)

    plt.annotate(text='', xy=(0.00261*xfac, 1.02), xytext=(0.00261*xfac, 1.22),
                 arrowprops=dict(facecolor=Ptcolor, shrink=0.05))

    plt.annotate(text='', xy=(0.00197*xfac, 1.02), xytext=(0.00197*xfac, 1.22),
                 arrowprops=dict(facecolor=Pdcolor, shrink=0.05))
    plt.axvline(D0, color='grey', ls=':', lw=2)
    
    
plt.subplot(2,2,1)
plt.annotate(text='a)', xy=(0.10, 1.10), fontsize='xx-large')
plt.subplot(2,2,2)
plt.annotate(text='b)', xy=(0.10, 1.10), fontsize='xx-large')
plt.subplot(2,2,3)
plt.annotate(text='c)', xy=(0.10, 1.10), fontsize='xx-large')
plt.subplot(2,2,4)
plt.annotate(text='d)', xy=(0.10, 1.10), fontsize='xx-large')

plt.tight_layout()

plt.savefig('plots/superconducting_DOS.png', dpi=300)

plt.show()
100%|██████████| 24/24 [00:00<00:00, 30.04it/s]
100%|██████████| 24/24 [00:00<00:00, 60.61it/s]
100%|██████████| 24/24 [00:00<00:00, 31.05it/s]
100%|██████████| 24/24 [00:00<00:00, 64.32it/s]
100%|██████████| 24/24 [00:00<00:00, 31.08it/s]
100%|██████████| 24/24 [00:00<00:00, 63.61it/s]
100%|██████████| 24/24 [00:00<00:00, 29.12it/s]
100%|██████████| 24/24 [00:00<00:00, 42.61it/s]
100%|██████████| 24/24 [00:00<00:00, 78.30it/s]
100%|██████████| 24/24 [00:00<00:00, 158.11it/s]
100%|██████████| 24/24 [00:00<00:00, 77.70it/s]
100%|██████████| 24/24 [00:00<00:00, 158.40it/s]
100%|██████████| 24/24 [00:00<00:00, 78.36it/s]
100%|██████████| 24/24 [00:00<00:00, 157.11it/s]
100%|██████████| 24/24 [00:00<00:00, 78.31it/s]
100%|██████████| 24/24 [00:00<00:00, 157.41it/s]
No description has been provided for this image
In [18]:
np.round(D0, 2), 'meV', np.round(D0/RY_TO_EV, 2), 'mRy'
Out[18]:
(3.07, 'meV', 0.23, 'mRy')
In [19]:
for D, name in [(0.00245*xfac, 'Ti'),
                (0.00302*xfac, 'Nb'),
                (0.00261*xfac, 'Pt'),
                (0.00197*xfac, 'Pd')]:
    print(name,np.round(D, 2), np.round(D/D0, 2))
Ti 2.45 0.8
Nb 3.02 0.98
Pt 2.61 0.85
Pd 1.97 0.64
In [ ]:
job = 'verdi archive create --compress 9'
job += ' -N c67fce15-86e0-4c58-81e5-4da458f1c1e0 a6b6dbba-eed1-480d-a369-8e7af3d9f995 5fd81c50-e443-441d-8d4f-8e1f3637b23e 259cd110-ced1-4aa0-b6d8-fb6a098b8faa 41d27e83-fe60-4193-9871-705b228a8388 cbde254c-be3e-4bcc-bdfa-d2806dfb3338 5330ed92-302f-4034-800f-a0078f45867e bf6fa45f-eb97-4ae6-b3af-a8c8c568c38d 780b6d97-abad-45a7-9f9e-a319b8598470 e40d257f-3ab7-4aea-8f9d-77d2ab7ade8d 3add16cb-a62c-4938-b3aa-06ecf6bbd72f 6c3c8752-d12a-44af-b3b9-fe05f74b689e 41d27e83-fe60-4193-9871-705b228a8388 cbde254c-be3e-4bcc-bdfa-d2806dfb3338 6c0dd5a5-2c20-4315-bd56-320ec772e06c 744fe188-dcea-448c-9bd2-3117356a5fbe 5d1c6b7c-8063-4c7c-8303-b019375441ac b819aa78-e0d8-4d34-9c51-e443bc935a6b 4625f596-713a-4bf0-91ac-135dfadfcdce 687c84d4-b95d-4e47-911a-7a4e75439df1 bcd6f4bf-cd5e-44cb-a92f-7ab43950895b 3d6ba41c-59e6-407d-b77b-d80184fbe956 119c6cf4-f405-44ba-a7ca-04bea0ac0a3f 86145f11-305a-4641-84e9-fdc1fa13eba1 1e2b9d7e-ee41-43e4-a898-8ac68b2c378f c2360b63-a9ea-4cc8-86e6-ea0a7d4e8682 4ef2a45f-0c76-480e-8758-fb349760f0c1 1f4df7aa-189a-43b3-a2c2-9a2b11831882 0995c730-564a-46cb-a17a-343918272b1c d95c59ed-e239-4f58-bc7e-3e78b26fafe1 402aa788-569a-4102-953d-051efb2210ff 139f9031-28f2-4226-8895-cb000b28954c 2b3d73e8-23be-4cd3-ad29-15dacd90231e 837e0f21-7304-40e3-9615-d3dedcdeaf08'
job += ' -f export.aiida'

!$job


Report: 
Archive Parameters
--------------------  ------------
Path                  export.aiida
Version               main_0001
Compression           9

Inclusion rules
----------------------------  --------
Computers/Nodes/Groups/Users  Selected
Computer Authinfos            False
Node Comments                 True
Node Logs                     True

Traversal rules
---------------------------------  -----
Follow links input calc forwards   False
Follow links input calc backwards  True
Follow links create forwards       True
Follow links create backwards      True
Follow links return forwards       True
Follow links return backwards      False
Follow links input work forwards   False
Follow links input work backwards  True
Follow links call calc forwards    True
Follow links call calc backwards   True
Follow links call work forwards    True
Follow links call work backwards   True

Report: Validating Nodes                                           
Report: Creating archive with:
---------  ----
users         1
computers     2
nodes      1090
logs       1415
links      1773
---------  ----
Archiving files:                          25.6%|█████▍               | 1094/4271
In [ ]: