(*This program evaluates the quantum expectation value used in the 
computation of the free energy, the radial distribution functions and 
the force extension relations for a pure bend WLC polymer. Here as an
example we have chosen the parameter beta to be 10. One can vary this parameter
and adjust the cutoffs accordingly to get results for other values of the 
scaled contour length. For related programs please send an e-mail to 
supurna@rri.res.in*)
ClearAll[h,f,Z,lmax,H,beta]
lmax=30;
Nmax=1000;
beta=10.;
h=.01;
L={};
For[n=0,n<Nmax+1,n++,
f=h*n;
H=Table[Switch[i-j,-1,f*(i+1)/Sqrt[
(2i+1)(2i+3)],0,i(i+1)/2,1,f*(i)/Sqrt[(2i-1)(2i+1)],_,0],{i,0,lmax},{j,0,lmax}];
M=MatrixExp[-beta*H];
Z=M[[1,1]];
G=-1/beta*(Log[Z]);
L=Append[L,G]]
L=Re[L];
plot10=ListPlot[L];

