Skip to main content

QCM-D data acquisition and analysis software with rheological modeling

Project description

DOI Python 3.12+ License: MIT

RheoQCM - QCM Data Collection and Analysis Software

RheoQCM is a Python package for QCM-D (Quartz Crystal Microbalance with Dissipation) data acquisition and rheological analysis. It features a modern JAX-powered computational core for high-performance modeling and a PyQt6-based GUI for data collection and visualization.

Screenshot of the User Interface

Features

  • High-performance modeling with JAX (GPU-accelerated when available)
  • QCM data collection and analysis in one integrated package
  • Import and analyze external QCM-D datasets (.xlsx, .mat, .h5)
  • Multilayer thin-film analysis using the Small Load Approximation (SLA)
  • Bayesian parameter estimation with MCMC (NumPyro backend)
  • Uncertainty quantification via autodiff-based covariance propagation
  • Cross-platform analysis (Linux/macOS/Windows), data collection on Windows

Requirements

  • Python 3.12+
  • JAX 0.8.0+ with jaxlib 0.8.0+
  • PyQt6 (for GUI)
  • NumPy 2.0+

For data collection with network analyzers:

  • Windows (32-bit Python)
  • myVNA software and AccessMyVNA

Installation

From PyPI (Recommended)

pip install rheoQCM

From Source

git clone https://github.com/imewei/RheoQCM.git
cd RheoQCM
pip install -e .

GPU Acceleration (Linux + NVIDIA)

For 20-100x speedup on large datasets:

# Auto-detect system CUDA version and install matching JAX
make install-jax-gpu

# Or explicitly choose CUDA version:
make install-jax-gpu-cuda13  # CUDA 13.x + SM >= 7.5
make install-jax-gpu-cuda12  # CUDA 12.x + SM >= 5.2

Prerequisites:

  • NVIDIA GPU (Maxwell or newer, SM >= 5.2)
  • System CUDA 12.x or 13.x installed (nvcc in PATH)
GPU Compatibility Table
GPU Generation Example GPUs SM Version CUDA 13 CUDA 12
Ada Lovelace RTX 40xx, L40 8.9 Yes Yes
Ampere RTX 30xx, A100 8.x Yes Yes
Turing RTX 20xx, T4 7.5 Yes Yes
Volta V100, Titan V 7.0 No Yes
Pascal GTX 10xx, P100 6.x No Yes
Maxwell GTX 9xx 5.x No Yes

Fallback Mode

If JAX is unavailable, install the fallback dependency:

pip install "rheoQCM[fallback]"

Quick Start

Using the GUI

python -m rheoQCM.main

Scripting with the Core API

from rheoQCM.core import QCMModel, configure_jax

configure_jax()  # Enable float64 precision

# Create model and load experimental data
model = QCMModel(f1=5e6, refh=3)
model.load_delfstars({3: -1000+100j, 5: -1700+180j, 7: -2500+280j})

# Solve for mechanical properties
result = model.solve_properties(nh=[3, 5, 3])
print(f"drho = {result.drho:.3e} kg/m^2")
print(f"phi = {result.phi:.4f} rad")
print(f"|G*|rho = {result.grho_refh:.3e} Pa·kg/m^3")

Batch Processing with GPU Acceleration

import jax.numpy as jnp
from rheoQCM.core import batch_analyze_vmap

# Process many data points in parallel
delfstars = jnp.array([
    [-1000+100j, -1700+180j, -2500+280j],
    [-1100+110j, -1800+190j, -2600+290j],
    # ... thousands more rows
])
results = batch_analyze_vmap(delfstars, harmonics=[3, 5, 7], f1=5e6, refh=3)

Importing QCM-D Data

  1. Export from instrument as .xlsx with columns: t(s), delf1, delg1, delf3, delg3, ...
  2. In GUI: File > Import QCM-D data
  3. Set base frequency in Settings > Hardware > Crystal > Base Frequency
  4. Analyze and export results

Documentation

Project Structure

src/
  rheoQCM/           # Main package
    core/            # JAX-accelerated computational core
      physics.py     # Layer 1: Pure physics functions
      multilayer.py  # Layer 1: Multilayer calculations
      model.py       # Layer 2: State management and solvers
      analysis.py    # Layer 3: Analysis interface
      bayesian.py    # Bayesian MCMC fitting
      uncertainty.py # Uncertainty propagation
    gui/             # PyQt6 GUI components
    io/              # I/O handlers (HDF5, Excel, JSON)
    modules/         # Application modules
    services/        # Service layer
  QCMFuncs/          # Legacy API (deprecated)
tests/               # Test suite
docs/                # Sphinx documentation

Citation

Please cite as:

@software{rheoqcm,
  author = {Wang, Qifeng and Yang, Megan and Shull, Kenneth R.},
  title = {RheoQCM: QCM Data Collection and Analysis Software},
  year = {2025},
  publisher = {GitHub},
  url = {https://github.com/imewei/RheoQCM},
  doi = {10.5281/zenodo.2486039}
}

Authors

  • Qifeng Wang - Primary developer
  • Megan Yang - Developer
  • Kenneth R. Shull - Project PI

Fork Maintainer

  • Wei Chen (wchen@anl.gov) - Contributor and maintainer of this fork

Related Projects

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Josh Yeh - Original MATLAB implementation
  • Diethelm Johannsmann - QCM theory
  • Lauren Sturdy, Ivan Makarov - Technical contributions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rheoqcm-0.1.0.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rheoqcm-0.1.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file rheoqcm-0.1.0.tar.gz.

File metadata

  • Download URL: rheoqcm-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rheoqcm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bbbf656e4f328c5018473d162922fef214c460d53617deab29887c6e5d9f4eaf
MD5 b0452f1315590eb51db84bdc09e9d232
BLAKE2b-256 65c10001253dc6e09d51d0905891b3973c9e7ee310fc9f7c49e85f6c34edd911

See more details on using hashes here.

Provenance

The following attestation bundles were made for rheoqcm-0.1.0.tar.gz:

Publisher: release.yml on imewei/RheoQCM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rheoqcm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rheoqcm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rheoqcm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a04f87bbf0e5b0c35bdb91e0f00bdbf5f836c258c20d65b5e16ce8d5c3639de
MD5 c1b5ad4f7c2fa1c1c3cadc5588cf5408
BLAKE2b-256 deb133d943a3c239ab1640543d3cd31949a007dc828351165941ebb3b296d9ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for rheoqcm-0.1.0-py3-none-any.whl:

Publisher: release.yml on imewei/RheoQCM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page