NistChemPy

Cookbook:

  • Basic Search
  • Compound Properties
  • Structural Search
  • Local WebBook Index
  • Local Index Workflow
  • Requests Configuration

Package details:

  • Package API
  • Data notice
  • Development workflows
  • AI-assisted development
  • Changelog
NistChemPy
  • Basic online search
  • View page source

Basic online search

This notebook demonstrates live NIST Chemistry WebBook search calls. The documentation build renders pregenerated outputs and does not execute this notebook automatically.

[1]:
import nistchempy as nist

search = nist.run_search('benzene', 'name')
search
[1]:
NistSearch(success=True, num_compounds=1, lost=False, message='')
[2]:
search.success, search.num_compounds, search.compound_ids[:5]
[2]:
(True, 1, ['C71432'])
[3]:
compounds = search.load_found_compounds()
compounds[0]
[3]:
NistCompound(ID=C71432)
[4]:
compounds[0].to_dict()
[4]:
{'record_type': 'compound',
 'compound_id': 'C71432',
 'source_url': 'https://webbook.nist.gov/cgi/cbook.cgi?ID=C71432',
 'retrieved_at': '',
 'ID': 'C71432',
 'name': 'Benzene',
 'synonyms': ['[6]Annulene',
  'Benzol',
  'Benzole',
  'Coal naphtha',
  'Cyclohexatriene',
  'Phenyl hydride',
  'Pyrobenzol',
  'Pyrobenzole',
  'Benzolene',
  'Bicarburet of hydrogen',
  'Carbon oil',
  'Mineral naphtha',
  'Motor benzol',
  'Benzeen',
  'Benzen',
  'Benzin',
  'Benzine',
  'Benzolo',
  'Fenzen',
  'NCI-C55276',
  'Phene',
  'Rcra waste number U019',
  'UN 1114',
  'NSC 67315',
  '1,3,5-Cyclohexatriene'],
 'formula': 'C 6 H 6',
 'mol_weight': 78.1118,
 'inchi': 'InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H',
 'inchi_key': 'UHOVQNZJYSORNB-UHFFFAOYSA-N',
 'cas_rn': '71-43-2',
 'mol_refs': {'mol2D': 'https://webbook.nist.gov/cgi/cbook.cgi?Str2File=C71432',
  'mol3D': 'https://webbook.nist.gov/cgi/cbook.cgi?Str3File=C71432'},
 'data_refs': {'cTG': 'https://webbook.nist.gov/cgi/cbook.cgi?ID=C71432&Mask=1#Thermo-Gas',
  'cTC': 'https://webbook.nist.gov/cgi/cbook.cgi?ID=C71432&Mask=2#Thermo-Condensed',
  'cTP': 'https://webbook.nist.gov/cgi/cbook.cgi?ID=C71432&Mask=4#Thermo-Phase',
  'cTR': 'https://webbook.nist.gov/cgi/cbook.cgi?ID=C71432&Mask=8#Thermo-React',
  'cSO': 'https://webbook.nist.gov/cgi/cbook.cgi?ID=C71432&Mask=10#Solubility',
  'cIE': 'https://webbook.nist.gov/cgi/cbook.cgi?ID=C71432&Mask=20#Ion-Energetics',
  'cIC': 'https://webbook.nist.gov/cgi/cbook.cgi?ID=C71432&Mask=40#Ion-Cluster',
  'cIR': 'https://webbook.nist.gov/cgi/cbook.cgi?ID=C71432&Mask=80#IR-Spec',
  'cMS': 'https://webbook.nist.gov/cgi/cbook.cgi?ID=C71432&Mask=200#Mass-Spec',
  'cUV': 'https://webbook.nist.gov/cgi/cbook.cgi?ID=C71432&Mask=400#UV-Vis-Spec',
  'cES': 'https://webbook.nist.gov/cgi/cbook.cgi?ID=C71432&Mask=800#Electronic-Spec',
  'cGC': 'https://webbook.nist.gov/cgi/cbook.cgi?ID=C71432&Mask=2000#Gas-Chrom',
  'Fluid Properties': 'https://webbook.nist.gov/cgi/fluid.cgi?ID=C71432&Action=Page'},
 'nist_public_refs': {'Electron-Impact Ionization Cross Sections (on physics web site)': 'https://physics.nist.gov/cgi-bin/Ionization/table.pl?ionization=C6H6xx0',
  'Gas Phase Kinetics Database': 'https://kinetics.nist.gov/kinetics/rpSearch?cas=71432',
  'X-ray Photoelectron Spectroscopy Database, version 5.0': 'https://srdata.nist.gov/xps/SpectralByCompdDd/2349',
  'NIST Polycyclic Aromatic Hydrocarbon Structure Index': 'https://pah.nist.gov/?q=pah001'},
 'nist_subscription_refs': {'NIST / TRC Web Thermo Tables, "lite" edition (thermophysical and thermochemical data)': 'https://wtt-lite.nist.gov/wtt-lite/index.html?cmp=benzene',
  'NIST / TRC Web Thermo Tables, professional edition (thermophysical and thermochemical data)': 'https://wtt-pro.nist.gov/wtt-pro/index.html?cmp=benzene'}}

The local index is not required for ordinary online search. It is useful when you need broad local filtering by known WebBook section availability.

Previous Next

© Copyright 2023-2026, Ivan Yu. Chernyshov.

Built with Sphinx using a theme provided by Read the Docs.