@fadhil-riyanto/chemistry
v1.0.0
Published
unofficial library that query data from pubchem national library of medicine, and might some site of chemistry
Downloads
1
Readme
chemistry
get data from largest chemistry database
how to search and getting Compound ID
import { chemistry } from "@fadhil-riyanto/chemistry"
(async () => {
let search = new chemistry.Search("1,4 dichlorobenzene")
let result = await search.get()
console.log(result); // <-- you I'll get autocomplete data here
console.log(await search.getCID("1-Bromo-2,4-dichlorobenzene")) // <-- fill desired keyword
})()
getting chemical info based on CID
import { chemistry, imageType } from "@fadhil-riyanto/chemistry"
(async () => {
let details = new chemistry.CompoundID(5360545)
console.log(details.image(imageType.IMG_3D))
console.log((await details.summary()))
})()
maintainer:
@fadhil-riyanto
license
GPL-2.0