d/dn( sum( (A(x[i]-px) + B(y[i]-py) + C(z[i]-pz) )2 - lamda * (A2+B2+C2) ) = 0
where n is the vector orthogonal to the plane, n = (A,B,C). Take the derivatives, we have three linear functions with the variables of (A,B,C) and a multiplier of lamba. It's a three dimensional eigenvalue problem which can be solved by Jacobi Transformations (Numerical Recipies in C, second edition, W.H.Press, Page 463).
The last configuration of coolings at different temperature went through Andersen Thermostat for 106 steps and 100 configurations have been saved for each temperature. The statistics of the flatness is based on those configurations. The averages and standard deviations of the flatness have also been calculated.
The histograms include 100 bins.
1) 100K
2) 200K
3) 300K
4) 400K
5) 500K
6) 600K
7) 700K
8) 800K
9) 900K
10) 1000K
11) 1500K