(* BeH2 molecule with Be[1s2 2sp], no overlap, parametrized ES 02.11.2012 *)
(* Variables: P,Q,R *)
Clear[k1,k2,s1,s2, z, P,Q,R,Vee,Vne,Vnn,Vex,T];

z=4.0;
T=k1*2.25/P^2+k2*4.5/Q^2;
Vne=-3.0*z/P-2.0*(3.0-(R/Q)^2)/Q;
Vne=Vne-4.0*z/(P+Q)-4.0/(P+Q+R)-4.0/(2*(P+Q)+R);
Vee=3.0*s1/P+6.0*s2/Q+8.0/(P+Q)+4.0/(2.0*(P+Q));
Vnn=2.0*z/(P+Q+R)+0.5/(P+Q+R);

(* Parameters in list c *)

(* c={k1 -> 1.0, k2-> 1.0, s1 -> 0.3, s2 -> 0.3}; *) 
(* c={k1 -> 1.01613950, k2 -> 0.65858068,s1-> 0.25742249,s2-> 0.22958899};*)
c={k1->1.05210521,k2-> 1.14799230,s1-> 0.25647799,s2-> 0.30796522};

func=T+Vne+Vee+Vnn /. c;

t=FindMinimum[func,{P,0.414},{Q,1.59},{R,0.517}]

u=t[[2]];

Vne /.u

Vee /.u  /. c

Vnn /. u

-(Vne+Vee+Vnn)/T /. u /.c

(P+Q+R)*0.529177 /. u

plot1=Graphics[{Circle[{0,0},P],Disk[{0,0},0.1],
			Circle[{-(P+Q),0},Q],Circle[{(P+Q),0},Q],Disk[{-(P+Q+R),0},0.1],Disk[{P+Q+R,0},0.1],
			{Thickness[0.012],Line[{{-(P+Q+R),0},{P+Q+R,0}}]}}]/. u

Show[plot1, {AspectRatio->Automatic, PlotRange->{{-4,4},{-3,3}},Axes->True,GridLines->Automatic,Frame->True}]