ILThermoPy CookBook

ILThermo 2.0 is the biggest curated database, containing a wide varieties of experimental data on ionic liquids. This cookbook shows how this database can be accessed in automatic mode via the ILThermoPy package.

Property search

To search by property, one need either property name or ILThermo property ID. Since they are internal parameters of the ILThermo 2.0 web interface, they should be obta Для поиска нужно свойство. Есть два варианта: имя свойства или его ключ. To get the up-to-date list of available properties use the ilt.ShowPropertyList function:

[4]:
ilt.ShowPropertyList()

# Activity, fugacity, and osmotic properties
MLZj: Activity
PYna: Osmotic coefficient

# Composition at phase equilibrium
Ndnj: Composition at phase equilibrium
ygbC: Eutectic composition
GkAD: Henry's Law constant
Jkjh: Ostwald coefficient
Hlwx: Tieline
VKmP: Upper consolute composition

# Critical properties
Fxwm: Critical pressure
KYTo: Critical temperature
DjWu: Lower consolute temperature
oWwR: Upper consolute pressure
FkGt: Upper consolute temperature

# Excess, partial, and apparent energetic properties
FvjM: Apparent enthalpy
Frnj: Apparent molar heat capacity
uCNF: Enthalpy of dilution
YTPh: Enthalpy of mixing of a binary solvent with component
Injc: Enthalpy of solution
AJQR: Excess enthalpy
glHA: Partial molar enthalpy
noog: Partial molar heat capacity

# Heat capacity and derived properties
ilYg: Enthalpy
qruh: Enthalpy function {H(T)-H(0)}/T
XsSC: Entropy
aqmC: Heat capacity at constant pressure
GNQC: Heat capacity at constant volume
jIhG: Heat capacity at vapor saturation pressure

# Phase transition properties
iewN: Enthalpy of transition or fusion
zJAj: Enthalpy of vaporization or sublimation
Afue: Equilibrium pressure
uNPa: Equilibrium temperature
sgjy: Eutectic temperature
aZKT: Monotectic temperature
kxLM: Normal melting temperature

# Refraction, surface tension, and speed of sound
tXLv: Interfacial tension
HqMd: Refractive index
KtnG: Relative permittivity
gtVY: Speed of sound
qWrP: Surface tension liquid-gas

# Transport properties
BEWu: Binary diffusion coefficient
YQlI: Electrical conductivity
NayH: Self diffusion coefficient
xKpV: Thermal conductivity
mZxC: Thermal diffusivity
FfHV: Tracer diffusion coefficient
jVUM: Viscosity

# Vapor pressure, boiling temperature, and azeotropic T & P
ZYgq: Normal boiling temperature

# Volumetric properties
VDiv: Adiabatic compressibility
ugIk: Apparent molar volume
ZVRM: Density
ULml: Excess volume
lWeF: Isobaric coefficient of volume expansion
SKbh: Isothermal compressibility
mgFE: Partial molar volume


If your old code raises ValueError during the property search, this indicates that the property ID and/or property name have changed in ILThermo 2.0 after update(s). In this case, simply correct the value to the current one.

Retrieving data

To load data on the found entries use the ilt.GetEntry function, which takes entry ID as input:

[5]:
# random search
df = ilt.Search(n_compounds = 2, year = 2004)
# downloading first 10 entries
data = [ilt.GetEntry(idx) for idx in df.id.iloc[:10]]
# get first entry
entry = data[0]
entry
[5]:
Entry(id='cDowJ', ref=Reference(full='Rebelo, L. P. N.; Najdanovic-Visak, V.; Visak, Z. P.; Nunes da Ponte, M.; Szydlowski, J.; Cerdeirina, C. A.; Troncoso, J.; Romani, L.; Esperanca, J. M. S. S.; Guedes, H. J. R.; de Sousa, H. C. (2004) Green Chem. 6(8), 369-381.'), property='Excess volume', property_type='Volumetric properties', phases=['Liquid'], components=[Compound(id='AADYzP', name='water', smiles='O'), Compound(id='AArYmU', name='1-butyl-3-methylimidazolium tetrafluoroborate', smiles='CCCC[n+]1ccn(C)c1.F[B-](F)(F)F')], num_data_points=185)

