Calculation of properties
*************************

The COSMO-RS method allows to calculate the pseudochemical potential
of a compound in the liquid phase \left( \mu_i ({T,\mathbf{x}})
\right), as well as in the gas phase \left( \mu_i^{gas}(T) \right),
see the previous COSMO-RS theory section and Ref. [1]. In the ADF
COSMO-RS implementation the following equations were used to calculate
properties using these pseudochemical potential where \mu_i^{pure} and
\mu_i^{solv} refers to the \mu_i ({T,\mathbf{x}}) evaluated at the
mole fraction of unity and the specified solvent composition,
respectively. The detailed explanation of the variables can be found
here.

The following sections will elaborate on the application of these
equations, categorized according to the thermodynamic principles:

1. Properties derived from pseudochemical potential in solution

2. Liquid-Liquid equilibrium properties

3. Vapor-Liquid equilibrium properties

4. Solid-Liquid equilibrium properties

   \renewcommand{\arraystretch}{1.5} \begin{array}{ll} \hline
   \textbf{Equation} & \textbf{No. [Tutorial]} \\ \hline \\ \mu_i
   ({T,\mathbf{x}}) = \mu_i^{res} ({T,\mathbf{x}}) + \mu_i^{comb}
   ({T,\mathbf{x}}) & (1) \\ \mu_i^{gas}(T) = E_i^{gas} - E_i^{COSMO}
   + \Delta E_i^{diel} - \sum_k \gamma_k A_i^{k} - \omega n_i^{ring} +
   \eta RT & (2) \\ \sum_i x_i = \sum_i y_i = \sum_i w_i = 1 & (3) \\
   w_i = \frac{x_i M_i^{pure}}{\sum_j x_j M_j^{pure}} = \frac{x_i
   M_i^{pure}}{M^{ave}} & (4) \\ M^{ave} = \sum_i x_i M_i^{pure} & (5)
   \\ P_i^{vap} = \exp \left( \frac{\mu_i^{pure} - \mu_i^{gas}}{RT}
   \right) & (6)   \href{../Tutorials/COSMO-RS/COSMO-
   RS_overview_properties.html#step-2-vapor-pressure}{[a,}
   \href{../Tutorials/COSMO-RS/The_COSMO-RS_compound_database.html
   #parametrization-of-adf-cosmo-rs-solvation-energies-vapor-
   pressures-partition-coefficients}{b]} \\ P_i = x_i \exp \left(
   \frac{\mu_i^{solv} - \mu_i^{gas}}{RT} \right) & (7) \\ P = \sum_i
   P_i & (8) \\ y_i = P_i/P & (9) \\ \gamma_i = \exp \left(
   \frac{\mu_i^{solv} - \mu_i^{pure}}{RT} \right) & (10)   \href
   {../Tutorials/COSMO-RS/COSMO-RS_overview_properties.html#step-5
   -activity-coefficients-henry-coefficients-solvation-free-
   energies}{[a,}   \href {../Tutorials/COSMO-RS/The_COSMO-
   RS_compound_database.html#large-infinite-dilution-activity-
   coefficients-in-water}{b]} \\ a_i = \gamma_i x_i & (11) \\ G^E =
   H^E - T S^E = \sum_i x_i \left( \mu_i^{solv} - \mu_i^{pure} \right)
   = \sum_i x_i RT \ln(\gamma_i) & (12)   \href {../Tutorials/COSMO-RS
   /COSMO-RS_overview_properties.html#step-3-boiling-point}{[a,}
   \href {../Tutorials/COSMO-RS/COSMO-
   RS_overview_properties.html#step-8-binary-mixtures-vle-lle}{b]} \\
   H^E = -RT^2 \frac{\partial}{\partial T} \left( \frac{G^E}{RT}
   \right) & (13)   \href {../Tutorials/COSMO-RS/COSMO-
   RS_overview_properties.html#step-3-boiling-point}{[a,}   \href
   {../Tutorials/COSMO-RS/COSMO-RS_overview_properties.html#step-8
   -binary-mixtures-vle-lle}{b]} \\ G^{mix} = G^E + RT \sum_i x_i
   \ln(x_i) = \sum_i x_i RT \ln(x_i \gamma_i) & (14)   \href
   {../Tutorials/COSMO-RS/COSMO-RS_overview_properties.html#step-8
   -binary-mixtures-vle-lle}{[a]} \\ \Delta_{vap} H = \frac{RT^2}{P}
   \frac{\partial P}{\partial T} & (15)   \href {../Tutorials/COSMO-RS
   /COSMO-RS_overview_properties.html#step-2-vapor-pressure}{[a,}
   \href {../Tutorials/COSMO-RS/COSMO-
   RS_overview_properties.html#step-3-boiling-point}{b,}   \href
   {../Tutorials/COSMO-RS/COSMO-RS_overview_properties.html#step-8
   -binary-mixtures-vle-lle}{c]} \\ k_H = \frac{1}{V_{solvent}} \exp
   \left( \frac{\mu_i^{gas} - \mu_i^{solv}}{RT} \right) & (16)   \href
   {../Tutorials/COSMO-RS/The_COSMO-RS_compound_database.html#henry-s
   -law-constants}{[a]} \\ k_H^{cc} = k_H RT & (17) \\ k_{H~inv}^{px}
   = \frac{1}{k_H V_{solvent}} = \gamma_i P_i^{vap} & (18) \\
   x_i^{\text{SOL(liq)}} = \frac{1}{\gamma_i}, \quad T > T_m \quad
   \text{(insoluble liquid)}& (19)   \href {../Tutorials/COSMO-RS
   /COSMO-RS_overview_properties.html#step-7-solubility}{[a]} \\
   x_i^{\text{SOL(solid)}} = \frac{1}{\gamma_i} \exp \left\{ \frac{
   \Delta_{fus} H_{i}}{R} \left( \frac{1}{T_{m,i}} - \frac{1}{T}
   \right)                         - \frac{\Delta C_{p,i}}{R} \left(
   \ln \frac{T_{m,i}}{T} - \frac{T_{m,i}}{T} + 1 \right) \right\},
   \quad T < T_{m,i} & (20)   \href {../Tutorials/COSMO-RS/COSMO-
   RS_overview_properties.html#solubility-solid-in-a-solvent}{[a,}
   \href {../Tutorials/COSMO-RS/The_COSMO-RS_compound_database.html
   #solubility-of-vanillin-in-organic-solvents}{b]} \\
   x_i^{\text{SOL(gas)}} = \frac{P_i^{gas}}{x_i \gamma_i P_i^{vap}} &
   (21)   \href {../Tutorials/COSMO-RS/COSMO-
   RS_overview_properties.html#solubility-gas-in-a-solvent}{[a]} \\
   \Delta G_{solv}^{\text{liq-solv}} = \mu_i^{solv}-\mu_i^{pure} &
   (22) \\ \Delta G_{solv}^{\text{gas-solv}} = \mu_i^{solv} -
   \mu_i^{gas} + RT \ln \left( \frac{V_{solvent}}{V_{gas}} \right) &
   (23)   \href {../Tutorials/COSMO-RS/The_COSMO-
   RS_compound_database.html#parametrization-of-adf-cosmo-rs-
   solvation-energies-vapor-pressures-partition-coefficients}{[a]} \\
   \log_{10} P_{\text{solv1/solv2}} = \frac{1}{\ln(10)}
   \frac{\mu_i^{solv2} - \mu_i^{solv1}}{RT} + \log_{10} \left(
   \frac{V_{solv1}}{V_{solv2}} \right) & (24)   \href {../Tutorials
   /COSMO-RS/COSMO-RS_overview_properties.html#step-6-partition-
   coefficients-log-p}{[a,}   \href {../Tutorials/COSMO-RS/The_COSMO-
   RS_compound_database.html#octanol-water-partition-coefficients-log-
   pow}{b,}   \href {../Tutorials/COSMO-RS/The_COSMO-
   RS_compound_database.html#parametrization-of-adf-cosmo-rs-
   solvation-energies-vapor-pressures-partition-coefficients}{c]} \\
   \frac{1}{{LFL}_{mix}} = \sum_i \frac{y_i}{LFL_i} & (25)   \href
   {../Tutorials/COSMO-RS/COSMO-RS_overview_properties.html#step-4
   -flash-point}{[a]} \\ \\ \hline \end{array}

The above equations are not always exact, for example the vapor-liquid
equilibrium properties assume perfect gas behavior.


Properties derived from pseudochemical potential in solution
============================================================

The \mu_i^{res} represents the electrostatic interaction contribution
and the \mu_i^{comb} accounts for the molecular size and shape
difference between species. This pseudochemical potential is essential
for predicting various properties in a liquid solution, including the
activity coefficient (Eq. 10) and excess properties (Eqs. 12 and 13).

In the COSMO-RS method the volume of 1 molecule in the liquid phase is
approximated with the volume of the molecule shaped cavity, that is
used in the COSMO calculations. In this way it is possible to
calculate the volume of 1 mole of solvent molecules in the liquid
phase. However, for properties that depend on such volumes, one can
also use (related) experimental data as input data for the
calculation.

Starting from ADF2012 the Gibbs-Helmholtz equation is used to
calculate the excess enthalpy of a mixture. Previously it was
estimated using the misfit and hydrogen bonding energy of the mixture
and its pure compounds.


Liquid-Liquid equilibrium properties
====================================

Please note the pseudochemical potential \mu_i do not include the RT
\ln(x_i) term in a standard chemical potential, \left( \frac{\partial
G}{\partial N_i} \right)_{T, P, N_{j \neq i}}. As a result, the
equation for the partition coefficinet (Eq. 24) should be derived from
the equality of the standard chemical potential between the two liquid
phase, as expressed in Eq. 26, as referenced in Ref. [2]:

   \renewcommand{\arraystretch}{1.5} \begin{array}{ll} \mu_i(T,x_i^I)
   + RT \ln(x_i^I) = \mu_i(T,x_i^{II}) + RT \ln (x_i^{II}) & (26) \\
   \mu_i^{pure}  = \mu_i(T,x_i) + RT \ln (x_i) & (27) \end{array}

In addition, the solubility of an insoluble liquid in a solvent can be
further simplified using Eq. (27) and determined by solving Eq. (19).
However in many cases, this assuption is invalid. A more accurate
approach is solving the miscibility gap directly from Eq. (26). An
example is given for the calculation miscibility gap in the binary
mixture of Methanol and Hexane.


Vapor-Liquid equilibrium properties
===================================

The COSMO-RS and COSMO-SAC 2013-ADF have been parameterized for vapor
pressure prediction. COSMO-RS provides a reliable approximation of the
pseudochemical potential for a compound in the gas phase (perfect gas
with a reference state of 1 bar) as expressed in Eq. (2) [1]. In this
semi-empirical equation, E_i^{gas} is the gas phase bond energy,
E_i^{COSMO} is the bond energy in a perfect conductor, \Delta
E_i^{diel} is the dielectric energy correction, the rest terms are
proposed as the dispersion energy, ring correction energy and the
energy correction on reference state. The \gamma_k is the dispersive
parameter of atom k, A_i^{k} is the exposed surface area of atom k,
n_i^{ring} is the numbers of ring atoms, \omega and \eta are both
model parameters.

The vapor pressure can then be estimated using Eq. (6), based on the
ideal gas assumption and the equality of the standard chemical
potential between the gas and liquid phases (Eq. 28 and Eq. 29).
Alternatively, Eq. (29) can be reformulated in terms of the fugacity,
as shown in Eq. (30). From this relation, various vapor-liquid
equilibrium properties can be determined, such as Henry’s constant
(Eqs 16, 17 and 18), gas solubility (Eq. 21) and solvation energy (Eq
23).

   \renewcommand{\arraystretch}{1.5} \begin{array}{ll}
   \mu_i^{gas}(T,P) = \mu_i^{gas}(T) + RT \ln(P) & (28) \\
   \mu_i^{gas}(T) + RT \ln(P) + RT \ln (y_i) = \mu_i({T,\mathbf{x}}) +
   RT \ln (x_i) & (29) \\ y_i P = x_i \gamma_i({T,\mathbf{x}})
   P_i^{vap}(T) & (30) \end{array}

The boiling temperature of a solvent is determined using an iterative
method, where the temperature is adjusted until the calculated vapor
pressure falls within a certain threshold of the desired pressure.

Also experimental vapor pressure data for pure compounds can be
incorporated as input to enhance the accuracy of these calculations.
This approach will corrects \mu_i^{gas} throguh Eq (6) and improve the
prediction accuracy on vapor-liquid equilibrium properties.


Solid-Liquid equilibrium properties
===================================

The solid solubility can be calculated from the solid-liquid
equilibrium, as expressed in Eq. (31). It can be solved using Eq. (32)
and Eq. (33), ultimately leading to Eq. (20) similar to Ref. [2]. Then
the solid solubility can be calculation with an iterative method,
since the activity coefficient \gamma_i depends on the molar fraction
of this compound. The COSMO-RS method does not predict \Delta_{fus}
H_i, \Delta C_{p,i} , or T_{m,i}. These need to be provide as input
data for the solid solubility calculation. When experimental data is
unavailable, the property prediction tool can be used to estimate
\Delta_{fus} H_i and T_{m,i} while assume \Delta C_{p,i}=0.

   \renewcommand{\arraystretch}{1.5} \begin{array}{ll} \\ \mu_i(T,x_i)
   + RT \ln(x_i) = \mu_i^{solid}(T) & (31) \\ \mu_i^{solid}(T) =
   \mu_i^{pure}(T) - \Delta_{fus} G_i(T) & (32) \\ \Delta_{fus} G_i(T)
   \approx \Delta_{fus} H_{i} \left( 1-\frac{T}{T_{m,i}} \right) +
   \Delta C_{p,i} \left\{ T- T_{m,i}  - T \ln \left( \frac{T}{T_{m,i}}
   \right) \right\}   & (33) \\ \\ \end{array}


Definition of Variables
^^^^^^^^^^^^^^^^^^^^^^^

 
| Quantity                                                                                                                 | Meaning                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|==========================================================================================================================|==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================|
| R                                                                                                                        | Gas constant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
 
| T                                                                                                                        | Temperature                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
 
| x_i                                                                                                                      | The molar fraction of compound i in a liquid solution                                                                                                                                                                                                                                                                                                                                                                                                                                            |
 
| y_i                                                                                                                      | The molar fraction of compound i in the gas phase                                                                                                                                                                                                                                                                                                                                                                                                                                                |
 
| w_i                                                                                                                      | The mass fraction of compound i in a liquid solution                                                                                                                                                                                                                                                                                                                                                                                                                                             |
 
| M_i^{pure}                                                                                                               | The molar mass of the pure compound i                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
 
| M^{ave}                                                                                                                  | The average molar mass of the mixture                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
 
| \gamma_i                                                                                                                 | Activity coefficient of compound i in a liquid solution                                                                                                                                                                                                                                                                                                                                                                                                                                          |
 
| a_i                                                                                                                      | Activity of compound i in a liquid solution                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
 
| P_i^{vap}                                                                                                                | The vapor pressure of the pure compound i                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
 
| P_i                                                                                                                      | The partial vapor pressure of compound i                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
 
| P                                                                                                                        | The total vapor pressure                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
 
| P_i^{gas}                                                                                                                | The specified partial pressure of gaseous solute compound i used in gas solubility calculations                                                                                                                                                                                                                                                                                                                                                                                                  |
 
| \mu_i^{gas}                                                                                                              | The pseudochemical potential of the pure compound i in the gas phase                                                                                                                                                                                                                                                                                                                                                                                                                             |
 
| \mu_i^{pure}                                                                                                             | The pseudochemical potential of the pure compound i in the liquid phase, also as \mu_i(T, x_i = 1)                                                                                                                                                                                                                                                                                                                                                                                               |
 
| \mu_i^{solv}                                                                                                             | The pseudochemical potential of compound i in a liquid solution, also as \mu_i(T, x_i = x^{solv})                                                                                                                                                                                                                                                                                                                                                                                                |
 
| G^E                                                                                                                      | The excess Gibbs free energy                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
 
| H^E                                                                                                                      | The excess enthalpy, Gibbs-Helmholtz equation                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
 
| G^{mix}                                                                                                                  | The Gibbs energy of mixing                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
 
| \Delta_{vap} H                                                                                                           | The enthalpy of vaporization, Clausius-Clapeyron equation                                                                                                                                                                                                                                                                                                                                                                                                                                        |
 
| E_i^{\text{HB pure}}                                                                                                     | The hydrogen bond energy of the pure compound i in the liquid phase, see Ref. [1]                                                                                                                                                                                                                                                                                                                                                                                                                |
 
| E_i^{\text{HB}}                                                                                                          | The partial hydrogen bond energy of compound i in a liquid solution                                                                                                                                                                                                                                                                                                                                                                                                                              |
 
| E_i^{\text{misfit pure}}                                                                                                 | The misfit energy of the pure compound i in the liquid phase, see Ref. [1]                                                                                                                                                                                                                                                                                                                                                                                                                       |
 
| E_i^{\text{misfit}}                                                                                                      | The partial misfit energy of compound i in a liquid solution                                                                                                                                                                                                                                                                                                                                                                                                                                     |
 
| \Delta G_{solv}^{\text{liq-solv}}                                                                                        | The solvation Gibbs free energy from the pure compound liquid phase to the solvated phase                                                                                                                                                                                                                                                                                                                                                                                                        |
 
| \Delta G_{solv}^{\text{gas-solv}}                                                                                        | The solvation Gibbs free energy from the pure compound gas phase to the solvated phase, with a reference state of 1 mol/L in both phases                                                                                                                                                                                                                                                                                                                                                         |
 
| k_H                                                                                                                      | Henry's law constant: ratio between the liquid phase concentration of a compound and its partial vapor pressure in the gas phase                                                                                                                                                                                                                                                                                                                                                                 |
 
| k_H^{cc}                                                                                                                 | dimensionless Henry's law constant: ratio between the liquid phase concentration of a compound and its gas phase concentration                                                                                                                                                                                                                                                                                                                                                                   |
 
| k_{H~inv}^{px}                                                                                                           | Henry's law constant, representing the volatility instead of the solubility, ratio between the partial vapor pressure of a compound in the gas phas and the molar fraction in the liquid phase                                                                                                                                                                                                                                                                                                   |
 
| V_{solvent}                                                                                                              | Volume of 1 mole of solvent molecules in the liquid phase                                                                                                                                                                                                                                                                                                                                                                                                                                        |
 
| V_{gas}                                                                                                                  | Volume of 1 mole of molecules in the gas phase (at 1 atm, perfect gas)                                                                                                                                                                                                                                                                                                                                                                                                                           |
 
| x_i^{\text{SOL(state)}}                                                                                                  | Solubility of solute compound i in a solvent (molar fraction) where state refers to the physical state of the solute (gas, liquid, or solid)                                                                                                                                                                                                                                                                                                                                                     |
 
| \Delta_{fus} H_i                                                                                                         | The enthalpy of fusion of compound i                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
 
| \Delta C_{p,i}                                                                                                           | The \Delta heat capacity of fusion of compound i, C_{p}^{liq} - C_{p}^{solid}                                                                                                                                                                                                                                                                                                                                                                                                                    |
 
| T_m                                                                                                                      | The melting temperature of compound i                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
 
| log_{10} P_{\text{solv1/solv2}}                                                                                          | The logarithm of the partition coefficient P, which is the ratio of the concentrations of a compound in two immiscible solvents, solvent 1 and solvent 2                                                                                                                                                                                                                                                                                                                                         |
 
| LFL_i                                                                                                                    | The flash point (lower flammable limit, LFL) of compound i                                                                                                                                                                                                                                                                                                                                                                                                                                       |
 
| LFL_{mix}                                                                                                                | The flash point (lower flammable limit, LFL) of a mixture, Le Chatelier's mixing rule                                                                                                                                                                                                                                                                                                                                                                                                            |
 

See also the COSMO-RS GUI tutorial for the calculation of the
following properties:

* boiling point of a solvent [a]

* pK_a values [a]

* vapor-liquid diagram binary mixture (VLE/LLE) [a, b]

**Ionic liquids in COSMO-RS 2020**

The activity coefficient of a compound i solvated in an ionic liquid
is an important thermodynamic property. In COSMO-RS 2020 one can treat
the ionic liquid as one compound, which means that the value of the
activity coefficient is calculated in the standard way most
applications report them. In particular, in COSMO-RS 2020 one can
treat the ionic liquid as one compound, which only has the dissociated
form.

* ionic liquids tutorial

**Ionic liquids in COSMO-RS <=2019**

The activity coefficient of a compound i solvated in an ionic liquid
is an important thermodynamic property. The cation and anion, which
have been treated separately, will be used in equal amounts to ensure
an electroneutral mixture in the COSMO-RS calculation.

In other applications cation-anion pair have been treated as one
molecule, however, below we will treat the cation and anion as two
separate molecules, which is needed in older versions of COSMO-RS
<=2019. This has consequences for the value of the activity
coefficient.

For example, for a 1:1 IL (i.e., [A]^+ [B]^- ), the activity
coefficient at a finite concentration of solute i in the binary
mixture (IL + solute) can be calculated by

      γ_i ^bin  = (γ_i ^tern    x_i ^tern )/x_i ^bin  =   γ_i ^tern /(1+x_IL ^bin )

where the superscript "tern" represents the hypothetical ternary
system comprising cation, anion and solute i, with

      x_cation ^tern  =   x_anion ^tern

      x_cation ^tern  +  x_anion ^tern  + x_i ^tern  = 1

and the superscript "bin" represents the binary mixture   comprising
solute and IL, with

      x_IL ^bin  + x_i ^bin  = 1

Accordingly, the activity coefficient of a solute i in the binary
mixture (IL + solute) at infinite dilution is simplified as

      γ_i ^bin  = 0.5 γ_i ^tern        (at infinite dilution)

Thus in this case we should scale the activity coefficient at infinite
dilution γ_i ^tern , which is directly obtained from the COSMO-RS
calculation, with a factor of 0.5.

Similarly, for a ternary system comprising component i, component j
and an ionic liquid, the activity coefficient at finite concentration
of component i can be calculated by

      γ_i ^tern  =   γ_i ^quart /(1+x_IL ^tern )

where the superscript "quart" represents the hypothetical quaternary
system comprised of cation, anion, solute i and solute j, with:

      x_cation ^quart  =   x_anion ^quart

      x_cation ^quart  +  x_anion ^quart  + x_i ^quart   + x_j ^quart  = 1

and the superscript "tern" represents the ternary mixture comprising
solute i, j, and IL, with

      x_IL ^tern  + x_i ^tern  +   x_j ^tern  = 1

[1] Klamt, A.; Jonas, V.; Bürger, T.; Lohrenz, J. C. W. *Refinement
    and Parametrization of COSMO-RS.* J. Phys. Chem. A 1998, 102 (26),
    5074–5085

[2] Hsieh, C.-M.; Wang, S.; Lin, S.-T.; Sandler, S. I. *A Predictive
    Model for the Solubility and Octanol−Water Partition Coefficient
    of Pharmaceuticals.* J. Chem. Eng. Data 2011, 56 (4), 936–945
