HSPiPy


NameHSPiPy JSON
Version 0.3.2 PyPI version JSON
download
home_pageNone
SummaryHansen Solubility Parameters in Python
upload_time2025-08-06 08:51:18
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords hansen solubility parameters chemistry solvents
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:
```python
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:
```python
hsp.get()

```

#### Visualizing HSP

Use the `plot_3d` and `plot_2d` methods to visualize the HSP data in 3D and 2D formats, respectively:
```python
hsp.plot_3d()
hsp.plot_2d()

```
![3dHSP](https://github.com/Gnpd/HSPiPy/blob/main/3dPlot.png)
![2dHSP](https://github.com/Gnpd/HSPiPy/blob/main/2dPlot.png)

### `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:

| Atribute      |      Description                                                                                                                                       |  
|---------------|:------------------------------------------------------------------------------------------------------------------------------------------------------:|
| `hsp.d`       |  Float - Dispersion parameter of the HSP.                                                                                                              |
| `hsp.p`       |  Float - Polar parameter of the HSP.                                                                                                                   |
| `hsp.h`       |  Float - Hydrogen-bonding parameter of the HSP.                                                                                                        |
| `hsp.radius`  |  Float - Radius of the solubility sphere.                                                                                                              | 
| `hsp.error`   |  Float - Error in the HSP calculation.                                                                                                                 | 
| `hsp.inside`  |  Numpy array - Solvents inside the solubility sphere.                                                                                                  | 
| `hsp.outside` |  Numpy array - Solvents outside the solubility sphere.                                                                                                 | 
| `hsp.grid`    |  A Pandas DataFrame containing the solvent data with columns for the solvent name, dispersion (D), polar (P), hydrogen-bonding (H), and score values.  | 

    

### Contributing
----------------