Entry object contains detailed information on the data entry, including:

  • id: data entry ID;

  • ref: reference to the source article;

  • property, property_type: measured property and its type;

  • phases: list of system’s phases;

  • components: list of system’s components;

  • num_phases, num_components, num_data_points: number of system’s components and phases, and number of measured data points;

  • expmeth: experimental method used to obtain the physchemical data;

  • solvent: solvent used in the experiment;

  • constraints: list of experimental constraints;

  • data: dataframe containing measured data;

  • header: full column names to the data, containing info on the measured property, measurement units, component, and phase;

  • footnotes: notes to the data;

  • response: original response.

Let’s illustrate the main attributes. Reference contains reference itself and the article’s title:

[6]:
entry.ref.full, entry.ref.title
[6]:
('Rebelo, L. P. N.; Najdanovic-Visak, V.; Visak, Z. P.; Nunes da Ponte, M.; Szydlowski, J.; Cerdeirina, C. A.; Troncoso, J.; Romani, L.; Esperanca, J. M. S. S.; Guedes, H. J. R.; de Sousa, H. C. (2004) Green Chem. 6(8), 369-381.',
 'A detailed thermodynamic analysis of [C4mim][BF4] + water as a case study to model ionic liquid aqueous solutions')

Each component is a Compound object and contains the following fields:

  • id: compound id;

  • name: compound name;

  • formula: chemical formula;

  • smiles: compound SMILES;

  • smiles_error: if compounds SMILES was not retrieved, this field describes the reason;

  • sample: dictionary containing info on compound’s source, purity, etc.;

  • mw: molar weight of the compound, g/mol.

[7]:
cmp1 = entry.components[0]
cmp1.id, cmp1.name, cmp1.formula, cmp1.smiles, cmp1.smiles_error, cmp1.sample, cmp1.mw
[7]:
('AADYzP',
 'water',
 'H2 O',
 'O',
 None,
 {'Source': 'commercial source',
  'Purification': 'estimated by the compiler',
  'Purity': '99.8 mass %(fractional distillation)'},
 18.02)

data field contains dataframe with measured physchemical data. Its columns has short names V1, V2, V3, etc. for all variables. If for some variable the measurement error was provided, the corresponding column will be d concatanated to the column name of the original value, e.g. V1 and dV1:

[8]:
entry.data
[8]:
V1 V2 V3 V4 dV4
0 100.0 0.0040 278.15 -3.600000e-08 1.000000e-08
1 100.0 0.0040 283.15 -3.350000e-08 1.000000e-08
2 100.0 0.0040 288.15 -3.070000e-08 1.000000e-08
3 100.0 0.0040 293.15 -2.830000e-08 1.000000e-08
4 100.0 0.0040 298.15 -2.580000e-08 1.000000e-08
... ... ... ... ... ...
180 60000.0 0.5905 298.15 4.620000e-07 1.100000e-08
181 60000.0 0.5905 303.15 4.550000e-07 1.100000e-08
182 60000.0 0.5905 313.15 4.510000e-07 1.100000e-08
183 60000.0 0.5905 323.15 5.420000e-07 1.200000e-08
184 60000.0 0.5905 333.15 5.830000e-07 1.200000e-08

185 rows × 5 columns

header field contains full names of the corresponding columns, including measured property, its measurement unit, and optionally compound and phase:

[9]:
entry.header
[9]:
{'V1': 'Pressure, kPa',
 'V2': 'Mole fraction of 1-butyl-3-methylimidazolium tetrafluoroborate => Liquid',
 'V3': 'Temperature, K',
 'V4': 'Excess volume, m<SUP>3</SUP>/mol => Liquid',
 'dV4': 'Error of excess volume, m<SUP>3</SUP>/mol => Liquid'}

Combining data entries formatted in this way is possible, albeit difficult. However, that is a problem of a particular database, and such a task is beyound the scope of this API.