The original Tpss code is copyrighted, I belive that suche things hinder the advance of science, so here is (I think) a nice way to generate code that calculates the TPSS functional that can be used by anyone following the GPL 2 (http://www.gnu.org/copyleft/gpl.html) or higher license.
"Progress in science through free software" ;)
Fawzi Mohamed

# TPSS

Reference: Perdew,Tao, Staroverov, Scuseria, J.Chem Phys vol 120, p 6898 (2004)
restart;
sost:=eqs -> subs(seq(eqs[nops(eqs)-i],i=1..(nops(eqs)-1)),rhs(eqs[nops(eqs)])):
unk:=eqs -> indets(sost(eqs),symbol):
loc:=eqs -> indets(eqs,symbol) minus unk(eqs):
e:='e': m:='m': h_bar:='h_bar': a_0:='a_0':myIF:='myIF':
e:=1: m:=1: h_bar:=1: a_0:=h_bar^2 /(m*e^2):
indice:=proc(el,l) local i,ii,elAtt,el_s; i:=-1; ii:=0; el_s:=convert(el,string); for elAtt in l do ii:=ii+1; if evalb(el_s=convert(elAtt,string)) then i:=ii; end if; end do; i; end proc:
indiceDef:=proc(el,l) local i,ii,elAtt; i:=-1; ii:=0; for elAtt in l do ii:=ii+1; if evalb(el=lhs(elAtt)) then i:=ii; end if; end do; i; end proc:
definizioni:= eqs -> map(eq -> if type(eq,equation) then lhs(eq); else 0; end if ,eqs):
sameNameSameDef:=proc(eqs1,eqs2) local commonDef,res,d; commonDef:=convert(definizioni(eqs1),set)intersect convert(definizioni(eqs2),set); res:=true; for d in commonDef do if not evalb(subs(eqs1,d)=subs(eqs2,d)) then; print("def different for "||d); res:=false; end if; end do; res; end proc:
# check same name -> same def apart from eqs at the indexes returned by the function eqs_to_rm checkCompatible:=proc (eqss,eqs_to_rm) local i,j,im_indx,eqd1,eqd2,res,ii,attComp; res:=true; for i from 1 to nops(eqss)-1 do im_indx:=eqs_to_rm(eqss[i]); #print("removed",map(lhs,[eqss[i][im_indx[ii]]$ii=1..nops(im_indx)])); eqd1:=subsop('im_indx[ii]=NULL'$ii=1..nops(im_indx),eqss[i]): for j from i+1 to nops(eqss) do #print("doing (",i,j,")"); im_indx:=eqs_to_rm(eqss[j]); #print("removed",map(lhs,[eqss[j][im_indx[ii]]$ii=1..nops(im_indx)])); eqd2:=subsop('im_indx[ii]=NULL'$ii=1..nops(im_indx),eqss[j]): attComp:=sameNameSameDef(eqd1,eqd2); res:=attComp and res; if not attComp then print("incompatibility between",i,j); end if; end do; end do; res; end proc:
getDef:=proc(symb,eqs) local eq; for eq in eqs do if(lhs(eq)=symb) then return eq; end if; end do; 0; end proc:
eqUses:=(eq1,eq2)->evalb(lhs(eq2) in indets(rhs(eq1),symbol)):
enforceDependencies:=proc(eqs) local dep,eq1,eq2,i,j,ii,eqns; dep:=true; eqns:=eqs; ii:=0; i:=1; while (i<=(nops(eqs)-1) and ii<10000) do dep:=false; j:=i+1; while (j<=nops(eqs) and ii<10000) do if eqUses(eqns[i],eqns[j]) then ii:=ii+1; eqns:=subsop(i=NULL,j=(eqns[j],eqns[i]),eqns); dep:=true; else j:=j+1; end if; end do; if not dep then i:=i+1; end if; end do; eqns; end proc:
combineDefs:=proc(ord) local def,defs,allDefs; allDefs:=[]: for defs in ord do for def in defs do if not def in allDefs then allDefs:=[op(allDefs),def]; end if; end do; end do; allDefs; end proc:
combineEqs:=proc(allDefs,eqss,ord) local def,eqs,eqsDeriv,found,d,i,ii; eqsDeriv:=[]; for def in allDefs do found:=false; for ii from 1 to nops(eqss) do d:=ord[ii]; i:=indice(def,d); if i>0 then eqs:=eqss[ii]; if not (lhs(eqs[i])=def) then print("errore eq",def); end if; eqsDeriv:=[op(eqsDeriv),eqs[i]]; found:=true; break; end if; end do; if not found then print("error unknown def",def); end if; end do; eqsDeriv; end proc:
sostConst:=proc(eqs) local sAtt,sToDo,result; sToDo:=[]; result:=[]; for sAtt in eqs do sAtt:=subs(op(sToDo),sAtt); if type(rhs(sAtt),numeric) then sToDo:=[op(sToDo),sAtt]; end if; if rhs(sAtt)<>0 then result:=[op(result),sAtt]; end if; end do; result; end proc:
calcDerivs:=proc(eqs,arg_names) local cs,r,d,eq,eq2,eq3,i; cs:=CompSeq(locals=loc(eqs),globals=convert(unk(eqs),set)minus convert(arg_names,set), params=arg_names,eqs); r:=convert(cs,procedure); d:=[seq(D[i](r),i=1..nops(arg_names))]; eq:=map(f->op(-1,convert(f,CompSeq)),d); # ensure that the variables are bound in the global namespace eq2:=map(f->evalindets(f,symbol,g->convert(convert(g,string),symbol)),eq); eq3:=[seq(subs(result=deriv_||(arg_names[i]),eq2[i]),i=1..nops(arg_names))]; end proc:
fCostanti:=proc(costanti,eqs) local cs,pr, pEq; pEq:=map(x->getDef(x,eqs),costanti); print(pEq); print(Fortran(convert(CompSeq(globals=costanti,pEq),procedure))); end proc:
rmDefs:=proc(lNames,eqs) local my_eqs,nm,i; my_eqs:=eqs; for nm in lNames do i:=indiceDef(nm,my_eqs); if (i>0) then my_eqs:=subsop(i=NULL,my_eqs); else my_eqs; end if; end do; my_eqs; end proc:
with(CodeGeneration);
Warning, the protected name Matlab has been redefined and unprotected
NiM3LEkiQ0c2IkkoRm9ydHJhbkdGJUkxSW50ZXJtZWRpYXRlQ29kZUdGJUklSmF2YUdGJUkzTGFuZ3VhZ2VEZWZpbml0aW9uR0YlSSdNYXRsYWJHNiRJKnByb3RlY3RlZEdGLEkoX3N5c2xpYkdGJUkmTmFtZXNHRiVJJVNhdmVHRiVJKlRyYW5zbGF0ZUdGJUksVmlzdWFsQmFzaWNHRiU=

## costanti

costanti:=[kappa, beta,mu,gamma_var,b,c,e_var, d, f_ii_0, p_1,A_1,alpha_1_1,beta_1_1,beta_2_1,beta_3_1,beta_4_1, p_2,A_2,alpha_1_2,beta_1_2,beta_2_2,beta_3_2,beta_4_2, p_3,A_3,alpha_1_3,beta_1_3,beta_2_3,beta_3_3,beta_4_3,scale_ec,scale_ex]:

## exchange

exhange energy (LDA)
eqx1:=ex_lda=rho*ex_unif*Fx;
NiM+SSVlcXgxRzYiL0knZXhfbGRhR0YlKihJJHJob0dGJSIiIkkoZXhfdW5pZkdGJUYqSSNGeEdGJUYq
Uniform gas exchange:
eqx2:=ex_unif=-3/(4*Pi)*(3*Pi^2*rho)^(1/3);
NiM+SSVlcXgyRzYiL0koZXhfdW5pZkdGJSwkKihJI1BpR0kqcHJvdGVjdGVkR0YrISIiIiIkIyIiIkYtKiZGKiIiI0kkcmhvR0YlRi9GLiMhIiQiIiU=
The enhancement factor Fx is function of just p an z;
eqx3:=p=norm_drho^2/(4*(3*Pi^2)^(2/3)*rho^(8/3)); eqx4:=s=(3/Pi)^(2/3)/6*norm_drho/rho^(4/3); eqx5:=z=tau_w/tau; eqx6:=tau_w=norm_drho^2/(8*rho);
NiM+SSVlcXgzRzYiL0kicEdGJSwkKipJKm5vcm1fZHJob0dGJSIiIyIiJCMiIiJGLCokSSNQaUdJKnByb3RlY3RlZEdGMUYrIyEiI0YsSSRyaG9HRiUjISIpRiwjRi4iIzc=
NiM+SSVlcXg0RzYiL0kic0dGJSwkKioiIiQjIiIjRioqJEkjUGlHSSpwcm90ZWN0ZWRHRi8hIiJGK0kqbm9ybV9kcmhvR0YlIiIiSSRyaG9HRiUjISIlRiojRjIiIic=
NiM+SSVlcXg1RzYiL0kiekdGJSomSSZ0YXVfd0dGJSIiIkkkdGF1R0YlISIi
NiM+SSVlcXg2RzYiL0kmdGF1X3dHRiUsJComSSpub3JtX2RyaG9HRiUiIiNJJHJob0dGJSEiIiMiIiIiIik=
evalb(simplify(subs(eqx3,eqx4,s^2=p),symbolic));
NiNJJXRydWVHSSpwcm90ZWN0ZWRHRiQ=
eqx7:=tildeq_b=(9/20)*(alpha-1)/(1+b*alpha*(alpha-1))^(1/2)+2*p/3; eqx8:=alpha=(5*p/3)*(z ^(-1)-1); # =(tau-tau_w)/tau_unif
NiM+SSVlcXg3RzYiL0kpdGlsZGVxX2JHRiUsJiomLCZJJmFscGhhR0YlIiIiISIiRixGLCwmRixGLCooSSJiR0YlRixGK0YsRipGLEYsI0YtIiIjIyIiKiIjP0kicEdGJSNGMiIiJA==
NiM+SSVlcXg4RzYiL0kmYWxwaGFHRiUsJComSSJwR0YlIiIiLCYqJEkiekdGJSEiIkYrRi9GK0YrIyIiJiIiJA==
Fx can be written as
eqx9:=Fx=1+kappa-kappa/(1+x/kappa); eqk1:=kappa=0.804; eqk2:=mu=0.21951; #eqk2:=mu=beta*(Pi^2/3); in pbe, in tpss paper they use this approximation...
NiM+SSVlcXg5RzYiL0kjRnhHRiUsKCIiIkYpSSZrYXBwYUdGJUYpKiZGKkYpLCZGKUYpKiZJInhHRiVGKUYqISIiRilGL0Yv
NiM+SSVlcWsxRzYiL0kma2FwcGFHRiUkIiQvKSEiJA==
NiM+SSVlcWsyRzYiL0kjbXVHRiUkIiZePiMhIiY=
and x
eqx10:=x=((10/81+c*z^2/(1+z^2)^2)*p+146/2025*tildeq_b^2-73/405*tildeq_b*sqrt(1/2*(3/5*z)^2+1/2*p^2)+1/kappa*(10/81)^2*p^2+ 2*sqrt(e_var)*10/81*(3/5*z)^2+e_var*mu*p^3)/(1+sqrt(e_var)*p)^2;
NiM+SSZlcXgxMEc2Ii9JInhHRiUqJiwuKiYsJiMiIzUiIyIpIiIiKihJImNHRiVGL0kiekdGJSIiIywmRi9GLyokRjJGM0YvISIjRi9GL0kicEdGJUYvRi8qJEkpdGlsZGVxX2JHRiVGMyMiJFkiIiVEPyomRjlGLywmRjUiIz0qJEY3RjMiI10jRi9GMyMhI3QiJV1TKiZJJmthcHBhR0YlISIiRjdGMyMiJCsiIiVobComSSZlX3ZhckdGJUZCRjJGMyMiIiUiI1gqKEZNRi9JI211R0YlRi9GNyIiJEYvRi8sJkYvRi8qJkZNRkJGN0YvRi9GNg==
eqk3:=b=0.4; eqk4:=c=1.59096; eqk5:=e_var=1.537;
NiM+SSVlcWszRzYiL0kiYkdGJSQiIiUhIiI=
NiM+SSVlcWs0RzYiL0kiY0dGJSQiJyc0ZiIhIiY=
NiM+SSVlcWs1RzYiL0kmZV92YXJHRiUkIiVQOiEiJA==
eqs_ex_lda := [eqk1,eqk2,eqk3,eqk4,eqk5,eqx3, eqx6, eqx5,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YqRipGMiEiIkYzRipGKiNGKkYuRjQ=
eqc7:=rs=(3/(4*Pi*rho))^(1/3);
NiM+SSVlcWM3RzYiL0kjcnNHRiUsJCooIiIkIyIiIkYqIiIlIyIiI0YqKiZJI1BpR0kqcHJvdGVjdGVkR0YyISIiSSRyaG9HRiVGM0YrI0YsRi0=
eqc8:=d=2.8;
NiM+SSVlcWM4RzYiL0kiZEdGJSQiI0chIiI=
eqc9:=norm_dchi=2*sqrt((norm_drhoa*rhob)^2+(norm_drhob*rhoa)^2 -(norm_drho^2-norm_drhoa^2-norm_drhob^2)*rhoa*rhob)/rho^2;
NiM+SSVlcWM5RzYiL0kqbm9ybV9kY2hpR0YlLCQqJiwsKiZJK25vcm1fZHJob2FHRiUiIiNJJXJob2JHRiVGLSIiIiomSStub3JtX2RyaG9iR0YlRi1JJXJob2FHRiVGLUYvKihGMkYvRi5GL0kqbm9ybV9kcmhvR0YlRi0hIiIqKEYyRi9GLkYvRixGLUYvKihGMkYvRi5GL0YxRi1GLyNGL0YtSSRyaG9HRiUhIiNGLQ==
eqs_c1:=[eqc8,eqc3,eqc9,eqc4,eqc5,eqx6,eqc6,eqc2_1,eqc2_2,eqc2,eqc1];
unk(eqs_c1);
NiM8LUkjUGlHSSpwcm90ZWN0ZWRHRiVJJHRhdUc2IkkkcmhvR0YnSSpub3JtX2RyaG9HRidJMWVwc2lsb25fY0dHQV8xXzBHRidJMWVwc2lsb25fY0dHQV8wXzFHRidJK25vcm1fZHJob2FHRidJK25vcm1fZHJob2JHRidJLWVwc2lsb25fY0dHQUdGJ0klcmhvYUdGJ0klcmhvYkdGJw==
PBE (alias epsilon_cGGA) from Perdew, Burke, Ernzehof, PRL, vol 77, p 3865 (1996) It has some corrections and discussions.
eqpbe1:=t=norm_drho/(2*phi*k_s*rho);
NiM+SSdlcXBiZTFHNiIvSSJ0R0YlLCQqKkkqbm9ybV9kcmhvR0YlIiIiSSRwaGlHRiUhIiJJJGtfc0dGJUYtSSRyaG9HRiVGLSN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qpbe9));
NiM+SSdlcXBiZThHNiIvSSViZXRhR0YlJCImRG4nISIn
NiM+SSdlcXBiZTlHNiIvSSpnYW1tYV92YXJHRiUqJiwmIiIiRiotSSNsbkc2JEkqcHJvdGVjdGVkR0YuSShfc3lzbGliR0YlNiMiIiMhIiJGKkkjUGlHRi4hIiM=
NiMkIisnM3AhNEohIzY=
eqpbe10:=k_f=(3*Pi^2*rho)^(1/3);
NiM+SShlcXBiZTEwRzYiL0kka19mR0YlKiYiIiQjIiIiRikqJkkjUGlHSSpwcm90ZWN0ZWRHRi4iIiNJJHJob0dGJUYrRio=
eqs_pbec1 := [eqpbe8,eqpbe9,eqc3, eqpbe2, eqpbe10, eqpbe3, eqpbe1, eqpbe6, eqpbe5,eqpbe7];
unk(eqs_pbec1);
NiM8KEkjUGlHSSpwcm90ZWN0ZWRHRiVJL2Vwc2lsb25fY191bmlmRzYiSSRyaG9HRidJKm5vcm1fZHJob0dGJ0klcmhvYUdGJ0klcmhvYkdGJw==
Uniform gas correlation from Perdew,Wang; PRB vol 45, p 13244, 1992
equc1:=epsilon_c_unif=e_c_u_0+alpha_c*f/f_ii_0*(1-chi^4)+(e_c_u_1-e_c_u_0)*f*chi^4;
NiM+SSZlcXVjMUc2Ii9JL2Vwc2lsb25fY191bmlmR0YlLChJKGVfY191XzBHRiUiIiIqKkkoYWxwaGFfY0dGJUYqSSJmR0YlRipJJ2ZfaWlfMEdGJSEiIiwmRipGKiokSSRjaGlHRiUiIiVGL0YqRioqKCwmSShlX2NfdV8xR0YlRipGKUYvRipGLUYqRjJGM0Yq
equc2:=f=((1+chi)^(4/3)+(1-chi)^(4/3)-2)/(2^(4/3)-2);
NiM+SSZlcXVjMkc2Ii9JImZHRiUqJiwoKiQsJiIiIkYsSSRjaGlHRiVGLCMiIiUiIiRGLCokLCZGLEYsRi0hIiJGLkYsISIjRixGLCwmKiQiIiMjRixGMEY3RjRGLEYz
equc3:=f_ii_0=subs(chi=0,diff(subs(equc2,f),chi,chi)); evalf(rhs(equc3));
NiM+SSZlcXVjM0c2Ii9JJ2ZfaWlfMEdGJSwkKiQsJiokIiIjIyIiIiIiJEYsISIjRi4hIiIjIiIpIiIq
NiMkIitMNCMqNDwhIio=
G_uc:=-2*A*(1+alpha_1*rs)*ln(1+1/(2*A*(beta_1*rs^(1/2)+beta_2*rs+beta_3*rs^(3/2)+beta_4*rs^(p+1))));
NiM+SSVHX3VjRzYiLCQqKEkiQUdGJSIiIiwmRilGKSomSShhbHBoYV8xR0YlRilJI3JzR0YlRilGKUYpLUkjbG5HNiRJKnByb3RlY3RlZEdGMUkoX3N5c2xpYkdGJTYjLCZGKUYpKiZGKCEiIiwqKiZJJ2JldGFfMUdGJUYpRi0jRikiIiNGKSomSSdiZXRhXzJHRiVGKUYtRilGKSomSSdiZXRhXzNHRiVGKUYtIyIiJEY7RikqJkknYmV0YV80R0YlRikpRi0sJkkicEdGJUYpRilGKUYpRilGNkY6RikhIiM=
equc4c:=[p_1=1.0,A_1=0.031091,alpha_1_1=0.21370,beta_1_1=7.5957,beta_2_1=3.5876,beta_3_1=1.6382, beta_4_1=0.49294]; equc4:={p=p_1,A=A_1,alpha_1=alpha_1_1,beta_1=beta_1_1,beta_2=beta_2_1,beta_3=beta_3_1, beta_4=beta_4_1}; equc5:=e_c_u_0=subs(equc4,G_uc);
NiM+SSdlcXVjNGNHNiI3KS9JJHBfMUdGJSQiIzUhIiIvSSRBXzFHRiUkIiYiNEohIicvSSphbHBoYV8xXzFHRiUkIiZxOCMhIiYvSSliZXRhXzFfMUdGJSQiJmRmKCEiJS9JKWJldGFfMl8xR0YlJCImd2UkRjovSSliZXRhXzNfMUdGJSQiJiNRO0Y6L0kpYmV0YV80XzFHRiUkIiYlSFxGNQ==
NiM+SSZlcXVjNEc2IjwpL0kicEdGJUkkcF8xR0YlL0kiQUdGJUkkQV8xR0YlL0knYmV0YV8xR0YlSSliZXRhXzFfMUdGJS9JKGFscGhhXzFHRiVJKmFscGhhXzFfMUdGJS9JJ2J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lSSliZXRhXzRfMkdGJQ==
NiM+SSZlcXVjN0c2Ii9JKGVfY191XzFHRiUsJCooSSRBXzJHRiUiIiIsJkYrRisqJkkqYWxwaGFfMV8yR0YlRitJI3JzR0YlRitGK0YrLUkjbG5HNiRJKnByb3RlY3RlZEdGM0koX3N5c2xpYkdGJTYjLCZGK0YrKiZGKiEiIiwqKiZJKWJldGFfMV8yR0YlRitGLyNGKyIiI0YrKiZJKWJldGFfMl8yR0YlRitGL0YrRisqJkkpYmV0YV8zXzJHRiVGK0YvIyIiJEY9RisqJkkpYmV0YV80XzJHRiVGKylGLywmSSRwXzJHRiVGK0YrRitGK0YrRjhGPEYrISIj
equc8c:=[p_3=1.0,A_3=0.016887,alpha_1_3=0.11125,beta_1_3=10.357,beta_2_3=3.6231,beta_3_3=0.88026, beta_4_3=0.49671]; equc8:={p=p_3,A=A_3,alpha_1=alpha_1_3,beta_1=beta_1_3,beta_2=beta_2_3,beta_3=beta_3_3, beta_4=beta_4_3}; equc9:=alpha_c=-subs(equc8,G_uc);
NiM+SSdlcXVjOGNHNiI3KS9JJHBfM0dGJSQiIzUhIiIvSSRBXzNHRiUkIiYoKW8iISInL0kqYWxwaGFfMV8zR0YlJCImRDYiISImL0kpYmV0YV8xXzNHRiUkIiZkLiIhIiQvSSliZXRhXzJfM0dGJSQiJkppJCEiJS9JKWJldGFfM18zR0YlJCImRSEpKUY1L0kpYmV0YV80XzNHRiUkIiZyJ1xGNQ==
NiM+SSZlcXVjOEc2IjwpL0kicEdGJUkkcF8zR0YlL0kiQUdGJUkkQV8zR0YlL0knYmV0YV8xR0YlSSliZXRhXzFfM0dGJS9JKGFscGhhXzFHRiVJKmFscGhhXzFfM0dGJS9JJ2JldGFfMkdGJUkpYmV0YV8yXzNHRiUvSSdiZXRhXzNHRiVJKWJldGFfM18zR0YlL0knYmV0YV80R0YlSSliZXRhXzRfM0dGJQ==
NiM+SSZlcXVjOUc2Ii9JKGFscGhhX2NHRiUsJCooSSRBXzNHRiUiIiIsJkYrRisqJkkqYWxwaGFfMV8zR0YlRitJI3JzR0YlRitGK0YrLUkjbG5HNiRJKnByb3RlY3RlZEdGM0koX3N5c2xpYkdGJTYjLCZGK0YrKiZGKiEiIiwqKiZJKWJldGFfMV8zR0YlRitGLyNGKyIiI0YrKiZJKWJldGFfMl8zR0YlRitGL0YrRisqJkkpYmV0YV8zXzNHRiVGK0YvIyIiJEY9RisqJkkpYmV0YV80XzNHRiVGKylGLywmSSRwXzNHRiVGK0YrRitGK0YrRjhGPEYrRj0=
eqs_e_c_unif:=[op(equc4c),op(equc6c),op(equc8c),eqc3,eqc7,equc5,equc7,equc9,equc3,equc2,equc1];
unk(eqs_e_c_unif);
NiM8JkkjUGlHSSpwcm90ZWN0ZWRHRiVJJHJob0c2IkklcmhvYUdGJ0klcmhvYkdGJw==
sameNameSameDef(eqs_e_c_unif,eqs_pbec1);
NiNJJXRydWVHSSpwcm90ZWN0ZWRHRiQ=
eqs_pbec2:=enforceDependencies(combineDefs([eqs_e_c_unif,eqs_pbec1])):
unk(eqs_pbec2);
NiM8J0kjUGlHSSpwcm90ZWN0ZWRHRiVJJHJob0c2Ikkqbm9ybV9kcmhvR0YnSSVyaG9hR0YnSSVyaG9iR0Yn
loc(eqs_pbec2);
eqs_pbec2_nc:=rmDefs(costanti,eqs_pbec2):
eqs_pbec3:=subs(map(x->x=x||_s1,loc(eqs_pbec2_nc)),epsilon_cGGA_s1=epsilon_cGGA_1_0, rhob=0,norm_drho=norm_drhoa,norm_drhob=0,rho=rhoa,eqs_pbec2_nc):
unk(eqs_pbec3);
NiM8LkkjUGlHSSpwcm90ZWN0ZWRHRiVJKmFscGhhXzFfMkc2IkkpYmV0YV8xXzJHRidJKWJldGFfMl8yR0YnSSliZXRhXzNfMkdGJ0kpYmV0YV80XzJHRidJJHBfMkdGJ0kkQV8yR0YnSSViZXRhR0YnSSpnYW1tYV92YXJHRidJK25vcm1fZHJob2FHRidJJXJob2FHRic=
eqs_pbec4:=subs(map(x->x=x||_s2,loc(eqs_pbec2_nc)),epsilon_cGGA_s2=epsilon_cGGA_0_1,rhoa=0,norm_drho=norm_drhob, norm_drhoa=0,rho=rhob,eqs_pbec2_nc):
unk(eqs_pbec4);
NiM8LkkjUGlHSSpwcm90ZWN0ZWRHRiVJKmFscGhhXzFfMkc2IkkpYmV0YV8xXzJHRidJKWJldGFfMl8yR0YnSSliZXRhXzNfMkdGJ0kpYmV0YV80XzJHRidJJHBfMkdGJ0kkQV8yR0YnSSViZXRhR0YnSSpnYW1tYV92YXJHRidJK25vcm1fZHJob2JHRidJJXJob2JHRic=
sameNameSameDef(eqs_pbec2,eqs_c1);
NiNJJXRydWVHSSpwcm90ZWN0ZWRHRiQ=
eqs_c2:=enforceDependencies(combineDefs([eqs_pbec3,eqs_pbec4,eqs_pbec2,eqs_c1])):
unk(eqs_c2);
NiM8KkkjUGlHSSpwcm90ZWN0ZWRHRiVJJHRhdUc2IkkkcmhvR0YnSSpub3JtX2RyaG9HRidJK25vcm1fZHJob2FHRidJK25vcm1fZHJob2JHRidJJXJob2FHRidJJXJob2JHRic=

