(* C-Atom and homologues 1s(2)2s(2) 2p(2) concentric spherical,with exchange correction page 40; 4.12.2011 *)
Clear[z,sig]; sig=0.29;
T=9/(4*P^2)+9*4/(4*Q^2)+4/R^2;
Vne=-3*z/P-3*z/Q-2*z/R;
Vee=(2/Q)*(3-(6/10)*(P/Q)^2)-6*sig*P^2/Q^3 + 3*sig/P+4*(1-(3/20)*(P/R)^2+(1/32)*(P/R)^3)/R+4*(1-(3/20)*(Q/R)^2+(1/32)*(Q/R)^3)/R+0.694975/R;
func=T+Vne+Vee; Vir = (Vne+Vee)/T;
(* Etot, P, Q *)
t = Table[FindMinimum[func,{P,0.22},{Q,1.0},{R,1.1},{MaxIterations->120}],{z,6,18}]
(* Virial ratio *)
Table[N[Vir /. t[[{z-5},2]],10],{z ,6,18}]
Table[N[Vne /. t[[{z-5},2]],10],{z ,6,18}]
Table[N[Vee /. t[[{z-5},2]],10],{z ,6,18}]
(* Etot in eV *)
Table[N[t[[{z-5},1]]*27.21138,10],{z,6,18}]