Contributions are welcome! If you have any suggestions, feature requests, or bug reports, please open an issue on the [GitHub repository](https://github.com/Gnpd/HSPiPy/issues).


### License
-----------

This library is licensed under the MIT License. See the [LICENSE](https://github.com/Gnpd/HSPiPy/blob/main/LICENSE) file for details.

### Acknowledgements
----------------

HSPiPy was inspired by the well-known HSP software suit [Hansen Solubility Parameters in Practice (HSPiP)](https://www.hansen-solubility.com/HSPiP/) and by the HSP community.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "HSPiPy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "hansen, solubility, parameters, chemistry, solvents",
    "author": null,
    "author_email": "Alejandro Gutierrez <agutierrez@g-npd.com>",
    "download_url": "https://files.pythonhosted.org/packages/44/7b/ab02ce7d0deadeec3746ced7d42741f6ddf88b1d0cca3a35f90f09d2bb31/hspipy-0.3.2.tar.gz",
    "platform": null,
    "description": "# HSPiPy\n\n#### Hansen Solubility Parameters in Python.\n\n### Introduction\n---------------\n\nHSPiPy 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\n\n\n### Installation\n---------------\n\nInstall **HSPiPy** easily with pip:\n\n```\npip install HSPiPy\n```\n\n\n### Usage\n--------\n\n#### Reading HSP Data\n\nTo read HSP data from a CSV file, create an instance of the `HSP` class and use the `read` method:\n```python\nfrom hspipy import HSP\n\nhsp = HSP()\nhsp.read('path_to_your_hsp_file.csv')\n\n```\n\n\n#### Calculating HSP\n\nUse the `get` method to calculate the Hansen Solubility Parameters (HSP) from your data:\n```python\nhsp.get()\n\n```\n\n#### Visualizing HSP\n\nUse the `plot_3d` and `plot_2d` methods to visualize the HSP data in 3D and 2D formats, respectively:\n```python\nhsp.plot_3d()\nhsp.plot_2d()\n\n```\n![3dHSP](https://github.com/Gnpd/HSPiPy/blob/main/3dPlot.png)\n![2dHSP](https://github.com/Gnpd/HSPiPy/blob/main/2dPlot.png)\n\n### `HSP` class methods:\n| Method              |      Description                                                                       |  \n|---------------------|:--------------------------------------------------------------------------------------:|\n| read(path)          |  Reads solvent data from a CSV file.                                                   |\n| get(inside_limit=1) |  Calculates the HSP and identifies solvents inside and outside the solubility sphere.  |\n| plot_3d()           |  Plots the HSP data in 3D.                                                             |\n| plot_2d()           |  Plots the HSP data in 2D.                                                             | \n| plots()             |  Generates both 2D and 3D plots.                                                       | \n\nOnce 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:\n\n| Atribute      |      Description                                                                                                                                       |  \n|---------------|:------------------------------------------------------------------------------------------------------------------------------------------------------:|\n| `hsp.d`       |  Float - Dispersion parameter of the HSP.                                                                                                              |\n| `hsp.p`       |  Float - Polar parameter of the HSP.                                                                                                                   |\n| `hsp.h`       |  Float - Hydrogen-bonding parameter of the HSP.                                                                                                        |\n| `hsp.radius`  |  Float - Radius of the solubility sphere.                                                                                                              | \n| `hsp.error`   |  Float - Error in the HSP calculation.                                                                                                                 | \n| `hsp.inside`  |  Numpy array - Solvents inside the solubility sphere.                                                                                                  | \n| `hsp.outside` |  Numpy array - Solvents outside the solubility sphere.                                                                                                 | \n| `hsp.grid`    |  A Pandas DataFrame containing the solvent data with columns for the solvent name, dispersion (D), polar (P), hydrogen-bonding (H), and score values.  | \n\n    \n\n### Contributing\n----------------\n\nContributions are welcome! If you have any suggestions, feature requests, or bug reports, please open an issue on the [GitHub repository](https://github.com/Gnpd/HSPiPy/issues).\n\n\n### License\n-----------\n\nThis library is licensed under the MIT License. See the [LICENSE](https://github.com/Gnpd/HSPiPy/blob/main/LICENSE) file for details.\n\n### Acknowledgements\n----------------\n\nHSPiPy was inspired by the well-known HSP software suit [Hansen Solubility Parameters in Practice (HSPiP)](https://www.hansen-solubility.com/HSPiP/) and by the HSP community.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Hansen Solubility Parameters in Python",
    "version": "0.3.2",
    "project_urls": {
        "Homepage": "https://github.com/Gnpd/HSPiPy",
        "Issues": "https://github.com/Gnpd/HSPiPy/issues",
        "Repository": "https://github.com/Gnpd/HSPiPy"
    },
    "split_keywords": [
        "hansen",
        " solubility",
        " parameters",
        " chemistry",
        " solvents"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "87551a60922bf8d0ccff8f299daf221fd4c8cdfda18147b482c3b494985fbed0",
                "md5": "8c9f30061d58ccedd12b2c480947ef58",
                "sha256": "12a4a79774533573704473747a1bc0100a508916515aedff5e01ba3013e6da63"
            },
            "downloads": -1,
            "filename": "hspipy-0.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8c9f30061d58ccedd12b2c480947ef58",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 227543,
            "upload_time": "2025-08-06T08:51:16",
            "upload_time_iso_8601": "2025-08-06T08:51:16.711550Z",
            "url": "https://files.pythonhosted.org/packages/87/55/1a60922bf8d0ccff8f299daf221fd4c8cdfda18147b482c3b494985fbed0/hspipy-0.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "447bab02ce7d0deadeec3746ced7d42741f6ddf88b1d0cca3a35f90f09d2bb31",
                "md5": "2e65e6f4bb098167c49e4c66356ddda7",
                "sha256": "9c79217b0675ee0d99307076768fb329d1b761211fca6c211ecc27a40610dd87"
            },
            "downloads": -1,
            "filename": "hspipy-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "2e65e6f4bb098167c49e4c66356ddda7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 230180,
            "upload_time": "2025-08-06T08:51:18",
            "upload_time_iso_8601": "2025-08-06T08:51:18.159167Z",
            "url": "https://files.pythonhosted.org/packages/44/7b/ab02ce7d0deadeec3746ced7d42741f6ddf88b1d0cca3a35f90f09d2bb31/hspipy-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-06 08:51:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Gnpd",
    "github_project": "HSPiPy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "hspipy"
}
        
Elapsed time: 1.10695s