Skip to content

Commit

Permalink
Merge pull request #11 from SalvadorBrandolin/main
Browse files Browse the repository at this point in the history
trying to fix docs
  • Loading branch information
SalvadorBrandolin authored Feb 6, 2024
2 parents f7e10be + c69d5a6 commit 49ee344
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 37 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,10 @@ PROPERTIES FROM GROUP-CONTRIBUTIONS. Chemical Engineering Communications,
[3] Joback, K. G. (1989). Designing molecules possessing desired physical
property values [Thesis (Ph. D.), Massachusetts Institute of Technology].
https://dspace.mit.edu/handle/1721.1/14191

[4] Bondi, A. (1966). Estimation of Heat Capacity of Liquids.
Industrial & Engineering Chemistry Fundamentals, 5(4), 442–449.
https://doi.org/10.1021/i160020a001

[5] Rowlinson, J. S., & Swinton, F. (2013). Liquids and liquid
mixtures: Butterworths monographs in chemistry. Butterworth-Heinemann
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ requires = ["setuptools", "wheel"]
line-length = 79
target-version = ["py310"]

testpaths = [
"tests"
]

[tool.pytest.ini_options]
markers = [
"UNIFAC: classic UNIFAC model tests",
Expand Down
14 changes: 13 additions & 1 deletion ugropy/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,21 @@
UNIFAC's subgroups detection functions.
"""

from .get_groups import get_groups
from .checks import (
check_has_composed,
check_has_hidden_ch2_ch,
check_has_molecular_weight_right,
)
from .composed import correct_composed
from .get_model_groups import get_groups
from .problematics import correct_problematics


__all__ = [
"check_has_composed",
"check_has_hidden_ch2_ch",
"check_has_molecular_weight_right",
"correct_composed",
"get_groups",
"correct_problematics",
]
2 changes: 1 addition & 1 deletion ugropy/core/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from rdkit import Chem
from rdkit.Chem import Descriptors

from .detect_groups import group_matches
from .detect_model_groups import group_matches


def check_has_molecular_weight_right(
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions ugropy/core/get_groups.py → ugropy/core/get_model_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
check_has_hidden_ch2_ch,
check_has_molecular_weight_right,
)
from .correct_composed import correct_composed
from .correct_problematics import correct_problematics
from .detect_groups import detect_groups
from .composed import correct_composed
from .detect_model_groups import detect_groups
from .problematics import correct_problematics


def get_groups(
Expand Down
File renamed without changes.
29 changes: 2 additions & 27 deletions ugropy/joback.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,6 @@ class Joback:
vapor_pressure_params : dict
Vapor pressure G and k parameters for the Riedel-Plank-Miller [2]
equation [bar].
Bibliography
------------
[1] Joback, K. G., & Reid, R. C. (1987). ESTIMATION OF PURE-COMPONENT
PROPERTIES FROM GROUP-CONTRIBUTIONS. Chemical Engineering Communications,
57(1–6), 233–243. https://doi.org/10.1080/00986448708960487
[2] Joback, K. G. (1989). Designing molecules possessing desired physical
property values [Thesis (Ph. D.), Massachusetts Institute of Technology].
https://dspace.mit.edu/handle/1721.1/14191
"""

def __init__(
Expand Down Expand Up @@ -156,7 +146,7 @@ def heat_capacity_liquid(
) -> Union[float, NDArray]:
"""Calculate the liquid heat capacity [J/mol/K].
Uses the Rowlinson-Bondi [1-2] equation with the Joback estimated
Uses the Rowlinson-Bondi [4-5] equation with the Joback estimated
properties.
Parameters
Expand All @@ -168,15 +158,6 @@ def heat_capacity_liquid(
-------
Union[float, NDArray]
Ideal gas heat capacity [J/mol/K].
Bibliography
------------
[1] Bondi, A. (1966). Estimation of Heat Capacity of Liquids.
Industrial & Engineering Chemistry Fundamentals, 5(4), 442–449.
https://doi.org/10.1021/i160020a001
[2] Rowlinson, J. S., & Swinton, F. (2013). Liquids and liquid
mixtures: Butterworths monographs in chemistry. Butterworth-Heinemann
"""
tr = temperature / self.critical_temperature
w = self.acentric_factor
Expand Down Expand Up @@ -223,7 +204,7 @@ def vapor_pressure(
) -> Union[float, NDArray]:
"""Calculate the vapor pressure [bar].
Uses the Riedel-Plank-Miller [1] equation with the Joback estimated
Uses the Riedel-Plank-Miller [3] equation with the Joback estimated
properties.
Parameters
Expand All @@ -235,12 +216,6 @@ def vapor_pressure(
-------
Union[float, NDArray]
Vapor pressure [bar]
Bibliography
------------
[1] Joback, K. G. (1989). Designing molecules possessing desired
physical property values [Thesis (Ph. D.), Massachusetts Institute of
Technology]. https://dspace.mit.edu/handle/1721.1/14191
"""
tr = temperature / self.critical_temperature

Expand Down
2 changes: 1 addition & 1 deletion ugropy/model_getters.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
unifac_matrix,
unifac_subgroups,
)
from ugropy.core.get_groups import get_groups
from ugropy.core.get_model_groups import get_groups


def instantiate_chem_object(
Expand Down

0 comments on commit 49ee344

Please sign in to comment.