(* 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.548528/R;
func=T+Vne+Vee; Vir = (Vne+Vee)/T;
(* Etot, P, Q *)
t = Table[FindMinimum[func,{P,0.27},{Q,1.6},{R,2.0},{MaxIterations->200},{Method->Newton}],{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}];
PA=Table[t[[{z-5},2,1]],{z,6,18}];
QA=Table[t[[{z-5},2,2]],{z,6,18}];
RA=Table[t[[{z-5},2,3]],{z,6,18}];

Do[Show[Graphics[{Circle[{0,0},P/. PA[[i]]],Circle[{0,0},Q /. QA[[i]]],{Dashing[{0.02,0.02}],Circle[{0,-R/. RA[[i]]},R /. RA[[i]]],Circle[{-R/. RA[[i]],0},R /. RA[[i]]],Circle[{R/. RA[[i]],0},R /. RA[[i]]],Circle[{0,R/. RA[[i]]},R /. RA[[i]]]}}],{AspectRatio -> Automatic,Axes -> True,GridLines -> Automatic, PlotRange -> {{-3.6,3.6},{-3.6,3.6}}, Frame -> True}], {i,1,13}]