Metadata-Version: 2.1
Name: finchnmr
Version: 0.0.0b1
Summary: [FI]tti[N]g 13[C] 1[H] HSQC [NMR]
Author-email: "Nathan A. Mahynski" <nathan.mahynski@gmail.com>, "David A. Sheen" <david.sheen@nist.gov>
Maintainer-email: "Nathan A. Mahynski" <nathan.mahynski@gmail.com>, "David A. Sheen" <david.sheen@nist.gov>
License: # NIST Software Licensing Statement
        
        NIST-developed software is provided by NIST as a public service.
        You may use, copy, and distribute copies of the software in any
        medium, provided that you keep intact this entire notice. You may
        improve, modify, and create derivative works of the software or
        any portion of the software, and you may copy and distribute such
        modifications or works. Modified works should carry a notice
        stating that you changed the software and should note the date
        and nature of any such change. Please explicitly acknowledge the
        National Institute of Standards and Technology as the source of
        the software.
        
        NIST-developed software is expressly provided "AS IS." NIST MAKES
        NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED, IN FACT, OR ARISING BY
        OPERATION OF LAW, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
        WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
        NON-INFRINGEMENT, AND DATA ACCURACY. NIST NEITHER REPRESENTS NOR
        WARRANTS THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED
        OR ERROR-FREE, OR THAT ANY DEFECTS WILL BE CORRECTED. NIST DOES
        NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF THE
        SOFTWARE OR THE RESULTS THEREOF, INCLUDING BUT NOT LIMITED TO THE
        CORRECTNESS, ACCURACY, RELIABILITY, OR USEFULNESS OF THE
        SOFTWARE.
        
        You are solely responsible for determining the appropriateness of
        using and distributing the software and you assume all risks
        associated with its use, including but not limited to the risks
        and costs of program errors, compliance with applicable laws,
        damage to or loss of data, programs or equipment, and the
        unavailability or interruption of operation. This software is not
        intended to be used in any situation where a failure could cause
        risk of injury or damage to property. The software developed by
        NIST employees is not subject to copyright protection within the
        United States.
        
Project-URL: Repository, https://github.com/mahynski/finchnmr.git
Project-URL: Documentation, https://finchnmr.readthedocs.io/
Project-URL: Issues, https://github.com/mahynski/finchnmr/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: xml-python==0.4.3
Requires-Dist: nmrglue==0.11
Requires-Dist: tqdm>=4.66.1
Requires-Dist: numpy<2.0.0,>=1.23
Requires-Dist: scikit-image==0.24.0
Requires-Dist: scipy>=1.14.1
Requires-Dist: scikit-learn
Requires-Dist: matplotlib>=3.7.2
Requires-Dist: pandas==2.2
Requires-Dist: pre-commit==3.3.3
Requires-Dist: pytest>=7.4.0
Requires-Dist: ipython<=8.21
Requires-Dist: ipykernel
Requires-Dist: nbformat>=4.2.0
Requires-Dist: plotly>=5.24.1
Requires-Dist: mypy
Requires-Dist: sphinx
Provides-Extra: all

![Workflow](https://github.com/mahynski/finchnmr/actions/workflows/python-app.yml/badge.svg?branch=main)
[![Documentation Status](https://readthedocs.org/projects/finchnmr/badge/?version=latest)](https://finchnmr.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/github/mahynski/finchnmr/graph/badge.svg?token=DsrQIbklpB)](https://codecov.io/github/mahynski/finchnmr)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![DOI](https://zenodo.org/badge/331207062.svg)](https://zenodo.org/badge/latestdoi/331207062)
<!--[![DOI](https://zenodo.org/badge/{github_id}.svg)](https://zenodo.org/badge/latestdoi/{github_id})-->

<!--
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
-->

FINCHnmr : [FI]tti[N]g 13[C] 1[H] HSQC [NMR]
===

<img src="https://raw.githubusercontent.com/mahynski/finchnmr/main/docs/_static/logo_small.png" height="100" align="left" />

FINCHnmr is lightweight toolkit for fitting 2D heteronuclear single-quantum coherence nuclear magnetic resonance [(HSQC NMR)](https://en.wikipedia.org/wiki/Heteronuclear_single_quantum_coherence_spectroscopy) data to a known library of substances.  This predicts the presence and relative concentration of these compounds, and the residual (error) can be interpreted as the sum of the remaining unknown compounds present.  For a live demonstration, visit our [HuggingFace space](https://huggingface.co/spaces/mahynski/finchnmr-demo) or try it out on [streamlit's community cloud](https://finchnmr-demo.streamlit.app/). Although originally designed to work with (1H-13C) data, FINCHnmr will work with any 2D NMR as long as the library used matches the sample being predicted / analyzed.
<br/>

There are two approaches to generating the spectral libraries.  Both methods are demonstrated in the documentation.

1. Library spectra are taken directly from the [Biological Magnetic Resonance Bank (BMRB)](https://bmrb.io/). These spectra are automatically padded and resized so that they match the extent (2D grid) and resolution of the wild spectra being fit.
2. Library spectra are reconstructed from a feature list of peak locations by placing bivariate Gaussians at these locations; assumptions must be made about the spread of these distributions in both dimentions of frequency shift space.

Installation
===

We recommend creating a [virtual environment](https://docs.python.org/3/library/venv.html) or, e.g., a [conda environment](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) then installing finchnmr with [pip](https://pip.pypa.io/en/stable/):

~~~bash
$ pip install finchnmr
~~~

You can also install from this GitHub repo source:

~~~bash
$ git clone git@github.com:mahynski/finchnmr.git
$ cd finchnmr
$ pip install .
$ python -m pytest # Optional unittests
~~~

Documentation
===

Documentation is hosted at [https://finchnmr.readthedocs.io/](https://finchnmr.readthedocs.io/) via [readthedocs](https://about.readthedocs.com/).

The logo was generated using Google Gemini with the prompt "Design a logo involving a finch and NMR" on Nov. 9, 2024.

License Information
===

* See LICENSE.md for more information.
* Any mention of commercial products is for information only; it does not imply recommendation or endorsement by [NIST](https://www.nist.gov/).
