Prediction of pKa values for drug-like molecules using semiempirical quantum chemical methods

Rapid yet accurate pKa prediction for drug-like molecules is a key challenge in computational chemistry. This study uses PM6-DH+/COSMO, PM6/COSMO, PM7/COSMO, PM3/COSMO, AM1/COSMO, PM3/SMD, AM1/SMD, and DFTB3/SMD to predict the pKa values of 53 amine groups in 48 drug-like compounds. The approach uses an isodesmic reaction where the pKa value is computed relative to a chemically related reference compound for which the pKa value has been measured experimentally or estimated using a standard empirical approach. The AM1- and PM3-based methods perform best with RMSE values of 1.4 - 1.6 pH units that have uncertainties of 0.3-0.4 pH units, which make them statistically equivalent. However, for all but PM3/SMD and AM1/SMD the RMSEs are dominated by a single outlier, cefadoxil, caused by proton transfer in the zwitterionic protonation state. If this outlier is removed, the RMSE values for PM3/COSMO and AM1/COSMO drop to 1.0 ± 0.2 and 1.1 ± 0.3, while PM3/SMD and AM1/SMD remain at 1.5 ± 0.4 and 1.6 ± 0.4 pH units, making the COSMO-based predictions statistically better than the SMD-based predictions. So for pKa calculations where a zwitterionic state is not involved or proton transfer in a zwitterionic state is not observed then PM3/COSMO or AM1/COSMO is the best pKa prediction method, otherwise PM3/SMD or AM1/SMD should be used. Thus, fast and relatively accurate pKa prediction for 100-1000s of drug-line amines is feasible with the current setup and relatively modest computational resources.


INTRODUCTION
One of the central practical challenges to be met when performing calculations on many organic molecules in aqueous solution is selecting the correct protonation state at a given pH. There are several empirical pKa predictors such as ACD pKa DB (ACDLabs, Toronto, Canada), Chemaxon (Chemaxon, Budapest, Hungary), and Epik (Schrödinger, New York, USA) that rely on large databases of experimental pKa values that are adjusted using empirical substituent-specific rules. As with any empirical approach the accuracy of these methods correlate with the similarity of the target molecule to molecules in the database. For example, Settimo et al. (2013) have recently shown that the empirical methods can fail for some amines, which represent a large fraction of drugs currently on the market or in development. This problem could make these methods difficult to apply to computational exploration of chemical space (Rupakheti et al., 2016;Gómez-Bombarelli et al., 2016) where molecules with completely new chemical substructures are likely to be encountered.
One possible solution to this problem is electronic structure (QM)-based pKa prediction methods (see Ho (2014) for a review) which in principle requires no empirical input. In practice, when applied to larger molecules (Eckert and Klamt, 2005;Klicić et al., 2002), some degree of empiricism is usually introduced to increase the accuracy of the predictions but these parameters tend to be much more transferable because of the underlying QM-model. However, these QM-based methods are computationally quite demanding and cannot be routinely applied to the very large sets of molecules typically encountered in high throughput screening.
Semiempirical QM methods such as PM6 (Stewart, 2008) and DFTB3 (Gaus et al., 2011) are orders of magnitude faster than QM methods but retain a flexible and, in principle, more transferable QM description of the molecules. I recently co-authored a proof-of-concept study (Kromann et al., 2014) demonstrating that semiemprical QM methods can be used together with isodesmic reactions to predict pKa values of small model systems with accuracies similar to QM methods for many functional groups. However, amines proved the most difficult due to the diverse chemical environment of the ionizable nitrogen atoms. We hypothesized that the solution to this problem is a more diverse set of reference molecules and in this study I demonstrate the validity of this hypothesis for a set of 53 amine groups in 48 drug-like compounds. In addition I test more semiempirical methods than in the previous study.

