#axis.set_xlabel(r'$\frac{1}{T}$ $(\frac{1}{k})$') axis.grid() simDict = { 'tipPos': 0, 'Gs': 1.452e-7, 'G': 1.5e-9, 'u': 0, 'eta': 0, } for i, J in enumerate(J_list): fourFe = Structure(atoms=[Fe1, Fe2, Fe2, Fe3], JDict={ (0, 1): J, (1, 2): J, (2, 3): J }, Bz=3) lifeTimes = TemperatureVariation(fourFe, T_rangeShort, **simDict).calcLifeTimesFullRates(V_bias) dIdV1 = DIdV(fourFe, V_range, tipPos=0, T=1).getdIdV() dIdV2 = DIdV(fourFe, V_range, tipPos=1, T=1).getdIdV() ax[0].semilogy(1 / T_rangeShort, 2 / (lifeTimes[:, 0] + lifeTimes[:, 1]), '--s', label='J = ' + str(J), markerfacecolor='none') ax[1].plot(V_range / 1e-3, dIdV1 / dIdV1[0],
Fe3 = Adatom(s=2,D=-2.1,E=0.311,g=2.11) JList = np.linspace(0.05,0.1,2) simDict = {'tipPos':0,'Gs':2.56e-7,'G':1.5e-9,'eta':0.5,'u':0.4} fig,ax = plt.subplots(1,3,figsize=(12,4.5)) scaledtrans = transforms.ScaledTranslation(-0.55, -0.15, fig.dpi_scale_trans) letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'] for i,axis in enumerate(ax): axis.text(0, 1, letters[i], fontsize=14, fontweight="bold", va="bottom", ha="left", transform=axis.transAxes + scaledtrans) for J in JList: struct1 = Structure(atoms=[Fe1,Fe2,Fe2,Fe3,], JDict={(0,1):J,(1,2):J,(2,3):J},Bz = 0.2,) struct2 = Structure(atoms=[Fe1,Fe2,Fe2,Fe3,], JDict={(0,1):J,(1,2):J,(2,3):J},Bz = 0.6,) lifeTimes1 = TemperatureVariation(struct1,T_rangeShort,**simDict).calcLifeTimesFullRates(V_bias) lifeTimes2 = TemperatureVariation(struct2,T_rangeShort,**simDict).calcLifeTimesFullRates(V_bias) label1 = 'J = ' + ("%.2f" % J) + ', meV Bz = 0.2 T' label2 = 'J = ' + ("%.2f" % J) + ', meV Bz = 0.6 T' v1 = struct1.getEigenStates() v2 = struct2.getEigenStates() #w = struct.getEnergies() print(label1) print(getHigestProbabillity(v1[:,0],3,2)) print(label2) print(getHigestProbabillity(v2[:,0],3,2)) avgLifetime1 = 2/(lifeTimes1[:,0]+lifeTimes1[:,1])
'tipPos': 0, 'Gs': 1.452e-7, 'G': 1.5e-9, 'u': 1, }, { 'tipPos': 0, 'Gs': 1.452e-7, 'G': 1.5e-9, 'u': 0, 'b0': 0.75 }, ] for i, structDict in enumerate(structList): struct = Structure(**structDict) lifeTime = TemperatureVariation( struct, T_rangeShort, **simList[0]).calcLifeTimesFullRates(V_bias) ax[0].semilogy(1 / T_rangeShort, 2 / (lifeTime[:, 0] + lifeTime[:, 1]), linestArray[i], markerfacecolor='none') struct = Structure(**structList[0]) for i, simDict in enumerate(simList): lifeTime = TemperatureVariation(struct, T_rangeShort, **simDict).calcLifeTimesFullRates(V_bias) ax[1].semilogy(1 / T_rangeShort, 2 / (lifeTime[:, 0] + lifeTime[:, 1]), linestArray[i],
from time import time import matplotlib.pyplot as plt import numpy as np start = time() Bloc_range = np.linspace(0, 2, 201) J = 1.15 B = -1 V_bias = None Fe1 = Adatom(s=2, D=-2.1, E=0.31, g=2.1) Fe2 = Adatom(s=2, D=-3.6, E=0.31, g=2.1) Fe3 = Adatom(s=2, D=-2.1, E=0.311, g=2.1) trimer = Structure([Fe1, Fe2, Fe3], JDict={(0, 1): J, (1, 2): J}, Bz=B) localField = LocalField(trimer, Bloc_range, tipPos=0, u=0, Gs=3.1e-6, G=3e-9, eta=0.2, b0=0.5) Neelprob, T1 = localField.calcNeelProb(V_bias) fig, ax = plt.subplots(2, 1, sharex=True, figsize=(8, 6)) ax[0].semilogy(Bloc_range, Neelprob.T) ax[1].plot(Bloc_range, T1 / 1e-6)
extremeB = np.zeros((len(JList), 2)) for i, J4 in enumerate(JList): tempDict = { 'atoms': [Fe1, Fe2, Fe3, Fe4], 'JDict': { (0, 1): J4, (1, 2): J4, (2, 3): J4 }, 'Bz': 0.1 } for j, B in enumerate(BList): tempDict[FielDir] = B struct = Structure(**tempDict) v = struct.getEigenStates() print(getHigestProbabillity(v[:, 0], 3, 2)) lifetimes[0, j, :] = Measurement(struct, **simDict).calcLifeTimesFullRates(V_bias) avgLifetime = (lifetimes[0, :, 0] + lifetimes[0, :, 0]) / 2 extremeB[i, 0] = BList[np.argmin((avgLifetime))] label = 'J= ' + ("%.2f" % J4) + ' meV' if (i == 1 or i == 4 or i == 6): #plt.figure() #plt.title(label) ax[0].semilogy(BList,
#] fig, ax = plt.subplots( 3, 1, figsize=(5, 10), ) lifetimes = np.zeros((len(simList), len(valuesDict[magDir]), n)) overlap = np.zeros(len(valuesDict[magDir])) dE = np.zeros((len(valuesDict[magDir]), 5), dtype=complex) for key in valuesDict.keys(): for j, value in enumerate(valuesDict[key]): tempDict = structDict.copy() tempDict[key] = value struct = Structure(**tempDict) v = struct.getEigenStates() w = struct.getEnergies() overlap[j] = np.sum(np.abs(v[:, 0] * v[:, 1])**2) dE[j, :] = (w[0:5] - w[0]) / meV print(getHigestProbabillity(v[:, 0], 3, 2)) for i, simDict in enumerate(simList): lifetimes[i, j, :] = Measurement( struct, **simDict).calcLifeTimesFullRates(V_bias) ax[0].semilogy(valuesDict[key], lifetimes[0, :, 0], '--sC0', label=r'$\phi_0 \to \phi_1$', markerfacecolor='none') ax[0].semilogy(valuesDict[key],
J = 0.7 valueDict = {'k': np.arange(5, 400, 10)} simDict = {'tipPos': 0, 'Gs': 2.56e-6, 'G': 1.5e-9, 'eta': 0, 'u': 0} structDict = { 'atoms': [Fe1, Fe2, Fe2, Fe3], 'JDict': { (0, 1): J, (1, 2): J, (2, 3): J }, 'Bz': 3, } fourFe1 = Structure(**structDict) fourFe2 = BigStructure(**structDict, n=5, k=625) fourFe3 = BigStructure(**structDict, n=5, k=10) lifeTimes1 = TemperatureVariation(fourFe1, T_rangeShort, **simDict).calcLifeTimesFullRates(V_bias) lifeTimes2 = TemperatureVariation(fourFe2, T_rangeShort, **simDict).calcLifeTimesFullRates(V_bias) lifeTimes3 = TemperatureVariation(fourFe3, T_rangeShort, **simDict).calcLifeTimesFullRates(V_bias) avgLifetime1 = 2 / (lifeTimes1[:, 0] + lifeTimes1[:, 1]) for key in valueDict.keys(): error = np.zeros((3, len(valueDict[key]))) for j, value in enumerate(valueDict[key]):
#fig,ax = plt.subplots(1,2,figsize=(10,6)) fig1, ax1 = plt.subplots(1, 1) maxPoint = np.zeros(len(BzList)) for J in JList: #fig,ax = plt.subplots(1,2,figsize=(10,6)) for i, Bz in enumerate(BzList): struct = Structure( atoms=[ Fe1, Fe2, Fe2, Fe4, ], JDict={ (0, 1): J, (1, 2): J, (2, 3): J }, Bz=Bz, ) lifeTimes4 = TemperatureVariation( struct, T_rangeShort, **simDict).calcLifeTimesFullRates(V_bias) v = struct.getEigenStates() w = struct.getEnergies() label = ("Bz = %.2f" % Bz) print(label) print(getHigestProbabillity(v[:, 0], 3, 2)) print(getHigestProbabillity(v[:, 1], 3, 2))
""" from FunctionsSpinHam import Adatom, Structure, DIdV import matplotlib.pyplot as plt import numpy as np Fe1 = Adatom(s=2, D=-2.1, E=0.31, g=2.11) Fe2 = Adatom(s=2, D=-3.6, E=0.31, g=2.11) Fe3 = Adatom(s=2, D=-2.1, E=0.311, g=2.11) Nv = 201 V_range = np.linspace(-0.03, 0.03, Nv) vPoints = [-14.5, -8.5, 8.5, 14.5] monomer = Structure(atoms=[Fe1, Fe2, Fe3], JDict={ (0, 1): 1.15, (1, 2): 1.15 }, Bz=2) mV = 0.001 mu = 1e-6 f, ax = plt.subplots(1, 1, sharex=True, figsize=(8, 4)) for i in range(len(monomer.atoms)): dIdV1 = DIdV(structure=monomer, tipPos=i, T=0.5, V_range=V_range, u=0.5, eta=0, G=2 / 3e7,