(*O-Atom and homologues to Ar[+10] 1s(2)2s(2) 2p(4), p(1), p(2) different size,with exchange correction page 40; 11.12.2011/28.04.2013 *)
Clear[z,sig]; sig=0.29;
T=0.976*9/(4*P^2)+9*4/(4*Q^2)+4/R^2+4/S^2;
Vne=-3*z/P-3*z/Q-2*z/R-2*z/S;
Vee=(2/Q)*(3-(6/10)*(P/Q)^2)-6*sig*P^2/Q^3 + 3*sig/P+3*sig/Q+1.5*sig/S+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+4*(1-(3/20)*(P/S)^2+(1/32)*(P/S)^3)/S+4*(1-(3/20)*(Q/S)^2+(1/32)*(Q/S)^3)/S+1.517767/R+1.517767/S;
func=T+Vne+Vee; Vir = (Vne+Vee)/T;

t =Table[FindMinimum[func,{P,0.1,0.2},{Q,0.4,2.0},{R,0.2,0.8},{S,0.2,0.84},{Method->Automatic,MaxIterations->800}],{z,8,18}]

(* Virial ratio *)
Table[N[Vir /. t[[{z-7},2]],10],{z ,8,18}]
Table[N[Vne /. t[[{z-7},2]],10],{z ,8,18}]
Table[N[Vee /. t[[{z-7},2]],10],{z ,8,18}]
(* Etot in eV *)
Table[N[t[[{z-7},1]]*27.21138,10],{z,8,18}];
PA=Table[t[[{z-7},2,1]],{z,8,18}];
QA=Table[t[[{z-7},2,2]],{z,8,18}];
RA=Table[t[[{z-7},2,3]],{z,8,18}];
SA=Table[t[[{z-7},2,4]],{z,8,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},S /. SA[[i]]]}}],{AspectRatio -> Automatic,Axes -> True,GridLines -> Automatic, PlotRange -> {{-2,2},{-2,2}}, Frame -> True}],{i,1,11}]