Chemistry Module

The chemistry module provides cheminformatics utilities for NMR workflows, including HOSE (Hierarchically Ordered Spherical Environment) code generation.

Base path: /latest/chem

Endpoints

GET /hosecode

Generate HOSE codes for every atom in a molecule.

Query parameters:

ParameterDefaultDescription
smilesrequiredSMILES string (e.g. CCCC1CC1)
frameworkcdkcdk or rdkit
spheres3Number of bond spheres (1–10)
usestereofalseInclude stereochemistry (CDK only)

Response: Array of HOSE code strings, one per atom.

bash
curl "https://dev.nmrkit.nmrxiv.org/latest/chem/hosecode?smiles=CCO&framework=cdk&spheres=3"

Example response:

json
[
  "C(CC,CC,&)",
  "C(CC,C&,&)",
  "C(CC,CC,&)"
]

Frameworks

FrameworkLibraryStereo support
cdkChemistry Development KitYes (usestereo)
rdkitRDKitNo

HOSE codes encode the local chemical environment around each atom and are widely used in NMR chemical shift prediction and database lookup.

Error codes

StatusMeaning
409Molecule already exists (unique constraint)
422Invalid SMILES or parse error

See also