(* CH4 methane.  Daten von ch4_g3at.pas aus paramki 17.06.2012 *)
Clear[z,sig1,sig2,sig4,k1,k2,k4,nc,R1,R2,R3,R4,w,p,vee,vne,vnn,
pi,c,Ekin,wd,r,p2,r2];
z=6.0; 
k1=1.04605075;  k2=1.20889711;  (*sig1=0.25273353;  sig2=0.32960771;*)
sig1=0.2650207; sig2=0.30451569; sig4=sig2;
nc=5; pi=0.0; k4=k2; bohr=0.529177; rad=57.29578;
c=Sqrt[2/3]; wd=Sqrt[3.0];
(* R1=0.2667627; R2=1.2425627; p=1.3558496; *)
(* C He shell, i=j each *)
       Ekin=2.25*k1/R1^2+9.0*k2/R2^2;
       vne=-3*z/R1;    vee=3*sig1/R1;
       p2=p*p; r=R1+R2; r2=r*r;
       vne=vne-4*(3-((p-1)*(1+R1/R2))^2)/R2;
       vee=vee+4*3*sig2/R2;
       vee=vee+8*2/r;
       vne=vne-8*z/r;
       vne=vne-8/(r*p);
       vnn=4*z/(r*p);
       vee=vee+12/(c*r);
       vne=vne-24*wd/Sqrt[2*r2*p + 3*r2*p2 + 3*r2];
       vnn=vnn+3/(c*r*p);

Epot=vne+vee+vnn;
func=Ekin+Epot;
t = FindMinimum[func,{R1,0.267},{R2,1.244},{p,1.356},{Method -> Automatic}, {MaxIterations -> 500}]
(* func *)
vne /. t[[2]]
vee /. t[[2]]
vnn /. t[[2]]
-Epot/Ekin /. t[[2]]
(R1+R2)*p*bohr /. t[[2]]

plot1=Graphics[{Circle[{xw[[1]],yw[[1]]},R1],      Circle[{xw[[2]],yw[[2]]},R2],Circle[{xw[[3]],yw[[3]]},R2],Circle[{xw[[4]],yw[[4]]},R2],Circle[{xw[[5]],yw[[5]]},R2],Disk[{xn[[1]],yn[[1]]},0.08], Disk[{xn[[2]],yn[[2]]},0.08], Disk[{xn[[3]],yn[[3]]},0.08], Disk[{xn[[4]],yn[[4]]},0.08],Disk[{xn[[5]],yn[[5]]},0.08]} ] /. t[[2]]

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

plot2=Graphics[{Circle[{xw[[1]],zw[[1]]},R1],      Circle[{xw[[2]],zw[[2]]},R2],Circle[{xw[[3]],zw[[3]]},R2],Circle[{xw[[4]],zw[[4]]},R2],Circle[{xw[[5]],zw[[5]]},R2],Disk[{xn[[1]],zn[[1]]},0.08], Disk[{xn[[2]],zn[[2]]},0.08], Disk[{xn[[3]],zn[[3]]},0.08], Disk[{xn[[4]],zn[[4]]},0.08],Disk[{xn[[5]],zn[[5]]},0.08]} ] /. t[[2]]

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