Hi,
Actually, this thread raises an interesting issue: do refinement programs ever refine cell parameters (I think they do not.) Not as far as I'm aware.
definitely not in phenix.refine.
I wonder whether it would make any difference, especially in things like bond lengths? Should be easy enough to include, but I guess the gains might not be so significant? I would imagine, though, that once one had a working model, one could make a histogram of observed bond lengths and their orientations, and scale the cell parameters accordingly to make the bond-length distribution be centered on the ideal lengths. This might perhaps be another source of "missing R"? I've never used WHATCHECK, but I'm told it does something like you describe, and alerts the user to possibly incorrect cell dimensions. (I'm hoping to add this to the PHENIX validation eventually, but I don't know the math.)
Not going into discussion whether this would be beneficial or not, from implementation point of view it should be very easy to do: just grid-search scan around each unit cell dimension and angle (that can deviate) in some small interval and score the result by R-factors. I would write a simple Python script that does this (it would be under 50 lines using CCTBX tools) and run through the whole PDB. In parallel one can do a control experiment by faking Fobs (compute from model in some way) and see how small unit cell changes affect the R-factors. A nice project for a summer student -:) Pavel.