Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,481 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux and Windows Build: Build Status DOI CodeFactor

SupraFit Logo

SupraFit

A Open Source Qt6 based fitting tool for supramolecular titration experiments (NMR, UV-VIS and Calorimetry), Michaelis Menten Kinetics and indidual custom models.

A short introduction can be downloaded here. For question, comments, feedback etc. please use the email adress on page 18 in that Quickstart.

Getting SupraFit

Three builds are available:

  • SupraFit 2.0 — the stable release, for Linux (AppImage), Windows and macOS. It does not change.
  • SupraFit 2.5.139 — a fixed snapshot of the development version, for Linux (AppImage and tar.gz) and Windows. Several years of work beyond 2.0, and like 2.0 it stays exactly as it is, so a result obtained with it can be reproduced later.
  • Nightly — rebuilt from the master branch on every change, for Linux, Windows and macOS. The newest features, and the newest bugs.

Please try the development version and say what you find. Much of it has been used on far fewer real datasets than the stable release, and the problems that matter tend to show up only on someone else's data. Bug reports, results that look wrong, and things that are simply awkward to use are all equally welcome — open an issue or write to the address on page 18 of the Quickstart.

Windows users please note, that SupraFit 2.0 requires the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 to be installed, which includes for example msvcp140.dll and msvcp140_1.dll. It may be downloaded from the official website. This holds not true for the development builds (2.5.x and the nightly) for Windows platforms. They are compilied with MinGW and all dlls are shipped with the zip archive.

History

  • SupraFit 2.0 stable version, first public release
  • SupraFit 2.x most recent development version, built automatically for Linux, Windows and macOS on every change to the master branch.

Running

Windows

Start SupraFit (suprafit.exe) from the build directory. The dlls have to be in place. Desktop shortcuts will work though.

Linux

Run the AppImage. It may have to be marked as executable: chmod +x SupraFit.AppImage*

macOS

The content of the dmg file has to be copied to the place where other programs are stored. Please not, that SupraFit on macOS has not been tested at. If there are any problems, please feel free to create an issue or contact me directly.

Nightly Build

Latest snapshots (not more than 5) of the current development can be found via the preleases. There are some new features and bugs included.

  • Models can be defined by writing the equation yourself instead of picking a built-in one — see docs/ScriptedModels.md. The equation is compiled once, may use per-series parameters, and can call the equilibrium solver and the cubic and quadratic roots directly.
  • Binding models are no longer limited to fixed stoichiometries: an equilibrium is entered as free-text reaction equations (A + B <=> AB, 2 A <=> A2, A + AB <=> A2B) and solved for arbitrary components. The nmr_any, uvvis_any, fl_any and itc_any models are built on it.
  • The current master branch contains the thermogram import routed through the core, developed in the refactor/thermo-gui-routing branch. The import dialog now shows the full precision that the command line has always read, so its volume and heat columns display more digits than before. The last binaries without this change are 2.5.139.
  • The current master branch contains a reworked engine for scripted models and a corrected BC50 calculation, developed in the feature/scripted-model-engine branch. The last binaries without these changes are 2.5.139.
  • The current master branch contains a Python interface (import suprafit), developed in the feature/python-interface branch. It is not part of the binaries above and has to be built with -DSUPRAFIT_PYBIND=ON; see python/README.md.

Results that change with this version. BC50 for the reaction-defined models (nmr_any, uvvis_any, fl_any, itc_any) was calculated from the 1:1 formula regardless of the reaction system that was loaded, and is now derived from the model's own stoichiometry. Grid-search output shows BC50 for the remaining ITC models and over the correct interval — the previous code collapsed that interval to a single point. The 2:1/1:1 models solve the cubic mass balance in closed form, which the previous solver did not satisfy exactly, so refitting such a model can land on slightly different constants. Values stored in a project file are not rewritten until you refit. To reproduce earlier numbers, use 2.5.139.

A fit that stops without moving off its start value is no longer reported as converged, and a fit that reaches the optimum exactly now is. This changes the flag shown next to a result, not the result itself.

Usage

SupraFit handles tables that are composed as follows:

Titration experiments (NMR, UV-VIS)

host guest signal1 signal2 signal3
0.1 0 1 2 3
0.1 0.01 1.1 2.1 3.3

The first two columns contain the concentrations of host (fixed concentration) and guest (variable concentration, silent component), the following columns should contain the NMR or UV/VIS signal.

Besides the classic fixed-stoichiometry models (1:1, 1:2, 2:1, …), SupraFit supports flexible binding stoichiometries: the equilibrium system is defined by free-text reaction equations (e.g. A + B <=> AB, A + 2 B <=> AB2, 2 A <=> A2 for host self-aggregation), from which a general N-component speciation is solved numerically. This covers NMR, UV-VIS, fluorescence and ITC and handles arbitrary species, including intermediate complexes reused as reactants and self-association preceding complex formation.

ITC data

v q
0.1 -12
0.1 -11

The first column contains the injected volume while the second columns has to contains the integrated heat response of the system.

SupraFit supports import of *.itc and plain x-y files with peak integration and some basic base line corrections. Alternatively *.dH files from Origin can be loaded right away. Plain x-y files for thermograms should look like:

2 -0.001
4 -0.001
6 -0.002
8 -0.002
10 -0.002
12 -0.001

With the first row having the time and the second the observed heat.

Michaelis Menten Kinetics

S_0 v
0.1 0
0.1 0.01

The first column contains the substrat concentration while the second columns has to contains the rate of reaction.

Copy such a table from any spreadsheet application and paste it in the New table dialog or load such a table as semicolon or tabulator seperated file with Open File.

