Skip to main content

pyIonics Python Library Documentation

Installation

pip install pyionics

About package

This package is a specialized tool for downloading datasets from ilthermo.org, converting them to CSV or TSV files, merging datasets, and adding SMILES information to your data.

Why you should use this package?

  1. property ids update for each updating of ilthermo.org site
  2. Converting csv and tsv
  3. adding smiles
  4. clean dirty json data for converting to other formats
  5. merge datasets

Usage

First, import the library in your Python code:

import pyionics as pyi

Retrieve Idsets Data

Use the getIdsets function to retrieve data:

pyi.getIdsets(
    prop="",          # property short name (e.g., 'dens')
    data_path=None,   # optional: path to your data
    cmp="",           # component name (e.g., 'benzene')
    ncmp="0",         # component number: 0=all, 1=pure, 2=binary, 3=triple
    year="",          # publish year
    auth="",          # author name
    keyw=""           # keyword
)

getIdsets Parameters

Parameter Description Example
prop Property short name dens
cmp Component name benzene
ncmp Component number 1, 2, 3
year Publish year 2020
auth Author name Smith
keyw Keyword ionic
  • prop: Use the short version of the property name (see below).
  • ncmp: 0 = all, 1 = pure, 2 = binary, 3 = triple.

Retrieve Datasets

Use the getData function to retrieve specific datasets.
When you call getData, it will collect all datasets matching your criteria (using getIdsets internally) and save them as JSON files in a newly created data folder in your working directory.

pyi.getData(
    prop=None,        # property short name (e.g., 'dens')
    data_path=None,   # optional: path to your data
    cmp="",           # component name (e.g., 'benzene')
    ncmp="0",         # component number: 0=all, 1=pure, 2=binary, 3=triple
    year="",          # publish year
    auth="",          # author name
    keyw=""           # keyword
)

Note: getData has the same parameters as getIdsets. See the table above for details.

Property List

Only short versions of property names are available for the getIdsets and getData functions.

When you use getIdsets, the results are saved as a JSON file in a newly created data folder in your working directory. The output file is named {prop}_idsets_{other parameters}.json, where {prop} is the short property name and {other parameters} reflect your query criteria. The short property names correspond to those used in pyILT2.

Property Name ID Short
activity BPpY a
osmotic-coefficient VjHv phi
composition-at-phase-equilibrium dNip Xpeq
eutectic-composition MbEq Xeut
henrys-law-constant lIUh Hc
ostwald-coefficient eCTp L
tieline neae tline
upper-consolute-composition WbZo Xucon
critical-pressure BPNz Pc
critical-temperature rDNz Tc
lower-consolute-temperature qpSz
upper-consolute-pressure MvMG Pucon
upper-consolute-temperature bRXE Tucon
apparent-enthalpy cpbY Hap
apparent-molar-heat-capacity teHk capm
enthalpy-of-dilution rTYh Hdil
enthalpy-of-mixing-of-a-binary-solvent-with-component aeiA Hmix
enthalpy-of-solution VTiT
excess-enthalpy brzp Hex
partial-molar-enthalpy Sqxi Hpm
partial-molar-heat-capacity mFmK
enthalpy tnYd H
enthalpy-function kthO HvT
entropy qdUt S
heat-capacity-at-constant-pressure IZSt cp
heat-capacity-at-constant-volume KvgF cv
heat-capacity-at-vapor-saturation-pressure zJIE cpe
enthalpy-of-transition-or-fusion CXUw Hfus
enthalpy-of-vaporization-or-sublimation iaOF Hvap
equilibrium-pressure SwyC Peq
equilibrium-temperature ghKa Teq
eutectic-temperature lnrs Teut
monotectic-temperature LUaF Tmot
normal-melting-temperature NmYB Tm
interfacial-tension YQDr s
refractive-index bNnk n
relative-permittivity imdq rperm
speed-of-sound NlQd sos
surface-tension-liquid-gas ETUw slg
binary-diffusion-coefficient HooV
electrical-conductivity Ylwl econd
self-diffusion-coefficient jjnq Dself
thermal-conductivity pAFI Tcond
thermal-diffusivity KTcm Dterm
tracer-diffusion-coefficient vBeU Dtrac
viscosity PusA visc
normal-boiling-temperature hkog Tb
vapor-or-sublimation-pressure HwfJ
adiabatic-compressibility WxCH kS
apparent-molar-volume zNjL Vapm
density JkYu dens
excess-volume psRu Vex
isobaric-coefficient-of-volume-expansion hXfd aV
isothermal-compressibility Bvon kT
partial-molar-volume LNxL Vpm

Convert Functions

After retrieving datasets with an idsets request, the data is saved as a JSON file. The pyionics library provides functions to convert these JSON files to CSV or TSV formats using convert2csv and convert2tsv. Note that merging datasets and adding SMILES information require the data to be in CSV format.

Just write the folder name located inside the data folder; do not include data as the parent directory.To convert files, use the following functions:

Convert to CSV:

    pyi.convert2csv(folder_name='', file_name='')
    # Converts a JSON file to CSV format
    # Only one of the parameters (`folder_name` or `file_name`) is required.

Convert to TSV:

    pyi.convert2tsv(folder_name='', file_name='')
    # Converts a JSON file to TSV format
    # Only one of the parameters (`folder_name` or `file_name`) is required.

Add SMILES

Note : getSmiles function runs just csv files. Also for folder_name parameter it shoud start with csv_ (other case function do not works right).

    pyi.addSmiles(folder_name='', file_name='')

Merge datasets

MergeFIles is function to merge datasets in folder

    pyi.mergeFiles(folder_name)

Metadata

Release files for pyionics 0.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyionics 0.4.3
File Size Uploaded Provenance Actions
pyionics-0.4.3.tar.gz 87.3 kB Without provenance Details for pyionics-0.4.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyionics 0.4.3
File Interpreter ABI Platform Actions
pyionics-0.4.3-py3-none-any.whl Python 3 none any Details for pyionics-0.4.3-py3-none-any.whl

Total release size: 173.1 kB

Release files / pyionics-0.4.3.tar.gz

Download URL pyionics-0.4.3.tar.gz
Size 87.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3875770e37d3fdac30b45338e3d7462bbb1cffad5cf1de8e8cde2c4607089e90
BLAKE2b-256 checksum
How to use checksums
0c26e76d7328b758064db365aa07acf19cd62ff0b4628d8a0fa5ac38b8fe8308
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pyionics-0.4.3-py3-none-any.whl

Download URL pyionics-0.4.3-py3-none-any.whl
Size 85.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99e814ab4a657a2cfaa3056a008f5a4a7d28856e0dfd126d547c37c44649a7ff
BLAKE2b-256 checksum
How to use checksums
39666e25c840ae50a7ccfccf8b79a66daa9439a2e949bcaa66682aa0f5ab27dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Security for pyionics 0.4.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page