Electrolyte database manager
Project description
electrolytes
electrolytes provides command-line and programatic access to a database of electrolytes and their properties. It includes 518 components by default (see credits). The package covers basic management of the database, including support for storing user-defined electrolytes.
Developed for use with the electroMicroTransport
toolbox for simulation of electromigrative separations.
Installation
Install with pip:
$ python3 -m pip install electrolytes
electrolytes requires Python 3.6 or later, and a relatively recent version of pip (pip may be upgraded with python3 -m pip install --upgrade pip
).
Command-line usage
Invoke the electrolytes
command-line application to search the database, find the details of a particular component, or to add/remove user-defined components. In your terminal, run:
$ electrolytes
or, alternatively:
$ python3 -m electrolytes
Add the --help
flag to learn what options are available.
Python API
The Python API is provided for electroMicroTransport
case setup scripts.
from electrolytes import database, Properties
You can look up components in the database
as you would with dict
(with component names as keys), and also add user-defined components with the add
method (as if database
were a set). Components are instances of the Constituent
class. Extra methods are also defined for database
:
def user_defined(self) -> Iterable[str]: ...
def is_user_defined(self, name: str) -> bool: ...
Constituent
names are case insensitive and will be automatically converted to all uppercase. Any instances added to (or removed from) the database
will be saved for the current operating system user. Default components cannot be changed or removed (expect a ValueError
if you try).
The public stubs of the Constituent
class are:
class Constituent:
def __init__(self,
*,
name: str,
u_neg: Sequence[float], # [-neg_count, -neg_count+1, -neg_count+2, ..., -1]
u_pos: Sequence[float], # [+1, +2, +3, ..., +pos_count]
pkas_neg: Sequence[float], # [-neg_count, -neg_count+1, -neg_count+2, ..., -1]
pkas_pos: Sequence[float], # [+1, +2, +3, ..., +pos_count]
neg_count: int = -1,
pos_count: int = -1): ...
# Interface for electroMicroTransport
def mobilities(self) -> Sequence[float]: ... # [+n, ..., +3, +2, +1, -1, -2, -3, ..., -n] (with n >= 3), SI units
def pkas(self) -> Sequence[float]: ... # [+n, ..., +3, +2, +1, -1, -2, -3, ..., -n] (with n >= 3)
def diffusivity(self) -> float: ... # SI units
Data credits
Electrolyte data taken from the Simul 6 [1] application (homepage, GitHub). The dataset of different electrolytes was originally compiled by Prof. Hirokawa [2].
[1]: GAŠ, Bohuslav; BRAVENEC, Petr. Simul 6: A fast dynamic simulator of electromigration. Electrophoresis, 2021. DOI: 10.1002/elps.202100048
[2]: HIROKAWA, Takeshi, et al. Table of isotachophoretic indices: I. Simulated qualitative and quantitative indices of 287 anionic substances in the range ph 3–10. Journal of Chromatography A, 1983, vol. 271, no 2, p. D1-D106. DOI: 10.1016/S0021-9673(00)80225-3
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file electrolytes-0.2.1.tar.gz
.
File metadata
- Download URL: electrolytes-0.2.1.tar.gz
- Upload date:
- Size: 32.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b84eb0f7761f15919fb2a9d09db610955e5717eb1e449e72f4f516cc39eb043f |
|
MD5 | 8930c62a2b188ccc7f873dab5614e42b |
|
BLAKE2b-256 | 6d67b46bb4f2c99382404b5bf6c658a8579eab4023d58e7559e9f0579683b1da |
File details
Details for the file electrolytes-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: electrolytes-0.2.1-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5ab3d3f3b59c261e15976b14642a6325eff5fafd44d870b12aad018d8c425ff |
|
MD5 | 103cd914df2ae6605c25aa4d48f56470 |
|
BLAKE2b-256 | e3e3a7323a20df422fb29bfee3645f385a62dba1505b3843f05c8e31aa755d3f |