COMPUTATIONAL METHODOLOGY
The pKa values are computed by pK a = pK ref a + ∆G • RT ln (10) (1) where ∆G • denotes the change in standard free energy for the isodesmic reaction where the standard free energy of molecule X is computed as the sum of the semiempirical heat of formation, or the electronic energy in case of DFTB3, and the solvation free energy All energy terms are computed using solution phase geometries unless noted otherwise. ∆H • f (X) is computed using either PM6-DH+ (Korth, 2010), PM6 (Stewart, 2007), PM7 (Stewart, 2012), PM3 (Stewart, 1989), AM1 (Dewar et al., 1985), or DFTB3 (Gaus et al., 2011) (where the electronic energy is used instead of the heat of formation), while ∆G • solv (X) is computed using either the SMD (Marenich et al., 2009) or COSMO (Klamt and Schüürmann, 1993) solvation method. The SMD calculations are performed with the GAMESS program (Schmidt et al., 1993), the latter using the semiempirical PCM interface developed by Steinmann et al. (2013) and the DFTB/PCM interface developed by Nishimoto (2016) and using version 3ob-3-1 of the 3OB parameter set (Gaus et al., 2011(Gaus et al., , 2014Lu et al., 2015;Kubillus et al., 2015), while the COSMO calculations are performed using MOPAC2016. A maximum of 200 optimization cycles are used for solution phase optimizations and a gradient convergence criterion (OPTTOL) of 5 × 10 −4 au and delocalized internal coordinates (Baker et al., 1996) are used for GAMESS-based optimization.
This study considers 53 amine groups in 48 drug-like molecules with experimentally measured amine pKa values taken from Table 3 of the study by Eckert and Klamt (2005). Some of the smaller molecules in that table, such as 2-methylbenzylamine, were removed since they would differ very little from the corresponding reference molecules. The reference molecules are chosen to match the chemical environment of the nitrogen within a two-bond radius as much as practically possible and including the ring-size if the nitrogen is situated in a ring. For example, the tertiary amine group in thenyldiamine ( Figure 1) has two methyl groups and a longer aliphatic chain so the reference molecule is dimethylethylamine, rather than triethylamine used in our previous study. This choice is motivated by our previous observation (Kromann et al., 2014) that, for example, the predicted value of dimethylamine has a relatively large error when computed using a diethylamine reference. Similarly, the reference compound for the aromatic nitrogen group in thenyldiamine is 2-aminopyridine, rather than pyridine, to reflect the fact that the nitrogen is bonded to an aromatic carbon which is bonded to another aromatic carbon and another nitrogen. In a few cases somewhat larger reference compounds are chosen if they reflect common structural motifs such as the guanine group in acyclovir or the − OOC-CH(R)-NH + 3 zwitterionic motif in phenylalanine and tryptophan. This approach resulted in 26 different reference molecules (Table S1) that reflect typical functional groups found in drug-like molecules. Most of the reference pKa values are computed using the ACE JChem pKa predictor (ACE/JChem, 2016) while the rest are experimental values. The only molecule where it proved difficult to apply this general approach to identifying a suitable reference molecule is the imine nitrogen in clozapin (Figure 1) where the nitrogen is bonded to a phenyl group on one side an a tertiary sp 2 carbon that in turn is hydrogen bonded to a nitrogen and a phenyl group. The reference compound that would result from applying the rules outlined above (N-phenylbenzamidine, Figure 1) was considered "too specific" for clozapin. Instead I searched the already chosen set of 26 reference molecules the molecule with the largest sub-structure match, which turn out to N-phenylethanimidamide, that was originally chosen as a reference for phenacain.
Many of the molecules contain more than one ionizable group. Only the pKa values of the amine indicated in Eckert and Klamt's Table 3 are computed and the protonation states are prepared according to standard pKa values. For example, for phenylalanine the carboxyl group is deprotonated because the "standard" pKa values of a carboxyl group (e.g. in acetic acid) is lower than the standard pKa values of a primary amine (e.g. ethylamine). Notice that the cyanoguanidine group in cimetidine has a pKa value of about 0 ( (Hirt et al., 1961;Charton, 1965)) and is therefore deprotonated when the imidazole group titrates. Eckert and Klamt characterised the histamine pKa value of 9.7 as an amidine pKa and the thenyldiamine pKa as a pyridine pKa. This is corrected to a primary amine (Baba et al., 2014) and tertiary amine, respectively. For thenyldiamine pKa values of 3.7 and 8.9 have been measured potentiometrically (Lordi and Christian, 1956) and cannot be assigned to a particular nitrogen experimentally. But based on standard pKa values it it is likely that the higher pKa value corresponds to the amino group. For example, the ACE JChem pKa predictor predicts values of 5.6 and 8.8 for the pyridine and amine groups, respectively. This hypothesis is further corroborated by the fact that introducing an additional N atom to the pyridine ring in neohetramine ( Figure 1) only significantly affects the lower pKa value (Lordi and Christian, 1956). The experimental pKa values of morphine and niacin are changed to 8.2 (Prankerd, 2007) and 4.2 (Niazi and Mollin, 1987), respectively, while the remaining experimental pKa values are taken from Eckert and Klamt (2005). When several tautomers are possible all are considered. The protonation and tautomer states considered can be found in supplementary materials. RDKit (Landrum, 2016) is used to generate 20 starting geometries for each protonation state and the lowest free energy structure for each protonation state is used for the pKa calculations. Table 1 lists the predicted pKa values, Figure 2 shows a plot of the errors, and Table 2 lists the root-meansquare-error (RMSE) and maximum absolute error for each method. The AM1-and PM3-based methods perform best with RMSE values of 1.4 -1.6 pH units that have uncertainties of 0.3-0.4 pH units, which make them statistically equivalent (see SI for more information). The null model pK a ≈ pK ref a has an RMSE of 1.8 ± 0.4 which, given the error bars, is statistically no worse than the AM1-and PM3-based method. The rest of the methods (PM6-DH+, PM6, PM7, and DFTB3) perform worse and are discussed further below.

PM3-and AM1-based methods
The negative outlier seen for the COSMO-based methods ( Figure 2) is cefadoxil ( Figure 1) and is due to proton transfer in the zwitterionic protonation state. For the three other zwitterions among the molecules, niacin, phenylalanine, and tryptophan, no proton transfer is observed and the error in the predicted pKa values are relatively small. Proton transfer in zwitterions is also a common problem for DFT/continuum calculations, for example for glycine (Wang et al., 2003;Bachrach, 2008;Kayi et al., 2012), and is due to deficiencies in the continuum solvent method, not the electronic structure method. The good performance observed for PM3/SMD is thus due to fortuitous cancellation of error. Cefadroxil is also the negative outlier for DFTB3/SMD although the proton doesn't transfer.
If the cefadroxil outlier is removed, the RMSE values for PM3/COSMO and AM1/COSMO drop to 1.0 ± 0.2 and 1.1 ± 0.3, while PM3/SMD and AM1/SMD remain at 1.5 ± 0.4 and 1.6 ± 0.4 pH units. Thus, without this outlier the COSMO-based predictions outperform the SMD-based predictions, as well as the null model. For pKa calculations where a zwitterionic state is not involved or proton transfer in a zwitterionic state is not observed then PM3/COSMO or AM1/COSMO is the best pKa prediction method, otherwise PM3/SMD or AM1/SMD should be used. The main reason for performing solution-phase geometry optimisations was the possible presence of zwitterions, so if a zwitterionic state is not involved then the geometry optimisations could potentially be done in the gas phase. Table 2 shows Table 1. Experimental, reference (cf. Eq 1), and predicted pKa values. "COS" stands for COSMO. "+" and "-" refers to the charge of the conjugate base.   Table S2). The largest difference in RMSEs is observed for PM3/COSMO(soln) and PM3/COSMO(gas) (0.39 pH units) and is just below the composite error of 0.42 pH units. So using gas phase geometries for non-zwitterionic molecules does not lead to a statistically significant difference in the accuracy of the pKa predictions, but given the uncertainty in the RMSE values this conclusion could easily change with the addition of more molecules to the set. Figure 2 shows that all semiempirical methods except PM7 tend to underestimate the pKa values. The mean signed errors for PM3/COSMO and AM1/COSMO are -0.4 and -0.5 pH units while they are -1.1 for both PM3/SMD and AM1/SMD (computed without cefadoxil). If these mean errors are included as an empirical correction to the pKa values then the accuracy of the COSMO-and SMD-based methods become statistically identical with RMSE values of between 0.9 and 1.1 pH units. However, it remains to be seen whether these corrections are transferable to other sets of amines.

