Skip to main content

Taster

taster is a Python package for computing partition coefficients of Martini 3 small molecules using free energy calculations.

Given a molecule's CG structure and ITP file, taster automates the full workflow:

  • Solvation box preparation across multiple solvents
  • Parallel FEP/TI simulations via GROMACS
  • Free energy estimation using TI or MBAR
  • LogP calculation relative to a reference solvent (typically water)
  • Convergence and overlap diagnostics (forward/backward convergence, MBAR overlap matrix, TI dhdl plots) for each leg

Requirements

  • Python >= 3.11
  • GROMACS (2024.3 or greater needed if topologies use angles with restricted bending potentials)
  • numpy >= 1.20
  • pandas >= 1.0
  • matplotlib >= 3.5
  • MDAnalysis >= 2.0
  • alchemlyb >= 2.0
  • tqdm >= 4.60
  • jax >= 0.7.2

Development dependencies are managed in uv dependency groups. The test group includes pytest and alchemtest; lint, typecheck, and docs provide the corresponding development tools.


Installation

Install uv first.

For Users

Install taster with the dependencies needed to run and test it:

git clone https://github.com/Martini-Force-Field-Initiative/taster.git
cd taster
uv sync --group test

Add as well --extra cuda for NVIDIA GPU support or --extra rocm for AMD GPU support

This creates a project environment in .venv using the versions pinned in uv.lock. GROMACS must also be installed separately.

For Developers

Install taster with all linting, type-checking, testing, and documentation tools:

uv sync --all-groups

Add as well --extra cuda for NVIDIA GPU support or --extra rocm for AMD GPU support


Quick Start

Python API

import taster

# Run the full workflow
df = taster.run_partition_workflow(
    itp="MOL.itp",
    structure="MOL.gro",
    solvents=["water", "octanol-water_74-26", "hexadecane", "chloroform"],
    reference="water",
    reps=3,
    ncores=36,
)

print(df)

Or run each step individually:

import taster

# Step 1 — prepare simulation boxes
resname = taster.prepare_partition_setup(
    itp="MOL.itp",
    structure="MOL.gro",
    solvents=["water", "octanol-water_74-26", "hexadecane"],
    reps=3,
)

# Step 2 — run TI simulations
taster.run_partitions(
    resname, solvents=["water", "octanol-water_74-26", "hexadecane"], reps=3, ncores=36
)

# Step 3 — analyse
df = taster.process_partition(
    resname, solvents=["octanol-water_74-26", "hexadecane"], water="water", reps=3
)

CLI

taster --itp MOL.itp --structure MOL.gro \
       --solvents water octanol-water_74-26 hexadecane chloroform \
       --reps 3 --ncores 36 --estimator MBAR

See all options:

taster --help

Available Solvents

import taster

print(taster.available_solvents())

Output

Results are saved to ./Partitions/<resname>/:

  • results.txt — human-readable report of LogP and ΔG values per replicate and average
  • partition_avg.npy — numpy array of averaged results (dG, dG_err, logP, logP_err) per solvent

process_partition and run_partition_workflow also return a pandas.DataFrame:

rep  solvent               dG      dG_err   logP    logP_err
1    octanol-water_74-26  -12.3    0.4      2.15    0.07
1    hexadecane           -15.1    0.5      2.64    0.09
...
avg  octanol-water_74-26  -12.3    0.2      2.16    0.04
avg  hexadecane           -15.1    0.3      2.64    0.05

Convergence and Overlap Diagnostics

By default (diagnostics=True), process_partition also saves convergence/overlap figures for every replicate and solvent leg (including the reference solvent) under ./Partitions/<resname>/diagnostics/<rep>/<solvent>/:

  • mbar_convergence.png / ti_convergence.png — forward/backward convergence of the free energy estimate
  • mbar_overlap_matrix.png — MBAR overlap matrix between neighbouring lambda states (MBAR only)
  • ti_dhdl.png — dHdl curve across lambda states (TI only)
  • convergence.log — convergence analysis log, kept out of the terminal

Pass diagnostics=False to skip this and only compute LogP values.


Testing

To run the full test suite from the main folder run:

uv run pytest -v tests/

This runs all tests in tests/; alchemtest is installed through the uv test dependency group.


Notes on HPC Usage

By default ncores is set to os.cpu_count(), which returns the total number of logical CPUs on the machine. On shared HPC nodes this will be the node's full core count.

Always pass ncores explicitly to match the resources available to your job.


Developed by:


License

LGPLv2.1 License. See LICENSE for details.

Metadata

Release files for martini-taster 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for martini-taster 0.1.5
File Size Uploaded Provenance Actions
martini_taster-0.1.5.tar.gz 1.3 MB With provenance Details for martini_taster-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for martini-taster 0.1.5
File Interpreter ABI Platform Actions
martini_taster-0.1.5-py3-none-any.whl Python 3 none any Details for martini_taster-0.1.5-py3-none-any.whl

Total release size: 2.7 MB

Release files / martini_taster-0.1.5.tar.gz

Download URL martini_taster-0.1.5.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
69dfa6b8a4f57fec9a13ca414a9573c2882ce5a3d62197c89487769d86ea4bf2
BLAKE2b-256 checksum
How to use checksums
434d5874ae18005aedd2608abb94f9565c10237717d7044d34edc82264765432
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / martini_taster-0.1.5-py3-none-any.whl

Download URL martini_taster-0.1.5-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
58347a94a678ef259d89ea810703eaafe58b2f044b1e3d453a20a2618c157f02
BLAKE2b-256 checksum
How to use checksums
c6f04fab8bef932f0896cc134ad61541127721bfc22d9783ea3a2a92b0516644
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Security for martini-taster 0.1.5

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for martini_taster-0.1.5.tar.gz

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 Oct 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page