HSPiPy 0.2__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hspipy-0.3.2/HSPiPy.egg-info/PKG-INFO +123 -0
- {HSPiPy-0.2 → hspipy-0.3.2}/HSPiPy.egg-info/SOURCES.txt +9 -3
- hspipy-0.3.2/HSPiPy.egg-info/requires.txt +4 -0
- {HSPiPy-0.2 → hspipy-0.3.2}/LICENSE +21 -21
- hspipy-0.3.2/MANIFEST.in +4 -0
- hspipy-0.3.2/PKG-INFO +123 -0
- hspipy-0.3.2/README.md +94 -0
- hspipy-0.3.2/README.rst +127 -0
- hspipy-0.3.2/hspipy/2dPlot.png +0 -0
- hspipy-0.3.2/hspipy/3dPlot.png +0 -0
- hspipy-0.3.2/hspipy/__init__.py +13 -0
- hspipy-0.3.2/hspipy/db.csv +250 -0
- hspipy-0.3.2/hspipy/hsp.py +141 -0
- hspipy-0.3.2/hspipy/hsp_core.py +47 -0
- hspipy-0.3.2/hspipy/hsp_example.csv +38 -0
- hspipy-0.3.2/pyproject.toml +47 -0
- {HSPiPy-0.2 → hspipy-0.3.2}/setup.cfg +4 -4
- HSPiPy-0.2/HSPiPy.egg-info/PKG-INFO +0 -23
- HSPiPy-0.2/HSPiPy.egg-info/requires.txt +0 -4
- HSPiPy-0.2/PKG-INFO +0 -23
- HSPiPy-0.2/README.md +0 -2
- HSPiPy-0.2/hspipy/__init__.py +0 -1
- HSPiPy-0.2/hspipy/src/__init__.py +0 -0
- HSPiPy-0.2/hspipy/src/hsp.py +0 -117
- HSPiPy-0.2/setup.py +0 -27
- {HSPiPy-0.2 → hspipy-0.3.2}/HSPiPy.egg-info/dependency_links.txt +0 -0
- {HSPiPy-0.2 → hspipy-0.3.2}/HSPiPy.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: HSPiPy
|
|
3
|
+
Version: 0.3.2
|
|
4
|
+
Summary: Hansen Solubility Parameters in Python
|
|
5
|
+
Author-email: Alejandro Gutierrez <agutierrez@g-npd.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Gnpd/HSPiPy
|
|
8
|
+
Project-URL: Repository, https://github.com/Gnpd/HSPiPy
|
|
9
|
+
Project-URL: Issues, https://github.com/Gnpd/HSPiPy/issues
|
|
10
|
+
Keywords: hansen,solubility,parameters,chemistry,solvents
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: scipy>=1.0.0
|
|
25
|
+
Requires-Dist: pandas>=1.0.0
|
|
26
|
+
Requires-Dist: matplotlib>=3.0.0
|
|
27
|
+
Requires-Dist: numpy>=1.18.0
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
# HSPiPy
|
|
31
|
+
|
|
32
|
+
#### Hansen Solubility Parameters in Python.
|
|
33
|
+
|
|
34
|
+
### Introduction
|
|
35
|
+
---------------
|
|
36
|
+
|
|
37
|
+
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
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Installation
|
|
41
|
+
---------------
|
|
42
|
+
|
|
43
|
+
Install **HSPiPy** easily with pip:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
pip install HSPiPy
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Usage
|
|
51
|
+
--------
|
|
52
|
+
|
|
53
|
+
#### Reading HSP Data
|
|
54
|
+
|
|
55
|
+
To read HSP data from a CSV file, create an instance of the `HSP` class and use the `read` method:
|
|
56
|
+
```python
|
|
57
|
+
from hspipy import HSP
|
|
58
|
+
|
|
59
|
+
hsp = HSP()
|
|
60
|
+
hsp.read('path_to_your_hsp_file.csv')
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
#### Calculating HSP
|
|
66
|
+
|
|
67
|
+
Use the `get` method to calculate the Hansen Solubility Parameters (HSP) from your data:
|
|
68
|
+
```python
|
|
69
|
+
hsp.get()
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### Visualizing HSP
|
|
74
|
+
|
|
75
|
+
Use the `plot_3d` and `plot_2d` methods to visualize the HSP data in 3D and 2D formats, respectively:
|
|
76
|
+
```python
|
|
77
|
+
hsp.plot_3d()
|
|
78
|
+
hsp.plot_2d()
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+

|
|
82
|
+

|
|
83
|
+
|
|
84
|
+
### `HSP` class methods:
|
|
85
|
+
| Method | Description |
|
|
86
|
+
|---------------------|:--------------------------------------------------------------------------------------:|
|
|
87
|
+
| read(path) | Reads solvent data from a CSV file. |
|
|
88
|
+
| get(inside_limit=1) | Calculates the HSP and identifies solvents inside and outside the solubility sphere. |
|
|
89
|
+
| plot_3d() | Plots the HSP data in 3D. |
|
|
90
|
+
| plot_2d() | Plots the HSP data in 2D. |
|
|
91
|
+
| plots() | Generates both 2D and 3D plots. |
|
|
92
|
+
|
|
93
|
+
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:
|
|
94
|
+
|
|
95
|
+
| Atribute | Description |
|
|
96
|
+
|---------------|:------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
|
97
|
+
| `hsp.d` | Float - Dispersion parameter of the HSP. |
|
|
98
|
+
| `hsp.p` | Float - Polar parameter of the HSP. |
|
|
99
|
+
| `hsp.h` | Float - Hydrogen-bonding parameter of the HSP. |
|
|
100
|
+
| `hsp.radius` | Float - Radius of the solubility sphere. |
|
|
101
|
+
| `hsp.error` | Float - Error in the HSP calculation. |
|
|
102
|
+
| `hsp.inside` | Numpy array - Solvents inside the solubility sphere. |
|
|
103
|
+
| `hsp.outside` | Numpy array - Solvents outside the solubility sphere. |
|
|
104
|
+
| `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. |
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Contributing
|
|
109
|
+
----------------
|
|
110
|
+
|
|
111
|
+
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).
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### License
|
|
115
|
+
-----------
|
|
116
|
+
|
|
117
|
+
This library is licensed under the MIT License. See the [LICENSE](https://github.com/Gnpd/HSPiPy/blob/main/LICENSE) file for details.
|
|
118
|
+
|
|
119
|
+
### Acknowledgements
|
|
120
|
+
----------------
|
|
121
|
+
|
|
122
|
+
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.
|
|
123
|
+
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
2
3
|
README.md
|
|
3
|
-
|
|
4
|
+
README.rst
|
|
5
|
+
pyproject.toml
|
|
4
6
|
HSPiPy.egg-info/PKG-INFO
|
|
5
7
|
HSPiPy.egg-info/SOURCES.txt
|
|
6
8
|
HSPiPy.egg-info/dependency_links.txt
|
|
7
9
|
HSPiPy.egg-info/requires.txt
|
|
8
10
|
HSPiPy.egg-info/top_level.txt
|
|
11
|
+
hspipy/2dPlot.png
|
|
12
|
+
hspipy/3dPlot.png
|
|
9
13
|
hspipy/__init__.py
|
|
10
|
-
hspipy/
|
|
11
|
-
hspipy/
|
|
14
|
+
hspipy/db.csv
|
|
15
|
+
hspipy/hsp.py
|
|
16
|
+
hspipy/hsp_core.py
|
|
17
|
+
hspipy/hsp_example.csv
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 Alejandro
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Alejandro
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
hspipy-0.3.2/MANIFEST.in
ADDED
hspipy-0.3.2/PKG-INFO
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: HSPiPy
|
|
3
|
+
Version: 0.3.2
|
|
4
|
+
Summary: Hansen Solubility Parameters in Python
|
|
5
|
+
Author-email: Alejandro Gutierrez <agutierrez@g-npd.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Gnpd/HSPiPy
|
|
8
|
+
Project-URL: Repository, https://github.com/Gnpd/HSPiPy
|
|
9
|
+
Project-URL: Issues, https://github.com/Gnpd/HSPiPy/issues
|
|
10
|
+
Keywords: hansen,solubility,parameters,chemistry,solvents
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: scipy>=1.0.0
|
|
25
|
+
Requires-Dist: pandas>=1.0.0
|
|
26
|
+
Requires-Dist: matplotlib>=3.0.0
|
|
27
|
+
Requires-Dist: numpy>=1.18.0
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
# HSPiPy
|
|
31
|
+
|
|
32
|
+
#### Hansen Solubility Parameters in Python.
|
|
33
|
+
|
|
34
|
+
### Introduction
|
|
35
|
+
---------------
|
|
36
|
+
|
|
37
|
+
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
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Installation
|
|
41
|
+
---------------
|
|
42
|
+
|
|
43
|
+
Install **HSPiPy** easily with pip:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
pip install HSPiPy
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Usage
|
|
51
|
+
--------
|
|
52
|
+
|
|
53
|
+
#### Reading HSP Data
|
|
54
|
+
|
|
55
|
+
To read HSP data from a CSV file, create an instance of the `HSP` class and use the `read` method:
|
|
56
|
+
```python
|
|
57
|
+
from hspipy import HSP
|
|
58
|
+
|
|
59
|
+
hsp = HSP()
|
|
60
|
+
hsp.read('path_to_your_hsp_file.csv')
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
#### Calculating HSP
|
|
66
|
+
|
|
67
|
+
Use the `get` method to calculate the Hansen Solubility Parameters (HSP) from your data:
|
|
68
|
+
```python
|
|
69
|
+
hsp.get()
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### Visualizing HSP
|
|
74
|
+
|
|
75
|
+
Use the `plot_3d` and `plot_2d` methods to visualize the HSP data in 3D and 2D formats, respectively:
|
|
76
|
+
```python
|
|
77
|
+
hsp.plot_3d()
|
|
78
|
+
hsp.plot_2d()
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+

|
|
82
|
+

|
|
83
|
+
|
|
84
|
+
### `HSP` class methods:
|
|
85
|
+
| Method | Description |
|
|
86
|
+
|---------------------|:--------------------------------------------------------------------------------------:|
|
|
87
|
+
| read(path) | Reads solvent data from a CSV file. |
|
|
88
|
+
| get(inside_limit=1) | Calculates the HSP and identifies solvents inside and outside the solubility sphere. |
|
|
89
|
+
| plot_3d() | Plots the HSP data in 3D. |
|
|
90
|
+
| plot_2d() | Plots the HSP data in 2D. |
|
|
91
|
+
| plots() | Generates both 2D and 3D plots. |
|
|
92
|
+
|
|
93
|
+
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:
|
|
94
|
+
|
|
95
|
+
| Atribute | Description |
|
|
96
|
+
|---------------|:------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
|
97
|
+
| `hsp.d` | Float - Dispersion parameter of the HSP. |
|
|
98
|
+
| `hsp.p` | Float - Polar parameter of the HSP. |
|
|
99
|
+
| `hsp.h` | Float - Hydrogen-bonding parameter of the HSP. |
|
|
100
|
+
| `hsp.radius` | Float - Radius of the solubility sphere. |
|
|
101
|
+
| `hsp.error` | Float - Error in the HSP calculation. |
|
|
102
|
+
| `hsp.inside` | Numpy array - Solvents inside the solubility sphere. |
|
|
103
|
+
| `hsp.outside` | Numpy array - Solvents outside the solubility sphere. |
|
|
104
|
+
| `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. |
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Contributing
|
|
109
|
+
----------------
|
|
110
|
+
|
|
111
|
+
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).
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### License
|
|
115
|
+
-----------
|
|
116
|
+
|
|
117
|
+
This library is licensed under the MIT License. See the [LICENSE](https://github.com/Gnpd/HSPiPy/blob/main/LICENSE) file for details.
|
|
118
|
+
|
|
119
|
+
### Acknowledgements
|
|
120
|
+
----------------
|
|
121
|
+
|
|
122
|
+
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.
|
|
123
|
+
|
hspipy-0.3.2/README.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# HSPiPy
|
|
2
|
+
|
|
3
|
+
#### Hansen Solubility Parameters in Python.
|
|
4
|
+
|
|
5
|
+
### Introduction
|
|
6
|
+
---------------
|
|
7
|
+
|
|
8
|
+
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
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Installation
|
|
12
|
+
---------------
|
|
13
|
+
|
|
14
|
+
Install **HSPiPy** easily with pip:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
pip install HSPiPy
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Usage
|
|
22
|
+
--------
|
|
23
|
+
|
|
24
|
+
#### Reading HSP Data
|
|
25
|
+
|
|
26
|
+
To read HSP data from a CSV file, create an instance of the `HSP` class and use the `read` method:
|
|
27
|
+
```python
|
|
28
|
+
from hspipy import HSP
|
|
29
|
+
|
|
30
|
+
hsp = HSP()
|
|
31
|
+
hsp.read('path_to_your_hsp_file.csv')
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
#### Calculating HSP
|
|
37
|
+
|
|
38
|
+
Use the `get` method to calculate the Hansen Solubility Parameters (HSP) from your data:
|
|
39
|
+
```python
|
|
40
|
+
hsp.get()
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### Visualizing HSP
|
|
45
|
+
|
|
46
|
+
Use the `plot_3d` and `plot_2d` methods to visualize the HSP data in 3D and 2D formats, respectively:
|
|
47
|
+
```python
|
|
48
|
+
hsp.plot_3d()
|
|
49
|
+
hsp.plot_2d()
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+

|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
### `HSP` class methods:
|
|
56
|
+
| Method | Description |
|
|
57
|
+
|---------------------|:--------------------------------------------------------------------------------------:|
|
|
58
|
+
| read(path) | Reads solvent data from a CSV file. |
|
|
59
|
+
| get(inside_limit=1) | Calculates the HSP and identifies solvents inside and outside the solubility sphere. |
|
|
60
|
+
| plot_3d() | Plots the HSP data in 3D. |
|
|
61
|
+
| plot_2d() | Plots the HSP data in 2D. |
|
|
62
|
+
| plots() | Generates both 2D and 3D plots. |
|
|
63
|
+
|
|
64
|
+
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:
|
|
65
|
+
|
|
66
|
+
| Atribute | Description |
|
|
67
|
+
|---------------|:------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
|
68
|
+
| `hsp.d` | Float - Dispersion parameter of the HSP. |
|
|
69
|
+
| `hsp.p` | Float - Polar parameter of the HSP. |
|
|
70
|
+
| `hsp.h` | Float - Hydrogen-bonding parameter of the HSP. |
|
|
71
|
+
| `hsp.radius` | Float - Radius of the solubility sphere. |
|
|
72
|
+
| `hsp.error` | Float - Error in the HSP calculation. |
|
|
73
|
+
| `hsp.inside` | Numpy array - Solvents inside the solubility sphere. |
|
|
74
|
+
| `hsp.outside` | Numpy array - Solvents outside the solubility sphere. |
|
|
75
|
+
| `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. |
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Contributing
|
|
80
|
+
----------------
|
|
81
|
+
|
|
82
|
+
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).
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### License
|
|
86
|
+
-----------
|
|
87
|
+
|
|
88
|
+
This library is licensed under the MIT License. See the [LICENSE](https://github.com/Gnpd/HSPiPy/blob/main/LICENSE) file for details.
|
|
89
|
+
|
|
90
|
+
### Acknowledgements
|
|
91
|
+
----------------
|
|
92
|
+
|
|
93
|
+
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.
|
|
94
|
+
|
hspipy-0.3.2/README.rst
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
HSPiPy
|
|
2
|
+
======
|
|
3
|
+
|
|
4
|
+
Hansen Solubility Parameters in Python.
|
|
5
|
+
---------------------------------------
|
|
6
|
+
|
|
7
|
+
Introduction
|
|
8
|
+
----------------
|
|
9
|
+
|
|
10
|
+
HSPiPy is a Python library designed for calculating and visualizing
|
|
11
|
+
Hansen Solubility Parameters (HSP). The library provides tools to
|
|
12
|
+
compute HSP from a grid of solvent data and offers 2D and 3D plotting
|
|
13
|
+
capabilities to visualize the solubility parameter space
|
|
14
|
+
|
|
15
|
+
Installation
|
|
16
|
+
^^^^^^^^^^^^^^^
|
|
17
|
+
|
|
18
|
+
Install **HSPiPy** easily with pip:
|
|
19
|
+
|
|
20
|
+
::
|
|
21
|
+
|
|
22
|
+
pip install HSPiPy
|
|
23
|
+
|
|
24
|
+
Usage
|
|
25
|
+
^^^^^^^^^^^^^^^
|
|
26
|
+
|
|
27
|
+
Reading HSP Data
|
|
28
|
+
----------------
|
|
29
|
+
|
|
30
|
+
To read HSP data from a CSV file, create an instance of the ``HSP``
|
|
31
|
+
class and use the ``read`` method:
|
|
32
|
+
|
|
33
|
+
.. code:: python
|
|
34
|
+
|
|
35
|
+
from hspipy import HSP
|
|
36
|
+
|
|
37
|
+
hsp = HSP()
|
|
38
|
+
hsp.read('path_to_your_hsp_file.csv')
|
|
39
|
+
|
|
40
|
+
Calculating HSP
|
|
41
|
+
----------------
|
|
42
|
+
|
|
43
|
+
Use the ``get`` method to calculate the Hansen Solubility Parameters
|
|
44
|
+
(HSP) from your data:
|
|
45
|
+
|
|
46
|
+
.. code:: python
|
|
47
|
+
|
|
48
|
+
hsp.get()
|
|
49
|
+
|
|
50
|
+
Visualizing HSP
|
|
51
|
+
----------------
|
|
52
|
+
|
|
53
|
+
Use the ``plot_3d`` and ``plot_2d`` methods
|
|
54
|
+
to visualize the HSP data in 3D and 2D formats, respectively:
|
|
55
|
+
|
|
56
|
+
.. code:: python
|
|
57
|
+
|
|
58
|
+
hsp.plot_3d()
|
|
59
|
+
hsp.plot_2d()
|
|
60
|
+
|
|
61
|
+
``HSP`` class methods:
|
|
62
|
+
----------------------
|
|
63
|
+
|
|
64
|
+
+---------------------+---------------------------------------------------------+
|
|
65
|
+
| Method | Description |
|
|
66
|
+
+=====================+=========================================================+
|
|
67
|
+
| read(path) | Reads solvent data from a CSV file. |
|
|
68
|
+
+---------------------+---------------------------------------------------------+
|
|
69
|
+
| get(inside_limit=1) | Calculates the HSP and identifies solvents inside and |
|
|
70
|
+
| | outside the solubility sphere. |
|
|
71
|
+
+---------------------+---------------------------------------------------------+
|
|
72
|
+
| plot_3d() | Plots the HSP data in 3D. |
|
|
73
|
+
+---------------------+---------------------------------------------------------+
|
|
74
|
+
| plot_2d() | Plots the HSP data in 2D. |
|
|
75
|
+
+---------------------+---------------------------------------------------------+
|
|
76
|
+
| plots() | Generates both 2D and 3D plots. |
|
|
77
|
+
+---------------------+---------------------------------------------------------+
|
|
78
|
+
|
|
79
|
+
Once you have calculated the HSP parameters using the get() method, you
|
|
80
|
+
can access the calculated HSP parameters and related attributes through
|
|
81
|
+
the properties of the HSP class instance. Below are the attributes you
|
|
82
|
+
can access:
|
|
83
|
+
|
|
84
|
+
+----------------+---------------------------------------------------------+
|
|
85
|
+
| Attribute | Description |
|
|
86
|
+
+================+=========================================================+
|
|
87
|
+
| ``hsp.d`` | Float - Dispersion parameter of the HSP. |
|
|
88
|
+
+----------------+---------------------------------------------------------+
|
|
89
|
+
| ``hsp.p`` | Float - Polar parameter of the HSP. |
|
|
90
|
+
+----------------+---------------------------------------------------------+
|
|
91
|
+
| ``hsp.h`` | Float - Hydrogen-bonding parameter of the HSP. |
|
|
92
|
+
+----------------+---------------------------------------------------------+
|
|
93
|
+
| ``hsp.radius`` | Float - Radius of the solubility sphere. |
|
|
94
|
+
+----------------+---------------------------------------------------------+
|
|
95
|
+
| ``hsp.error`` | Float - Error in the HSP calculation. |
|
|
96
|
+
+----------------+---------------------------------------------------------+
|
|
97
|
+
| ``hsp.inside`` | Numpy array - Solvents inside the solubility sphere. |
|
|
98
|
+
+----------------+---------------------------------------------------------+
|
|
99
|
+
| ``hsp.outside``| Numpy array - Solvents outside the solubility sphere. |
|
|
100
|
+
+----------------+---------------------------------------------------------+
|
|
101
|
+
| ``hsp.grid`` | A Pandas DataFrame containing the solvent data with |
|
|
102
|
+
| | columns for the solvent name, dispersion (D), polar (P),|
|
|
103
|
+
| | hydrogen-bonding (H), and score values. |
|
|
104
|
+
+----------------+---------------------------------------------------------+
|
|
105
|
+
|
|
106
|
+
Contributing
|
|
107
|
+
^^^^^^^^^^^^^^^
|
|
108
|
+
|
|
109
|
+
Contributions are welcome! If you have any suggestions, feature
|
|
110
|
+
requests, or bug reports, please open an issue on the `GitHub
|
|
111
|
+
repository <https://github.com/Gnpd/HSPiPy/issues>`__.
|
|
112
|
+
|
|
113
|
+
License
|
|
114
|
+
^^^^^^^^^^^^^^^
|
|
115
|
+
|
|
116
|
+
This library is licensed under the MIT License. See the
|
|
117
|
+
`LICENSE <https://github.com/Gnpd/HSPiPy/blob/main/LICENSE>`__ file for
|
|
118
|
+
details.
|
|
119
|
+
|
|
120
|
+
Acknowledgements
|
|
121
|
+
^^^^^^^^^^^^^^^^^
|
|
122
|
+
|
|
123
|
+
HSPiPy was inspired by the well-known HSP software suit `Hansen
|
|
124
|
+
Solubility Parameters in Practice
|
|
125
|
+
(HSPiP) <https://www.hansen-solubility.com/HSPiP/>`__ and by the HSP
|
|
126
|
+
community.
|
|
127
|
+
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""
|
|
2
|
+
HSPiPy - Hansen Solubility Parameters in Python
|
|
3
|
+
|
|
4
|
+
A Python package for calculating and visualizing Hansen Solubility Parameters.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
__version__ = "0.3.2"
|
|
8
|
+
__author__ = "Alejandro Gutierrez"
|
|
9
|
+
__email__ = "agutierrez@g-npd.com"
|
|
10
|
+
|
|
11
|
+
from .hsp import HSP
|
|
12
|
+
|
|
13
|
+
__all__ = ["HSP"]
|