Acidity

class Acidity(reactant_species, product_species, solvent_components, temperature=None, parameters=None)

Calculate the pKa of a hydrogen transfer reaction taking into account solvation effects.

Parameters:
acidity()
Returns:

The pKa of the reaction, defined as the negative base-10 logarithm of the equilibrium constant.

Return type:

float

parameters()
Returns:

The COSMO-RS parameters

Return type:

CosmoRSParameters

productSpecies()
Returns:

The ionized products in the proton transfer reaction.

Return type:

Sequence of CosmoRealSpecies

reactantSpecies()
Returns:

The neutral reactants in the in the proton transfer reaction.

Return type:

Sequence of CosmoRealSpecies

solventComponents()
Returns:

The components of the solvent.

Return type:

CosmoRSMixture

temperature()
Returns:

The solvent temperature.

Return type:

PhysicalQuantity of type temperature

uniqueString()

Return a unique string representing the state of the object.

Usage Examples

Calculate the pKa of acetic acid in water.

# Create the species for acetate
cosmo_rs = CosmoRS(
    configuration=optimized_configuration,
    solvation_energy=solvation_energy
)
acetate = cosmo_rs.evaluate()

# Calculate the pKa of acetic acid
acetic_acid_pka = Acidity(
    reactant_species=[acetic_acid, water],
    product_species=[acetate, hydronium],
    solvent_components=water,
    temperature=298*Kelvin,
    parameters=CosmoRSParameters()
)
pka = acetic_acid_pka.acidity()
nlprint(f'The calculated pKa of acetic acid is {pka}')

acetic_acid_example.py

Notes

The Acidity object calculates the pKa of a compound. It does this by calculating the acid/base equilibrium of the form:

\[AH + B \rightleftarrows A^- + BH^+\]

Here \(A\) acts as an acid transferring its proton to molecule \(B\) which acts as a base, forming two charged species. The molecule \(B\) can either be a solvent molecule or some other. In cases where water is a component of the solvent, \(B\) will often be water, forming a hydronium ion on the right hand side of the equation.

In COSMO-RS, pKa is calculated based on the solvated energies of each molecule as well as each molecules interaction with solvent. The pKa can be simply given as:

\[pK_a = \frac{E_{COSMO}^{A^-+BH^+} - E_{COSMO}^{AH+B} + \mu_S^{A^-+BH^+} - \mu_S^{AH+B}} {\ln(10)RT}\]

Here \(E_{COSMO}\) represents the COSMO internal energy of each pair of molecules and \(\mu_S\) represents the solvated chemical potential of each molecular species.

Due to systematic errors in calculating both the internal energy and the solvated chemical potential, it is possible to use a linear correction to estimate the observed pKa[1]. Given the pKa calculated by the COSMO-RS method as \(pK_a^{raw}\), the corrected pKa can be given as:

\[pK_a = A \times pK_a^{raw} + B\]

Here \(A\) and \(B\) are simply the slope and the intercept of the linear correction. They are both parameters contained in the CosmoRSParameters object.

It should also be noted that, with the exception of hydronium, all molecules in the COSMO-RS molecule database are neutral molecules. For pKa calculations it will then be necessary to perform a DFT calculation on the deprotonated molecule. In this case, since it is a charged molecule, Multipole boundary conditions should be used. While slower than used Periodic FFT boundary conditions, Multipole boundary conditions ensure that the molecule is treated as a single, charged molecule without periodicity.