SupraFit loads and saves tables and calculated models as json files *.json or compressed json files *.suprafit.

Constrained Optimisation

Global parameters (local will follow) can now be optimised with respect to boundary conditations. The limits can be set by clicking the three-dotted push button next to the parameter value. This is quite an experimental feature, since the correct math is somehow complicated. The boundary conditions in SupraFit are realised using a logfermi potential as penalty function (see https://xtb-docs.readthedocs.io/en/latest/xcontrol.html#different-potential-shapes). For best optimisation experience, make sure that the initial guess of the parameters lies within the choosen boundaries.

Statistics

SupraFit provides some statistical analysis. Implemented methods are based on the following approaches:

  • Monte Carlo simulation (Percentile method based confidence calculation)
  • F-Test based confidence calculation
  • Resampling methods

The Monte Carlo simulation and F-Test based approches are explained in C. Hübler, Chem. Methods 2022, e202200006. DOI 10.1002/cmtd.202200006. Further analysis using Monte Carlo simulation and the Resampling methods are described in more detail in Hübler C. 2022. Analysing binding stoichiometries in NMR titration experiments using Monte Carlo simulation and resampling techniques. PeerJ Analytical Chemistry 4:e23 https://doi.org/10.7717/peerj-achem.23. A detailed handbook will be provided as soon as possbile.

Download source code and requirements

git clones automatically fisher_dist and libpeakpick.

  • fisher_dis provides the finv-function like in octave to calculate the quantiles of the F distribution
  • libpeakpick provides some basic peak picking, peak integration and regression tools. It retrives a copy of eigen from official git mirror, that is used by SupraFit as well.
  • CuteCharts QtCharts adopted for SupraFit
  • ChaiScript and ChaiScriptExtra The current development version (2.x) contains limited scripting implementation using ChaiScript.

SupraFit comes with the some selected Google Noto Fonts. They are optional and can be included into the binary during compile-time (set -Dnoto_font=true\false as cmake argument).

Compiling

To compile SupraFit you will need CMake 3.21 or newer, a C++14-capable compiler and Qt 6.2.

SupraFit needs QtCharts, so please provide it. It can/should be checked in the Installer Tools from Qt.

SupraFit has been successfully compilied with:

  • gcc 5.2 and newer versions
  • clang 3.9

on linux systems, on windows systems using

  • mingw 5.3 or newer

MSVC 2015, MS 2019 builds failed with Qt 6. Before the port, MSVC worked well.

Compiling works on macOS 10.15 with the latest Qt (6.2.0). XCode was downloaded by the Qt Installer, CMake downloaded and installed manually.

Windows 7 or higher is mandatory.

To obtain SupraFit 2.0, use

git clone --recursive -b 2.0  https://github.com/conradhuebler/SupraFit.git

To obtain the most recent development version, which is SupraFit 2.x , use

git clone --recursive https://github.com/conradhuebler/SupraFit.git

Compile it as follows on Unix Platform:

cd suprafit
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release  -Dnoto_font=true/false
make

or use the script in the subdirectory. It should automatically update the submodules.

sh scripts/build_unix.sh 

On Windows Systems use for example

cd suprafit
mkdir build
cd build

For Visual Studio use

cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release -Dnoto_font=true/false ..

openMP is disabled when compiling with Visual Studio

or for MinGW (openMP is enabled, libgomp-1.dll is expected) use

cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -Dnoto_font=true/false ..
cmake --build . --config Release

On macOS, an easy way to compile SupraFit is using QtCreator.

Acknowledgments

Special thanks to Prof. M. Mazik Institut for organic Chemistry, TU Bergakademie Freiberg for her support.

Special thanks to Dr. Sebastian Förster, Dr. Stefan Kaiser and Dr. Felix Amrhein for finding bugs and constructive feedback.

Special thanks to the Centre of Advanced Study and Research - Freiberg (GraFA) and Saxonian Ministry of Science, Culture and Tourism (SMWK) for funding.

Citation and more

If you obtain results with SupraFit, I kindly ask to include in your citation:

If the Monte Carlo simulation and Resampling plans were helpfull:

Methods and references

Equilibrium concentrations for an arbitrary set of reactions — including self-aggregation, such as a host dimerisation preceding complex formation — are obtained by minimising a convex potential in logarithmic concentration space. Two programs that treat titration data this way were the inspiration for SupraFit's solver, and both deserve the credit:

  • Daniil O. Soloviev and Christopher A. Hunter, Musketeer: a software tool for the analysis of titration data, Chem. Sci., 2024, 15, 15299–15310. DOI 10.1039/d4sc03354j
  • Eric Masson, Equilibrist: A Browser-Based Platform for Fitting Equilibrium and Rate Constants from Optical and NMR Data, J. Chem. Inf. Model., 2026. DOI 10.1021/acs.jcim.6c01004

SupraFit's own solver defaults to a damped Newton step with the analytic Hessian; the quasi-Newton (BFGS) variant remains selectable. Both reach the mass balance to 1e-12, which the solver's test pins.

A model whose equilibrium is solved this way names both works, alongside SupraFit, in its model information — so the citation appears where the method was actually used.

Poster presentation at Physical-Organic Chemistry at its Best: The Art of Chemical Problem Solving (13.09 and 14.09 2018)

SupraFit has been used in

Some notes

  • SupraFit prefers larger screens over smaller ones. 1600x1200 or 1680x1050 is the recommended size.
  • SupraFit is being developed on a Linux platform, so some platform dependent errors or layout problems may have not been observed yet.

Have a lot of fun!

About

Non-linear fitting tool for supramolecular titration experiments and kinetics.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages