The role of protein dynamics in the aggregation of biopharmaceuticals