# ChemSpec
An interactive, offline viewer for NMR, FT-IR, and analytical chemistry spectra directly inside your electronic lab notebook. **Fully supported on both Desktop and Mobile.**
## Quick demo:
**Bring analytical chemistry to Obsidian.**
ChemSpec is an offline, interactive viewer for NMR, FT-IR, and analytical chemistry spectra inside your electronic lab notebook.
Created to use it alongside **ChemEdit** ELN to process raw analytical data, integrate peaks, and simulate spectra natively in your vault.
### What's New (v1.1.0)
* **NMR Stacking:** Drag & drop multiple spectra onto the standalone viewer to stack/overlay them.
*NMR stacking screenshot:*
*NMR Overlay:*
* **Fixed CV Plotting:** CV rendering with a full bounding box, inward-facing ticks, bold serif fonts, and high-res trace rendering.
* **Electrochemistry Tools:** Added one-click **"Auto Fc Calc"** (E1/2 and ΔE shifting) and **"Find Peaks"** (Epa, Epc detection and labeling) directly on the CV canvas.
* **Smart NMR Labels:** Peak labels now dynamically hide when overlapping to prevent unreadable "walls of text" on zoom-out.
* **SVG Export Fixes:** Publication SVG exports now mirror the canvas, including collision-aware peaks, multiplets, and integrals.
*Settings preview:*
## Features
* **Native Embeds:** Render `.nmr`, `.jdx`, `.jcamp`, `.csv`, and `.txt` files directly via standard Obsidian embeds (`![[spectrum.jdx]]`).
* **NMR Processing:** Load raw Bruker `acqus`/`1r` datasets. Features include integration, multiplet brackets, J-coupling calculations, and peak picking.
* **FT-IR & Cyclic Voltammetry (CV):** Plot standard spectroscopy and electrochemistry trace files directly in your notes.
* **PubNMR Simulation:** Paste ACS NMR strings into a `pubnmr` code block to render a simulated, interactive spectrum.
* **Export & Draft:** Copy ACS multi-proton strings to your clipboard, or export `.svg` publication figures and `.jdx` files from the canvas.
* **Themes:** Spectra automatically adapt to Obsidian's Light/Dark mode.
---
## Usage
### 1. File Embeds
Drop a spectrum file into your vault and embed it using Obsidian's standard syntax:
```markdown
![[compound_1.nmr]]
![[ir_spectrum.jcamp]]
![[cv_trace.csv]]
```
### 2. Standalone Workspace
Click the **Activity Icon** in the left ribbon to open the ChemSpec application. Drag and drop raw Bruker folders or files directly into the workspace to process them.
### 3. Spectra Grids
Compare multiple spectra using a code block:
````markdown
```nmr
pdata/1/processed.nmr
reference_spectrum.jdx
```
````
### 4. Text-to-Spectrum (PubNMR)
Simulate a spectrum from experimental text:
````markdown
```pubnmr
1H NMR (400 MHz, CDCl3) δ 7.95 (d, J = 8.1 Hz, 2H), 7.42 (d, J = 8.1 Hz, 2H), 2.45 (s, 3H)
```
````
---
## Installation
**From Obsidian Community Plugins**
1. Open **Settings → Community plugins**.
2. Click **Browse** and search for **ChemSpec**.
3. Click **Install** and then **Enable**.
**Manual Installation**
1. Download `main.js` and `manifest.json` from the [Releases page](https://github.com/ruzx/chemspec/releases).
2. Place them in your vault at `.obsidian/plugins/chemspec/`.
3. Reload plugins and enable ChemSpec.
---
## Feedback & Bugs
Found a bug or have a feature request? Please [open an issue on GitHub](https://github.com/ruzx/chemspec/issues).
---
## Acknowledgements
ChemSpec was built to complement **ChemEdit**, providing a dedicated Electronic Lab Notebook (ELN) experience in Obsidian.
Thanks to the open-source cheminformatics community:
* [nmr-parser](https://github.com/cheminfo/nmr-parser) & [nmr-processing](https://github.com/cheminfo/nmr-processing) by Cheminfo / Zakodium.
* [jcampconverter](https://github.com/cheminfo/jcampconverter) for spectroscopy parsing.
## Related Plugins
| Plugin | Description |
| --- | --- |
| **[ChemEdit](https://github.com/ruzx/obsidian-chemedit)** | Natively draw reactions, calculate stoichiometry, and manage ELN entries. |
| [Chem](https://github.com/Acylation/obsidian-chem) | Render **SMILES** structures locally using SmilesDrawer and RDKit.js |
| [LaTeX Suite](https://github.com/artisticat1/obsidian-latex-suite) | Write chemistry equations easily with LaTeX packages such as `mhchem` and `chemfig`. |