Last active
September 27, 2022 09:07
-
-
Save sneumann/072adeb302ca010e2eb5de24e3bdb413 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget -O- https://www.chemotion-repository.net/api/v1/public/molecule.json?id=6338 |\ | |
jq "$(cat <<EOF | |
{ "@context": "https://schema.org/", | |
"@type": "MolecularEntity", | |
"dct:conformsTo": { "http://purl.org/dc/terms/conformsTo": { | |
"@id": "https://bioschemas.org/profiles/MolecularEntity/0.5-RELEASE", | |
"@type": "CreativeWork" } | |
}, | |
"@id": .molecule.tag.taggable_data.chemotion.doi, | |
name: .molecule.iupac_name, | |
url: "http://chemotion-repository.net/home/publications/molecules/\(.molecule.id)", | |
identifier: "chemotion ID ?", | |
iupacName:.molecule.iupac_name, | |
smiles: .molecule.cano_smiles, | |
inChI: .molecule.inchistring, | |
inChIKey: .molecule.inchikey, | |
molecularFormula: .molecule.sum_formular, | |
molecularWeight: { value: .molecule.molecular_weight } | |
} | |
EOF | |
)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment