Skip to main content

No project description provided

Project description

pyIonics Python Library Documentation

Installation

pip install pyionics

About package

this package is spesific tool for install datasets from ilthermo.org website and converting to csv, tsv files, merge and adding smiles into 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 output will be saved as a JSON file in a newly created data folder in your working directory. The output file is named as {prop}_idsets_{other parameters}.json, where {prop} is the short property name and {other parameters} reflect your query.

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:
```python
    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):

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyionics-0.4.1.tar.gz (87.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyionics-0.4.1-py3-none-any.whl (85.7 kB view details)

Uploaded Python 3

File details

Details for the file pyionics-0.4.1.tar.gz.

File metadata

  • Download URL: pyionics-0.4.1.tar.gz
  • Upload date:
  • Size: 87.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pyionics-0.4.1.tar.gz
Algorithm Hash digest
SHA256 62f07eef3df174b3b7d6db65a72dddc6a0fbaa708c44615b614c3d54b1cc9925
MD5 b4551c94ea21af5262ec6b27cab441f2
BLAKE2b-256 ed3f52aef29ae732795d918c1b7d795ffdc6d6c7c87b2cd2f52e8c10c35845a0

See more details on using hashes here.

File details

Details for the file pyionics-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: pyionics-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 85.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pyionics-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 045d0bd0d7d8eaee50d3fdee587136b955ad16fdba0a4c85e57a26ea02103467
MD5 2d77bd2b327ca543a2af6b1c56edf8f5
BLAKE2b-256 612bb4339338752cb7437245b4870fdea5333c1bb6605d98ccac03156c4b2bac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page