Skip to content

Commit

Permalink
Merge pull request #51 from molssi-seamm/dev
Browse files Browse the repository at this point in the history
Added Energy/Temperature transformations for thermochemistry
  • Loading branch information
seamm committed Jun 5, 2023
2 parents f755a7f + da47944 commit ae7ce32
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
History
=======

2023.6.4 -- Added more unit conversions to support thermochemistry
* added E_h/K --> kJ/mol/K

2023.4.6 -- Added more unit conversions to support Buckingham potentials
* added e.g. eV*Å^6 to kcal/mol*Å^6 to support Buckingham pontetials

Expand Down
14 changes: 14 additions & 0 deletions seamm_util/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
_d.add_transformation("[mass] / [substance]", "[mass]", lambda ureg, x: x * factor)
_d.add_transformation("[mass]", "[mass] / [substance]", lambda ureg, x: x / factor)

# kJ/mol/Å --> eV/Å
_d.add_transformation(
"[length] * [mass] / [substance] / [time] ** 2",
"[length] * [mass] / [time] ** 2",
Expand All @@ -165,6 +166,7 @@
lambda ureg, x: x / factor,
)

# kJ/mol --> eV
_d.add_transformation(
"[length] ** 2 * [mass] / [substance] / [time] ** 2",
"[length] ** 2 * [mass] / [time] ** 2",
Expand All @@ -176,6 +178,18 @@
lambda ureg, x: x / factor,
)

# kJ/mol/K --> eV/K
_d.add_transformation(
"[length] ** 2 * [mass] / [substance] / [temperature] / [time] ** 2",
"[length] ** 2 * [mass] / [temperature] / [time] ** 2",
lambda ureg, x: x * factor,
)
_d.add_transformation(
"[length] ** 2 * [mass] / [temperature] / [time] ** 2",
"[length] ** 2 * [mass] / [substance] / [temperature] / [time] ** 2",
lambda ureg, x: x / factor,
)

# kJ/mol/Å^2 --> eV/Å^2
_d.add_transformation(
"[mass] / [substance] / [time] ** 2",
Expand Down

0 comments on commit ae7ce32

Please sign in to comment.