Saturday, April 16, 2016

A simple script to get molecular coordinates from a chemical name using Open Babel

#!/bin/csh
# Molget: cshell script to get coordinates from chemical name using Babel and Cactus
# usage: ./molget methane
# (remember to "chmod 755 molget)
#
set molecule = $argv[1]
curl https://cactus.nci.nih.gov/chemical/structure/$molecule/smiles -o $molecule.smi
babel -ismi $molecule.smi -oxyz $molecule.xyz --gen3D
view raw molget hosted with ❤ by GitHub

Here is a simple cshell script to get coordinates from a chemical name using Open Babel.

Acknowledgements (Jimmy's "friends" please read carefully): I learned about curl from Jimmy who didn't contribute to the code in any way (and hates cshell anyway).


This work is licensed under a Creative Commons Attribution 4.0