(* Ne-Atom and homologues 1s(2)2s(2) 2p(6) , all p equal size (?),with exchange correction page 40;8.12.2011 *)

Clear[z,sig]; sig=0.24;

T=9/(4*P^2)+9*4/(4*Q^2)+12/R^2;
Vne=-3*z/P-3*z/Q-6*z/R;
Vee=(2/Q)*(3-(6/10)*(P/Q)^2)-6*sig*P^2/Q^3 + 3*sig/P+3*sig/Q+12*(1-(3/20)*(P/R)^2+(1/32)*(P/R)^3)/R+4.5*sig/R+12*(1-(3/20)*(Q/R)^2+(1/32)*(Q/R)^3)/R+6.582336/R; (* 8.48528/R *)
func=T+Vne+Vee; Vir = (Vne+Vee)/T;

(* Etot, P, Q *)
t = Table[FindMinimum[func,{P,0.15},{Q,1.6},{R,0.6},{MaxIterations->800, Method -> "Newton"}],{z,10,18}]

(* Virial ratio *)
Table[N[Vir /. t[[{z-9},2]],10],{z ,10,18}]
Table[N[Vne /. t[[{z-9},2]],10],{z ,10,18}]
Table[N[Vee /. t[[{z-9},2]],10],{z ,10,18}]

(* Etot in eV *)
Table[N[t[[{z-9},1]]*27.21138,10],{z,10,18}];
PA=Table[t[[{z-9},2,1]],{z,10,18}];
QA=Table[t[[{z-9},2,2]],{z,10,18}];
RA=Table[t[[{z-9},2,3]],{z,10,18}];

Table[Show[Graphics[{Circle[{0,0},P/. PA[[i]]],Circle[{0,0},Q /. QA[[i]]],{Dashing[{0.01,0.01}],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]]],Circle[{0,0},R /. RA[[i]]]}}],{AspectRatio -> Automatic,Axes -> True,GridLines -> Automatic, PlotRange -> {{-2,2},{-2,2}}, Frame -> True}], {i,1,9}]