A reliable and efficient first principles-based method for predicting pK(a) values. 1. Methodology.