What do you mean by “packing fraction” in this context? I know what it means in the context of crystallographic solids, but that definition doesn’t extent to proteins in solution.
Regarding measuring the goodness of packing, the typical way of doing that is with RosettaHoles or the packstat metrics. The most recent version of RosettaHoles probably isn’t very easy to do with PyRosetta, as it requires the external program dalphaballs. Packstat is probably the better bet. Take a look a the classes protocols::toolbox::pose_metric_calculators::PackstatCalculator, protocols::simple_filters::PackStatFilter and core::scoring::methods::PackStatEnergy
The other possibility is looking at the overlap of atoms as 3D Gaussians that’s implicit in the Lazaridus-Karplus EFF solvation model (fa_sol), though I don’t know offhand if you can just get the overlap term without the energy weighting issues.