npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vamos-hose

v1.2.1

Published

Predict 13C NMR chemical shifts from SMILES using HOSE codes and nmrshiftdb2

Readme

vamos-hose

A pure JavaScript library that predicts 13C NMR chemical shifts from SMILES strings. It generates HOSE codes and looks them up in a preprocessed NMRShiftDB2 database (1.4M entries). Runs entirely in the browser with no server-side dependencies — the database is code-split into 256 lazy-loaded chunks.

Live Demo · npm

Target API

lookupNmrShifts -- SMILES to predicted shifts

import { lookupNmrShifts } from 'vamos-hose';

const shifts = await lookupNmrShifts('CCCCC1=NC(Cl)=C(CO)N1CC2=CC=C(C=C2)C3=CC=CC=C3C4=NNN=N4', {
  nucleus: '13C',
});
// Returns: [{ shift: 13.9, atom: 'C', hose: '...', smiles: '...' }, ...]

plotSpectra -- Render a synthetic NMR spectrum

import { plotSpectra } from 'vamos-hose';

const canvas = document.getElementById('nmr-canvas');
plotSpectra(canvas, shifts, {
  range: [0, 220],    // ppm range
  width: 800,
  height: 300,
  lineWidth: 0.5,     // Lorentzian half-width in ppm
});

estimateFromSpectra -- Reverse lookup: peaks to candidate structures

import { estimateFromSpectra } from 'vamos-hose';

const candidates = await estimateFromSpectra({
  nucleus: '13C',
  peaks: [14.1, 22.7, 32.0, 127.5, 128.3, 130.6, 137.0, 174.1],
  tolerance: 2.0,     // ppm tolerance per peak
  minMatches: 5,      // minimum peaks that must match
});
// Returns: [{ smiles: '...', hose: '...', matchedPeaks: 7, score: 0.87 }, ...]

Development

npm install
npm test

Acknowledgments

This project builds on the work of several open-source projects and academic publications:

  • nmrshiftdb2 — NMR chemical shift database (Stefan Kuhn, Christoph Steinbeck et al.). The HOSE code generator in src/hose-generator.js is a JavaScript port of the ExtendedHOSECodeGenerator (AGPL v3).
  • CDK (Chemistry Development Kit) — The canonical labeling algorithm is ported from CDK's CanonicalLabeler (Oliver Horlacher, LGPL 2.1), which implements the Weininger algorithm (D. Weininger et al., J. Chem. Inf. Comput. Sci., 1989, 29, 97-101).
  • openchemlib-js — SMILES parsing and molecule representation (BSD-3-Clause).
  • W. Bremser — Original HOSE code concept (Analytica Chimica Acta, 1978, 103, 355-365).

License

AGPL-3.0-or-later

The HOSE code generator (src/hose-generator.js) is a JavaScript port of nmrshiftdb2's ExtendedHOSECodeGenerator, which is licensed under AGPL v3. It also ports CDK's CanonicalLabeler, licensed under LGPL 2.1. Since the algorithms were directly ported (not linked as a library), the derived code is a derivative work and the AGPL v3 copyleft applies to the entire project. See LICENSE and the src/hose-generator.js file header for details.

Note: The AGPL applies to the software only. Chemical shifts, NMR predictions, drug candidates, or any other scientific results produced by running this library are not covered by the AGPL and remain the property of the user.