A general approach for determining scalar coupling constants in polypeptides and proteins