PM6-DH+-, PM6-and PM7-based methods
In addition to their chemical importance pKa values are also useful benchmarking tools that can help in identifying problems with theoretical methods. Here I compare the results for PM6-DH+/COSMO, PM6/COSMO-and PM7/COSMO-based methods to PM3/COSMO to gain some insight in to why these methods lead to less accurate pKa predictions with RMSE values of 1.9 compared to 1.0 (ignoring cefadroxil).
Compared to PM3, PM6-DH+ has two "outliers": propranolol and lidocaine (Figure 2). For propanolol PM6-DH+ predicts a pKa value of 5.2, which is significantly lower than the experimental value of 9.6 and that predicted by PM3 (8.3). Comparison of the lowest free energy structures for the protonated state shown in Figure 3a-b shows that the PM6-DH+ structure is significantly more compact than the PM3 structure with the isopropylaminoethanol chain stacked on the face with the naphthalene group. This will lead to desolvation of the amine group and will lower the predicted pKa. This structure is also the lowest free energy structure for PM6 where the predicted pKa value is 6.8. So the compactness is not solely due to the dispersion interactions included in PM6-DH+, as one might expect, but these forces do contribute to the very low pKa value. It is important to emphasize that this does not necessarily imply 5/18 that the dispersion interactions are overestimated by the DH+ corrected, but rather that they possibly are too large compared to the solute/solvent interactions in the COSMO solvation model when using PM6-DH+ to describe the solute. This general point also applies to the rest of the analyses presented below.
For lidocaine PM6-DH+ predicts a pKa value of 3.7 pH units, which is significantly lower than the experimental value of 7.9 and that predicted by PM3 (5.4). Comparison of the lowest free energy structures for the protonated state shown in Figure 3c-d shows that the NH-O hydrogen bond-like interaction observed in the PM3 structure is absent in the PM6-DH+ structure, which is consistent with a lower pKa value. The hydrogen bond, which is also present in the lowest free energy PM6 structure, is replaced by non-polar interactions between methyl groups which presumably are stronger in PM6-DH+ due to the dispersion forces.
Compared to PM3, PM6 has one "outliers" (Figure 2), piroxicam, where PM6 predicts a pKa value of 0.5, which is significantly lower than the experimental value of 5.3 and that predicted by PM3 (6.3). Comparison of the lowest free energy structures for the protonated state shown in Figure 4 shows that the pyridine NH hydrogen bond to the amide O observed in the PM3 structure is replaced by a presumably unfavorable NH-HN interaction with the amide group, which indeed should lower the pKa considerably. Both PM3 and PM6 geometry optimisations are performed with exactly the same set of starting structures and it is not immediately clear why this arrangement leads to lowest free energy, but it is presumably due to an increase in the solvation energy.
Compared to PM3, PM7 has three "outliers" (Figure 2): spartein, trimipramine, and thenyldiamine. For propanolol PM7 predicts a pKa value of 15.9, which is significantly higher than the experimental value of 12.0 and that predicted by PM3 (11.7). Comparison of the lowest free energy structures for the protonated state shown in Figure 5a-b shows virtually no difference in structure. The same is found for the low free energy structures of the conjugate base and both protonation states of the reference molecule. The most likely explanation for the overestimation is therefore that the NH-N hydrogen bond strength is overestimated compared to PM3. This theory is further corroborated for trimiparine where PM7 predicts a pKa value of 13.7 pH units, which is significantly higher than the experimental value of 9.4 and that predicted by PM3 (10.2). Comparison of the lowest free energy structures for the protonated state shown in Figure 5c-d shows a NH-N hydrogen bond for the PM7 structure, which is absent in the PM3 structure. This structural difference is consistent with both the higher pKa and an overestimation of NH-N hydrogen bond strength by PM7. Finally, for thenyldiamine PM7 predicts a pKa value of 13.1 pH units, which again is significantly higher than the experimental value of 8.9 and that predicted by PM3 (9.4). The main difference in structure between the free energy minima (Figure 5e-f) is an apparently stronger interaction between the thiophene ring and the amine in the PM7 structure, which, if anything, should desolvate the amine group and lower the pKa value. The most likely explanation for the overestimation is thus an overestimation of the NH-N hydrogen bond as in the the other two cases.

