Script to calculate the fraction of frictional contacts.