Off[];SetOptions[$Output,PageWidth->Infinity]; mathfile=ToString[mfile]<>".txt"; smfile=ToString[mfile]; Print["Starting computations ..."]; {ctime,res}=Timing[Get[mathfile]]; Print[]; If[fails, Print["Computations failed.\n --- finished ---"];Exit[], Print[SetAccuracy[ctime,3]," elapsed."]; ]; (************) Do[If[!NumberQ[energy[n]],Print[" --- finished ---"];Exit[]],{n,0,morder}]; (* Plotting energy[n] *) enplus=enminus={}; Do[ener=energy[n]//N;enlog=Log[10,Abs[ener]]; If[ener>0,enplus=Append[enplus,{n,enlog}], enminus=Append[enminus,{n,enlog}]],{n,0,morder}]; rat=1/GoldenRatio//N; pltplus=If[Length[enplus]==0,{}, ListPlot[enplus, PlotStyle->{RGBColor[1,0,0],PointSize[0.015]}, DisplayFunction->Identity]]; pltminus=If[Length[enminus]==0,{}, ListPlot[enminus, PlotStyle->{RGBColor[0,0,1],PointSize[0.015]}, DisplayFunction->Identity]]; plt=Show[pltplus,pltminus, AxesLabel -> { StyleForm[N,FontSlant->"Italic"], SequenceForm["lg|",Subscript[StyleForm[E,FontSlant->"Italic"], StyleForm[N,FontSlant->"Italic"]],"|"] }, AspectRatio -> rat, DisplayFunction->Identity]; outfile=$HomeDirectory<>"/.web/system/temp/"<>smfile<>".gif"; Display[outfile,plt,"GIF", ImageSize -> 320 {1,rat}, ImageResolution -> 150]; Run["chmod 755 "<>outfile]; (************) nrund=Floor[10^8 Random[]]; Print["
smfile<>".gif?",
nrund,"\" WIDTH=666 HEIGHT=412 ALT=\"Plot of the expansion coefficients\"> Coefficients of the energy expansion as a function of N, order of the perturbation theory. Red/blue dots correspond to positive/negative coefficients. |
"]; Print["Computations finished."]; Exit[];