## Fortran Costanti

fCostanti(costanti,subs(Pi=pi,[op(eqs_ex_lda),op(eqs_c2),scale_ec=1,scale_ex=1]));

# LDA

sameNameSameDef(eqs_ex_lda,eqs_c2);
NiNJJXRydWVHSSpwcm90ZWN0ZWRHRiQ=
eqs_lda0:=combineDefs([subs(rhoa=rho/2,norm_drhoa=norm_drho/2,rhob=rho/2,norm_drhob=norm_drho/2, eqs_c2),eqs_ex_lda,[scale_ec=1,scale_ex=1,energy=scale_ec*ec+scale_ex*ex_lda]]): eqs_lda:=rmDefs(costanti,eqs_lda0):
lda_const:={op(costanti)} intersect unk(eqs_lda); {op(costanti)} minus lda_const;
NiM+SSpsZGFfY29uc3RHNiI8OkkiZEdGJUkqYWxwaGFfMV8xR0YlSSliZXRhXzFfMUdGJUkpYmV0YV8yXzFHRiVJKWJldGFfM18xR0YlSSliZXRhXzRfMUdGJUkqYWxwaGFfMV8yR0YlSSliZXRhXzFfMkdGJUkpYmV0YV8yXzJHRiVJKWJldGFfM18yR0YlSSliZXRhXzRfMkdGJUkjbXVHRiVJImJHRiVJImNHRiVJJHBfMUdGJUkkQV8xR0YlSSRwXzJHRiVJJEFfMkdGJUkma2FwcGFHRiVJJWJldGFHRiVJJmVfdmFyR0YlSSpnYW1tYV92YXJHRiVJKXNjYWxlX2VjR0YlSSlzY2FsZV9leEdGJQ==
NiM8KkkqYWxwaGFfMV8zRzYiSSliZXRhXzFfM0dGJUkpYmV0YV8yXzNHRiVJJHBfM0dGJUkkQV8zR0YlSSdmX2lpXzBHRiVJKWJldGFfM18zR0YlSSliZXRhXzRfM0dGJQ==
def_lda:=definizioni(eqs_lda);
ima:=indice(ma,def_lda); imb:=indice(mb,def_lda);
NiM+SSRpbWFHNiIiI1s=
NiM+SSRpbWJHNiIiI1w=
eqMa:=eqs_lda[ima]; eqMb:=eqs_lda[imb];
NiM+SSVlcU1hRzYiL0kjbWFHRiUtSSRtYXhHSSpwcm90ZWN0ZWRHRio2JEkxZXBzaWxvbl9jR0dBXzFfMEdGJUktZXBzaWxvbl9jR0dBR0Yl
NiM+SSVlcU1iRzYiL0kjbWJHRiUtSSRtYXhHSSpwcm90ZWN0ZWRHRio2JEkxZXBzaWxvbl9jR0dBXzBfMUdGJUktZXBzaWxvbl9jR0dBR0Yl
eqMas:=[ma=epsilon_cGGA,ma=epsilon_cGGA_1_0]: eqMbs:=[mb=epsilon_cGGA,mb=epsilon_cGGA_0_1]:
arg_lda_names:=[rho,norm_drho,tau];
NiM+SS5hcmdfbGRhX25hbWVzRzYiNyVJJHJob0dGJUkqbm9ybV9kcmhvR0YlSSR0YXVHRiU=
printlevel:=1;
NiM+SStwcmludGxldmVsRzYiIiIi
for i from 1 to 2 do for j from 1 to 2 do deriv_lda[i,j]:=calcDerivs(subsop(ima=eqMas[i],imb=eqMbs[j],eqs_lda),arg_lda_names): end do; end do; i:='i':j:='j':
ims:= eqs->select(x->x>0,[indice(ma,definizioni(eqs)), indice(mb,definizioni(eqs)), indice(marho,definizioni(eqs)), indice(mbrho,definizioni(eqs)), indice(manorm_drho,definizioni(eqs)), indice(mbnorm_drho,definizioni(eqs)), indice(matau,definizioni(eqs)), indice(mbtau,definizioni(eqs))]):
eqss_lda2:=[sostConst(eqs_lda),seq(seq(seq(deriv_lda[i,j][ider],i=1..2),j=1..2),ider=1..3)]:
checkCompatible(eqss_lda1,ims);
NiNJJXRydWVHSSpwcm90ZWN0ZWRHRiQ=
Order sequence defs
def_eqss_lda2:=map(definizioni,eqss_lda2):
allDefs_eqs_lda2:=combineDefs(def_eqss_lda2):
eqs_lda2:=combineEqs(allDefs_eqs_lda2,eqss_lda2,def_eqss_lda2):
unk(eqs_lda2) minus lda_const;
NiM8JkkjUGlHSSpwcm90ZWN0ZWRHRiVJJHRhdUc2IkkkcmhvR0YnSSpub3JtX2RyaG9HRic=
getDef(ma,eqs_lda2); getDef(mb,eqs_lda2); indice(marho,eqs_lda2); getDef(marho,deriv_lda[1,1][1]); getDef(mbrho,deriv_lda[2,2][1]);
NiMvSSNtYUc2Ii1JJG1heEdJKnByb3RlY3RlZEdGKDYkSTFlcHNpbG9uX2NHR0FfMV8wR0YlSS1lcHNpbG9uX2NHR0FHRiU=
NiMvSSNtYkc2Ii1JJG1heEdJKnByb3RlY3RlZEdGKDYkSTFlcHNpbG9uX2NHR0FfMF8xR0YlSS1lcHNpbG9uX2NHR0FHRiU=
NiMhIiI=
NiMvSSZtYXJob0c2IkkwZXBzaWxvbl9jR0dBcmhvR0Yl
NiMvSSZtYnJob0c2Ikk0ZXBzaWxvbl9jR0dBXzBfMXJob0dGJQ==
corrMabEqs:=proc() local arg,res,der; arg:=[rho,norm_drho]; res:=[]; for der in arg do res:=[op(res), ma||der=myIF(epsilon_cGGA_1_0>epsilon_cGGA, epsilon_cGGA_1_0||der,epsilon_cGGA||der), mb||der=myIF(epsilon_cGGA_0_1>epsilon_cGGA, epsilon_cGGA_0_1||der,epsilon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s_lda2):
getDef(mbrho,eqs_lda3);
NiMvSSZtYnJob0c2Ii1JJW15SUZHRiU2JTJJLWVwc2lsb25fY0dHQUdGJUkxZXBzaWxvbl9jR0dBXzBfMUdGJUk0ZXBzaWxvbl9jR0dBXzBfMXJob0dGJUkwZXBzaWxvbl9jR0dBcmhvR0Yl
unk([op(eqs_lda3),result=deriv_rho]);
NiM8QEkiZEc2IkkjUGlHSSpwcm90ZWN0ZWRHRidJKmFscGhhXzFfMUdGJUkpYmV0YV8xXzFHRiVJKWJldGFfMl8xR0YlSSliZXRhXzNfMUdGJUkpYmV0YV80XzFHRiVJKmFscGhhXzFfMkdGJUkpYmV0YV8xXzJHRiVJKWJldGFfMl8yR0YlSSliZXRhXzNfMkdGJUkpYmV0YV80XzJHRiVJI211R0YlSSJiR0YlSSJjR0YlSSRwXzFHRiVJJEFfMUdGJUkkcF8yR0YlSSRBXzJHRiVJJHRhdUdGJUkma2FwcGFHRiVJJWJldGFHRiVJJmVfdmFyR0YlSSpnYW1tYV92YXJHRiVJJHJob0dGJUkpc2NhbGVfZWNHRiVJKXNjYWxlX2V4R0YlSSpub3JtX2RyaG9HRiVJNGVwc2lsb25fY0dHQV8wXzFyaG9HRiVJNGVwc2lsb25fY0dHQV8xXzByaG9HRiU=
eqs_lda4:=enforceDependencies([my_tau=max(tau,tau_w),my_rho=rho,my_norm_drho=norm_drho, op(subs(tau=my_tau,rho=my_rho,norm_drho=my_norm_drho,eqs_lda3))]):
res_eqs_lda:={energy,deriv_rho,deriv_norm_drho,deriv_tau}; for my_symb in res_eqs_lda do print(my_symb,unk([op(eqs_lda4),result=my_symb])minus lda_const); end do;
NiM+SSxyZXNfZXFzX2xkYUc2IjwmSTBkZXJpdl9ub3JtX2RyaG9HRiVJKmRlcml2X3Job0dGJUkqZGVyaXZfdGF1R0YlSSdlbmVyZ3lHRiU=
NiRJMGRlcml2X25vcm1fZHJob0c2IjwmSSNQaUdJKnByb3RlY3RlZEdGJ0kkdGF1R0YkSSRyaG9HRiRJKm5vcm1fZHJob0dGJA==
NiRJKmRlcml2X3Job0c2IjwmSSNQaUdJKnByb3RlY3RlZEdGJ0kkdGF1R0YkSSRyaG9HRiRJKm5vcm1fZHJob0dGJA==
NiRJKmRlcml2X3RhdUc2IjwmSSNQaUdJKnByb3RlY3RlZEdGJ0kkdGF1R0YkSSRyaG9HRiRJKm5vcm1fZHJob0dGJA==
NiRJJ2VuZXJneUc2IjwmSSNQaUdJKnByb3RlY3RlZEdGJ0kkdGF1R0YkSSRyaG9HRiRJKm5vcm1fZHJob0dGJA==
glob_eqs_lda4:={my_rho,my_norm_drho,my_tau}union res_eqs_lda union lda_const;
NiM+SS5nbG9iX2Vxc19sZGE0RzYiPEFJImRHRiVJKmFscGhhXzFfMUdGJUkpYmV0YV8xXzFHRiVJKWJldGFfMl8xR0YlSSliZXRhXzNfMUdGJUkpYmV0YV80XzFHRiVJKmFscGhhXzFfMkdGJUkpYmV0YV8xXzJHRiVJKWJldGFfMl8yR0YlSSliZXRhXzNfMkdGJUkpYmV0YV80XzJHRiVJI211R0YlSSJiR0YlSSJjR0YlSSRwXzFHRiVJJEFfMUdGJUkkcF8yR0YlSSRBXzJHRiVJJmthcHBhR0YlSSViZXRhR0YlSSZlX3ZhckdGJUkqZ2FtbWFfdmFyR0YlSSlzY2FsZV9lY0dGJUkpc2NhbGVfZXhHRiVJMGRlcml2X25vcm1fZHJob0dGJUkqZGVyaXZfcmhvR0YlSSpkZXJpdl90YXVHRiVJJ215X3Job0dGJUktbXlfbm9ybV9kcmhvR0YlSSdlbmVyZ3lHRiVJJ215X3RhdUdGJQ==
cs_eqs_lda4:=CompSeq(locals=loc(eqs_lda4)minus glob_eqs_lda4, globals=glob_eqs_lda4,params=[rho,norm_drho,tau],subs(Pi=pi,eqs_lda4)): r_eqs_lda4:=convert(cs_eqs_lda4,procedure):

## Fortran code

Fortran(r_eqs_lda4,defaulttype=float,optimize);
Warning, the function names {myIF} are not recognized in the target language
Warning, The following variable name replacements were made: ["cg", "cg0", "cg1", "cg10", "cg11", "cg12", "cg13", "cg14", "cg15", "cg16", "cg17", "cg18", "cg19", "cg2", "cg20", "cg21", "cg22", "cg23", "cg24", "cg25", "cg26", "cg27", "cg28", "cg29", "cg3", "cg30", "cg31", "cg32", "cg33", "cg34", "cg35", "cg36", "cg37", "cg38", "cg39", "cg4", "cg40", "cg41", "cg42", "cg43", "cg44", "cg45", "cg46", "cg47", "cg48", "cg49", "cg5", "cg50", "cg51", "cg52", "cg53", "cg54", "cg55", "cg56", "cg57", "cg58", "cg6", "cg7", "cg8", "cg9"] = ["norm_drho", "ex_unif", "alphanorm_drho", "tau_w", "epsilon_cGGA_1_0", "A_s1", "A_s2", "znorm_drho", "Hnorm_drho", "tnorm_drho", "tau_wnorm_drho", "k_s", "epsilon_cGGA_0_1", "e_c_u_1_s1", "rs_s1rho", "tildeq_btau", "epsilon_cRevPKZBrho", "rs_s1", "phi_s1", "k_f_s1", "k_s_s1", "t_s1", "rs_s2", "k_s_s2", "A_s2rho", "t_s2", "alpharho", "tildeq_brho", "k_f_s1rho", "tildeq_bnorm_drho", "phi_s2", "epsilon_cGGArho", "tau_wrho", "epsilon_cRevPKZBtau", "pnorm_drho", "e_c_u_0", "epsilon_cRevPKZBnorm_drho", "epsilon_cGGA", "epsilon_cRevPKZB", "t_s1rho", "A_s1rho", "mbnorm_drho", "alphatau", "t_s1norm_drho", "t_s2norm_drho", "e_c_u_1_s1rho", "tildeq_b", "manorm_drho", "e_c_u_0rho", "A_3", "p_3", "beta_1_3", "beta_2_3", "beta_3_3", "beta_4_3", "r_eqs_lda4", "e_c_u_1_s2", "rs_s2rho", "t_s2rho", "e_c_u_1_s2rho"]
doubleprecision function cg58 (rho, cg, tau) doubleprecision d doubleprecision alpha_1_1 doubleprecision beta_1_1 doubleprecision beta_2_1 doubleprecision beta_3_1 doubleprecision beta_4_1 doubleprecision alpha_1_2 doubleprecision beta_1_2 doubleprecision beta_2_2 doubleprecision beta_3_2 doubleprecision beta_4_2 doubleprecision mu doubleprecision b doubleprecision c doubleprecision p_1 doubleprecision A_1 doubleprecision p_2 doubleprecision A_2 doubleprecision kappa doubleprecision beta doubleprecision e_var doubleprecision gamma_var doubleprecision scale_ec doubleprecision scale_ex doubleprecision deriv_norm_drho doubleprecision deriv_rho doubleprecision deriv_tau doubleprecision my_rho doubleprecision my_norm_drho doubleprecision energy doubleprecision my_tau common d, alpha_1_1, beta_1_1, beta_2_1, beta_3_1, beta_4_1, alp #ha_1_2, beta_1_2, beta_2_2, beta_3_2, beta_4_2, mu, b, c, p_1, A_1 #, p_2, A_2, kappa, beta, e_var, gamma_var, scale_ec, scale_ex, der #iv_norm_drho, deriv_rho, deriv_tau, my_rho, my_norm_drho, energy, #my_tau doubleprecision rho doubleprecision cg doubleprecision tau doubleprecision t177 doubleprecision t294 doubleprecision t220 doubleprecision t252 doubleprecision t267 doubleprecision t151 doubleprecision t542 doubleprecision t194 doubleprecision t9 doubleprecision t437 doubleprecision t445 doubleprecision t325 integer t13 doubleprecision t14 doubleprecision cg0 doubleprecision rsrho doubleprecision t280 doubleprecision t281 doubleprecision t284 doubleprecision t286 doubleprecision t288 doubleprecision t290 doubleprecision t213 doubleprecision cg1 doubleprecision ma doubleprecision mb doubleprecision cg2 doubleprecision t569 logical t571 doubleprecision t574 doubleprecision marho doubleprecision cg3 doubleprecision mbrho doubleprecision cg4 doubleprecision z doubleprecision cg5 doubleprecision t799 doubleprecision t629 integer t5 doubleprecision t39 doubleprecision cg6 doubleprecision t256 doubleprecision t385 doubleprecision rs doubleprecision t277 doubleprecision t327 doubleprecision t328 doubleprecision t472 doubleprecision t475 doubleprecision cg7 doubleprecision t211 doubleprecision t212 doubleprecision t303 doubleprecision t253 doubleprecision t642 doubleprecision t645 doubleprecision t78 doubleprecision t536 doubleprecision t295 doubleprecision cg8 doubleprecision t16 doubleprecision t58 doubleprecision t60 doubleprecision t279 doubleprecision cg9 doubleprecision cg10 doubleprecision t26 doubleprecision t28 doubleprecision cg11 doubleprecision t77 doubleprecision t36 doubleprecision alpha doubleprecision t79 doubleprecision t80 doubleprecision t221 doubleprecision t223 doubleprecision t224 doubleprecision t226 doubleprecision t227 doubleprecision t230 doubleprecision t231 doubleprecision t233 doubleprecision t329 doubleprecision cg12 doubleprecision cg13 doubleprecision t585 doubleprecision t489 doubleprecision t490 doubleprecision cg14 doubleprecision t19 doubleprecision t20 doubleprecision t21 doubleprecision t127 doubleprecision t134 doubleprecision t138 doubleprecision cg15 doubleprecision t29 doubleprecision t450 doubleprecision t404 doubleprecision Fx doubleprecision cg16 doubleprecision cg17 doubleprecision t630 doubleprecision t637 logical t639 doubleprecision t41 doubleprecision t351 doubleprecision t35 integer t12 doubleprecision t293 doubleprecision t430 integer t1 doubleprecision t268 doubleprecision t49 integer t2 doubleprecision t119 doubleprecision t112 doubleprecision cg18 doubleprecision t505 doubleprecision t403 doubleprecision t410 doubleprecision t411 doubleprecision t419 doubleprecision t215 doubleprecision cg19 doubleprecision t337 doubleprecision t340 doubleprecision t343 doubleprecision t386 doubleprecision t390 doubleprecision t395 doubleprecision t396 doubleprecision cg20 doubleprecision t107 integer t111 doubleprecision t319 doubleprecision t322 doubleprecision cg21 doubleprecision cg22 doubleprecision t301 doubleprecision t302 doubleprecision t305 doubleprecision t307 doubleprecision t310 doubleprecision t313 doubleprecision t316 doubleprecision t84 doubleprecision cg23 doubleprecision cg24 doubleprecision cg25 doubleprecision cg26 doubleprecision cg27 doubleprecision cg28 doubleprecision cg29 doubleprecision cg30 doubleprecision t464 doubleprecision t546 doubleprecision t216 doubleprecision cg31 doubleprecision t55 doubleprecision t260 doubleprecision t263 doubleprecision t85 doubleprecision cg32 doubleprecision t391 doubleprecision t547 doubleprecision t549 doubleprecision t554 doubleprecision t555 doubleprecision t184 doubleprecision t186 doubleprecision t187 doubleprecision t189 doubleprecision t190 doubleprecision t191 doubleprecision t193 doubleprecision cg33 doubleprecision t100 doubleprecision t101 doubleprecision t398 doubleprecision t218 doubleprecision cg34 doubleprecision t161 doubleprecision t168 doubleprecision cg35 doubleprecision t406 doubleprecision t140 doubleprecision t143 doubleprecision t145 doubleprecision t146 doubleprecision t147 doubleprecision t152 doubleprecision cg36 doubleprecision cg37 doubleprecision t291 doubleprecision t73 doubleprecision t299 doubleprecision zrho doubleprecision cg38 doubleprecision t331 doubleprecision t625 doubleprecision t604 doubleprecision t7 doubleprecision t71 doubleprecision t513 doubleprecision t517 doubleprecision cg39 doubleprecision t22 doubleprecision cg40 doubleprecision t219 doubleprecision cg41 doubleprecision cg42 doubleprecision t94 doubleprecision t95 doubleprecision t96 doubleprecision cg43 doubleprecision cg44 doubleprecision t485 doubleprecision t234 doubleprecision t370 doubleprecision t67 doubleprecision cg45 doubleprecision t541 doubleprecision t208 doubleprecision t209 doubleprecision t344 doubleprecision t452 doubleprecision cg46 doubleprecision t235 doubleprecision t557 doubleprecision t561 doubleprecision t562 doubleprecision cg47 doubleprecision cg48 doubleprecision t42 doubleprecision t204 doubleprecision t205 doubleprecision ztau doubleprecision t doubleprecision A doubleprecision t264 doubleprecision t265 doubleprecision t269 doubleprecision t271 doubleprecision t272 doubleprecision t274 doubleprecision t275 doubleprecision t276 doubleprecision t371 doubleprecision t376 doubleprecision t383 doubleprecision t27 doubleprecision trho doubleprecision Arho doubleprecision prho integer t3 integer t4 doubleprecision p doubleprecision cg49 doubleprecision t659 doubleprecision cg50 doubleprecision t6 doubleprecision t609 doubleprecision t610 doubleprecision t614 doubleprecision t615 doubleprecision t617 doubleprecision t622 doubleprecision t623 doubleprecision t238 doubleprecision t239 doubleprecision t241 doubleprecision t242 doubleprecision t243 doubleprecision cg51 doubleprecision t245 doubleprecision t246 doubleprecision t248 doubleprecision t249 doubleprecision t254 doubleprecision t196 doubleprecision t197 doubleprecision t198 doubleprecision t199 doubleprecision t201 doubleprecision t202 doubleprecision t89 doubleprecision t278 my_rho = rho my_norm_drho = cg t1 = 3 ** (0.1D1 / 0.3D1) t2 = 4 ** (0.1D1 / 0.3D1) t3 = t2 ** 2 t4 = t1 * t3 t5 = 2 ** (0.1D1 / 0.3D1) t6 = 0.1D1 / 0.3141592654D1 t7 = 0.1D1 / rho t9 = (t6 * t7) ** (0.1D1 / 0.3D1) cg23 = dble(t4) * dble(t5) * t9 / 0.4D1 t12 = t5 ** 2 cg24 = dble(t12) / 0.2D1 t13 = t1 * t12 t14 = 0.3141592654D1 ** 2 t16 = (t14 * rho) ** (0.1D1 / 0.3D1) cg25 = dble(t13) * t16 / 0.2D1 t19 = sqrt(cg25 * t6) cg26 = 0.2D1 * t19 t20 = 0.1D1 / cg24 t21 = cg * t20 t22 = 0.1D1 / cg26 cg27 = t21 * t22 * t7 / 0.2D1 cg28 = cg23 cg35 = cg24 t26 = sqrt(cg25 * t6) cg29 = 0.2D1 * t26 t27 = 0.1D1 / cg35 t28 = cg * t27 t29 = 0.1D1 / cg29 cg30 = t28 * t29 * t7 / 0.2D1 t35 = 0.1D1 / A_1 t36 = sqrt(cg28) t39 = t36 * cg28 t41 = p_1 + 0.1D1 t42 = cg28 ** t41 t49 = log(0.1D1 + t35 / (beta_1_1 * t36 + beta_2_1 * cg28 + beta #_3_1 * t39 + beta_4_1 * t42) / 0.2D1) t55 = sqrt(cg23) t58 = t55 * cg23 t60 = cg23 ** t41 t67 = log(0.1D1 + t35 / (beta_1_1 * t55 + beta_2_1 * cg23 + beta #_3_1 * t58 + beta_4_1 * t60) / 0.2D1) t71 = 0.1D1 + alpha_1_2 * cg28 t73 = 0.1D1 / A_2 t77 = p_2 + 0.1D1 t78 = cg28 ** t77 t79 = beta_4_2 * t78 t80 = beta_1_2 * t36 + beta_2_2 * cg28 + beta_3_2 * t39 + t79 t84 = 0.1D1 + t73 / t80 / 0.2D1 t85 = log(t84) cg6 = -0.2D1 * A_2 * t71 * t85 t89 = 0.1D1 + alpha_1_2 * cg23 t94 = cg23 ** t77 t95 = beta_4_2 * t94 t96 = beta_1_2 * t55 + beta_2_2 * cg23 + beta_3_2 * t58 + t95 t100 = 0.1D1 + t73 / t96 / 0.2D1 t101 = log(t100) cg2 = -0.2D1 * A_2 * t89 * t101 t107 = 0.1D1 / cg52 t111 = cg53 + 1 t112 = cg28 ** t111 t119 = log(0.1D1 + t107 / (cg54 * t36 + cg55 * cg28 + cg56 * t39 # + cg57 * t112) / 0.2D1) t127 = cg23 ** t111 t134 = log(0.1D1 + t107 / (cg54 * t55 + cg55 * cg23 + cg56 * t58 # + cg57 * t127) / 0.2D1) rs = dble(t4) * t9 / 0.4D1 t138 = 0.1D1 + alpha_1_1 * rs t140 = sqrt(rs) t143 = t140 * rs t145 = rs ** t41 t146 = beta_4_1 * t145 t147 = beta_1_1 * t140 + beta_2_1 * rs + beta_3_1 * t143 + t146 t151 = 0.1D1 + t35 / t147 / 0.2D1 t152 = log(t151) cg4 = -0.2D1 * A_1 * t138 * t152 t161 = rs ** t77 t168 = log(0.1D1 + t73 / (beta_1_2 * t140 + beta_2_2 * rs + beta #_3_2 * t143 + beta_4_2 * t161) / 0.2D1) t177 = rs ** t111 t184 = log(0.1D1 + t107 / (cg54 * t140 + cg55 * rs + cg56 * t143 # + cg57 * t177) / 0.2D1) t186 = 0.1D1 / gamma_var t187 = beta * t186 t189 = cg24 ** 2 t190 = t189 * cg24 t191 = 0.1D1 / t190 t193 = exp(-cg2 * t186 * t191) t194 = t193 - 0.1D1 cg12 = t187 / t194 t196 = gamma_var * t190 t197 = cg27 ** 2 t198 = cg12 * t197 t199 = 0.1D1 + t198 t201 = cg12 ** 2 t202 = t197 ** 2 t204 = 0.1D1 + t198 + t201 * t202 t205 = 0.1D1 / t204 t208 = 0.1D1 + t187 * t197 * t199 * t205 t209 = log(t208) cg11 = cg2 + t196 * t209 t211 = cg35 ** 2 t212 = t211 * cg35 t213 = 0.1D1 / t212 t215 = exp(-cg6 * t186 * t213) t216 = t215 - 0.1D1 cg13 = t187 / t216 t218 = gamma_var * t212 t219 = cg30 ** 2 t220 = cg13 * t219 t221 = t220 + 0.1D1 t223 = cg13 ** 2 t224 = t219 ** 2 t226 = 0.1D1 + t220 + t223 * t224 t227 = 0.1D1 / t226 t230 = 0.1D1 + t187 * t219 * t221 * t227 t231 = log(t230) cg19 = cg6 + t218 * t231 t233 = sqrt(dble(t1) * t16 * t6) cg18 = 0.2D1 * t233 t234 = 0.1D1 / cg18 t235 = cg * t234 t = t235 * t7 / 0.2D1 t238 = exp(-cg4 * t186) t239 = -0.1D1 + t238 A = t187 / t239 t241 = t ** 2 t242 = A * t241 t243 = 0.1D1 + t242 t245 = A ** 2 t246 = t241 ** 2 t248 = 0.1D1 + t242 + t245 * t246 t249 = 0.1D1 / t248 t252 = 0.1D1 + t187 * t241 * t243 * t249 t253 = log(t252) cg41 = cg4 + gamma_var * t253 t254 = cg ** 2 cg10 = t254 * t7 / 0.8D1 my_tau = max(tau, cg10) ma = max(cg11, cg41) mb = max(cg19, cg41) t256 = cg10 ** 2 t260 = ma / 0.2D1 + mb / 0.2D1 t263 = 0.53D0 * cg41 * t256 - 0.153D1 * t256 * t260 t264 = my_tau ** 2 t265 = 0.1D1 / t264 cg42 = cg41 + t263 * t265 t267 = rho * cg42 t268 = d * cg42 t269 = t256 * cg10 t271 = 0.1D1 / t264 / my_tau t272 = t269 * t271 t274 = 0.1D1 + t268 * t272 t275 = t254 * dble(t1) t276 = t14 ** (0.1D1 / 0.3D1) t277 = t276 ** 2 t278 = 0.1D1 / t277 t279 = rho ** 2 t280 = rho ** (0.1D1 / 0.3D1) t281 = t280 ** 2 t284 = t278 / t281 / t279 p = t275 * t284 / 0.12D2 t286 = 0.1D1 / my_tau z = cg10 * t286 t288 = 0.1D1 / z - 0.1D1 alpha = 0.5D1 / 0.3D1 * p * t288 t290 = alpha - 0.1D1 t291 = b * alpha t293 = 0.1D1 + t291 * t290 t294 = sqrt(t293) t295 = 0.1D1 / t294 cg5 = 0.9D1 / 0.20D2 * t290 * t295 + 0.2D1 / 0.3D1 * p t299 = z ** 2 t301 = 0.1D1 + t299 t302 = t301 ** 2 t303 = 0.1D1 / t302 t305 = 0.10D2 / 0.81D2 + c * t299 * t303 t307 = cg5 ** 2 t310 = p ** 2 t313 = sqrt(0.18D2 * t299 + 0.50D2 * t310) t316 = 0.1D1 / kappa t319 = sqrt(e_var) t322 = e_var * mu t325 = t305 * p + 0.146D3 / 0.2025D4 * t307 - 0.73D2 / 0.4050D4 #* cg5 * t313 + 0.100D3 / 0.6561D4 * t316 * t310 + 0.4D1 / 0.45D2 * # t319 * t299 + t322 * t310 * p t327 = 0.1D1 + t319 * p t328 = t327 ** 2 t329 = 0.1D1 / t328 t331 = 0.1D1 + t325 * t329 * t316 Fx = 0.1D1 + kappa - kappa / t331 cg0 = -0.3D1 / 0.4D1 * dble(t1) * t16 * t6 t337 = rho * cg0 energy = scale_ec * t267 * t274 + scale_ex * t337 * Fx t340 = t9 ** 2 t343 = 0.1D1 / t279 t344 = 0.1D1 / t340 * t6 * t343 rsrho = -dble(t4) * t344 / 0.12D2 t351 = t147 ** 2 cg51 = -0.2D1 * A_1 * alpha_1_1 * rsrho * t152 + t138 / t351 * ( #beta_1_1 / t140 * rsrho / 0.2D1 + beta_2_1 * rsrho + 0.3D1 / 0.2D1 # * beta_3_1 * t140 * rsrho + t146 * t41 * rsrho / rs) / t151 t370 = t16 ** 2 t371 = 0.1D1 / t370 t376 = cg18 ** 2 trho = -cg / t376 * t7 / t233 * dble(t1) * t371 * t14 * t6 / 0.6 #D1 - t235 * t343 / 0.2D1 t383 = gamma_var ** 2 t385 = beta / t383 t386 = t239 ** 2 Arho = t385 / t386 * cg51 * t238 t390 = t187 * t t391 = t243 * t249 t395 = Arho * t241 t396 = A * t t398 = 0.2D1 * t396 * trho t403 = t187 * t241 t404 = t248 ** 2 t406 = t243 / t404 t410 = t241 * t t411 = t245 * t410 t419 = 0.1D1 / t252 cg36 = cg51 + gamma_var * (0.2D1 * t390 * t391 * trho + t187 * t #241 * (t395 + t398) * t249 - t403 * t406 * (t395 + t398 + 0.2D1 * #A * t246 * Arho + 0.4D1 * t411 * trho)) * t419 cg37 = -t254 * t343 / 0.8D1 prho = -0.2D1 / 0.9D1 * t275 * t278 / t281 / t279 / rho zrho = cg37 * t286 t430 = p / t299 cg31 = 0.5D1 / 0.3D1 * prho * t288 - 0.5D1 / 0.3D1 * t430 * zrho t437 = t290 / t294 / t293 cg32 = 0.9D1 / 0.20D2 * cg31 * t295 - 0.9D1 / 0.40D2 * t437 * (b # * cg31 * t290 + t291 * cg31) + 0.2D1 / 0.3D1 * prho t445 = c * z t450 = c * t299 * z t452 = 0.1D1 / t302 / t301 t464 = cg5 / t313 t472 = t316 * p t475 = t319 * z t485 = t325 / t328 / t327 t489 = t331 ** 2 t490 = 0.1D1 / t489 cg20 = -dble(t4) * dble(t5) * t344 / 0.12D2 cg33 = dble(t13) * t371 * t14 / 0.6D1 t505 = cg26 ** 2 cg43 = -t21 / t505 * t7 / t19 * cg33 * t6 / 0.2D1 - t21 * t22 * #t343 / 0.2D1 t513 = A_2 * alpha_1_2 t517 = t96 ** 2 cg49 = -0.2D1 * t513 * cg20 * t101 + t89 / t517 * (beta_1_2 / t5 #5 * cg20 / 0.2D1 + beta_2_2 * cg20 + 0.3D1 / 0.2D1 * beta_3_2 * t5 #5 * cg20 + t95 * t77 * cg20 / cg23) / t100 t536 = t194 ** 2 cg44 = t385 / t536 * cg49 * t191 * t193 t541 = t187 * cg27 t542 = t199 * t205 t546 = cg44 * t197 t547 = cg12 * cg27 t549 = 0.2D1 * t547 * cg43 t554 = t187 * t197 t555 = t204 ** 2 t557 = t199 / t555 t561 = t197 * cg27 t562 = t201 * t561 t569 = 0.1D1 / t208 t571 = cg41 .lt. cg11 marho = myIF(t571, cg49 + t196 * (0.2D1 * t541 * t542 * cg43 + t #187 * t197 * (t546 + t549) * t205 - t554 * t557 * (t546 + t549 + 0 #.2D1 * cg12 * t202 * cg44 + 0.4D1 * t562 * cg43)) * t569, cg36) cg7 = cg20 t574 = cg29 ** 2 cg8 = -t28 / t574 * t7 / t26 * cg33 * t6 / 0.2D1 - t28 * t29 * t #343 / 0.2D1 t585 = t80 ** 2 cg9 = -0.2D1 * t513 * cg7 * t85 + t71 / t585 * (beta_1_2 / t36 * # cg7 / 0.2D1 + beta_2_2 * cg7 + 0.3D1 / 0.2D1 * beta_3_2 * t36 * c #g7 + t79 * t77 * cg7 / cg28) / t84 t604 = t216 ** 2 cg3 = t385 / t604 * cg9 * t213 * t215 t609 = t187 * cg30 t610 = t221 * t227 t614 = cg3 * t219 t615 = cg13 * cg30 t617 = 0.2D1 * t615 * cg8 t622 = t187 * t219 t623 = t226 ** 2 t625 = t221 / t623 t629 = t219 * cg30 t630 = t223 * t629 t637 = 0.1D1 / t230 t639 = cg41 .lt. cg19 mbrho = myIF(t639, cg9 + t218 * (0.2D1 * t609 * t610 * cg8 + t18 #7 * t219 * (t614 + t617) * t227 - t622 * t625 * (t614 + t617 + 0.2 #D1 * cg13 * t224 * cg3 + 0.4D1 * t630 * cg8)) * t637, cg36) t642 = cg41 * cg10 t645 = cg10 * t260 cg22 = cg36 + (0.53D0 * cg36 * t256 + 0.106D1 * t642 * cg37 - 0. #306D1 * t645 * cg37 - 0.153D1 * t256 * (marho / 0.2D1 + mbrho / 0. #2D1)) * t265 t659 = t256 * t271 deriv_rho = scale_ec * (cg42 * t274 + rho * cg22 * t274 + t267 * # (d * cg22 * t272 + 0.3D1 * t268 * t659 * cg37)) + scale_ex * (cg0 # * Fx - rho * 0.3141592654D1 * dble(t1) * t371 * Fx / 0.4D1 + t337 # * t490 * (((0.2D1 * t445 * t303 * zrho - 0.4D1 * t450 * t452 * zr #ho) * p + t305 * prho + 0.292D3 / 0.2025D4 * cg5 * cg32 - 0.73D2 / # 0.4050D4 * cg32 * t313 - 0.73D2 / 0.8100D4 * t464 * (0.36D2 * z * # zrho + 0.100D3 * p * prho) + 0.200D3 / 0.6561D4 * t472 * prho + 0 #.8D1 / 0.45D2 * t475 * zrho + 0.3D1 * t322 * t310 * prho) * t329 - # 0.2D1 * t485 * t319 * prho)) cg16 = t234 * t7 / 0.2D1 cg15 = gamma_var * (0.2D1 * t390 * t391 * cg16 + 0.2D1 * t187 * #t410 * A * cg16 * t249 - t403 * t406 * (0.2D1 * t396 * cg16 + 0.4D #1 * t411 * cg16)) * t419 cg17 = cg * t7 / 0.4D1 cg39 = cg * dble(t1) * t284 / 0.6D1 cg14 = cg17 * t286 cg1 = 0.5D1 / 0.3D1 * cg39 * t288 - 0.5D1 / 0.3D1 * t430 * cg14 cg34 = 0.9D1 / 0.20D2 * cg1 * t295 - 0.9D1 / 0.40D2 * t437 * (b #* cg1 * t290 + t291 * cg1) + 0.2D1 / 0.3D1 * cg39 cg47 = t20 * t22 * t7 / 0.2D1 cg50 = myIF(t571, t196 * (0.2D1 * t541 * t542 * cg47 + 0.2D1 * t #187 * t561 * cg12 * cg47 * t205 - t554 * t557 * (0.2D1 * t547 * cg #47 + 0.4D1 * t562 * cg47)) * t569, cg15) cg48 = t27 * t29 * t7 / 0.2D1 cg45 = myIF(t639, t218 * (0.2D1 * t609 * t610 * cg48 + 0.2D1 * t #187 * t629 * cg13 * cg48 * t227 - t622 * t625 * (0.2D1 * t615 * cg #48 + 0.4D1 * t630 * cg48)) * t637, cg15) cg40 = cg15 + (0.53D0 * cg15 * t256 + 0.106D1 * t642 * cg17 - 0. #306D1 * t645 * cg17 - 0.153D1 * t256 * (cg50 / 0.2D1 + cg45 / 0.2D #1)) * t265 deriv_norm_drho = scale_ec * (rho * cg40 * t274 + t267 * (d * cg #40 * t272 + 0.3D1 * t268 * t659 * cg17)) + scale_ex * t337 * t490 #* (((0.2D1 * t445 * t303 * cg14 - 0.4D1 * t450 * t452 * cg14) * p #+ t305 * cg39 + 0.292D3 / 0.2025D4 * cg5 * cg34 - 0.73D2 / 0.4050D #4 * cg34 * t313 - 0.73D2 / 0.8100D4 * t464 * (0.36D2 * z * cg14 + #0.100D3 * p * cg39) + 0.200D3 / 0.6561D4 * t472 * cg39 + 0.8D1 / 0 #.45D2 * t475 * cg14 + 0.3D1 * t322 * t310 * cg39) * t329 - 0.2D1 * # t485 * t319 * cg39) cg38 = -0.2D1 * t263 * t271 t799 = t264 ** 2 ztau = -cg10 * t265 cg46 = -0.5D1 / 0.3D1 * t430 * ztau cg21 = 0.9D1 / 0.20D2 * cg46 * t295 - 0.9D1 / 0.40D2 * t437 * (b # * cg46 * t290 + t291 * cg46) deriv_tau = scale_ec * (rho * cg38 * t274 + t267 * (d * cg38 * t #272 - 0.3D1 * t268 * t269 / t799)) + scale_ex * t337 * t490 * ((0. #2D1 * t445 * t303 * ztau - 0.4D1 * t450 * t452 * ztau) * p + 0.292 #D3 / 0.2025D4 * cg5 * cg21 - 0.73D2 / 0.4050D4 * cg21 * t313 - 0.7 #3D2 / 0.225D3 * t464 * z * ztau + 0.8D1 / 0.45D2 * t475 * ztau) * #t329 cg58 = deriv_tau return end

# Tests LDA

eqFx1:=z=solve(eqx8,z);
NiM+SSZlcUZ4MUc2Ii9JInpHRiUsJComSSJwR0YlIiIiLCZJJmFscGhhR0YlIiIkRioiIiYhIiJGLw==
eqs_Fx1:=[eqk1,eqk2,eqk3,eqk4,p=s^2,eqFx1,eqx7,eqk5,eqx10,eqx9];
unk(eqs_Fx1);
NiM8JEkic0c2IkkmYWxwaGFHRiU=
r_Fx1:=convert(CompSeq(locals=loc(eqs_Fx1),params=[s,alpha],eqs_Fx1),procedure):
plot({r_Fx1(s,0),r_Fx1(s,0.1),r_Fx1(s,0.25),r_Fx1(s,0.5),r_Fx1(s,1)},s=0..3);
plot({r_Fx1(s,1),r_Fx1(s,2),r_Fx1(s,4),r_Fx1(s,10^6)},s=0..3);
indets(collect(sost(subsop(indiceDef(ex_unif,eqs_lda4)=NULL,indiceDef(tau_w,eqs_lda4)=NULL,indiceDef(z,eqs_lda4)=NULL,indiceDef(p,eqs_lda4)=NULL,[op(eqs_lda4),result=energy/rho/ex_unif])),rho),symbol);
NiM8KkkjUGlHSSpwcm90ZWN0ZWRHRiVJJHRhdUc2IkkiekdGJ0kqbm9ybV9kcmhvR0YnSShleF91bmlmR0YnSSJwR0YnSSRyaG9HRidJJnRhdV93R0Yn
getDef(rs,eqs_lda4);
NiMvSSNyc0c2IiwkKigiIiQjIiIiRigiIiUjIiIjRigqJkkjUGlHSSpwcm90ZWN0ZWRHRjAhIiJJJ215X3Job0dGJUYxRikjRipGKw==
eq_G1:=rho=solve(getDef(rs,eqs_lda4),my_rho);
NiM+SSZlcV9HMUc2Ii9JJHJob0dGJSwkKiZJI3JzR0YlISIkSSNQaUdJKnByb3RlY3RlZEdGLSEiIiMiIiQiIiU=
eqx4;
NiMvSSJzRzYiLCQqKiIiJCMiIiNGKCokSSNQaUdJKnByb3RlY3RlZEdGLSEiIkYpSSpub3JtX2RyaG9HRiUiIiJJJHJob0dGJSMhIiVGKCNGMCIiJw==
eq_G2:=norm_drho=solve(eqx4,norm_drho);
NiM+SSZlcV9HMkc2Ii9JKm5vcm1fZHJob0dGJSwkKipJInNHRiUiIiJJJHJob0dGJSMiIiUiIiRGLyNGK0YvKiRJI1BpR0kqcHJvdGVjdGVkR0YzISIiIyEiI0YvIiIj
getDef(alpha,eqs_lda4);
NiMvSSZhbHBoYUc2IiwkKiZJInBHRiUiIiIsJiokSSJ6R0YlISIiRilGLUYpRikjIiImIiIk
getDef(z,eqs_lda4);
NiMvSSJ6RzYiKiZJJnRhdV93R0YlIiIiSSdteV90YXVHRiUhIiI=
getDef(tau_w,eqs_lda4);
NiMvSSZ0YXVfd0c2IiwkKiZJLW15X25vcm1fZHJob0dGJSIiI0knbXlfcmhvR0YlISIiIyIiIiIiKQ==
eq_G3_1:=subs(getDef(z,eqs_lda4),getDef(tau_w,eqs_lda4),p=s^2,my_tau=tau,my_rho=rho,my_norm_drho=norm_drho,getDef(alpha,eqs_lda4));
NiM+SShlcV9HM18xRzYiL0kmYWxwaGFHRiUsJComSSJzR0YlIiIjLCYqKEkqbm9ybV9kcmhvR0YlISIjSSRyaG9HRiUiIiJJJHRhdUdGJUYxIiIpISIiRjFGMSMiIiYiIiQ=
eq_G3:=tau=solve(eq_G3_1,tau);
NiM+SSZlcV9HM0c2Ii9JJHRhdUdGJSwkKiosJkkmYWxwaGFHRiUiIiQqJEkic0dGJSIiIyIiJiIiIkkqbm9ybV9kcmhvR0YlRi9GLiEiI0kkcmhvR0YlISIiI0YxIiNT
eqs_G1:=[eq_G1,eq_G2,eq_G3,op(subs(s=tmp_s,alpha=tmp_alpha,rs=tmp_rs,eqs_lda4)),result=energy/(rho*ex_unif)]:
unk(eqs_G1);
NiM8Jkkic0c2IkkjUGlHSSpwcm90ZWN0ZWRHRidJI3JzR0YlSSZhbHBoYUdGJQ==
myIF:='myIF': cs_G1:=CompSeq(locals=loc(eqs_G1),params=[s,alpha,rs],evalf(eqs_G1)):
r_G1:=convert(cs_G1,procedure):
myIF:=`if`;
NiM+SSVteUlGRzYiSSNpZkdJKnByb3RlY3RlZEdGJw==
printlevel:=1: getDef(A_s1,eqs_lda4);
NiMvSSVBX3MxRzYiLCQqJkktZ2FtbWFfdmFyX3MxR0YlISIiLCYtSSRleHBHNiRJKnByb3RlY3RlZEdGLkkoX3N5c2xpYkdGJTYjLCQqKEkyZXBzaWxvbl9jX3VuaWZfczFHRiUiIiJGKEYpSSdwaGlfczFHRiUhIiRGKUY0RilGNEYpJCImRG4nISIn
printlevel:=1; r_G1(0.1^10,0,10^5);
NiM+SStwcmludGxldmVsRzYiIiIi
NiMkIismPUJ5bCIhIio=
plot({r_G1(s,0,0.0000001),r_G1(s,0,2),r_G1(s,0,10),r_G1(s,0,10^5)},s=0.1^10..3);
plot({r_G1(s,1,0.0000001),r_G1(s,1,2),r_G1(s,1,10),r_G1(s,1,10^5)},s=0..3);
Test derivs

## Test derivs and effects of violations of z<1 (norm_drho^2<8*tau*rho)

myIF:= 'myIF';
NiM+SSVteUlGRzYiRiQ=
cs_e_lda:=CompSeq(locals=loc(eqs_lda4),params=[rho,norm_drho,tau],[op(evalf(eqs_lda4)),energy]):
r_e_lda:=convert(cs_e_lda,procedure):
cs_e_rho_lda:=CompSeq(locals=loc(eqs_lda4)union {res},params=[rho,norm_drho,tau],[op(evalf(eqs_lda4)),res=deriv_rho]):
r_e_rho_lda:=convert(cs_e_rho_lda,procedure):
cs_e_ndrho_lda:=CompSeq(locals=loc(eqs_lda4),params=[rho,norm_drho,tau],[op(evalf(eqs_lda4)),deriv_norm_drho]):
r_e_ndrho_lda:=convert(cs_e_ndrho_lda,procedure):
cs_e_tau_lda:=CompSeq(locals=loc(eqs_lda4),params=[rho,norm_drho,tau], [op(evalf(eqs_lda4)),deriv_tau]):
r_e_tau_lda:=convert(cs_e_tau_lda,procedure):
caseMax_lda:=convert( CompSeq(locals=loc(eqs_lda4),params=[rho,norm_drho,tau],[op(evalf(eqs_lda4)), myIF(epsilon_cGGA_1_0 > epsilon_cGGA,1,2)*10+myIF(epsilon_cGGA_0_1 > epsilon_cGGA,1,2)]), procedure):
myIF:=proc(a,b,c) if evalf(a) then b; else c; end if; end proc;
NiM+SSVteUlGRzYiZio2JUkiYUdGJUkiYkdGJUkiY0dGJUYlRiVGJUAlLUkmZXZhbGZHSSpwcm90ZWN0ZWRHRi42IzkkOSU5JkYlRiVGJQ==
evalf(r_eqs_lda4(0.30073162,0.19290617,0.02710470));evalf(energy); my_rho:='my_rho':my_norm_drho:='my_norm_drho':my_tau:='my_tau': energy:='energy': deriv_rho:='deriv_rho':deriv_norm_drho:='deriv_norm_drho':deriv_tau:='deriv_tau':
NiMkIisoKmUkejQkISM1
NiMkISsnb24qXDwhIzU=
evalf(r_e_lda(0.30073162,0.19290617,0.02710470));
NiMkISsnb24qXDwhIzU=
evalf(r_e_lda(0.3475E+00,0.7490E-01,0.4142E-03));
NiMkIStJN04jPiMhIzU=
test_eval_e_lda:=proc(rho::numeric,norm_drho::numeric,tau::numeric,dx::numeric) local e1,er1,er2,enr1,enr2,et1,et2,cas; e1:=evalf(r_e_lda(rho,norm_drho,tau)); er1:=(evalf(r_e_lda(rho+dx,norm_drho,tau))-evalf(r_e_lda(rho-dx,norm_drho,tau)))/(2*dx); enr1:=(evalf(r_e_lda(rho,norm_drho+dx,tau))-evalf(r_e_lda(rho,norm_drho-dx,tau)))/(2*dx); et1:=(evalf(r_e_lda(rho,norm_drho,tau+dx))-evalf(r_e_lda(rho,norm_drho,tau-dx)))/(2*dx); er2:=evalf(r_e_rho_lda(rho,norm_drho,tau)); enr2:=evalf(r_e_ndrho_lda(rho,norm_drho,tau)); et2:=evalf(r_e_tau_lda(rho,norm_drho,tau)); cas:=caseMax_lda(rho,norm_drho,tau); [energy=e1,e_rho=er2,e_rho_fd=er1,e_ndrho=enr2,e_ndrho_fd=enr1,e_tau=et2,e_tau_fd=et1,caseMax=cas, err=sqrt((er1-er2)^2+(enr1-enr2)^2+(et1-et2)^2)]; end proc:
printlevel:=1; test_eval_e_lda(0.3475E+00,0.7490E-01,0.4142E-03,0.1^6);
NiM+SStwcmludGxldmVsRzYiIiIi
NiM3Ky9JJ2VuZXJneUc2IiQhK0k3TiM+IyEjNS9JJmVfcmhvR0YmJCErUElaKnkoRikvSSllX3Job19mZEdGJiQhKysrKzgkKUYpL0koZV9uZHJob0dGJiQhKyN6Mz8nW0YpL0krZV9uZHJob19mZEdGJiQhKysrKys/ISM4L0kmZV90YXVHRiYkIis/dG09ISohIiovSSllX3RhdV9mZEdGJiQiIiFGQy9JKGNhc2VNYXhHRiYiIzYvSSRlcnJHRiYkIitXVyE+LipGPw==
test_eval_e_lda(0.2694,0.5632*0.1,0.1341*0.01,0.1^6);
NiM3Ky9JJ2VuZXJneUc2IiQhK3Qrb246ISM1L0kmZV9yaG9HRiYkIStkcUspPihGKS9JKWVfcmhvX2ZkR0YmJCErKytdandGKS9JKGVfbmRyaG9HRiYkISteOzljV0YpL0krZV9uZHJob19mZEdGJiQhKysrKys1ISM4L0kmZV90YXVHRiYkIis2P2FAJikhIiovSSllX3RhdV9mZEdGJiQiIiFGQy9JKGNhc2VNYXhHRiYiIzYvSSRlcnJHRiYkIistb0lMJilGPw==
test_eval_e_lda(0.1761*0.1,0.2970*0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kmZV9yaG9HRiYkIStxKW9VVSkhIicvSSllX3Job19mZEdGJiQhKysrIWZVKUYuL0koZV9uZHJob0dGJiQiK1djbFBKISIlL0krZV9uZHJob19mZEdGJiQiKys/bFBKRjcvSSZlX3RhdUdGJiQhKy0qb0klPSEiIi9JKWVfdGF1X2ZkR0YmJCErc0JpJTMjRkAvSShjYXNlTWF4R0YmIiM2L0kkZXJyR0YmJCIrK1pgOkMhIiM=
printlevel:=1;myIF:='myIF':
NiM+SStwcmludGxldmVsRzYiIiIi
getDef(ma,eqs_lda4);
NiMvSSNtYUc2Ii1JJG1heEdJKnByb3RlY3RlZEdGKDYkSTFlcHNpbG9uX2NHR0FfMV8wR0YlSS1lcHNpbG9uX2NHR0FHRiU=
my_eq:=getDef(epsilon_cRevPKZB,eqs_lda4);
NiM+SSZteV9lcUc2Ii9JMWVwc2lsb25fY1JldlBLWkJHRiUsJiomSS1lcHNpbG9uX2NHR0FHRiUiIiIsJkYrRisqJkkmdGF1X3dHRiUiIiNJJHRhdUdGJSEiIyQiI2BGMUYrRisqKEYuRi9GMEYxLCZJI21hR0YlI0YrRi9JI21iR0YlRjdGKyQhJGAiRjE=
collect(subs(tau=tau_w/red_taui,my_eq),red_taui);
NiMvSTFlcHNpbG9uX2NSZXZQS1pCRzYiLCYqJiwoSS1lcHNpbG9uX2NHR0FHRiUkIiNgISIjSSNtYUdGJSQhKysrK113ISM1SSNtYkdGJUYuIiIiSSlyZWRfdGF1aUdGJSIiI0YyRilGMg==
my_eq1:=-0.4126139659e-1*(1+0.53*0.9667680180e-5^2/tau^2)-1.53*(-0.1985255142e-1)*0.9667680180e-5^2/(tau+10^(-12))^2;
NiM+SSdteV9lcTFHNiIsKCQhK2YnUmg3JSEjNiIiIiokSSR0YXVHRiUhIiMkISs8QCNSLyMhI0AqJCwmRixGKiNGKiIuKysrKysrIkYqRi0kIisiWzkqUUdGMA==
plot(my_eq1,tau=0.1^6..0.1^4);
printlevel:=5;
NiM+SStwcmludGxldmVsRzYiIiIm
plot((0.9667680180e-5/tau)^2,tau=0.1^6..0.1^4);
evalf(r_e_lda(0.1776*0.1,0.1172*0.1^2,0.7*0.1^6));
`{--> enter `, r_e_lda, `, args = `, 0.1776e-1, `, `, 0.1172e-2, `, `, 0\ .7e-6
NiM+SSdjaGlfczFHNiIkIiIiIiIh
NiM+SSZyc19zMUc2IiQiK3J6cSYqSCEiKg==
NiM+SStlX2NfdV8wX3MxRzYiJCErME92J3AkISM2
NiM+SStlX2NfdV8xX3MxRzYiJCErJXAyQio+ISM2
NiM+SSthbHBoYV9jX3MxRzYiJCIrLnpyJlIkISM2
NiM+SSpmX2lpXzBfczFHNiIkIitMNCMqNDwhIio=
NiM+SSVmX3MxRzYiJCIiIiIiIQ==
NiM+STJlcHNpbG9uX2NfdW5pZl9zMUc2IiQhKyVwMkIqPiEjNg==
NiM+SShiZXRhX3MxRzYiJCImRG4nISIn
NiM+SS1nYW1tYV92YXJfczFHNiIkIisnM3AhNEohIzY=
NiM+SSdwaGlfczFHNiIkIitnXytQeiEjNQ==
NiM+SSdrX2ZfczFHNiIkIitRKGZqUychIzU=
NiM+SSdrX3NfczFHNiIkIitXdF5KISohIzU=
NiM+SSV0X3MxRzYiJCIrIXBnSGclISM2
NiM+SSVBX3MxRzYiJCIrWCVmbUMpISM1
NiM+SSVIX3MxRzYiJCIrIz1fRDAoISM5
NiM+STFlcHNpbG9uX2NHR0FfMV8wRzYiJCErVV5EJik+ISM2
NiM+SSdjaGlfczJHNiIkISIiIiIh
NiM+SSZyc19zMkc2IiQiK3J6cSYqSCEiKg==
NiM+SStlX2NfdV8wX3MyRzYiJCErME92J3AkISM2
NiM+SStlX2NfdV8xX3MyRzYiJCErJXAyQio+ISM2
NiM+SSthbHBoYV9jX3MyRzYiJCIrLnpyJlIkISM2
NiM+SSpmX2lpXzBfczJHNiIkIitMNCMqNDwhIio=
NiM+SSVmX3MyRzYiJCIiIiIiIQ==
NiM+STJlcHNpbG9uX2NfdW5pZl9zMkc2IiQ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M+SSZlY3RhdUc2IiQhK11mMkNMIiIh
NiM+SSV6dGF1RzYiJCErYmYqSCg+ISIj
NiM+SSlhbHBoYXRhdUc2IiQiK3InKSkzKUchIig=
NiM+SSx0aWxkZXFfYnRhdUc2IiQiKzk5JVsuIiEiKA==
NiM+SSV4dGF1RzYiJCErJkcvJltnISIj
NiM+SSZGeHRhdUc2IiQhKyRlUGEieiEiJg==
NiM+SSpleF9sZGF0YXVHNiIkIitATyUpM0YhIig=
NiM+SSpkZXJpdl90YXVHNiIkISt6YzJDTCIiIQ==
NiMkIis0Y1B2SyEiKA==
`<-- exit `, r_e_lda, ` (now at top level`, `) = `, 327.5375609, `}`
NiMkIis0Y1B2SyEiKA==
evalf(r_e_lda(0.1776*0.1,0.1172*0.1^2,0.1^5));
`{--> enter `, r_e_lda, `, args = `, 0.1776e-1, `, `, 0.1172e-2, `, `, 0\ .1e-4
NiM+SSdjaGlfczFHNiIkIiIiIiIh
NiM+SSZyc19zMUc2IiQiK3J6cSYqSCEiKg==
NiM+SStlX2NfdV8wX3MxRzYiJCErME92J3AkISM2
NiM+SStlX2NfdV8xX3MxRzYiJCErJXAyQio+ISM2
NiM+SSthbHBoYV9jX3MxRzYiJCIrLnpyJlIkISM2
NiM+SSpmX2lpXzBfczFHNiIkIitMNCMqNDwhIio=
NiM+SSVmX3MxRzYiJCIiIiIiIQ==
NiM+STJlcHNpbG9uX2NfdW5pZl9zMUc2IiQhKyVwMkIqPiEjNg==
NiM+SShiZXRhX3MxRzYiJCImRG4nISIn
NiM+SS1nYW1tYV92YXJfczFHNiIkIisnM3AhNEohIzY=
NiM+SSdwaGlfczFHNiIkIitnXytQeiEjNQ==
NiM+SSdrX2ZfczFHNiIkIitRKGZqUychIzU=
NiM+SSdrX3NfczFHNiIkIitXdF5KISohIzU=
NiM+SSV0X3MxRzYiJCIrIXBnSGclISM2
NiM+SSVBX3MxRzYiJCIrWCVmbUMpISM1
NiM+SSVIX3MxRzYiJCIrIz1fRDAoISM5
NiM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Mybm9ybV9kcmhvRzYiJCIrN1J4KzchIzU=
NiM+STplcHNpbG9uX2NHR0FfMF8xbm9ybV9kcmhvRzYiJCIrN1J4KzchIzU=
NiM+SSxtYm5vcm1fZHJob0c2IiQiKzdSeCs3ISM1
NiM+STplcHNpbG9uX2NSZXZQS1pCbm9ybV9kcmhvRzYiJCIrLi02OUYhIik=
NiM+SSxlY25vcm1fZHJob0c2IiQiKylHWS5jJyEjNQ==
NiM+STBkZXJpdl9ub3JtX2RyaG9HNiIkISs8QDs2TCEjNQ==
NiM+STRlcHNpbG9uX2NSZXZQS1pCdGF1RzYiJCErSVopKiplIiEiJw==
NiM+SSZlY3RhdUc2IiQhK18lW08lUSEiKQ==
NiM+SSV6dGF1RzYiJCErIT0hb24nKiEiJg==
NiM+SSlhbHBoYXRhdUc2IiQiK3UnKSkzKUchIig=
NiM+SSx0aWxkZXFfYnRhdUc2IiQiKz1WP1A1ISIo
NiM+SSV4dGF1RzYiJCErbikpeiRRIyEiJg==
NiM+SSZGeHRhdUc2IiQhKyVRTigqbyIhIiY=
NiM+SSpleF9sZGF0YXVHNiIkIis7MW0jeSYhIik=
NiM+SSpkZXJpdl90YXVHNiIkIitrQCxSPiEiKQ==
NiMkIStARiIqKVIlISM3
`<-- exit `, r_e_lda, ` (now at top level`, `) = `, -0.4398912721e-2, `}\ `
NiMkIStARiIqKVIlISM3
proc() local dx; dx:=0.1^6; (evalf(r_e_lda(0.30073162+dx,0.19290617,0.02710470))-evalf(r_e_lda(0.30073162-dx,0.19290617,0.02710470)))/(2*dx); end proc();
NiMkISsrKyt2dCEjNQ==
evalf(r_e_ndrho_lda(0.30073162,0.19290617,0.02710470));
NiMkISsxcz1gJikhIzY=
proc() local dx; dx:=0.1^6; (evalf(r_e_lda(0.30073162,0.19290617+dx,0.02710470))-evalf(r_e_lda(0.30073162,0.19290617-dx,0.02710470)))/(2*dx); end proc();
NiMkISsrKytiJikhIzY=
evalf(r_e_tau_lda(0.30073162,0.19290617,0.02710470));
NiMkIisoKmUkejQkISM1
proc() local dx; dx:=0.1^6; (evalf(r_e_lda(0.30073162,0.19290617,0.02710470+dx))-evalf(r_e_lda(0.30073162,0.19290617,0.02710470-dx)))/(2*dx); end proc();
NiMkIisrKyspNCQhIzU=

# LSD

unk(eqs_ex_lda);
NiM8JkkjUGlHSSpwcm90ZWN0ZWRHRiVJJHRhdUc2Ikkqbm9ybV9kcmhvR0YnSSRyaG9HRic=
eqs_ex_lda_nc:=rmDefs(costanti,eqs_ex_lda):
eqs_ex_lda_nc;
Tau -> tau_a correct? Calculate exchange separately (do ispin=1,2....)?
eqs_ex_s1:=subs(op(map(x->x=x||_sp1,loc(eqs_ex_lda_nc))),rho=2*rhoa,norm_drho=2*norm_drhoa,tau=2*tau_a, eqs_ex_lda_nc):
unk(eqs_ex_s1);
NiM8K0kmdGF1X2FHNiJJI1BpR0kqcHJvdGVjdGVkR0YnSSNtdUdGJUkiYkdGJUkiY0dGJUkma2FwcGFHRiVJJmVfdmFyR0YlSSVyaG9hR0YlSStub3JtX2RyaG9hR0Yl
eqs_ex_s2:=subs(op(map(x->x=x||_sp2,loc(eqs_ex_lda_nc))),rho=2*rhob,norm_drho=2*norm_drhob,tau=2*tau_b, eqs_ex_lda_nc):
unk(eqs_ex_s2);
NiM8K0kjUGlHSSpwcm90ZWN0ZWRHRiVJI211RzYiSSJiR0YnSSJjR0YnSSZrYXBwYUdGJ0kmZV92YXJHRidJJnRhdV9iR0YnSSVyaG9iR0YnSStub3JtX2RyaG9iR0Yn
unk(eqs_c2);
NiM8KkkjUGlHSSpwcm90ZWN0ZWRHRiVJJHRhdUc2Ikkqbm9ybV9kcmhvR0YnSSRyaG9HRidJJXJob2FHRidJJXJob2JHRidJK25vcm1fZHJob2FHRidJK25vcm1fZHJob2JHRic=
eqs_lsd0:=[rho=rhoa+rhob,tau=tau_a+tau_b,op(eqs_ex_s1),op(eqs_ex_s2),op(eqs_c2),energy=scale_ex*(ex_lda_sp1/2+ex_lda_sp2/2)+scale_ec*ec]: eqs_lsd1:=rmDefs(costanti,eqs_lsd0):
unk(eqs_lsd1)minus {op(costanti)};
NiM8KkkmdGF1X2FHNiJJI1BpR0kqcHJvdGVjdGVkR0YnSSpub3JtX2RyaG9HRiVJJnRhdV9iR0YlSSVyaG9hR0YlSSVyaG9iR0YlSStub3JtX2RyaG9hR0YlSStub3JtX2RyaG9iR0Yl
ima:=indiceDef(ma,eqs_lsd1); imb:=indiceDef(mb,eqs_lsd1);
NiM+SSRpbWFHNiIiI28=
NiM+SSRpbWJHNiIiI3A=
eqMa:=eqs_lsd1[ima]; eqMb:=eqs_lsd1[imb];
NiM+SSVlcU1hRzYiL0kjbWFHRiUtSSRtYXhHSSpwcm90ZWN0ZWRHRio2JEkxZXBzaWxvbl9jR0dBXzFfMEdGJUktZXBzaWxvbl9jR0dBR0Yl
NiM+SSVlcU1iRzYiL0kjbWJHRiUtSSRtYXhHSSpwcm90ZWN0ZWRHRio2JEkxZXBzaWxvbl9jR0dBXzBfMUdGJUktZXBzaWxvbl9jR0dBR0Yl
eqMas:=[ma=epsilon_cGGA,ma=epsilon_cGGA_1_0]: eqMbs:=[mb=epsilon_cGGA,mb=epsilon_cGGA_0_1]:
arg_lsd_names:=[rhoa,rhob,norm_drhoa,norm_drhob,norm_drho,tau_a,tau_b];
NiM+SS5hcmdfbHNkX25hbWVzRzYiNylJJXJob2FHRiVJJXJob2JHRiVJK25vcm1fZHJob2FHRiVJK25vcm1fZHJob2JHRiVJKm5vcm1fZHJob0dGJUkmdGF1X2FHRiVJJnRhdV9iR0Yl
for i from 1 to 2 do for j from 1 to 2 do deriv_lsd[i,j]:=calcDerivs(subsop(ima=eqMas[i],imb=eqMbs[j],eqs_lsd1),arg_lsd_names): end do; end do; i:='i':j:='j':
ims:= proc(eqs)local i,i1,i2; i1:=[indiceDef(ma,eqs), indiceDef(mb,eqs), op(map(x->indiceDef(x,eqs),[`||`(ma,arg_lsd_names[i])$i=1..5])), op(map(x->indiceDef(x,eqs),[`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yfmVwc2lsb25fY1JldlBLWkJub3JtX2RyaG82Ig==
NiVROGluY29tcGF0aWJpbGl0eX5iZXR3ZWVuNiIiIz0iIz8=
NiNRTGRlZn5kaWZmZXJlbnR+Zm9yfmVwc2lsb25fY1JldlBLWkJub3JtX2RyaG82Ig==
NiVROGluY29tcGF0aWJpbGl0eX5iZXR3ZWVuNiIiIz0iI0A=
NiNRTGRlZn5kaWZmZXJlbnR+Zm9yfmVwc2lsb25fY1JldlBLWkJub3JtX2RyaG82Ig==
NiVROGluY29tcGF0aWJpbGl0eX5iZXR3ZWVuNiIiIz4iIz8=
NiNRTGRlZn5kaWZmZXJlbnR+Zm9yfmVwc2lsb25fY1JldlBLWkJub3JtX2RyaG82Ig==
NiVROGluY29tcGF0aWJpbGl0eX5iZXR3ZWVuNiIiIz4iI0A=
NiNRTGRlZn5kaWZmZXJlbnR+Zm9yfmVwc2lsb25fY1JldlBLWkJub3JtX2RyaG82Ig==
NiVROGluY29tcGF0aWJpbGl0eX5iZXR3ZWVuNiIiIz8iI0A=
NiNJJmZhbHNlR0kqcHJvdGVjdGVkR0Yk
myEq1:=getDef(epsilon_cRevPKZBrhoa,eqss_lsd2[2]);
op([2,2,1,6,4,5],myEq1);
NiMqKEklcmhvYkc2IiIiIkkkcmhvR0YlISIiSSdtYnJob2FHRiVGJg==
myEq2:=getDef(epsilon_cRevPKZBrhoa,eqss_lsd2[4]);
evalb(subsop([2,2,1,6,4,5]=0,myEq1)=myEq2);
NiNJJXRydWVHSSpwcm90ZWN0ZWRHRiQ=
myEq1:=getDef(epsilon_cRevPKZBrhob,eqss_lsd2[6]);
op([2,2,1,6,4,2],myEq1);
NiMqKEklcmhvYUc2IiIiIkkkcmhvR0YlISIiSSdtYXJob2JHRiVGJg==
myEq2:=getDef(epsilon_cRevPKZBrhob,eqss_lsd2[7]);
evalb(subsop([2,2,1,6,4,2]=0,myEq1)=myEq2);
NiNJJXRydWVHSSpwcm90ZWN0ZWRHRiQ=
myEq1:=getDef(ep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LEkmdGF1X3dHRiUiIiNGLCooRi1GLEYuRi8sJiooSSVyaG9hR0YlRixJJHJob0dGJSEiIkkjbWFHRiVGLEYsKihJJXJob2JHRiVGLEY0RjVJI21iR0YlRixGLEYsRjVGLEkkdGF1R0YlISIj
myEq2:=getDef(epsilon_cRevPKZBnorm_drhob,eqss_lsd2[16]);
NiM+SSZteUVxMkc2Ii9JO2Vwc2lsb25fY1JldlBLWkJub3JtX2RyaG9iR0YlKiYsKCooSS1lcHNpbG9uX2NHR0FHRiUiIiJJNENfY2hpX2Vwc25vcm1fZHJob2JHRiVGLEkmdGF1X3dHRiUiIiNGLCooRi1GLEYuRi8sJiooSSVyaG9hR0YlRixJJHJob0dGJSEiIkkjbWFHRiVGLEYsKihJJXJob2JHRiVGLEY0RjVJI21iR0YlRixGLEYsRjUqLCwmRixGLEkqQ19jaGlfZXBzR0YlRixGLEYuRi9GOEYsRjRGNUktbWJub3JtX2RyaG9iR0YlRixGNUYsSSR0YXVHRiUhIiM=
op([2,1,3],myEq2);
NiMsJCosLCYiIiJGJkkqQ19jaGlfZXBzRzYiRiZGJkkmdGF1X3dHRigiIiNJJXJob2JHRihGJkkkcmhvR0YoISIiSS1tYm5vcm1fZHJob2JHRihGJkYt
evalb(subsop([2,1,3]=0,myEq2)=myEq1);
NiNJJXRydWVHSSpwcm90ZWN0ZWRHRiQ=
myEq1:=getDef(epsilon_cRevPKZBnorm_drho,eqss_lsd2[18]);
op([2,2,1,6,4,1],myEq1);
NiMqKEklcmhvYUc2IiIiIkkkcmhvR0YlISIiSSxtYW5vcm1fZHJob0dGJUYm
myEq2:=getDef(epsilon_cRevPKZBnorm_drho,eqss_lsd2[19]);
NiM+SSZteUVxMkc2Ii9JOmVwc2lsb25fY1JldlBLWkJub3JtX2RyaG9HRiUsJkk2ZXBzaWxvbl9jR0dBbm9ybV9kcmhvR0YlIiIiKiYsLiooRilGKkkqQ19jaGlfZXBzR0YlRipJJnRhdV93R0YlIiIjRioqKEktZXBzaWxvbl9jR0dBR0YlRipJM0NfY2hpX2Vwc25vcm1fZHJob0dGJUYqRi9GMEYqKipGMkYqRi5GKkYvRipJL3RhdV93bm9ybV9kcmhvR0YlRipGMCooRjNGKkYvRjAsJiooSSVyaG9hR0YlRipJJHJob0dGJSEiIkkjbWFHRiVGKkYqKihJJXJob2JHRiVGKkY6RjtJI21iR0YlRipGKkYqRjsqKiwmRipGKkYuRipGKkYvRipGN0YqRjVGKiEiIyosRkFGKkYvRjBGPkYqRjpGO0ksbWJub3JtX2RyaG9HRiVGKkY7RipJJHRhdUdGJUZCRio=
evalb(subsop([2,2,1,6,4,1]=0,myEq1)=myEq2);
NiNJJXRydWVHSSpwcm90ZWN0ZWRHRiQ=
eqss_lsd3:=subsop(10=op(11,eqss_lsd2),11=op(10,eqss_lsd2),14=op(16,eqss_lsd2),16=op(14,eqss_lsd2), eqss_lsd2):
Order sequence defs
def_eqss_lsd3:=map(definizioni,eqss_lsd3):
allDefs_eqs_lsd3:=combineDefs(def_eqss_lsd3):
eqs_lsd4:=combineEqs(allDefs_eqs_lsd3,eqss_lsd3,def_eqss_lsd3):
unk(eqs_lsd4)minus {op(costanti)};
NiM8KkkmdGF1X2FHNiJJI1BpR0kqcHJvdGVjdGVkR0YnSSpub3JtX2RyaG9HRiVJJnRhdV9iR0YlSSVyaG9hR0YlSSVyaG9iR0YlSStub3JtX2RyaG9hR0YlSStub3JtX2RyaG9iR0Yl
getDef(epsilon_cRevPKZBnorm_drhoa,eqs_lsd4); getDef(epsilon_cRevPKZBnorm_drhob,eqs_lsd4);
NiMvSTtlcHNpbG9uX2NSZXZQS1pCbm9ybV9kcmhvYUc2IiomLCgqKEktZXBzaWxvbl9jR0dBR0YlIiIiSTRDX2NoaV9lcHNub3JtX2RyaG9hR0YlRipJJnRhdV93R0YlIiIjRioqKEYrRipGLEYtLCYqKEklcmhvYUdGJUYqSSRyaG9HRiUhIiJJI21hR0YlRipGKiooSSVyaG9iR0YlRipGMkYzSSNtYkdGJUYqRipGKkYzKiwsJkYqRipJKkNfY2hpX2Vwc0dGJUYqRipGLEYtRjFGKkYyRjNJLW1hbm9ybV9kcmhvYUdGJUYqRjNGKkkkdGF1R0YlISIj
NiMvSTtlcHNpbG9uX2NSZXZQS1pCbm9ybV9kcmhvYkc2IiomLCgqKEktZXBzaWxvbl9jR0dBR0YlIiIiSTRDX2NoaV9lcHNub3JtX2RyaG9iR0YlRipJJnRhdV93R0YlIiIjRioqKEYrRipGLEYtLCYqKEklcmhvYUdGJUYqSSRyaG9HRiUhIiJJI21hR0YlRipGKiooSSVyaG9iR0YlRipGMkYzSSNtYkdGJUYqRipGKkYzKiwsJkYqRipJKkNfY2hpX2Vwc0dGJUYqRipGLEYtRjZGKkYyRjNJLW1ibm9ybV9kcmhvYkdGJUYqRjNGKkkkdGF1R0YlISIj
getDef(ma,eqs_lsd4); getDef(mb,eqs_lsd4); proc() local der; for der in [rhoa,rhob,norm_drhoa,norm_drhob,norm_drho] do print(getDef(ma||der,eqs_lsd4)); print(getDef(mb||der,eqs_lsd4)); end do; end proc();
NiMvSSNtYUc2Ii1JJG1heEdJKnByb3RlY3RlZEdGKDYkSTFlcHNpbG9uX2NHR0FfMV8wR0YlSS1lcHNpbG9uX2NHR0FHRiU=
NiMvSSNtYkc2Ii1JJG1heEdJKnByb3RlY3RlZEdGKDYkSTFlcHNpbG9uX2NHR0FfMF8xR0YlSS1lcHNpbG9uX2NHR0FHRiU=
NiMvSSdtYXJob2FHNiJJMWVwc2lsb25fY0dHQXJob2FHRiU=
NiMvSSdtYnJob2FHNiJJMWVwc2lsb25fY0dHQXJob2FHRiU=
NiMvSSdtYXJob2JHNiJJMWVwc2lsb25fY0dHQXJob2JHRiU=
NiMvSSdtYnJob2JHNiJJMWVwc2lsb25fY0dHQXJob2JHRiU=
NiMvSS1tYW5vcm1fZHJob2FHNiJJO2Vwc2lsb25fY0dHQV8xXzBub3JtX2RyaG9hR0Yl
NiMiIiE=
NiMiIiE=
NiMvSS1tYm5vcm1fZHJob2JHNiJJO2Vwc2lsb25fY0dHQV8wXzFub3JtX2RyaG9iR0Yl
NiMvSSxtYW5vcm1fZHJob0c2Ikk2ZXBzaWxvbl9jR0dBbm9ybV9kcmhvR0Yl
NiMvSSxtYm5vcm1fZHJob0c2Ikk2ZXBzaWxvbl9jR0dBbm9ybV9kcmhvR0Yl
corrMabEqs:=proc() local res,der; res:=[]; for der in [rhoa] do res:=[op(res), ma||der=myIF(epsilon_cGGA_1_0>epsilon_cGGA, epsilon_cGGA_1_0||der,epsilon_cGGA||der), mb||der=myIF(epsilon_cGGA_0_1>epsilon_cGGA, 0,epsilon_cGGA||der) ]; end do; for der in [rhob] do res:=[op(res), ma||der=myIF(epsilon_cGGA_1_0>epsilon_cGGA, 0,epsilon_cGGA||der), mb||der=myIF(epsilon_cGGA_0_1>epsilon_cGGA, epsilon_cGGA_0_1||der,epsilon_cGGA||der) ]; end do; for der in [norm_drhoa] do res:=[op(res), ma||der=myIF(epsilon_cGGA_1_0>epsilon_cGGA, epsilon_cGGA_1_0||der,0) ]; end do; for der in [norm_drhob] do res:=[op(res), mb||der=myIF(epsilon_cGGA_0_1>epsilon_cGGA, epsilon_cGGA_0_1||der,0) ]; end do; for der in [norm_drho] do res:=[op(res), ma||der=myIF(epsilon_cGGA_1_0>epsilon_cGGA, 0,epsilon_cGGA||der), mb||der=myIF(epsilon_cGGA_0_1>epsilon_cGGA, 0,epsilon_cGGA||der) ]; end do; #subs(myIF=`if`,res); end proc();
sostCorrMabEqs:=[seq(indiceDef(lhs(corrMabEqs[i]),eqs_lsd4)=(corrMabEqs[i]),i=1..nops(corrMabEqs))];
eqs_lsd5:=subsop(op(sostCorrMabEqs),eqs_lsd4):
getDef(mbrhoa,eqs_lsd5);
NiMvSSdtYnJob2FHNiItSSVteUlGR0YlNiUySS1lcHNpbG9uX2NHR0FHRiVJMWVwc2lsb25fY0dHQV8wXzFHRiUiIiFJMWVwc2lsb25fY0dHQXJob2FHRiU=
unk([op(eqs_lsd5),result=deriv_rhoa]);
eqs_lsd6:=enforceDependencies([my_tau_a=max(tau_a,norm_drhoa^2/(8*rhoa)), my_tau_b=max(tau_b,norm_drhob^2/(8*rhob)),my_rhoa=rhoa,my_rhob=rhob, my_norm_drho=min(norm_drho,8*rho*(my_tau_a+my_tau_b)),my_norm_drhoa=norm_drhoa, my_norm_drhob=norm_drhob, op(subs(tau_a=my_tau_a,tau_b=my_tau_b,rhoa=my_rhoa,rhob=my_rhob, norm_drho=my_norm_drho,norm_drhoa=my_norm_drhoa,norm_drhob=my_norm_drhob, eqs_lsd5))]):
res_eqs_lsd:={energy,deriv_rhoa,deriv_rhob,deriv_norm_drhoa,deriv_norm_drhob,deriv_norm_drho, deriv_tau_a,deriv_tau_b}; for my_symb in res_eqs_lsd do print(my_symb,unk([op(eqs_lsd6),result=my_symb])minus convert(arg_lsd_names,set)minus {op(costanti)}); end do;
NiM+SSxyZXNfZXFzX2xzZEc2IjwqSTFkZXJpdl9ub3JtX2RyaG9hR0YlSTFkZXJpdl9ub3JtX2RyaG9iR0YlSSdlbmVyZ3lHRiVJK2Rlcml2X3Job2FHRiVJK2Rlcml2X3Job2JHRiVJLGRlcml2X3RhdV9hR0YlSSxkZXJpdl90YXVfYkdGJUkwZGVyaXZfbm9ybV9kcmhvR0Yl
NiRJMWRlcml2X25vcm1fZHJob2FHNiI8I0kjUGlHSSpwcm90ZWN0ZWRHRic=
NiRJMWRlcml2X25vcm1fZHJob2JHNiI8I0kjUGlHSSpwcm90ZWN0ZWRHRic=
NiRJJ2VuZXJneUc2IjwjSSNQaUdJKnByb3RlY3RlZEdGJw==
NiRJK2Rlcml2X3Job2FHNiI8I0kjUGlHSSpwcm90ZWN0ZWRHRic=
NiRJK2Rlcml2X3Job2JHNiI8I0kjUGlHSSpwcm90ZWN0ZWRHRic=
NiRJLGRlcml2X3RhdV9hRzYiPCNJI1BpR0kqcHJvdGVjdGVkR0Yn
NiRJLGRlcml2X3RhdV9iRzYiPCNJI1BpR0kqcHJvdGVjdGVkR0Yn
NiRJMGRlcml2X25vcm1fZHJob0c2IjwjSSNQaUdJKnByb3RlY3RlZEdGJw==
glob_eqs_lsd6:={my_rhoa,my_rhob,my_norm_drho,my_norm_drhoa,my_norm_drhob,my_tau_a,my_tau_b}union res_eqs_lsd union {op(costanti)};
cs_eqs_lsd6:=CompSeq(locals=loc(eqs_lsd6)minus glob_eqs_lsd6, globals=glob_eqs_lsd6,params=[rhoa,rhob,norm_drhoa,norm_drhob,norm_drho,tau_a,tau_b],subs(Pi=pi,eqs_lsd6)): r_eqs_lsd6:=convert(cs_eqs_lsd6,procedure):

## Fortran code

Fortran(r_eqs_lsd6,defaulttype=float,optimize);
Warning, the function names {myIF} are not recognized in the target language
Warning, The following variable name replacements were made: ["cg", "cg0", "cg1", "cg10", "cg100", "cg101", "cg102", "cg103", "cg104", "cg105", "cg11", "cg12", "cg13", "cg14", "cg15", "cg16", "cg17", "cg18", "cg19", "cg2", "cg20", "cg21", "cg22", "cg23", "cg24", "cg25", "cg26", "cg27", "cg28", "cg29", "cg3", "cg30", "cg31", "cg32", "cg33", "cg34", "cg35", "cg36", "cg37", "cg38", "cg39", "cg4", "cg40", "cg41", "cg42", "cg43", "cg44", "cg45", "cg46", "cg47", "cg48", "cg49", "cg5", "cg50", "cg51", "cg52", "cg53", "cg54", "cg55", "cg56", "cg57", "cg58", "cg59", "cg6", "cg60", "cg61", "cg62", "cg63", "cg64", "cg65", "cg66", "cg67", "cg68", "cg69", "cg7", "cg70", "cg71", "cg72", "cg73", "cg74", "cg75", "cg76", "cg77", "cg78", "cg79", "cg8", "cg80", "cg81", "cg82", "cg83", "cg84", "cg85", "cg86", "cg87", "cg88", "cg89", "cg9", "cg90", "cg91", "cg92", "cg93", "cg94", "cg95", "cg96", "cg97", "cg98", "cg99"] = ["norm_drhoa", "norm_drhob", "norm_drho", "C_chi_epsrhoa", "epsilon_c_unifrhob", "rs_s2rhob", "phirhoa", "k_frhoa", "alpha_sp2rhob", "r_eqs_lsd6", "epsilon_cRevPKZBtau_a", "A_s1rhoa", "z_sp1tau_a", "e_c_u_0rhoa", "epsilon_cRevPKZBnorm_drhoa", "t_s2rhob", "alpha_sp2", "epsilon_c_unifrhoa", "k_s", "tau_a", "p_sp1rhoa", "tau_wnorm_drho", "tau_w_sp2", "ex_unif_sp2", "epsilon_cRevPKZBrhob", "tildeq_b_sp1norm_drhoa", "tildeq_b_sp2norm_drhob", "e_c_u_0", "alpha_c", "A_s1", "tau_b", "epsilon_cRevPKZBtau_b", "alpha_sp1tau_a", "t_s1rhoa", "epsilon_cGGA_0_1", "epsilon_cGGA_1_0", "A_s2rhob", "phirhob", "ex_unif_sp1", "phi_s1", "alpha_sp2tau_b", "t_s2norm_drhob", "tnorm_drho", "C_chi", "C_chi_eps", "e_c_u_1_s2", "p_sp2rhob", "k_s_s1", "t_s1", "rs_s2", "phi_s2", "k_s_s2", "tildeq_b_sp1tau_a", "t_s2", "Hnorm_drho", "z_sp2tau_b", "A_s2", "z_sp2rhob", "alpha_sp1", "t_s1norm_drhoa", "p_sp1", "z_sp1", "rs_s1rhoa", "C_chi_epsnorm_drho", "chirhob", "manorm_drho", "tau_w_sp1", "chirhoa", "epsilon_cRevPKZB", "e_c_u_1_s1", "Fx_sp1", "p_sp2", "z_sp2", "rs_s1", "C_chi_epsnorm_drhob", "manorm_drhoa", "p_sp2norm_drhob", "z_sp2norm_drhob", "mbnorm_drho", "e_c_u_1_s1rhoa", "epsilon_cGGArhoa", "tildeq_b_sp1rhoa", "epsilon_c_unif", "epsilon_cGGA", "tildeq_b_sp1", "tildeq_b_sp2tau_b", "C_chi_epsrhob", "tildeq_b_sp2", "z_sp1rhoa", "epsilon_cRevPKZBnorm_drho", "tau_w", "e_c_u_1_s2rhob", "p_sp1norm_drhoa", "z_sp1norm_drhoa", "tau_wrhob", "tildeq_b_sp2rhob", "mbnorm_drhob", "epsilon_cRevPKZBnorm_drhob", "alpha_sp1rhoa", "e_c_u_0rhob", "tau_wrhoa", "epsilon_cGGArhob", "epsilon_cRevPKZBrhoa", "Fx_sp2", "alpha_sp1norm_drhoa", "C_chi_epsnorm_drhoa", "alpha_sp2norm_drhob"]
doubleprecision function cg105 (rhoa, rhob, cg, cg0, cg1, cg2, cg3 #) doubleprecision d doubleprecision deriv_norm_drhoa doubleprecision deriv_norm_drhob doubleprecision my_norm_drhob doubleprecision my_tau_b doubleprecision mu doubleprecision b doubleprecision c doubleprecision p_1 doubleprecision A_1 doubleprecision p_2 doubleprecision A_2 doubleprecision p_3 doubleprecision A_3 doubleprecision alpha_1_1 doubleprecision beta_1_1 doubleprecision beta_2_1 doubleprecision beta_3_1 doubleprecision beta_4_1 doubleprecision alpha_1_2 doubleprecision beta_1_2 doubleprecision beta_2_2 doubleprecision beta_3_2 doubleprecision beta_4_2 doubleprecision alpha_1_3 doubleprecision beta_1_3 doubleprecision beta_2_3 doubleprecision beta_3_3 doubleprecision beta_4_3 doubleprecision scale_ec doubleprecision scale_ex doubleprecision kappa doubleprecision beta doubleprecision e_var doubleprecision f_ii_0 doubleprecision gamma_var doubleprecision energy doubleprecision deriv_rhoa doubleprecision deriv_rhob doubleprecision deriv_tau_a doubleprecision deriv_tau_b doubleprecision my_rhob doubleprecision my_rhoa doubleprecision my_tau_a doubleprecision deriv_norm_drho doubleprecision my_norm_drho doubleprecision my_norm_drhoa common d, deriv_norm_drhoa, deriv_norm_drhob, my_norm_drhob, my_ #tau_b, mu, b, c, p_1, A_1, p_2, A_2, p_3, A_3, alpha_1_1, beta_1_1 #, beta_2_1, beta_3_1, beta_4_1, alpha_1_2, beta_1_2, beta_2_2, bet #a_3_2, beta_4_2, alpha_1_3, beta_1_3, beta_2_3, beta_3_3, beta_4_3 #, scale_ec, scale_ex, kappa, beta, e_var, f_ii_0, gamma_var, energ #y, deriv_rhoa, deriv_rhob, deriv_tau_a, deriv_tau_b, my_rhob, my_r #hoa, my_tau_a, deriv_norm_drho, my_norm_drho, my_norm_drhoa doubleprecision rhoa doubleprecision rhob doubleprecision cg doubleprecision cg0 doubleprecision cg1 doubleprecision cg2 doubleprecision cg3 doubleprecision t338 doubleprecision t452 doubleprecision t9 doubleprecision t173 doubleprecision t174 doubleprecision t20 doubleprecision t331 doubleprecision t332 doubleprecision cg4 doubleprecision cg5 doubleprecision t71 doubleprecision cg6 doubleprecision t310 doubleprecision cg7 doubleprecision t668 doubleprecision t3 doubleprecision cg8 doubleprecision t407 doubleprecision t408 doubleprecision t409 doubleprecision t412 doubleprecision t414 doubleprecision t560 doubleprecision t430 doubleprecision t431 doubleprecision t437 doubleprecision t415 logical t784 integer t785 doubleprecision t239 doubleprecision eps doubleprecision t245 doubleprecision t187 doubleprecision t1162 doubleprecision t118 doubleprecision cg9 doubleprecision cg10 doubleprecision t351 doubleprecision t352 doubleprecision t355 doubleprecision t570 doubleprecision t839 doubleprecision t841 doubleprecision t846 doubleprecision t849 doubleprecision t639 doubleprecision t144 doubleprecision t196 doubleprecision cg11 doubleprecision trhob doubleprecision Arhob doubleprecision t422 doubleprecision cg12 doubleprecision t604 doubleprecision t606 doubleprecision t607 doubleprecision cg13 doubleprecision t373 doubleprecision t374 doubleprecision t375 doubleprecision t377 doubleprecision t378 doubleprecision cg14 doubleprecision t215 doubleprecision t216 doubleprecision t217 doubleprecision t395 doubleprecision t397 doubleprecision t398 doubleprecision t280 doubleprecision t660 doubleprecision t663 doubleprecision t382 doubleprecision t383 doubleprecision t385 doubleprecision t386 doubleprecision t388 doubleprecision t389 doubleprecision t282 doubleprecision t285 doubleprecision t67 doubleprecision cg15 doubleprecision cg16 doubleprecision t699 doubleprecision t21 doubleprecision t86 doubleprecision t198 doubleprecision t625 doubleprecision t921 doubleprecision t250 doubleprecision t37 doubleprecision t463 doubleprecision mbrhoa doubleprecision marhoa integer t18 doubleprecision t320 doubleprecision t321 doubleprecision t326 doubleprecision t1169 doubleprecision t1170 doubleprecision t164 doubleprecision t165 doubleprecision cg17 doubleprecision marhob doubleprecision mbrhob doubleprecision t627 doubleprecision cg18 doubleprecision t103 doubleprecision t102 doubleprecision t52 doubleprecision t403 doubleprecision cg19 doubleprecision cg20 doubleprecision t305 doubleprecision t769 doubleprecision t771 doubleprecision t773 doubleprecision t775 doubleprecision t838 doubleprecision t22 doubleprecision cg21 doubleprecision t1506 doubleprecision t193 doubleprecision t464 doubleprecision t466 doubleprecision t879 doubleprecision t736 doubleprecision t739 doubleprecision cg22 doubleprecision t690 doubleprecision t691 doubleprecision mb doubleprecision cg23 doubleprecision t87 doubleprecision t478 doubleprecision t479 doubleprecision t481 doubleprecision t628 doubleprecision t632 doubleprecision t471 doubleprecision t540 doubleprecision t543 doubleprecision t107 doubleprecision t828 doubleprecision t929 doubleprecision t577 doubleprecision cg24 doubleprecision cg25 integer t5 doubleprecision cg26 doubleprecision t345 doubleprecision t346 integer t19 doubleprecision t287 doubleprecision t288 doubleprecision t289 doubleprecision t293 doubleprecision t294 doubleprecision t121 doubleprecision t111 doubleprecision cg27 doubleprecision t110 doubleprecision cg28 doubleprecision cg29 doubleprecision t716 doubleprecision t717 doubleprecision t719 doubleprecision t720 doubleprecision t581 doubleprecision t584 doubleprecision t585 doubleprecision t113 doubleprecision cg30 doubleprecision cg31 doubleprecision cg32 doubleprecision t936 doubleprecision t83 doubleprecision cg33 doubleprecision t411 doubleprecision t341 doubleprecision t678 doubleprecision t680 doubleprecision t847 doubleprecision cg34 doubleprecision t69 doubleprecision t275 doubleprecision t359 doubleprecision t360 doubleprecision t361 doubleprecision t232 doubleprecision t233 doubleprecision t234 doubleprecision t88 doubleprecision cg35 doubleprecision frhob doubleprecision cg36 doubleprecision t115 doubleprecision t882 doubleprecision t888 doubleprecision t746 doubleprecision t1121 doubleprecision phi doubleprecision cg37 doubleprecision t298 doubleprecision t583 doubleprecision cg38 integer t6 doubleprecision t618 doubleprecision t758 doubleprecision t309 logical t863 doubleprecision t41 doubleprecision cg39 doubleprecision t400 doubleprecision t366 doubleprecision t333 doubleprecision t589 doubleprecision t593 doubleprecision t404 doubleprecision t339 doubleprecision t340 integer t150 doubleprecision t109 doubleprecision t156 doubleprecision t249 doubleprecision t7 doubleprecision t222 doubleprecision t553 integer t440 doubleprecision t441 doubleprecision t442 doubleprecision t438 doubleprecision t436 doubleprecision t356 doubleprecision t427 integer t1111 integer t77 doubleprecision t364 doubleprecision t367 doubleprecision t370 doubleprecision t371 doubleprecision t343 doubleprecision cg40 doubleprecision t827 doubleprecision cg41 doubleprecision cg42 doubleprecision t328 doubleprecision t329 doubleprecision t330 doubleprecision t218 doubleprecision t672 doubleprecision t675 doubleprecision t70 doubleprecision t417 doubleprecision t419 doubleprecision t420 doubleprecision t55 doubleprecision t908 doubleprecision t492 doubleprecision cg43 doubleprecision t426 doubleprecision t130 doubleprecision cg44 doubleprecision t25 doubleprecision t1132 doubleprecision frhoa doubleprecision t392 doubleprecision t79 doubleprecision t14 doubleprecision t475 doubleprecision t15 doubleprecision t134 doubleprecision t133 doubleprecision t132 doubleprecision t703 doubleprecision t704 doubleprecision t319 doubleprecision cg45 doubleprecision cg46 doubleprecision cg47 doubleprecision cg48 doubleprecision cg49 doubleprecision cg50 doubleprecision t209 doubleprecision cg51 doubleprecision t708 doubleprecision t709 doubleprecision t711 doubleprecision t505 doubleprecision t363 doubleprecision t468 doubleprecision t470 doubleprecision t472 doubleprecision t456 doubleprecision cg52 doubleprecision cg53 doubleprecision cg54 doubleprecision t33 doubleprecision t136 doubleprecision t166 doubleprecision cg55 doubleprecision t98 doubleprecision t948 doubleprecision t455 doubleprecision t402 doubleprecision t520 doubleprecision cg56 doubleprecision cg57 doubleprecision cg58 doubleprecision t64 doubleprecision t96 doubleprecision t101 doubleprecision t532 doubleprecision t91 doubleprecision t58 doubleprecision chi doubleprecision rs doubleprecision rho doubleprecision t684 doubleprecision t686 doubleprecision t873 doubleprecision t687 doubleprecision cg59 doubleprecision ma doubleprecision t959 doubleprecision t1184 doubleprecision t1303 doubleprecision t380 integer t76 doubleprecision t650 doubleprecision t651 doubleprecision t934 doubleprecision t571 doubleprecision cg60 doubleprecision rsrhob doubleprecision t498 integer t16 doubleprecision t956 doubleprecision cg61 doubleprecision t825 doubleprecision cg62 doubleprecision t277 doubleprecision t211 integer t12 doubleprecision t853 doubleprecision t854 doubleprecision t861 doubleprecision t557 doubleprecision t558 integer t559 doubleprecision t621 doubleprecision tau doubleprecision t doubleprecision A doubleprecision t140 doubleprecision t1161 doubleprecision cg63 doubleprecision rsrhoa doubleprecision t611 doubleprecision t177 doubleprecision t457 doubleprecision t35 doubleprecision cg64 doubleprecision t833 doubleprecision t834 doubleprecision t43 doubleprecision t754 doubleprecision cg65 doubleprecision cg66 doubleprecision cg67 doubleprecision cg68 doubleprecision cg69 doubleprecision cg70 doubleprecision cg71 doubleprecision cg72 doubleprecision t969 doubleprecision t974 doubleprecision t27 doubleprecision cg73 integer t161 doubleprecision t723 doubleprecision t724 doubleprecision t735 doubleprecision t459 doubleprecision t460 doubleprecision t462 integer t147 doubleprecision t44 doubleprecision t45 doubleprecision cg74 doubleprecision t348 doubleprecision t349 doubleprecision cg75 doubleprecision t766 doubleprecision t767 doubleprecision cg76 integer t2 doubleprecision cg77 doubleprecision cg78 doubleprecision t394 doubleprecision t393 doubleprecision t806 doubleprecision t227 integer t148 doubleprecision t32 doubleprecision cg79 doubleprecision cg80 doubleprecision cg81 doubleprecision t353 doubleprecision t975 doubleprecision t976 doubleprecision t167 doubleprecision t1496 doubleprecision t1500 doubleprecision t223 doubleprecision cg82 doubleprecision t423 doubleprecision cg83 doubleprecision t99 doubleprecision cg84 integer t337 doubleprecision cg85 doubleprecision cg86 doubleprecision cg87 doubleprecision cg88 doubleprecision t73 doubleprecision t272 doubleprecision t274 doubleprecision t36 doubleprecision t47 doubleprecision t381 doubleprecision t325 doubleprecision t1457 doubleprecision t893 doubleprecision t795 doubleprecision t1172 doubleprecision t449 doubleprecision t474 doubleprecision t476 integer t152 doubleprecision t238 doubleprecision t93 doubleprecision cg89 doubleprecision t458 doubleprecision t1164 integer t146 doubleprecision t416 doubleprecision cg90 doubleprecision cg91 doubleprecision t406 doubleprecision t257 doubleprecision cg92 doubleprecision t30 integer t13 doubleprecision cg93 doubleprecision cg94 doubleprecision t665 doubleprecision t205 doubleprecision t358 doubleprecision t561 doubleprecision t1043 doubleprecision t731 doubleprecision t518 doubleprecision cg95 doubleprecision cg96 doubleprecision t1151 doubleprecision t401 doubleprecision t154 doubleprecision t314 doubleprecision t265 doubleprecision t513 integer t1 doubleprecision cg97 doubleprecision t61 doubleprecision t179 doubleprecision t180 doubleprecision t49 integer t85 doubleprecision t303 doubleprecision t304 doubleprecision t597 doubleprecision t600 doubleprecision cg98 doubleprecision cg99 doubleprecision t973 doubleprecision cg100 doubleprecision cg101
doubleprecision t1156 doubleprecision t1157 doubleprecision f doubleprecision cg102 doubleprecision cg103 doubleprecision trhoa doubleprecision Arhoa doubleprecision t155 doubleprecision t914 doubleprecision cg104 doubleprecision t1070 doubleprecision t1072 doubleprecision t157 doubleprecision t1176 doubleprecision t1177 t1 = int(cg ** 2) t2 = 1 / int(rhoa) t3 = dble(t1) * dble(t2) my_tau_a = max(cg2, t3 / 0.8D1) t5 = int(cg0 ** 2) t6 = 1 / int(rhob) t7 = dble(t5) * dble(t6) my_tau_b = max(t7 / 0.8D1, cg3) my_rhoa = rhoa my_rhob = rhob my_norm_drhoa = cg my_norm_drhob = cg0 rho = rhoa + rhob t9 = my_tau_a + my_tau_b my_norm_drho = min(0.8D1 * rho * t9, cg1) tau = t9 t12 = 3 ** (0.1D1 / 0.3D1) t13 = t1 * t12 t14 = pi ** 2 t15 = t14 ** (0.1D1 / 0.3D1) t16 = int(t15 ** 2) t18 = 2 ** (0.1D1 / 0.3D1) t19 = 1 / t16 * t18 t20 = rhoa ** 2 t21 = rhoa ** (0.1D1 / 0.3D1) t22 = t21 ** 2 t25 = dble(t19) / t22 / t20 cg57 = dble(t13) * t25 / 0.24D2 cg62 = t3 / 0.4D1 t27 = 0.1D1 / my_tau_a cg58 = cg62 * t27 / 0.2D1 t30 = 0.1D1 / cg58 - 0.1D1 cg55 = 0.5D1 / 0.3D1 * cg57 * t30 t32 = cg55 - 0.1D1 t33 = b * cg55 t35 = 0.1D1 + t33 * t32 t36 = sqrt(t35) t37 = 0.1D1 / t36 cg79 = 0.9D1 / 0.20D2 * t32 * t37 + 0.2D1 / 0.3D1 * cg57 t41 = cg58 ** 2 t43 = 0.1D1 + t41 t44 = t43 ** 2 t45 = 0.1D1 / t44 t47 = 0.10D2 / 0.81D2 + c * t41 * t45 t49 = cg79 ** 2 t52 = cg57 ** 2 t55 = sqrt(0.18D2 * t41 + 0.50D2 * t52) t58 = 0.1D1 / kappa t61 = sqrt(e_var) t64 = e_var * mu t67 = t47 * cg57 + 0.146D3 / 0.2025D4 * t49 - 0.73D2 / 0.4050D4 #* cg79 * t55 + 0.100D3 / 0.6561D4 * t58 * t52 + 0.4D1 / 0.45D2 * t #61 * t41 + t64 * t52 * cg57 t69 = 0.1D1 + t61 * cg57 t70 = t69 ** 2 t71 = 0.1D1 / t70 t73 = 0.1D1 + t67 * t71 * t58 cg66 = 0.1D1 + kappa - kappa / t73 t76 = 1 / int(pi) t77 = t76 * t12 t79 = (t14 * rhoa) ** (0.1D1 / 0.3D1) cg37 = -0.3D1 / 0.4D1 * dble(t77) * dble(t18) * t79 t83 = rhoa * cg37 t85 = t5 * t12 t86 = rhob ** 2 t87 = rhob ** (0.1D1 / 0.3D1) t88 = t87 ** 2 t91 = dble(t19) / t88 / t86 cg67 = dble(t85) * t91 / 0.24D2 cg22 = t7 / 0.4D1 t93 = 0.1D1 / my_tau_b cg68 = cg22 * t93 / 0.2D1 t96 = 0.1D1 / cg68 - 0.1D1 cg17 = 0.5D1 / 0.3D1 * cg67 * t96 t98 = cg17 - 0.1D1 t99 = b * cg17 t101 = 0.1D1 + t99 * t98 t102 = sqrt(t101) t103 = 0.1D1 / t102 cg81 = 0.9D1 / 0.20D2 * t98 * t103 + 0.2D1 / 0.3D1 * cg67 t107 = cg68 ** 2 t109 = 0.1D1 + t107 t110 = t109 ** 2 t111 = 0.1D1 / t110 t113 = 0.10D2 / 0.81D2 + c * t107 * t111 t115 = cg81 ** 2 t118 = cg67 ** 2 t121 = sqrt(0.18D2 * t107 + 0.50D2 * t118) t130 = t113 * cg67 + 0.146D3 / 0.2025D4 * t115 - 0.73D2 / 0.4050 #D4 * cg81 * t121 + 0.100D3 / 0.6561D4 * t58 * t118 + 0.4D1 / 0.45D #2 * t61 * t107 + t64 * t118 * cg67 t132 = 0.1D1 + t61 * cg67 t133 = t132 ** 2 t134 = 0.1D1 / t133 t136 = 0.1D1 + t130 * t134 * t58 cg96 = 0.1D1 + kappa - kappa / t136 t140 = (t14 * rhob) ** (0.1D1 / 0.3D1) cg23 = -0.3D1 / 0.4D1 * dble(t77) * dble(t18) * t140 t144 = rhob * cg23 t146 = 4 ** (0.1D1 / 0.3D1) t147 = t146 ** 2 t148 = t12 * t147 t150 = (t76 * t2) ** (0.1D1 / 0.3D1) cg69 = dble(t148 * t150) / 0.4D1 t152 = t18 ** 2 cg38 = dble(t152) / 0.2D1 t154 = sqrt(dble(t12) * t79 * dble(t76)) cg45 = 0.2D1 * t154 t155 = 0.1D1 / cg38 t156 = cg * t155 t157 = 0.1D1 / cg45 cg46 = t156 * t157 * dble(t2) / 0.2D1 t161 = (t76 * t6) ** (0.1D1 / 0.3D1) cg47 = dble(t148 * t161) / 0.4D1 cg48 = cg38 t164 = sqrt(dble(t12) * t140 * dble(t76)) cg49 = 0.2D1 * t164 t165 = 0.1D1 / cg48 t166 = cg0 * t165 t167 = 0.1D1 / cg49 cg50 = t166 * t167 * dble(t6) / 0.2D1 t173 = 0.1D1 / A_1 t174 = sqrt(cg47) t177 = t174 * cg47 t179 = p_1 + 0.1D1 t180 = cg47 ** t179 t187 = log(0.1D1 + t173 / (beta_1_1 * t174 + beta_2_1 * cg47 + b #eta_3_1 * t177 + beta_4_1 * t180) / 0.2D1) t193 = sqrt(cg69) t196 = t193 * cg69 t198 = cg69 ** t179 t205 = log(0.1D1 + t173 / (beta_1_1 * t193 + beta_2_1 * cg69 + b #eta_3_1 * t196 + beta_4_1 * t198) / 0.2D1) t209 = 0.1D1 + alpha_1_2 * cg47 t211 = 0.1D1 / A_2 t215 = p_2 + 0.1D1 t216 = cg47 ** t215 t217 = beta_4_2 * t216 t218 = beta_1_2 * t174 + beta_2_2 * cg47 + beta_3_2 * t177 + t21 #7 t222 = 0.1D1 + t211 / t218 / 0.2D1 t223 = log(t222) cg43 = -0.2D1 * A_2 * t209 * t223 t227 = 0.1D1 + alpha_1_2 * cg69 t232 = cg69 ** t215 t233 = beta_4_2 * t232 t234 = beta_1_2 * t193 + beta_2_2 * cg69 + beta_3_2 * t196 + t23 #3 t238 = 0.1D1 + t211 / t234 / 0.2D1 t239 = log(t238) cg65 = -0.2D1 * A_2 * t227 * t239 t245 = 0.1D1 / A_3 t249 = p_3 + 0.1D1 t250 = cg47 ** t249 t257 = log(0.1D1 + t245 / (beta_1_3 * t174 + beta_2_3 * cg47 + b #eta_3_3 * t177 + beta_4_3 * t250) / 0.2D1) t265 = cg69 ** t249 t272 = log(0.1D1 + t245 / (beta_1_3 * t193 + beta_2_3 * cg69 + b #eta_3_3 * t196 + beta_4_3 * t265) / 0.2D1) t274 = rhoa - rhob t275 = 0.1D1 / rho chi = t274 * t275 t277 = (dble(t76) * t275) ** (0.1D1 / 0.3D1) rs = dble(t148) * t277 / 0.4D1 t280 = 0.1D1 + alpha_1_1 * rs t282 = sqrt(rs) t285 = t282 * rs t287 = rs ** t179 t288 = beta_4_1 * t287 t289 = beta_1_1 * t282 + beta_2_1 * rs + beta_3_1 * t285 + t288 t293 = 0.1D1 + t173 / t289 / 0.2D1 t294 = log(t293) cg27 = -0.2D1 * A_1 * t280 * t294 t298 = 0.1D1 + alpha_1_2 * rs t303 = rs ** t215 t304 = beta_4_2 * t303 t305 = beta_1_2 * t282 + beta_2_2 * rs + beta_3_2 * t285 + t304 t309 = 0.1D1 + t211 / t305 / 0.2D1 t310 = log(t309) t314 = 0.1D1 + alpha_1_3 * rs t319 = rs ** t249 t320 = beta_4_3 * t319 t321 = beta_1_3 * t282 + beta_2_3 * rs + beta_3_3 * t285 + t320 t325 = 0.1D1 + t245 / t321 / 0.2D1 t326 = log(t325) cg28 = 0.2D1 * A_3 * t314 * t326 t328 = 0.1D1 + chi t329 = t328 ** (0.1D1 / 0.3D1) t330 = t329 * t328 t331 = 0.1D1 - chi t332 = t331 ** (0.1D1 / 0.3D1) t333 = t332 * t331 t337 = 1 / (2 * t18 - 2) f = (t330 + t333 - 0.2D1) * dble(t337) t338 = cg28 * f t339 = 0.1D1 / f_ii_0 t340 = chi ** 2 t341 = t340 ** 2 t343 = t339 * (0.1D1 - t341) t345 = -0.2D1 * A_2 * t298 * t310 - cg27 t346 = t345 * f cg77 = cg27 + t338 * t343 + t346 * t341 t348 = 0.1D1 / gamma_var t349 = beta * t348 t351 = cg38 ** 2 t352 = t351 * cg38 t353 = 0.1D1 / t352 t355 = exp(-cg65 * t348 * t353) t356 = t355 - 0.1D1
cg29 = t349 / t356 t358 = gamma_var * t352 t359 = cg46 ** 2 t360 = cg29 * t359 t361 = 0.1D1 + t360 t363 = cg29 ** 2 t364 = t359 ** 2 t366 = 0.1D1 + t360 + t363 * t364 t367 = 0.1D1 / t366 t370 = 0.1D1 + t349 * t359 * t361 * t367 t371 = log(t370) cg34 = cg65 + t358 * t371 t373 = cg48 ** 2 t374 = t373 * cg48 t375 = 0.1D1 / t374 t377 = exp(-cg43 * t348 * t375) t378 = t377 - 0.1D1 cg53 = t349 / t378 t380 = gamma_var * t374 t381 = cg50 ** 2 t382 = cg53 * t381 t383 = 0.1D1 + t382 t385 = cg53 ** 2 t386 = t381 ** 2 t388 = 0.1D1 + t382 + t385 * t386 t389 = 0.1D1 / t388 t392 = 0.1D1 + t349 * t381 * t383 * t389 t393 = log(t392) cg33 = cg43 + t380 * t393 t394 = t329 ** 2 t395 = t332 ** 2 phi = t394 / 0.2D1 + t395 / 0.2D1 t397 = t14 * rho t398 = t397 ** (0.1D1 / 0.3D1) t400 = sqrt(dble(t12) * t398 * dble(t76)) cg19 = 0.2D1 * t400 t401 = 0.1D1 / phi t402 = my_norm_drho * t401 t403 = 0.1D1 / cg19 t404 = t403 * t275 t = t402 * t404 / 0.2D1 t406 = cg77 * t348 t407 = phi ** 2 t408 = t407 * phi t409 = 0.1D1 / t408 t411 = exp(-t406 * t409) t412 = t411 - 0.1D1 A = t349 / t412 t414 = gamma_var * t408 t415 = t ** 2 t416 = A * t415 t417 = 0.1D1 + t416 t419 = A ** 2 t420 = t415 ** 2 t422 = 0.1D1 + t416 + t419 * t420 t423 = 0.1D1 / t422 t426 = 0.1D1 + t349 * t415 * t417 * t423 t427 = log(t426) cg78 = cg77 + t414 * t427 t430 = rhoa * rhob t431 = my_norm_drho ** 2 t436 = sqrt(dble(t1) * t86 + dble(t5) * t20 - t430 * t431 + t430 # * dble(t1) + t430 * dble(t5)) t437 = rho ** 2 t438 = 0.1D1 / t437 t440 = t12 ** 2 t441 = 0.2D1 * t436 * t438 * dble(t440) t442 = 0.1D1 / t398 eps = t441 * t442 / 0.6D1 cg41 = 0.53D0 + 0.87D0 * t340 + 0.5D0 * t341 + 0.226D1 * t341 * #t340 cg84 = t431 * t275 / 0.8D1 t449 = eps ** 2 t452 = 0.1D1 / t330 + 0.1D1 / t333 t455 = 0.1D1 + t449 * t452 / 0.2D1 t456 = t455 ** 2 t457 = t456 ** 2 t458 = 0.1D1 / t457 cg42 = cg41 * t458 ma = max(cg34, cg78) mb = max(cg33, cg78) t459 = cg78 * cg42 t460 = cg84 ** 2 t462 = 0.1D1 + cg42 t463 = t462 * t460 t464 = rhoa * t275 t466 = rhob * t275 t468 = t464 * ma + t466 * mb t470 = t459 * t460 - t463 * t468 t471 = tau ** 2 t472 = 0.1D1 / t471 cg64 = cg78 + t470 * t472 t474 = rho * cg64 t475 = d * cg64 t476 = t460 * cg84 t478 = 0.1D1 / t471 / tau t479 = t476 * t478 t481 = 0.1D1 + t475 * t479 energy = scale_ex * (t83 * cg66 + t144 * cg96) + scale_ec * t474 # * t481 cg20 = -dble(t13) * dble(t19) / t22 / t20 / rhoa / 0.9D1 t492 = 0.1D1 / t20 cg82 = -dble(t1) * t492 * t27 / 0.8D1 t498 = cg57 / t41 cg91 = 0.5D1 / 0.3D1 * cg20 * t30 - 0.5D1 / 0.3D1 * t498 * cg82 t505 = t32 / t36 / t35 cg76 = 0.9D1 / 0.20D2 * cg91 * t37 - 0.9D1 / 0.40D2 * t505 * (b #* cg91 * t32 + t33 * cg91) + 0.2D1 / 0.3D1 * cg20 t513 = c * cg58 t518 = c * t41 * cg58 t520 = 0.1D1 / t44 / t43 t532 = cg79 / t55 t540 = t58 * cg57 t543 = t61 * cg58 t553 = t67 / t70 / t69 t557 = t73 ** 2 t558 = 0.1D1 / t557 t559 = pi * t12 t560 = t79 ** 2 t561 = 0.1D1 / t560 t570 = t274 * t438 cg63 = t275 - t570 t571 = t277 ** 2 rsrhoa = -dble(t148) / t571 * dble(t76) * t438 / 0.12D2 t577 = A_1 * alpha_1_1 t581 = t289 ** 2 t583 = t280 / t581 t584 = 0.1D1 / t282 t585 = beta_1_1 * t584 t589 = beta_3_1 * t282 t593 = 0.1D1 / rs t597 = 0.1D1 / t293 cg14 = -0.2D1 * t577 * rsrhoa * t294 + t583 * (t585 * rsrhoa / 0 #.2D1 + beta_2_1 * rsrhoa + 0.3D1 / 0.2D1 * t589 * rsrhoa + t288 * #t179 * rsrhoa * t593) * t597 t600 = A_2 * alpha_1_2 t604 = t305 ** 2 t606 = t298 / t604 t607 = beta_1_2 * t584 t611 = beta_3_2 * t282 t618 = 0.1D1 / t309 t621 = A_3 * alpha_1_3 t625 = t321 ** 2 t627 = t314 / t625 t628 = beta_1_3 * t584 t632 = beta_3_3 * t282 t639 = 0.1D1 / t325 frhoa = (0.4D1 / 0.3D1 * t329 * cg63 - 0.4D1 / 0.3D1 * t332 * cg #63) * dble(t337) t650 = t340 * chi t651 = t339 * t650 t660 = t650 * cg63 cg18 = cg14 + (0.2D1 * t621 * rsrhoa * t326 - t627 * (t628 * rsr #hoa / 0.2D1 + beta_2_3 * rsrhoa + 0.3D1 / 0.2D1 * t632 * rsrhoa + #t320 * t249 * rsrhoa * t593) * t639) * f * t343 + cg28 * frhoa * t #343 - 0.4D1 * t338 * t651 * cg63 + (-0.2D1 * t600 * rsrhoa * t310 #+ t606 * (t607 * rsrhoa / 0.2D1 + beta_2_2 * rsrhoa + 0.3D1 / 0.2D #1 * t611 * rsrhoa + t304 * t215 * rsrhoa * t593) * t618 - cg14) * #f * t341 + t345 * frhoa * t341 + 0.4D1 * t346 * t660 t663 = 0.1D1 / t329 t665 = 0.1D1 / t332 cg102 = t663 * cg63 / 0.3D1 - t665 * cg63 / 0.3D1 t668 = t398 ** 2 cg103 = dble(t12) / t668 * t14 / 0.3D1 t672 = 0.1D1 / t400 t675 = my_norm_drho / t407 t678 = cg19 ** 2 t680 = 0.1D1 / t678 * t275 t684 = t402 * t403 * t438 trhoa = -t675 * t404 * cg102 / 0.2D1 - t402 * t680 * t672 * cg10 #3 * dble(t76) / 0.2D1 - t684 / 0.2D1 t686 = t412 ** 2 t687 = 0.1D1 / t686 t690 = t407 ** 2 t691 = 0.1D1 / t690 Arhoa = -t349 * t687 * (-cg18 * t348 * t409 + 0.3D1 * t406 * t69 #1 * cg102) * t411 t699 = gamma_var * t407 t703 = t349 * t t704 = t417 * t423 t708 = Arhoa * t415 t709 = A * t t711 = 0.2D1 * t709 * trhoa t716 = t349 * t415 t717 = t422 ** 2 t719 = t417 / t717 t720 = A * t420 t723 = t415 * t t724 = t419 * t723 t731 = 0.1D1 / t426 cg75 = cg18 + 0.3D1 * t699 * t427 * cg102 + t414 * (0.2D1 * t703 # * t704 * trhoa + t349 * t415 * (t708 + t711) * t423 - t716 * t719 # * (t708 + t711 + 0.2D1 * t720 * Arhoa + 0.4D1 * t724 * trhoa)) * #t731 t735 = 0.1D1 / t436 * t438 t736 = dble(t5) * rhoa t739 = rhob * dble(t1) t746 = 0.4D1 * t436 / t437 / rho t754 = t441 / t398 / t397 * t14 / 0.18D2 t758 = t341 * chi cg93 = -t431 * t438 / 0.8D1 t766 = cg41 / t457 / t455 t767 = eps * t452 t769 = t328 ** 2 t771 = 0.1D1 / t329 / t769 t773 = t331 ** 2 t775 = 0.1D1 / t332 / t773 cg10 = (0.174D1 * chi * cg63 + 0.20D1 * t660 + 0.1356D2 * t758 * # cg63) * t458 - 0.4D1 * t766 * (t767 * ((t735 * (0.2D1 * t736 - rh #ob * t431 + t739 + rhob * dble(t5)) - t746) * dble(t440) * t442 / #0.6D1 - t754) + t449 * (-0.4D1 / 0.3D1 * t771 * cg63 + 0.4D1 / 0.3 #D1 * t775 * cg63) / 0.2D1) t784 = cg78 .lt. cg33 mbrhoa = myIF(t784, 0, cg75) t785 = t150 ** 2 cg59 = -dble(t148) / dble(t785) * dble(t76) * t492 / 0.12D2 t795 = cg45 ** 2 cg32 = -t156 / t795 * dble(t2) / t154 * dble(t12) * t561 * t14 * # dble(t76) / 0.6D1 - t156 * t157 * t492 / 0.2D1 t806 = t234 ** 2 cg74 = -0.2D1 * t600 * cg59 * t239 + t227 / t806 * (beta_1_2 / t #193 * cg59 / 0.2D1 + beta_2_2 * cg59 + 0.3D1 / 0.2D1 * beta_3_2 * #t193 * cg59 + t233 * t215 * cg59 / cg69) / t238 t825 = gamma_var ** 2 t827 = beta / t825 t828 = t356 ** 2 cg12 = t827 / t828 * cg74 * t353 * t355 t833 = t349 * cg46 t834 = t361 * t367 t838 = cg12 * t359 t839 = cg29 * cg46 t841 = 0.2D1 * t839 * cg32 t846 = t349 * t359 t847 = t366 ** 2 t849 = t361 / t847 t853 = t359 * cg46 t854 = t363 * t853 t861 = 0.1D1 / t370 t863 = cg78 .lt. cg34 marhoa = myIF(t863, cg74 + t358 * (0.2D1 * t833 * t834 * cg32 + #t349 * t359 * (t838 + t841) * t367 - t846 * t849 * (t838 + t841 + #0.2D1 * cg29 * t364 * cg12 + 0.4D1 * t854 * cg32)) * t861, cg75) t873 = t462 * cg84 t879 = rhoa * t438 * ma t882 = rhob * t438 * mb cg95 = cg75 + (cg75 * cg42 * t460 + cg78 * cg10 * t460 + 0.2D1 * # t459 * cg84 * cg93 - cg10 * t460 * t468 - 0.2D1 * t873 * t468 * c #g93 - t463 * (t275 * ma - t879 + t464 * marhoa - t882 + t466 * mbr #hoa)) * t472 t888 = cg64 * t481 t893 = t460 * t478 deriv_rhoa = scale_ex * (0.2D1 * cg37 * cg66 - rhoa * dble(t559) # * dble(t18) * t561 * cg66 / 0.2D1 + 0.2D1 * t83 * t558 * (((0.2D1 # * t513 * t45 * cg82 - 0.4D1 * t518 * t520 * cg82) * cg57 + t47 * #cg20 + 0.292D3 / 0.2025D4 * cg79 * cg76 - 0.73D2 / 0.4050D4 * cg76 # * t55 - 0.73D2 / 0.8100D4 * t532 * (0.36D2 * cg58 * cg82 + 0.100D #3 * cg57 * cg20) + 0.200D3 / 0.6561D4 * t540 * cg20 + 0.8D1 / 0.45 #D2 * t543 * cg82 + 0.3D1 * t64 * t52 * cg20) * t71 - 0.2D1 * t553 #* t61 * cg20)) / 0.2D1 + scale_ec * (t888 + rho * cg95 * t481 + t4 #74 * (d * cg95 * t479 + 0.3D1 * t475 * t893 * cg93)) cg44 = -dble(t85) * dble(t19) / t88 / t86 / rhob / 0.9D1 t908 = 0.1D1 / t86 cg54 = -dble(t5) * t908 * t93 / 0.8D1 t914 = cg67 / t107 cg104 = 0.5D1 / 0.3D1 * cg44 * t96 - 0.5D1 / 0.3D1 * t914 * cg54 t921 = t98 / t102 / t101 cg89 = 0.9D1 / 0.20D2 * cg104 * t103 - 0.9D1 / 0.40D2 * t921 * ( #b * cg104 * t98 + t99 * cg104) + 0.2D1 / 0.3D1 * cg44 t929 = c * cg68 t934 = c * t107 * cg68 t936 = 0.1D1 / t110 / t109 t948 = cg81 / t121 t956 = t58 * cg67 t959 = t61 * cg68 t969 = t130 / t133 / t132 t973 = t136 ** 2 t974 = 0.1D1 / t973 t975 = t140 ** 2 t976 = 0.1D1 / t975 cg60 = -t275 - t570 rsrhob = rsrhoa cg92 = -0.2D1 * t577 * rsrhob * t294 + t583 * (t585 * rsrhob / 0 #.2D1 + beta_2_1 * rsrhob + 0.3D1 / 0.2D1 * t589 * rsrhob + t288 * #t179 * rsrhob * t593) * t597 frhob = (0.4D1 / 0.3D1 * t329 * cg60 - 0.4D1 / 0.3D1 * t332 * cg #60) * dble(t337) t1043 = t650 * cg60 cg100 = cg92 + (0.2D1 * t621 * rsrhob * t326 - t627 * (t628 * rs #rhob / 0.2D1 + beta_2_3 * rsrhob + 0.3D1 / 0.2D1 * t632 * rsrhob + # t320 * t249 * rsrhob * t593) * t639) * f * t343 + cg28 * frhob * #t343 - 0.4D1 * t338 * t651 * cg60 + (-0.2D1 * t600 * rsrhob * t310 # + t606 * (t607 * rsrhob / 0.2D1 + beta_2_2 * rsrhob + 0.3D1 / 0.2 #D1 * t611 * rsrhob + t304 * t215 * rsrhob * t593) * t618 - cg92) * # f * t341 + t345 * frhob * t341 + 0.4D1 * t346 * t1043 cg36 = t663 * cg60 / 0.3D1 - t665 * cg60 / 0.3D1 trhob = -t675 * t404 * cg36 / 0.2D1 - t402 * t680 * t672 * cg103 # * dble(t76) / 0.2D1 - t684 / 0.2D1 Arhob = -t349 * t687 * (-cg100 * t348 * t409 + 0.3D1 * t406 * t6 #91 * cg36) * t411 t1070 = Arhob * t415 t1072 = 0.2D1 * t709 * trhob cg94 = cg100 + 0.3D1 * t699 * t427 * cg36 + t414 * (0.2D1 * t703 # * t704 * trhob + t349 * t415 * (t1070 + t1072) * t423 - t716 * t7 #19 * (t1070 + t1072 + 0.2D1 * t720 * Arhob + 0.4D1 * t724 * trhob) #) * t731 cg88 = cg93 cg80 = (0.174D1 * chi * cg60 + 0.20D1 * t1043 + 0.1356D2 * t758 #* cg60) * t458 - 0.4D1 * t766 * (t767 * ((t735 * (0.2D1 * t739 - r #hoa * t431 + rhoa * dble(t1) + t736) - t746) * dble(t440) * t442 / # 0.6D1 - t754) + t449 * (-0.4D1 / 0.3D1 * t771 * cg60 + 0.4D1 / 0. #3D1 * t775 * cg60) / 0.2D1) marhob = myIF(t863, 0, cg94) t1111 = t161 ** 2 cg101 = -dble(t148) / dble(t1111) * dble(t76) * t908 / 0.12D2 t1121 = cg49 ** 2 cg16 = -t166 / t1121 * dble(t6) / t164 * dble(t12) * t976 * t14 #* dble(t76) / 0.6D1 - t166 * t167 * t908 / 0.2D1 t1132 = t218 ** 2 cg85 = -0.2D1 * t600 * cg101 * t223 + t209 / t1132 * (beta_1_2 / # t174 * cg101 / 0.2D1 + beta_2_2 * cg101 + 0.3D1 / 0.2D1 * beta_3_ #2 * t174 * cg101 + t217 * t215 * cg101 / cg47) / t222 t1151 = t378 ** 2 cg35 = t827 / t1151 * cg85 * t375 * t377 t1156 = t349 * cg50 t1157 = t383 * t389 t1161 = cg35 * t381 t1162 = cg53 * cg50 t1164 = 0.2D1 * t1162 * cg16 t1169 = t349 * t381 t1170 = t388 ** 2 t1172 = t383 / t1170 t1176 = t381 * cg50 t1177 = t385 * t1176 t1184 = 0.1D1 / t392 mbrhob = myIF(t784, cg85 + t380 * (0.2D1 * t1156 * t1157 * cg16 #+ t349 * t381 * (t1161 + t1164) * t389 - t1169 * t1172 * (t1161 + #t1164 + 0.2D1 * cg53 * t386 * cg35 + 0.4D1 * t1177 * cg16)) * t118 #4, cg94) cg24 = cg94 + (cg94 * cg42 * t460 + cg78 * cg80 * t460 + 0.2D1 * # t459 * cg84 * cg88 - cg80 * t460 * t468 - 0.2D1 * t873 * t468 * c #g88 - t463 * (-t879 + t464 * marhob + t275 * mb - t882 + t466 * mb #rhob)) * t472 deriv_rhob = scale_ex * (0.2D1 * cg23 * cg96 - rhob * dble(t559) # * dble(t18) * t976 * cg96 / 0.2D1 + 0.2D1 * t144 * t974 * (((0.2D #1 * t929 * t111 * cg54 - 0.4D1 * t934 * t936 * cg54) * cg67 + t113 # * cg44 + 0.292D3 / 0.2025D4 * cg81 * cg89 - 0.73D2 / 0.4050D4 * c #g89 * t121 - 0.73D2 / 0.8100D4 * t948 * (0.36D2 * cg68 * cg54 + 0. #100D3 * cg67 * cg44) + 0.200D3 / 0.6561D4 * t956 * cg44 + 0.8D1 / #0.45D2 * t959 * cg54 + 0.3D1 * t64 * t118 * cg44) * t134 - 0.2D1 * # t969 * t61 * cg44)) / 0.2D1 + scale_ec * (t888 + rho * cg24 * t48 #1 + t474 * (d * cg24 * t479 + 0.3D1 * t475 * t893 * cg88)) cg86 = cg * dble(t12) * t25 / 0.12D2 cg87 = cg * dble(t2) * t27 / 0.4D1 cg97 = 0.5D1 / 0.3D1 * cg86 * t30 - 0.5D1 / 0.3D1 * t498 * cg87 cg25 = 0.9D1 / 0.20D2 * cg97 * t37 - 0.9D1 / 0.40D2 * t505 * (b #* cg97 * t32 + t33 * cg97) + 0.2D1 / 0.3D1 * cg86 cg56 = t155 * t157 * dble(t2) / 0.2D1 cg98 = -0.2D1 / 0.3D1 * t766 * t767 * t735 * (0.2D1 * cg * t86 + # 0.2D1 * t430 * cg) * dble(t440) * t442 cg70 = myIF(t863, t358 * (0.2D1 * t833 * t834 * cg56 + 0.2D1 * t #349 * t853 * cg29 * cg56 * t367 - t846 * t849 * (0.2D1 * t839 * cg #56 + 0.4D1 * t854 * cg56)) * t861, 0) cg15 = (cg78 * cg98 * t460 - cg98 * t460 * t468 - t463 * t464 * #cg70) * t472 t1303 = t474 * d deriv_norm_drhoa = scale_ex * t83 * t558 * (((0.2D1 * t513 * t45 # * cg87 - 0.4D1 * t518 * t520 * cg87) * cg57 + t47 * cg86 + 0.292D #3 / 0.2025D4 * cg79 * cg25 - 0.73D2 / 0.4050D4 * cg25 * t55 - 0.73 #D2 / 0.8100D4 * t532 * (0.36D2 * cg58 * cg87 + 0.100D3 * cg57 * cg #86) + 0.200D3 / 0.6561D4 * t540 * cg86 + 0.8D1 / 0.45D2 * t543 * c #g87 + 0.3D1 * t64 * t52 * cg86) * t71 - 0.2D1 * t553 * t61 * cg86) # + scale_ec * (rho * cg15 * t481 + t1303 * cg15 * t476 * t478) cg71 = cg0 * dble(t12) * t91 / 0.12D2 cg72 = cg0 * dble(t6) * t93 / 0.4D1 cg99 = 0.5D1 / 0.3D1 * cg71 * t96 - 0.5D1 / 0.3D1 * t914 * cg72 cg26 = 0.9D1 / 0.20D2 * cg99 * t103 - 0.9D1 / 0.40D2 * t921 * (b # * cg99 * t98 + t99 * cg99) + 0.2D1 / 0.3D1 * cg71 cg4 = t165 * t167 * dble(t6) / 0.2D1 cg7 = -0.2D1 / 0.3D1 * t766 * t767 * t735 * (0.2D1 * cg0 * t20 + # 0.2D1 * t430 * cg0) * dble(t440) * t442 cg9 = myIF(t784, t380 * (0.2D1 * t1156 * t1157 * cg4 + 0.2D1 * t #349 * t1176 * cg53 * cg4 * t389 - t1169 * t1172 * (0.2D1 * t1162 * # cg4 + 0.4D1 * t1177 * cg4)) * t1184, 0) cg90 = (cg78 * cg7 * t460 - cg7 * t460 * t468 - t463 * t466 * cg #9) * t472 deriv_norm_drhob = scale_ex * t144 * t974 * (((0.2D1 * t929 * t1 #11 * cg72 - 0.4D1 * t934 * t936 * cg72) * cg67 + t113 * cg71 + 0.2 #92D3 / 0.2025D4 * cg81 * cg26 - 0.73D2 / 0.4050D4 * cg26 * t121 - #0.73D2 / 0.8100D4 * t948 * (0.36D2 * cg68 * cg72 + 0.100D3 * cg67 #* cg71) + 0.200D3 / 0.6561D4 * t956 * cg71 + 0.8D1 / 0.45D2 * t959 # * cg72 + 0.3D1 * t64 * t118 * cg71) * t134 - 0.2D1 * t969 * t61 * # cg71) + scale_ec * (rho * cg90 * t481 + t1303 * cg90 * t476 * t47 #8) cg40 = t401 * t403 * t275 / 0.2D1 cg51 = t414 * (0.2D1 * t703 * t704 * cg40 + 0.2D1 * t349 * t723 #* A * cg40 * t423 - t716 * t719 * (0.2D1 * t709 * cg40 + 0.4D1 * t #724 * cg40)) * t731 cg21 = my_norm_drho * t275 / 0.4D1 cg6 = 0.4D1 / 0.3D1 * t766 * t767 * t735 * t430 * my_norm_drho * # dble(t440) * t442 cg61 = myIF(t863, 0, cg51) cg73 = myIF(t784, 0, cg51) cg83 = cg51 + (cg51 * cg42 * t460 + cg78 * cg6 * t460 + 0.2D1 * #t459 * cg84 * cg21 - cg6 * t460 * t468 - 0.2D1 * t873 * t468 * cg2 #1 - t463 * (t464 * cg61 + t466 * cg73)) * t472 deriv_norm_drho = scale_ec * (rho * cg83 * t481 + t474 * (d * cg #83 * t479 + 0.3D1 * t475 * t893 * cg21)) t1457 = my_tau_a ** 2 cg13 = -cg62 / t1457 / 0.2D1 cg31 = -0.5D1 / 0.3D1 * t498 * cg13 cg5 = 0.9D1 / 0.20D2 * cg31 * t37 - 0.9D1 / 0.40D2 * t505 * (b * # cg31 * t32 + t33 * cg31) cg11 = -0.2D1 * t470 * t478 t1496 = t471 ** 2 t1500 = 0.3D1 * t475 * t476 / t1496 deriv_tau_a = scale_ex * t83 * t558 * ((0.2D1 * t513 * t45 * cg1 #3 - 0.4D1 * t518 * t520 * cg13) * cg57 + 0.292D3 / 0.2025D4 * cg79 # * cg5 - 0.73D2 / 0.4050D4 * cg5 * t55 - 0.73D2 / 0.225D3 * t532 * # cg58 * cg13 + 0.8D1 / 0.45D2 * t543 * cg13) * t71 + scale_ec * (r #ho * cg11 * t481 + t474 * (d * cg11 * t479 - t1500)) t1506 = my_tau_b ** 2 cg52 = -cg22 / t1506 / 0.2D1 cg39 = -0.5D1 / 0.3D1 * t914 * cg52 cg8 = 0.9D1 / 0.20D2 * cg39 * t103 - 0.9D1 / 0.40D2 * t921 * (b #* cg39 * t98 + t99 * cg39) cg30 = cg11 deriv_tau_b = scale_ex * t144 * t974 * ((0.2D1 * t929 * t111 * c #g52 - 0.4D1 * t934 * t936 * cg52) * cg67 + 0.292D3 / 0.2025D4 * cg #81 * cg8 - 0.73D2 / 0.4050D4 * cg8 * t121 - 0.73D2 / 0.225D3 * t94 #8 * cg68 * cg52 + 0.8D1 / 0.45D2 * t959 * cg52) * t134 + scale_ec #* (rho * cg30 * t481 + t474 * (d * cg30 * t479 - t1500)) cg105 = deriv_tau_b return end