DFTB3/SMD
Compared to PM3/COSMO, DFTB3/SMD has five "outliers" (Figure 2) and here I focus on the two with the largest errors: guanethidine and mechlorethamine. For guanethidine DFTB3 predicts a pKa value of 16.2 pH units, which is significantly higher than the experimental value of 11.4 and that predicted by PM3 (13.2). Comparison of the lowest free energy structures for the protonated state shown in Figure 6a-b shows that they are quite similar with a NH-N hydrogen bond, but with the 7-membered ring in a slightly different conformation. The hydrogen bond length in the DFTB3 structure is 2.33Å, which is significantly shorter than the 2.56Åin the PM3 structure. A stronger hydrogen bond is consistent with a higher pKa, but the errors for DFTB3 are not unusually larger for, for example, spartein, trimipramine, and thenyldiamine. One possibility is that it is only guanine NH hydrogen bond strengths that are overestimated but this can not be verified with the current set of molecules.
For mechlorethamine DFTB3 predicts a pKa value of 1.3 pH units, which is significantly lower than the experimental value of 6.4 and that predicted by PM3 (5.4). Comparison of the lowest free energy structures for the protonated state shown in Figure 6c-d shows overall similar structures. In both cases the amine hydrogen is surrounded by the two chlorine atoms, which lowers the pKa value due to desolvation.

