Twist and shear in β-sheets and β-ribbons