CosmoRealSolvent¶
- class CosmoRealSolvent(temperature, solvent_components, parameters=None)¶
Constructor for COSMO-RS solvent. This can be used to calculate solvent interactions in the COSMO-RS model.
- Parameters:
temperature (PhysicalQuantity of type temperature) – The solvent temperature.
solvent_components (
MoleculeConfiguration
|CosmoRealSpecies
|CosmoRSMixture
) – The solvents chemical components. This can either be a pure compound or a mixture.parameters (
CosmoRSParameters
) – The COSMO-RS parameters
- chemicalPotential(species)¶
Calculate the total chemical potential of the species in the solvent.
- Parameters:
species (
CosmoRealSpecies
) – The species for which the chemical potential is calculated.- Returns:
The chemical potential.
- Return type:
PhysicalQuantity of type energy
- combinatorialChemicalPotential(species)¶
Calculate the combinatorial chemical potential of the species in the solvent.
- Parameters:
species (
CosmoRealSpecies
) – The species for which the chemical potential is calculated.- Returns:
The chemical potential.
- Return type:
PhysicalQuantity of type energy
- moleFractions()¶
- Returns:
The mole fraction of each solvent component.
- Return type:
Sequence of floats
- parameters()¶
- Returns:
The COSMO-RS parameters
- Return type:
- residualChemicalPotential(species)¶
Calculate the residual chemical potential of the species in the solvent.
- Parameters:
species (
CosmoRealSpecies
) – The species for which the chemical potential is calculated.- Returns:
The chemical potential.
- Return type:
PhysicalQuantity of type energy
- sigmaPotential(min_charge_density=None, max_charge_density=None)¶
Calculate the sigma potential for the solvent based on the sigma profile. This assumes globally active hydrogen bonding and no orthogonal charges.
- Parameters:
min_charge_density (PhysicalQuantity of type energy per area) – The minimum charge density considered.
max_charge_density (PhysicalQuantity of type energy per area) – The maximum charge density considered.
- Returns:
A tuple of the charge densities and the corresponding sigma potentials respectively.
- Return type:
tuple
- sigmaPotentialPlot(min_charge_density=None, max_charge_density=None)¶
Method to calculate and plot the sigma potential.
- Parameters:
min_charge_density (PhysicalQuantity of type energy per area) – The minimum charge density considered.
max_charge_density (PhysicalQuantity of type energy per area) – The maximum charge density considered.
- Returns:
The PlotModel of the sigma potential.
- Return type:
- sigmaPotentialProjection(charge_densities)¶
Project the surface sigma potential onto the given charge density assuming hydrogen bonding is globally active and there are no orthogonal charges.
- Parameters:
charge_densities (PhysicalQuantity of type charge per area) – List of charge densities to project the sigma potential onto.
- Returns:
The projected sigma potential.
- Return type:
PhysicalQuantity of type energy per area
- solventComponents()¶
The molecular composition of the solvent.
- Returns:
The molecular composition of the solvent.
- Return type:
- solventSigmaProfile(min_charge_density=None, max_charge_density=None)¶
Calculate the combined solvent sigma profile.
- Parameters:
min_charge_density (PhysicalQuantity of type energy per area) – The minimum charge density considered.
max_charge_density (PhysicalQuantity of type energy per area) – The maximum charge density considered.
- Returns:
A tuple of the charge densities and the corresponding sigma profiles respectively.
- Return type:
tuple
- solventSpecies()¶
- Returns:
The CosmoRealSpecies object for each solvent component.
- Return type:
Sequence of
CosmoRealSpecies
- surfaceSigmaPotential()¶
Returns the sigma potential for each of the surface points, including all hydrogen bond and orthogonal charge effects. The corresponding charge densities are also returned. Note that these depend on the points on the solvent surface, and are not evenly spaced
- Returns:
A tuple of the charge densities and the corresponding sigma potentials respectively.
- Return type:
tuple
- 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 chemical potential of methanol in water and the \(\sigma\)-potential of solvent water.
# Load the COSMO species
database = CosmoRSSpeciesDatabase()
water = database.exportSpecies('water')
methanol = database.exportSpecies('methanol')
# Create the solvent.
solvent = CosmoRealSolvent(
298*Kelvin,
water,
parameters=CosmoRSParameters(),
)
# Calculate chemical potential of a methanol molecule in solvent water.
chemical_potential = solvent.chemicalPotential(methanol)
nlprint(f'The chemical potential of dissolving methanol in water is {chemical_potential}')
# Get the sigma potential of water.
charge_densities, sigma_potential = solvent.sigmaPotential()
# Get the sigma potential plot of water
plot = solvent.sigmaPotentialPlot()
Plot.show(plot)
Notes¶
The CosmoRealSolvent
object allows to calculate a fundamental construct of the COSMO-RS
theory, namely the \(\sigma\)-potential of a pure liquid substance or mixture. For more information on
the COSMO-RS formalism please refer to CosmoRSParameters
. The main properties one can obtain using
the object are the combinatorial and residual pseudochemical potential (\(\mu^{comb}_X\) and \(\mu^{res}_X\),
respectively) which makes up the total pseudochemical potential of a species \(X\) in solvent. It is also possible
to calculate the solvent \(\sigma\)-profile. This can be given as:
Here \(i\) represents a component of the solvent \(S\) ensemble. \(A_i\) is the total surface area, \(x_i\) the given mole fraction and \(p\) the \(\sigma\) profile [1]. Hence, \(p_S\) represents a statistical distribution of surface charge densities of the ensemble.
The \(\sigma\)-potential is also calculated by the CosmoRealSolvent
. When the object
is created the \(\sigma\)-potential of each surface segment is calculated. This is done using
both the normal and orthogonal charge densities \(\sigma\) and \(\sigma^\perp\).
Hydrogen bonding can also take into account the associated atom of each surface element, only adding
hydrogen bonding when surface elements are connected to appropriate donors and acceptors. These
calculated surface sigma potentials are then used to calculate the residual chemical potential of
solutes in the solvent. While increasing the accuracy of the calculation, the downside to this
approach is that the \(\sigma\)-potential is no longer simply a function of the charge density.
This makes displaying the \(\sigma\)-potential difficult, due to its multivariate nature.
As a result the CosmoRealSolvent
has three different methods for estimating the
\(\sigma\)-potential. The first method is to simply calculate the \(\sigma\)-potential
assuming no orthogonal charges and every surface element is hydrogen bond active. This is done in
the sigmaPotential
method. A second method is to calculate the \(\sigma\)-potential at a
range of charge densities using the calculated surface \(\sigma\)-potential. This takes into
account the orthogonal charges and different hydrogen bonding abilities of each surface element, and
then projects that onto a set of charge densities. This is done in the sigmaPotentialProjection
method. Lastly, it is possible to simply return the calculated \(\sigma\)-potential at
each surface element along with the associated charge density. This takes into account the
orthogonal charges and hydrogen bonding, but may not result in different potentials being given
for the same charge density. This is done in the surfaceSigmaPotential
method.