Skip to content

Latest commit

 

History

History
127 lines (95 loc) · 4.62 KB

README.rst

File metadata and controls

127 lines (95 loc) · 4.62 KB

HSPiPy

Hansen Solubility Parameters in Python.

Introduction

HSPiPy is a Python library designed for calculating and visualizing Hansen Solubility Parameters (HSP). The library provides tools to compute HSP from a grid of solvent data and offers 2D and 3D plotting capabilities to visualize the solubility parameter space

Installation

Install HSPiPy easily with pip:

pip install HSPiPy

Usage

Reading HSP Data

To read HSP data from a CSV file, create an instance of the HSP class and use the read method:

from hspipy import HSP

hsp = HSP()
hsp.read('path_to_your_hsp_file.csv')

Calculating HSP

Use the get method to calculate the Hansen Solubility Parameters (HSP) from your data:

hsp.get()

Visualizing HSP

Use the plot_3d and plot_2d methods to visualize the HSP data in 3D and 2D formats, respectively:

hsp.plot_3d()
hsp.plot_2d()

HSP class methods:

Method Description
read(path) Reads solvent data from a CSV file.
get(inside_limit=1) Calculates the HSP and identifies solvents inside and outside the solubility sphere.
plot_3d() Plots the HSP data in 3D.
plot_2d() Plots the HSP data in 2D.
plots() Generates both 2D and 3D plots.

Once you have calculated the HSP parameters using the get() method, you can access the calculated HSP parameters and related attributes through the properties of the HSP class instance. Below are the attributes you can access:

Contributing

Contributions are welcome! If you have any suggestions, feature requests, or bug reports, please open an issue on the GitHub repository.

License

This library is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

HSPiPy was inspired by the well-known HSP software suit Hansen Solubility Parameters in Practice (HSPiP) and by the HSP community.