6/18
However, closer inspection of the structures reveal that for the DFTB3 structure the chlorine atoms are significantly closer together and one of the chlorine atoms is significantly closer to the amine hydrogen. These structural differences are consistent with greater desolvation in the DFTB3 structure and, hence, a lower pKa value.
With regard to DFTB3 it is also noteworthy that two molecules fragment in the DFTB3 gas phase geometry optimisations: in the case of the niacin zwitterion CO 2 is eliminated while for the protonated form of sotalol CH 3 SO 2 is eliminated. Barrier-less CO 2 has been previously observed for DFTB3 for model systems of L-aspartate α-decarboxylase (Kromann et al., 2016) and is presumably due to the 16.8 kcal/mol error in the atomisation energy of CO 2 for DFTB3 (Gaus et al., 2011).

Prediction of dominant protonation state
One of the main uses of pKa values is the prediction of the correct protonation state at physiological pH (7.4), i.e. determining whether the predicted pKa value is above or below 7.4. Here (ignoring cefadroxil) PM3/COSMO performs best by getting it right 94% of the time, compared to 90%, 79%, and 92% for AM1/COSMO, PM3/SMD, and the null model. Thus, only PM3/COSMO outperforms the null model. PM3/COSMO fails in three cases, labetalol, lidocaine, and nafronyl, where PM3/COSMO predicts pKa values of 7.5, 5.4, and 7.3, respectively and the corresponding experimental values are 7.3, 7.9, and 9.1 pH units. The null model fails in four cases, clozapine (amide nitrogen), labetalol, mechlorethamine, and trazodone, where the null model predicts pKa values of 10.3, 10.6, 10.0, and 10.2 and the corresponding experimental values are 3.9, 7.3, 6.4, and 6.8 pH units, respectively. Thus, both methods fail for only one ionizable site where the experimentally measured pKa value is significantly different from physiological pH.

