Python-Ref > Cheminformatics > OpenBabel > Using OpenBabel from the command line
 
 

^^->
Klíčová slova
Moduly
Knihovní funkce

Using OpenBabel from the command line

Before we start using OpenBabel in our programs, we should examine what it can do for us without writing a single line of code.
The following command will convert 150 SMILES strings from a test file distributed together with OpenBabel to InChI.
babel -i smi 150mols.smi -o inchi aaa.txt
The following command will do the same thing, but only to structures that contain a fragment described by "C=C".
babel -i smi 150mols.smi -o inchi aaa.txt -s "C=C"
The following command will again convert structures from SMILES to InChI, but this time only those not having benzene ring in them.
babel -i smi 150mols.smi -o inchi aaa.txt -v "c1ccccc1"