Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi there, This code is written in unknown language (for me, may be it is written using Fortran), could help me rewrite this code using
Hi there, This code is written in unknown language (for me, may be it is written using Fortran), could help me rewrite this code using the Matlab?
one of plots that we should get after run this could
Thanks!
Module DEF implicit none real*8 real 8 real*8 real 8 real*8 real*8 integer complex*16:: i, D, GRL, aL, aR end Module DEF : Tr, VL, VR, alphaL, betaR, alpha, beta Y,xL, xR :S0,s1, k, gamma, gammaL, gammaR, KL, KR, EPSO :emin,eminL, eminR, emax, emaxL, emaxR :eps,epsL, epsR, epsOL, eps0R, X, Z : E, EL, ER, delta, deltaL, deltaR, theta, thetaL, thetaR, cf : N,m,j program MBS use DEE implicit none open (13, file-'OBN.dat' !Complex definition energies Number of atoms in the branch !Correction Factor to avoid dividing by zero !Coupling to the left the impurity Coupling to the right impurity !Coupling to the left lead Coupling to right lead Coupling in the branch Coupling in the left lead Coupling in the right lead i-(0.0do,1.0d0) m-10000 N=15 cf-LE-30 alpha -0.2 alphaL-1 betaR -1 gamma-1 gammaL-1 gammaR-1 gamma1-1 gammaR-1 eps -0 epsL0 epsR0 epsOL-0 eps0R-0 emin=-2 Coupling in the left lead !Coupling in the right lead Site energy in the branch !Site energy in the left lead !Site energy in the right lead Site energy of the left impurity Site energy of the right impurity ! Minimum of the energy ! Maximum of the energy ! Variattion delta (emax-emin)/dble (m) do j-1,m E -emin +delta dble (j) theta =dble ((eps -E)/(2*gamma )) if (abs (theta) .le.1) then endif thetaL-dble ((epsL-E)/(2+gammaL)) k -acos (theta) if (abs (thetal) . e . ) then endif thetaR dble ((epsR-E) /(2*gammaR)) KL=acos (the t aL) if (abs (thetar) le.1) then KR=acos (thetaR) endif KR=acos (thetaR) endif s0-sin (k*N) s1-sin (k (N+1)) VL= (2 * gamma L*sin (KL) ) 8 VR-(2*gammaR sin (KR)) xl= ( (alpha* *2) * (s0+cf) ) / (gamma * (s1+cf) ) xR((beta* *2) (s0+cf))/(gamma (s1+cf)) y-(alpha beta* (s0+cf))/(gamma (s1+cf) aL-eps OL-E-( ( ( alpha L * * 2) /gamma L) * (cos (KL) +i*sin (KL) ) ) aRzeps OR-E-( ( (betaR * * 2 ) /gammaR) * (cos (KL) +i*sin (KL) ) ) GRL=-y/D X (GRL Dconjg (GRL) Tr-VL* ( (alphaL/gammaL) **2) *X*((betaR/gammaR))*VR write (13,' (5x, 6(E15.9,5x))E, tr enddo end program BWI 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1F -2 1.5 -1 -0.5 0.5 1.5 2 E-Ef Module DEF implicit none real*8 real 8 real*8 real 8 real*8 real*8 integer complex*16:: i, D, GRL, aL, aR end Module DEF : Tr, VL, VR, alphaL, betaR, alpha, beta Y,xL, xR :S0,s1, k, gamma, gammaL, gammaR, KL, KR, EPSO :emin,eminL, eminR, emax, emaxL, emaxR :eps,epsL, epsR, epsOL, eps0R, X, Z : E, EL, ER, delta, deltaL, deltaR, theta, thetaL, thetaR, cf : N,m,j program MBS use DEE implicit none open (13, file-'OBN.dat' !Complex definition energies Number of atoms in the branch !Correction Factor to avoid dividing by zero !Coupling to the left the impurity Coupling to the right impurity !Coupling to the left lead Coupling to right lead Coupling in the branch Coupling in the left lead Coupling in the right lead i-(0.0do,1.0d0) m-10000 N=15 cf-LE-30 alpha -0.2 alphaL-1 betaR -1 gamma-1 gammaL-1 gammaR-1 gamma1-1 gammaR-1 eps -0 epsL0 epsR0 epsOL-0 eps0R-0 emin=-2 Coupling in the left lead !Coupling in the right lead Site energy in the branch !Site energy in the left lead !Site energy in the right lead Site energy of the left impurity Site energy of the right impurity ! Minimum of the energy ! Maximum of the energy ! Variattion delta (emax-emin)/dble (m) do j-1,m E -emin +delta dble (j) theta =dble ((eps -E)/(2*gamma )) if (abs (theta) .le.1) then endif thetaL-dble ((epsL-E)/(2+gammaL)) k -acos (theta) if (abs (thetal) . e . ) then endif thetaR dble ((epsR-E) /(2*gammaR)) KL=acos (the t aL) if (abs (thetar) le.1) then KR=acos (thetaR) endif KR=acos (thetaR) endif s0-sin (k*N) s1-sin (k (N+1)) VL= (2 * gamma L*sin (KL) ) 8 VR-(2*gammaR sin (KR)) xl= ( (alpha* *2) * (s0+cf) ) / (gamma * (s1+cf) ) xR((beta* *2) (s0+cf))/(gamma (s1+cf)) y-(alpha beta* (s0+cf))/(gamma (s1+cf) aL-eps OL-E-( ( ( alpha L * * 2) /gamma L) * (cos (KL) +i*sin (KL) ) ) aRzeps OR-E-( ( (betaR * * 2 ) /gammaR) * (cos (KL) +i*sin (KL) ) ) GRL=-y/D X (GRL Dconjg (GRL) Tr-VL* ( (alphaL/gammaL) **2) *X*((betaR/gammaR))*VR write (13,' (5x, 6(E15.9,5x))E, tr enddo end program BWI 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1F -2 1.5 -1 -0.5 0.5 1.5 2 E-Ef
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started