Timings
A MOPAC-based geometry optimization requires no more than about 10-20 CPU seconds on a single core CPU even for the largest molecules considered here (e.g. clozapine), whereas corresponding GAMESS optimizations take about 60-90 seconds. Thus, using 20 different starting geometries for each protonation state a pKa value can be predicted in a few CPU minutes using a single 12-CPU node. In practice the wall-clock time is longer due to the overhead involved in having all cores write output files to disk simultaneously. Similarly, most queuing software has an some computational overhead which becomes noticeable when a large number of sub-minute jobs are submitted simultaneously. These general problems need to be addressed if semiempirical methods are to be used efficiently in very large-scale high throughput studies. Nevertheless, fast pKa predictions for 100-1000s of molecules is feasible with the current setup and relatively modest computational resources.

SUMMARY AND OUTLOOK
This study uses PM6-DH+/COSMO, PM6/COSMO, PM7/COSMO, PM3/COSMO, AM1/COSMO, PM3/SMD, AM1/SMD, and DFTB3/SMD to predict the pKa values of 53 amine groups in 48 drug-like compounds. The approach uses isodesmic reactions where the pKa values is computed relative to a chemically related reference compound for which the pKa value has been measured experimentally or estimated using an standard empirical approach. Both gas phase and solution phase geometry optimisations are tested. The AM1-and PM3-based methods using solution phase geometries perform best with RMSE values of 1.4 -1.6 pH units that have uncertainties of 0.3-0.4 pH units, which make them statistically equivalent. However, for all but PM3/SMD and AM1/SMD the RMSEs is dominated by a single outlier, cefadoxil, caused by proton transfer in the zwitterionic protonation state. If this outlier is removed, the RMSE values for PM3/COSMO and AM1/COSMO drop to 1.0 ± 0.2 and 1.1 ± 0.3, while PM3/SMD and AM1/SMD remain at 1.5 ± 0.4 and 1.6 ± 0.4 pH units. Thus, without this outlier the COSMO-based predictions outperform the SMD-based predictions, so for pKa calculations where a zwitterionic state is not involved or proton transfer in a zwitterionic state is not observed then PM3/COSMO or AM1/COSMO is the best pKa prediction method, otherwise PM3/SMD or AM1/SMD should be used. Thus, fast and relatively accurate pKa predictions for 100-1000s of molecules is feasible with the current setup and relatively modest computational resources.

7/18
For the current study the reference molecules were selected by hand to match the local structure around the ionizable as much as possible for most molecules to maximize the cancellation of error and improve accuracy as much as possible. This approach will work well when the pKa of a small number of molecules is needed or if the effect of substituents on the pKa of an ionizable group in a target molecule is to be investigated. However for high throughput pKa prediction for a very large and diverse set of molecules it will not always be practically possible to identify closely related reference molecules and for such a case the overall accuracy is likely to be worse than reported here. How much worse remains to be seen but the fact that the pKa of the imine nitrogen in clozapine can be predicted to within 1.2 pH units using PM3/COSMO and a reference compound with a pKa value with a pKa value that is 6.4 pH units higher suggests that the error may not be that much higher. The current implementation also relies on manual selection of the protonation state of other ionizable groups, which in cases like cimetidine requires expert knowledge. In the general case this step needs to be automated by generating all possible protonation isomers for a given protonation state and selecting the one with the lowest free energy. Work on full automation of the process is ongoing.   Table S2. Experimental, reference (cf. Eq 1), and predicted pKa values computed using gas phase geometries. "COS" stands for COSMO. "+" and "-" refers to the charge of the conjugate base.