thermoextrap: Thermodynamic Extrapolation/Interpolation Library
This repository contains code used and described in references 1 2.
Overview
If you find this code useful in producing published works, please provide an appropriate citation. Note that the second citation is focused on adding features that make use of GPR models based on derivative information produced by the core code base. For now, the GPR code, along with more information, may be found here. In a future release, we expect this to be fully integrated into the code base rather than a standalone module.
Code included here can be used to perform thermodynamic extrapolation and interpolation of observables calculated from molecular simulations. This allows for more efficient use of simulation data for calculating how observables change with simulation conditions, including temperature, density, pressure, chemical potential, or force field parameters. Users are highly encourage to work through the Jupyter Notebooks presenting examples for a variety of different observable functional forms. We only guarantee that this code is functional for the test cases we present here or for which it has previously been applied Additionally, the code may be in continuous development at any time. Use at your own risk and always check to make sure the produced results make sense. If bugs are found, please report them. If specific features would be helpful just let us know and we will be happy to work with you to come up with a solution.
Features
- Fast calculation of derivatives
Status
This package is actively used by the author. Please feel free to create a pull request for wanted features and suggestions!
Installation
Use one of the following to install thermoextrap:
conda install -c conda-forge thermoextrap
or
pip install thermoextrap
Additional dependencies
To utilize the full potential of thermoextrap, additional dependencies are
needed. This can be done via pip by using:
pip install thermoextrap[all]
If using conda, then you'll have to manually install some dependencies. For example, you can run:
conda install bottleneck dask "pymbar>=4.0"
At this time, it is recommended to install the Gaussian Process Regression (GPR) dependencies via pip, as the conda-forge recipes are slightly out of date:
pip install tensorflow tensorflow-probability "gpflow>=2.6.0"
Building cmomy library
thermoextrap makes extensive use of the cmomy library. If using
thermoextrapin parallel, you should either first compile cached numba code
with
python -m cmomy.compile
Or run your command with the environment variable CMOMY_NUMBA_CACHE set to
false
CMOMY_NUMBA_CACHE=false python ....
Installing from source
The repo is setup to use uv to create a development environment. Use the following:
uv sync
This environment will include all additional dependencies mentioned above.
Alternatively, you can install the (locked) development dependencies using:
uv export --group dev > requirements-dev.txt
uv pip install -r requirements/lock/dev.txt
It is not recommended to install the development dependencies with conda.
Example usage
import thermoextrap
Documentation
See the documentation for a look at thermoextrap in action.
To have a look at using thermoextrap with Gaussian process regression, look in
the gpr and
gpr_active_learning directories.
What's new?
See changelog.
License
This is free software. See LICENSE.
Related work
This package extensively uses the cmomy package to handle central comoments.
Contact
Questions may be addressed to Bill Krekelberg at william.krekelberg@nist.gov or Jacob Monroe at jacob.monroe@uark.edu.
Credits
This package was created using Cookiecutter with the usnistgov/cookiecutter-nist-python template.
-
Extrapolation and Interpolation Strategies for Efficiently Estimating Structural Observables as a Function of Temperature and Density ↩
-
Leveraging Uncertainty Estimates and Derivative Information in Gaussian Process Regression for Expedited Data Collection in Molecular Simulations. In preparation. ↩
Metadata
Release files for thermoextrap 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| thermoextrap-1.2.1.tar.gz | 435.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| thermoextrap-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 556.8 kB
Release files / thermoextrap-1.2.1.tar.gz
| Download URL | thermoextrap-1.2.1.tar.gz |
|---|---|
| Size | 435.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28f20a3670525a387a1bb270cff350a821ad9303963747659e187bf481af937e
|
|
BLAKE2b-256 checksum How to use checksums |
3017a1d0bb460dbfe243110fa202fc2c87b16c8bb81b6acb9d1ca7551b818eb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.
Transparency logRelease files / thermoextrap-1.2.1-py3-none-any.whl
| Download URL | thermoextrap-1.2.1-py3-none-any.whl |
|---|---|
| Size | 121.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1160a79072731b77abf452b0110486eede3effca6a566e8094d7c6244d164dd2
|
|
BLAKE2b-256 checksum How to use checksums |
e3ba66790efe2b6cebeaca3de5685b3bd132c7b64dc2a2f2225af3f548284d87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.
Transparency log