SlideShare uma empresa Scribd logo
1 de 39
Open Babel
               Access and interconvert chemical
               information


                       Noel M. O’Boyle
Open Babel development team and NextMove Software, Cambridge, UK




                           Nov 2012
                       Secret UK Location
Image credit: AJ Cann (AJC1 on Flickr)
Image credit: Jon Osborne (jonno101101 on Flickr)
‱ Volunteer effort, an open source success story
   – Originally a fork from OpenEye’s OELib in 2001
   – Lead is Geoff Hutchison (Uni of Pittsburgh)
   – 4 or 5 active developers – I got involved in late 2005

‱ http://openbabel.org
‱ Associated paper: (Open Access)
   – Open Babel: An open chemical toolbox, J. Cheminf., 2011, 3,
     33.
5

     Does anyone else use Open Babel?




‱ 40K downloads (from SF) in last 12 months
   – 1.4K downloads of Windows Python bindings
‱ Paper #1 most accessed in last year
   – Cited 60 times in 1 year
‱ In short, very widely-used
Features
‱ Multiple chemical file formats (+ options) and utility
  formats
‱ 2D coordinate generation and depiction (PNG and
  SVG)
‱ 3D coordinate generation, forcefield minimisation,
  conformer generation
‱ Binary fingerprints (path-based, substructure-
  based) and associated “fast search” database
‱ Bond perception, aromaticity detection and atom-
  typing
‱ Canonical labelling, automorphisms, alignment
‱ Plugin architecture
‱ Several command-line applications, but also a
  software library
‱ Written in C++ but bindings in several languages
obabel and file conversion
‱ Basic usage:
  obabel infile.extn –O outfile.extn


‱ Can also read from stdin, write to stdout, read
  from a SMILES string, specify the input and
  output file formats, specify conversion
  options, and format specific options
  – Or ask for help (obabel –H)
online docs better!


‱ Note: obabel has replaced the older babel
Conversion options
‱ Handle multimolecule files
    join/m, sort, C
‱ Handle multicomponent molecules
    r, separate
‱ Filter
    filter, smallest/largest, s/v, f/l, unique
‱ Manipulate structure or atom order
    addpolarh, align, b, c, canonical, d, h, gen2d/3d
‱ Forcefield
    minimize, conformer, energy
‱ Conformers
    readconformer, writeconformers
‱ Manipulate SDF properties and title
    add, addfilename, addindex, addoutindex, addtotitle, append, delete,
    property, title


See http://openbabel.org/docs
File-format options
‱ Particular file formats may have their own
  specific input or output options
   – To provide or handle different flavours of the file
     format
   – To specify additional information to include
   – To provide additional functionality

‱ Options are listed in the help text for a format
  (see next slides)

‱ To use:
   – specify read options with –a (e.g. –ar)
   – specify write options with –x (e.g. –xi)
SMILES output options

                                                                    1. Add explicit Hs
Note that atom order is    > obabel -:CC(=O)Cl        –osmi         2. Show them in the
preserved                  CC(=O)Cl                                 output
                           > obabel -:CC(=O)Cl        –osmi –xh -h
  Make atom 3 the first
                           [CH3]C(=O)Cl
  atom
                    > obabel -:CC(=O)Cl        -osmi -xf 3
                           O=C(C)Cl
  
and atom 1 the          > obabel -:CC(=O)Cl        -osmi -xf 3 –xl 1
  last                     O=C(Cl)C
                           > obabel -:CC(=O)Cl        -:CC(=O)Cl -osmi -xC
                           ClC(=O)C                                 Random order
                           O=C(Cl)C
                           > obabel -:CC(=O)Cl        -osmi -xF "2 4"
                           CCl
                            Fragment SMILES for the fragment
                            composed of atoms 2 and 4

    Take home message: Look through the list of options for file formats
    which you frequently use (and request new options!)
Pro tip #1 “obabel –L” is your friend




Information on plugins and plugin options.
Pro tip #1 “obabel –L” is your friend




Information on plugins and plugin options.
Pro tip #1 “obabel –L” is your friend




Information on plugins and plugin options.
Pro tip #1 “obabel –L” is your friend




Information on plugins and plugin options.
Pro tip #1 “obabel –L” is your friend




Information on plugins and plugin options.
Pro tip #1 “obabel –L” is your friend




Information on plugins and plugin options.
What can be done with descriptors and SDF
                properties?

‱ Filter based on value or True/False
   --filter "MW<130 & My_Property < 12"
‱ Sort and reverse sort --sort ~logP
‱ Take the N largest or smallest (or everything but)
   --largest 5 MW
‱ Add SDF properties --add MW
‱ Add to title (useful for depictions) --addtotitle MW
‱ Remove duplicates --unique cansmi

‱ Create more descriptors!
   – Group contribution, SMARTS descriptors or compound
     descriptors are easily added via text files*


   * http://open-babel.readthedocs.org/en/latest/WritePlugins/AddNewDescriptor.html
Pro Tip #2 Faster filtering




                      Also –aP if filtering based
                      on SDF properties
Pro tip #3 (Ab)use the title output format

‱ obabel myfile.sdf –o txt
   – List the titles of all of the molecules

‱ obabel myfile.sdf –otxt --title “” --append MW
   – List the molecular weights of all of the molecules

‱ obabel myfile.sdf –otxt --title “” --append
  My_Property
   – List the property value for all of the molecules
PNG Depiction
PNG Depiction



                                      -xC




-xa                                    -xt




-xu
                  --highlight “cCO blue”
Ascii Depiction
Pro Tip #4 SVG + Firefox = User interface
‱ SVG has same options as PNG

‱ 
but drag-and-drop onto Firefox and you have
  a zoomable user interface
   – particularly useful for visualising multimolecule
     files
   – Demo showing a 1000 molecule file (only 3MB):
      http://baoilleach.blogspot.co.uk/2011/06/molecular-zooming-with-open-babel-svg.html

‱ You could create a navigation interface for an
  entire database (sponsorship opportunity!)
   – E.g. make each of 1000 molecules link to another
     SVG with 1000 molecules
‱ Multimolecule depictions can be aligned based
  on substructure (also PNG)
   – Demo: http://baoilleach.blogspot.co.uk/2012/02/portrait-of-molecule-as-green.html
Pro Tip #5 Automatic conversion
On Windows, create a file sdf.bat on your
Desktop with the following text:
     @obabel.exe %1 –O "%~ndp1.%~n0"


If you drag-and-drop a chemical file onto
this, the file will be converted to an SDF
file.

(Rename to mol2.bat for mol2 files, etc.)
Alignment
‱ Open Babel does not have any code to
  determine the maximum common substructure
  (MCS)
   – Sponsorship opportunity ahoy!

‱ 2D and 3D alignment is supported –align
   – Based on Kabsch alignment (minimised RMSD)
   – You either have to align the whole molecule
     (atoms should be in same order) or else a
     specified substructure (SMARTS)

‱ When aligning 3D structures I find it useful to --
  join the results into a single structure and view
  in 3D viewer (e.g. Avogadro)
Spectrophores
‱   Donated by Silicos-it, http://silicos-it.com/
‱   Usage: obspectrophore –i myfile.extn
‱   Requires 3D structure
     – Note: it does not complain if you give it a 2D structure
     – 3D conformation dependent, but orientation independent

‱   48-value descriptor based on electrostatic, lipophilic and electrophilic
    property values at points on a grid (or cage) and the atomic shape
    deviation
Spectrophores
‱   Donated by Silicos-it, http://silicos-it.com/
‱   Usage: obspectrophore –i myfile.extn
‱   Requires 3D structure
     – Note: it does not complain if you give it a 2D structure
     – 3D conformation dependent, but orientation independent

‱   48-value descriptor based on electrostatic, lipophilic and electrophilic
    property values at points on a grid (or cage) and the atomic shape
    deviation



‱   Custom code require to use spectrophores for similarity
‱   Silicos-it have previously trained Self-Organising Maps (SOMs) using
    spectrophores for known classes of compounds and used them to
    predict novel compounds for a particular class
Progamming with Open Babel
‱ Sometimes the GUI or command-line interface does not do
  exactly what you want
    – You can write your own applications or scripts

‱ Choice of C++, Python, Java, .NET, Perl
    – But C++ and Python best supported

‱ Python is well-established in chemistry
    – Relatively easy to learn
    – Small number of commands
    – Can do a lot in a few lines

‱ Since the full Open Babel library is quite large, to make it easy
  to get started we provide a Python module Pybel
    – Makes it easy to do the most common operations
    – Very small number of classes and functions
    – The full library is still available under-the-hood

‱ Google “Open Babel Python”
Using the Python Bindings
import pybel

# Read a molecule
inputfile = pybel.readfile(“mol”, “tmp.mol”)
mol = next(inputfile)

print(mol.molwt) # Show molecular weight
Using the Python Bindings
import pybel

# Loop over multiple molecules
inputfile = pybel.readfile(“sdf”, “tmp.sdf”)
for mol in inputfile:
       # Show molecular weight
       print(mol.molwt)
Using the Python Bindings
import pybel

# Loop over multiple molecules
inputfile = pybel.readfile(“sdf”, “tmp.sdf”)
for mol in inputfile:
       if (mol.title.endswith(“_active”) and
           mol.wt > 100 and “S” in mol.formula):
             # Show molecular weight
             print(mol.molwt)
Using the Python Bindings
import pybel

# Loop over multiple molecules
inputfile = pybel.readfile(“sdf”, “tmp.sdf”)
outputfile = pybel.Outputfile(“smi”, “tmp.smi”)
for mol in inputfile:
       if (mol.title.endswith(“_active”) and
           mol.wt > 100 and “S” in mol.formula):
             # Add the molecule to the output file
             outputfile.write(mol)
Learn by playing at the command-line
A cry for help
Like mailing lists?
   openbabel-
   discuss@lists.sf.net
Like forums?
   http://forums.openbabel.org
Like to email a developer
directly?
   We will ask you to email the
   list :-)


Don’t forget to read the
docs first and Google it                   Image: Tintin44 (Flickr)

   http://openbabel.org/docs

Mais conteĂșdo relacionado

Mais procurados

Fingerprinting Chemical Structures
Fingerprinting Chemical StructuresFingerprinting Chemical Structures
Fingerprinting Chemical StructuresRajarshi Guha
 
Molecular dynamics and Simulations
Molecular dynamics and SimulationsMolecular dynamics and Simulations
Molecular dynamics and SimulationsAbhilash Kannan
 
HOMOLOGY MODELING IN EASIER WAY
HOMOLOGY MODELING IN EASIER WAYHOMOLOGY MODELING IN EASIER WAY
HOMOLOGY MODELING IN EASIER WAYShikha Popali
 
Cheminformatics-1.ppt
Cheminformatics-1.pptCheminformatics-1.ppt
Cheminformatics-1.pptwadhava gurumeet
 
27.docking protein-protein and protein-ligand
27.docking protein-protein and protein-ligand27.docking protein-protein and protein-ligand
27.docking protein-protein and protein-ligandAbhijeet Kadam
 
Molecular modelling and docking studies
Molecular modelling and docking studiesMolecular modelling and docking studies
Molecular modelling and docking studiesrouthusree
 
Lecture 9 slides: Machine learning for Protein Structure ...
Lecture 9 slides: Machine learning for Protein Structure ...Lecture 9 slides: Machine learning for Protein Structure ...
Lecture 9 slides: Machine learning for Protein Structure ...butest
 
Energy minimization
Energy minimizationEnergy minimization
Energy minimizationAishwarya Rane
 
7.local and global minima
7.local and global minima7.local and global minima
7.local and global minimaAbhijeet Kadam
 
Protien Structure Prediction
Protien Structure PredictionProtien Structure Prediction
Protien Structure PredictionSelimReza76
 
energy minimization
energy minimizationenergy minimization
energy minimizationpradeep kore
 
MOLECULAR DOCKING.pptx
MOLECULAR DOCKING.pptxMOLECULAR DOCKING.pptx
MOLECULAR DOCKING.pptxE Poovarasan
 
Understanding Smiles
Understanding Smiles Understanding Smiles
Understanding Smiles Abhik Seal
 
Z matrix and potential energy surface
Z matrix and potential energy  surfaceZ matrix and potential energy  surface
Z matrix and potential energy surfacemsfbi1521
 
Cheminformatics
CheminformaticsCheminformatics
CheminformaticsVin Anto
 
Molecular and Quantum Mechanics in drug design
Molecular and Quantum Mechanics in drug designMolecular and Quantum Mechanics in drug design
Molecular and Quantum Mechanics in drug designAjay Kumar
 
SNPs analysis methods
SNPs analysis methodsSNPs analysis methods
SNPs analysis methodshad89
 

Mais procurados (20)

Chemoinformatics
ChemoinformaticsChemoinformatics
Chemoinformatics
 
Computer aided Drug designing (CADD)
Computer aided Drug designing (CADD)Computer aided Drug designing (CADD)
Computer aided Drug designing (CADD)
 
Fingerprinting Chemical Structures
Fingerprinting Chemical StructuresFingerprinting Chemical Structures
Fingerprinting Chemical Structures
 
Molecular dynamics and Simulations
Molecular dynamics and SimulationsMolecular dynamics and Simulations
Molecular dynamics and Simulations
 
HOMOLOGY MODELING IN EASIER WAY
HOMOLOGY MODELING IN EASIER WAYHOMOLOGY MODELING IN EASIER WAY
HOMOLOGY MODELING IN EASIER WAY
 
Cheminformatics-1.ppt
Cheminformatics-1.pptCheminformatics-1.ppt
Cheminformatics-1.ppt
 
27.docking protein-protein and protein-ligand
27.docking protein-protein and protein-ligand27.docking protein-protein and protein-ligand
27.docking protein-protein and protein-ligand
 
Molecular modelling and docking studies
Molecular modelling and docking studiesMolecular modelling and docking studies
Molecular modelling and docking studies
 
Lecture 9 slides: Machine learning for Protein Structure ...
Lecture 9 slides: Machine learning for Protein Structure ...Lecture 9 slides: Machine learning for Protein Structure ...
Lecture 9 slides: Machine learning for Protein Structure ...
 
Energy minimization
Energy minimizationEnergy minimization
Energy minimization
 
7.local and global minima
7.local and global minima7.local and global minima
7.local and global minima
 
Protien Structure Prediction
Protien Structure PredictionProtien Structure Prediction
Protien Structure Prediction
 
energy minimization
energy minimizationenergy minimization
energy minimization
 
MOLECULAR DOCKING.pptx
MOLECULAR DOCKING.pptxMOLECULAR DOCKING.pptx
MOLECULAR DOCKING.pptx
 
Understanding Smiles
Understanding Smiles Understanding Smiles
Understanding Smiles
 
Z matrix and potential energy surface
Z matrix and potential energy  surfaceZ matrix and potential energy  surface
Z matrix and potential energy surface
 
Cheminformatics
CheminformaticsCheminformatics
Cheminformatics
 
Molecular and Quantum Mechanics in drug design
Molecular and Quantum Mechanics in drug designMolecular and Quantum Mechanics in drug design
Molecular and Quantum Mechanics in drug design
 
docking
docking docking
docking
 
SNPs analysis methods
SNPs analysis methodsSNPs analysis methods
SNPs analysis methods
 

Destaque

Design your own test automation tool
Design your own test automation toolDesign your own test automation tool
Design your own test automation toolautomated-testing.info
 
molecular file formats in bioinformatics
molecular file formats in bioinformaticsmolecular file formats in bioinformatics
molecular file formats in bioinformaticsnadeem akhter
 
Computational biology bls 303
Computational biology bls 303Computational biology bls 303
Computational biology bls 303Bruno Mmassy
 
Sequence file formats
Sequence file formatsSequence file formats
Sequence file formatsAlphonsa Joseph
 
BIOLOGICAL SEQUENCE DATABASES
BIOLOGICAL SEQUENCE DATABASES BIOLOGICAL SEQUENCE DATABASES
BIOLOGICAL SEQUENCE DATABASES nadeem akhter
 
Chemical File Formats for storing chemical data
Chemical File Formats for storing chemical dataChemical File Formats for storing chemical data
Chemical File Formats for storing chemical dataAbhik Seal
 
sequence of file formats in bioinformatics
sequence of file formats in bioinformaticssequence of file formats in bioinformatics
sequence of file formats in bioinformaticsnadeem akhter
 
Biological databases
Biological databasesBiological databases
Biological databasesSarfaraz Nasri
 
databases in bioinformatics
databases in bioinformaticsdatabases in bioinformatics
databases in bioinformaticsnadeem akhter
 
Biological databases
Biological databasesBiological databases
Biological databasesSucheta Tripathy
 
Biological Databases
Biological DatabasesBiological Databases
Biological DatabasesShweta Kagliwal
 

Destaque (13)

Design your own test automation tool
Design your own test automation toolDesign your own test automation tool
Design your own test automation tool
 
molecular file formats in bioinformatics
molecular file formats in bioinformaticsmolecular file formats in bioinformatics
molecular file formats in bioinformatics
 
Biological databases
Biological databasesBiological databases
Biological databases
 
Computational biology bls 303
Computational biology bls 303Computational biology bls 303
Computational biology bls 303
 
Sequence file formats
Sequence file formatsSequence file formats
Sequence file formats
 
BIOLOGICAL SEQUENCE DATABASES
BIOLOGICAL SEQUENCE DATABASES BIOLOGICAL SEQUENCE DATABASES
BIOLOGICAL SEQUENCE DATABASES
 
Chemical File Formats for storing chemical data
Chemical File Formats for storing chemical dataChemical File Formats for storing chemical data
Chemical File Formats for storing chemical data
 
sequence of file formats in bioinformatics
sequence of file formats in bioinformaticssequence of file formats in bioinformatics
sequence of file formats in bioinformatics
 
Biological databases
Biological databasesBiological databases
Biological databases
 
databases in bioinformatics
databases in bioinformaticsdatabases in bioinformatics
databases in bioinformatics
 
Biological databases
Biological databasesBiological databases
Biological databases
 
Biological Databases
Biological DatabasesBiological Databases
Biological Databases
 
Biological databases
Biological databasesBiological databases
Biological databases
 

Semelhante a Intro to Open Babel

What's New and Cooking in Open Babel 2.3.2
What's New and Cooking in Open Babel 2.3.2What's New and Cooking in Open Babel 2.3.2
What's New and Cooking in Open Babel 2.3.2baoilleach
 
Querying Cultural Heritage
Querying Cultural HeritageQuerying Cultural Heritage
Querying Cultural HeritageBarry Norton
 
Mon norton tut_querying cultural heritage data
Mon norton tut_querying cultural heritage dataMon norton tut_querying cultural heritage data
Mon norton tut_querying cultural heritage dataeswcsummerschool
 
So you want to liberate your data?
So you want to liberate your data?So you want to liberate your data?
So you want to liberate your data?Mogens Heller Grabe
 
Programming the Semantic Web
Programming the Semantic WebProgramming the Semantic Web
Programming the Semantic WebLuigi De Russis
 
Vba Macros Interoperability
Vba Macros InteroperabilityVba Macros Interoperability
Vba Macros InteroperabilityRajesh Sola
 
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...Lucidworks
 
Pspice Introduction
Pspice IntroductionPspice Introduction
Pspice IntroductionAkshay Dhole
 
Hadoop and Marklogic: Using the Genetic Algorithm to generate Source Code
Hadoop and Marklogic: Using the Genetic Algorithm to generate Source CodeHadoop and Marklogic: Using the Genetic Algorithm to generate Source Code
Hadoop and Marklogic: Using the Genetic Algorithm to generate Source Codejimfuller2009
 
VTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERS
VTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERSVTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERS
VTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERSvtunotesbysree
 
Erlang - Concurrent Language for Concurrent World
Erlang - Concurrent Language for Concurrent WorldErlang - Concurrent Language for Concurrent World
Erlang - Concurrent Language for Concurrent WorldZvi Avraham
 
Numerical Simulation of Nonlinear Mechanical Problems using Metafor
Numerical Simulation of Nonlinear Mechanical Problems using MetaforNumerical Simulation of Nonlinear Mechanical Problems using Metafor
Numerical Simulation of Nonlinear Mechanical Problems using MetaforRomain Boman
 
How DSL works on Ruby
How DSL works on RubyHow DSL works on Ruby
How DSL works on RubyHiroshi SHIBATA
 
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)Ahmed El-Arabawy
 
MongoDB Replication fundamentals - Desert Code Camp - October 2014
MongoDB Replication fundamentals - Desert Code Camp - October 2014MongoDB Replication fundamentals - Desert Code Camp - October 2014
MongoDB Replication fundamentals - Desert Code Camp - October 2014Avinash Ramineni
 
Martin Odersky - Evolution of Scala
Martin Odersky - Evolution of ScalaMartin Odersky - Evolution of Scala
Martin Odersky - Evolution of ScalaScala Italy
 
Wrapper induction construct wrappers automatically to extract information f...
Wrapper induction   construct wrappers automatically to extract information f...Wrapper induction   construct wrappers automatically to extract information f...
Wrapper induction construct wrappers automatically to extract information f...George Ang
 

Semelhante a Intro to Open Babel (20)

What's New and Cooking in Open Babel 2.3.2
What's New and Cooking in Open Babel 2.3.2What's New and Cooking in Open Babel 2.3.2
What's New and Cooking in Open Babel 2.3.2
 
Querying Cultural Heritage
Querying Cultural HeritageQuerying Cultural Heritage
Querying Cultural Heritage
 
Mon norton tut_querying cultural heritage data
Mon norton tut_querying cultural heritage dataMon norton tut_querying cultural heritage data
Mon norton tut_querying cultural heritage data
 
So you want to liberate your data?
So you want to liberate your data?So you want to liberate your data?
So you want to liberate your data?
 
Lec7
Lec7Lec7
Lec7
 
Ch3 gnu make
Ch3 gnu makeCh3 gnu make
Ch3 gnu make
 
Programming the Semantic Web
Programming the Semantic WebProgramming the Semantic Web
Programming the Semantic Web
 
Vba Macros Interoperability
Vba Macros InteroperabilityVba Macros Interoperability
Vba Macros Interoperability
 
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
 
Pspice Introduction
Pspice IntroductionPspice Introduction
Pspice Introduction
 
Scalax
ScalaxScalax
Scalax
 
Hadoop and Marklogic: Using the Genetic Algorithm to generate Source Code
Hadoop and Marklogic: Using the Genetic Algorithm to generate Source CodeHadoop and Marklogic: Using the Genetic Algorithm to generate Source Code
Hadoop and Marklogic: Using the Genetic Algorithm to generate Source Code
 
VTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERS
VTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERSVTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERS
VTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERS
 
Erlang - Concurrent Language for Concurrent World
Erlang - Concurrent Language for Concurrent WorldErlang - Concurrent Language for Concurrent World
Erlang - Concurrent Language for Concurrent World
 
Numerical Simulation of Nonlinear Mechanical Problems using Metafor
Numerical Simulation of Nonlinear Mechanical Problems using MetaforNumerical Simulation of Nonlinear Mechanical Problems using Metafor
Numerical Simulation of Nonlinear Mechanical Problems using Metafor
 
How DSL works on Ruby
How DSL works on RubyHow DSL works on Ruby
How DSL works on Ruby
 
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
 
MongoDB Replication fundamentals - Desert Code Camp - October 2014
MongoDB Replication fundamentals - Desert Code Camp - October 2014MongoDB Replication fundamentals - Desert Code Camp - October 2014
MongoDB Replication fundamentals - Desert Code Camp - October 2014
 
Martin Odersky - Evolution of Scala
Martin Odersky - Evolution of ScalaMartin Odersky - Evolution of Scala
Martin Odersky - Evolution of Scala
 
Wrapper induction construct wrappers automatically to extract information f...
Wrapper induction   construct wrappers automatically to extract information f...Wrapper induction   construct wrappers automatically to extract information f...
Wrapper induction construct wrappers automatically to extract information f...
 

Mais de baoilleach

We need to talk about Kekulization, Aromaticity and SMILES
We need to talk about Kekulization, Aromaticity and SMILESWe need to talk about Kekulization, Aromaticity and SMILES
We need to talk about Kekulization, Aromaticity and SMILESbaoilleach
 
Open Babel project overview
Open Babel project overviewOpen Babel project overview
Open Babel project overviewbaoilleach
 
So I have an SD File... What do I do next?
So I have an SD File... What do I do next?So I have an SD File... What do I do next?
So I have an SD File... What do I do next?baoilleach
 
Chemistrify the Web
Chemistrify the WebChemistrify the Web
Chemistrify the Webbaoilleach
 
Universal Smiles: Finally a canonical SMILES string
Universal Smiles: Finally a canonical SMILES stringUniversal Smiles: Finally a canonical SMILES string
Universal Smiles: Finally a canonical SMILES stringbaoilleach
 
Cheminformatics
CheminformaticsCheminformatics
Cheminformaticsbaoilleach
 
Making the most of a QM calculation
Making the most of a QM calculationMaking the most of a QM calculation
Making the most of a QM calculationbaoilleach
 
Data Analysis in QSAR
Data Analysis in QSARData Analysis in QSAR
Data Analysis in QSARbaoilleach
 
Large-scale computational design and selection of polymers for solar cells
Large-scale computational design and selection of polymers for solar cellsLarge-scale computational design and selection of polymers for solar cells
Large-scale computational design and selection of polymers for solar cellsbaoilleach
 
My Open Access papers
My Open Access papersMy Open Access papers
My Open Access papersbaoilleach
 
Improving the quality of chemical databases with community-developed tools (a...
Improving the quality of chemical databases with community-developed tools (a...Improving the quality of chemical databases with community-developed tools (a...
Improving the quality of chemical databases with community-developed tools (a...baoilleach
 
De novo design of molecular wires with optimal properties for solar energy co...
De novo design of molecular wires with optimal properties for solar energy co...De novo design of molecular wires with optimal properties for solar energy co...
De novo design of molecular wires with optimal properties for solar energy co...baoilleach
 
Cinfony - Bring cheminformatics toolkits into tune
Cinfony - Bring cheminformatics toolkits into tuneCinfony - Bring cheminformatics toolkits into tune
Cinfony - Bring cheminformatics toolkits into tunebaoilleach
 
Density functional theory calculations on Ruthenium polypyridyl complexes inc...
Density functional theory calculations on Ruthenium polypyridyl complexes inc...Density functional theory calculations on Ruthenium polypyridyl complexes inc...
Density functional theory calculations on Ruthenium polypyridyl complexes inc...baoilleach
 
Application of Density Functional Theory to Scanning Tunneling Microscopy
Application of Density Functional Theory to Scanning Tunneling MicroscopyApplication of Density Functional Theory to Scanning Tunneling Microscopy
Application of Density Functional Theory to Scanning Tunneling Microscopybaoilleach
 
Towards Practical Molecular Devices
Towards Practical Molecular DevicesTowards Practical Molecular Devices
Towards Practical Molecular Devicesbaoilleach
 
Why multiple scoring functions can improve docking performance - Testing hypo...
Why multiple scoring functions can improve docking performance - Testing hypo...Why multiple scoring functions can improve docking performance - Testing hypo...
Why multiple scoring functions can improve docking performance - Testing hypo...baoilleach
 
Why multiple scoring functions can improve docking performance - Testing hypo...
Why multiple scoring functions can improve docking performance - Testing hypo...Why multiple scoring functions can improve docking performance - Testing hypo...
Why multiple scoring functions can improve docking performance - Testing hypo...baoilleach
 
Improving enrichment rates
Improving enrichment ratesImproving enrichment rates
Improving enrichment ratesbaoilleach
 
The Blue Obelisk community
The Blue Obelisk communityThe Blue Obelisk community
The Blue Obelisk communitybaoilleach
 

Mais de baoilleach (20)

We need to talk about Kekulization, Aromaticity and SMILES
We need to talk about Kekulization, Aromaticity and SMILESWe need to talk about Kekulization, Aromaticity and SMILES
We need to talk about Kekulization, Aromaticity and SMILES
 
Open Babel project overview
Open Babel project overviewOpen Babel project overview
Open Babel project overview
 
So I have an SD File... What do I do next?
So I have an SD File... What do I do next?So I have an SD File... What do I do next?
So I have an SD File... What do I do next?
 
Chemistrify the Web
Chemistrify the WebChemistrify the Web
Chemistrify the Web
 
Universal Smiles: Finally a canonical SMILES string
Universal Smiles: Finally a canonical SMILES stringUniversal Smiles: Finally a canonical SMILES string
Universal Smiles: Finally a canonical SMILES string
 
Cheminformatics
CheminformaticsCheminformatics
Cheminformatics
 
Making the most of a QM calculation
Making the most of a QM calculationMaking the most of a QM calculation
Making the most of a QM calculation
 
Data Analysis in QSAR
Data Analysis in QSARData Analysis in QSAR
Data Analysis in QSAR
 
Large-scale computational design and selection of polymers for solar cells
Large-scale computational design and selection of polymers for solar cellsLarge-scale computational design and selection of polymers for solar cells
Large-scale computational design and selection of polymers for solar cells
 
My Open Access papers
My Open Access papersMy Open Access papers
My Open Access papers
 
Improving the quality of chemical databases with community-developed tools (a...
Improving the quality of chemical databases with community-developed tools (a...Improving the quality of chemical databases with community-developed tools (a...
Improving the quality of chemical databases with community-developed tools (a...
 
De novo design of molecular wires with optimal properties for solar energy co...
De novo design of molecular wires with optimal properties for solar energy co...De novo design of molecular wires with optimal properties for solar energy co...
De novo design of molecular wires with optimal properties for solar energy co...
 
Cinfony - Bring cheminformatics toolkits into tune
Cinfony - Bring cheminformatics toolkits into tuneCinfony - Bring cheminformatics toolkits into tune
Cinfony - Bring cheminformatics toolkits into tune
 
Density functional theory calculations on Ruthenium polypyridyl complexes inc...
Density functional theory calculations on Ruthenium polypyridyl complexes inc...Density functional theory calculations on Ruthenium polypyridyl complexes inc...
Density functional theory calculations on Ruthenium polypyridyl complexes inc...
 
Application of Density Functional Theory to Scanning Tunneling Microscopy
Application of Density Functional Theory to Scanning Tunneling MicroscopyApplication of Density Functional Theory to Scanning Tunneling Microscopy
Application of Density Functional Theory to Scanning Tunneling Microscopy
 
Towards Practical Molecular Devices
Towards Practical Molecular DevicesTowards Practical Molecular Devices
Towards Practical Molecular Devices
 
Why multiple scoring functions can improve docking performance - Testing hypo...
Why multiple scoring functions can improve docking performance - Testing hypo...Why multiple scoring functions can improve docking performance - Testing hypo...
Why multiple scoring functions can improve docking performance - Testing hypo...
 
Why multiple scoring functions can improve docking performance - Testing hypo...
Why multiple scoring functions can improve docking performance - Testing hypo...Why multiple scoring functions can improve docking performance - Testing hypo...
Why multiple scoring functions can improve docking performance - Testing hypo...
 
Improving enrichment rates
Improving enrichment ratesImproving enrichment rates
Improving enrichment rates
 
The Blue Obelisk community
The Blue Obelisk communityThe Blue Obelisk community
The Blue Obelisk community
 

Último

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraĂșjo
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Último (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Intro to Open Babel

  • 1. Open Babel Access and interconvert chemical information Noel M. O’Boyle Open Babel development team and NextMove Software, Cambridge, UK Nov 2012 Secret UK Location
  • 2. Image credit: AJ Cann (AJC1 on Flickr)
  • 3. Image credit: Jon Osborne (jonno101101 on Flickr)
  • 4. ‱ Volunteer effort, an open source success story – Originally a fork from OpenEye’s OELib in 2001 – Lead is Geoff Hutchison (Uni of Pittsburgh) – 4 or 5 active developers – I got involved in late 2005 ‱ http://openbabel.org ‱ Associated paper: (Open Access) – Open Babel: An open chemical toolbox, J. Cheminf., 2011, 3, 33.
  • 5. 5 Does anyone else use Open Babel? ‱ 40K downloads (from SF) in last 12 months – 1.4K downloads of Windows Python bindings ‱ Paper #1 most accessed in last year – Cited 60 times in 1 year ‱ In short, very widely-used
  • 6. Features ‱ Multiple chemical file formats (+ options) and utility formats ‱ 2D coordinate generation and depiction (PNG and SVG) ‱ 3D coordinate generation, forcefield minimisation, conformer generation ‱ Binary fingerprints (path-based, substructure- based) and associated “fast search” database ‱ Bond perception, aromaticity detection and atom- typing ‱ Canonical labelling, automorphisms, alignment ‱ Plugin architecture ‱ Several command-line applications, but also a software library ‱ Written in C++ but bindings in several languages
  • 7. obabel and file conversion ‱ Basic usage: obabel infile.extn –O outfile.extn ‱ Can also read from stdin, write to stdout, read from a SMILES string, specify the input and output file formats, specify conversion options, and format specific options – Or ask for help (obabel –H)
online docs better! ‱ Note: obabel has replaced the older babel
  • 8. Conversion options ‱ Handle multimolecule files join/m, sort, C ‱ Handle multicomponent molecules r, separate ‱ Filter filter, smallest/largest, s/v, f/l, unique ‱ Manipulate structure or atom order addpolarh, align, b, c, canonical, d, h, gen2d/3d ‱ Forcefield minimize, conformer, energy ‱ Conformers readconformer, writeconformers ‱ Manipulate SDF properties and title add, addfilename, addindex, addoutindex, addtotitle, append, delete, property, title See http://openbabel.org/docs
  • 9. File-format options ‱ Particular file formats may have their own specific input or output options – To provide or handle different flavours of the file format – To specify additional information to include – To provide additional functionality ‱ Options are listed in the help text for a format (see next slides) ‱ To use: – specify read options with –a (e.g. –ar) – specify write options with –x (e.g. –xi)
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. SMILES output options 1. Add explicit Hs Note that atom order is > obabel -:CC(=O)Cl –osmi 2. Show them in the preserved CC(=O)Cl output > obabel -:CC(=O)Cl –osmi –xh -h Make atom 3 the first [CH3]C(=O)Cl atom
 > obabel -:CC(=O)Cl -osmi -xf 3 O=C(C)Cl 
and atom 1 the > obabel -:CC(=O)Cl -osmi -xf 3 –xl 1 last O=C(Cl)C > obabel -:CC(=O)Cl -:CC(=O)Cl -osmi -xC ClC(=O)C Random order O=C(Cl)C > obabel -:CC(=O)Cl -osmi -xF "2 4" CCl Fragment SMILES for the fragment composed of atoms 2 and 4 Take home message: Look through the list of options for file formats which you frequently use (and request new options!)
  • 15. Pro tip #1 “obabel –L” is your friend Information on plugins and plugin options.
  • 16. Pro tip #1 “obabel –L” is your friend Information on plugins and plugin options.
  • 17. Pro tip #1 “obabel –L” is your friend Information on plugins and plugin options.
  • 18. Pro tip #1 “obabel –L” is your friend Information on plugins and plugin options.
  • 19. Pro tip #1 “obabel –L” is your friend Information on plugins and plugin options.
  • 20. Pro tip #1 “obabel –L” is your friend Information on plugins and plugin options.
  • 21. What can be done with descriptors and SDF properties? ‱ Filter based on value or True/False --filter "MW<130 & My_Property < 12" ‱ Sort and reverse sort --sort ~logP ‱ Take the N largest or smallest (or everything but) --largest 5 MW ‱ Add SDF properties --add MW ‱ Add to title (useful for depictions) --addtotitle MW ‱ Remove duplicates --unique cansmi ‱ Create more descriptors! – Group contribution, SMARTS descriptors or compound descriptors are easily added via text files* * http://open-babel.readthedocs.org/en/latest/WritePlugins/AddNewDescriptor.html
  • 22. Pro Tip #2 Faster filtering Also –aP if filtering based on SDF properties
  • 23. Pro tip #3 (Ab)use the title output format ‱ obabel myfile.sdf –o txt – List the titles of all of the molecules ‱ obabel myfile.sdf –otxt --title “” --append MW – List the molecular weights of all of the molecules ‱ obabel myfile.sdf –otxt --title “” --append My_Property – List the property value for all of the molecules
  • 25. PNG Depiction -xC -xa -xt -xu --highlight “cCO blue”
  • 27. Pro Tip #4 SVG + Firefox = User interface ‱ SVG has same options as PNG
 ‱ 
but drag-and-drop onto Firefox and you have a zoomable user interface – particularly useful for visualising multimolecule files – Demo showing a 1000 molecule file (only 3MB): http://baoilleach.blogspot.co.uk/2011/06/molecular-zooming-with-open-babel-svg.html ‱ You could create a navigation interface for an entire database (sponsorship opportunity!) – E.g. make each of 1000 molecules link to another SVG with 1000 molecules ‱ Multimolecule depictions can be aligned based on substructure (also PNG) – Demo: http://baoilleach.blogspot.co.uk/2012/02/portrait-of-molecule-as-green.html
  • 28.
  • 29. Pro Tip #5 Automatic conversion On Windows, create a file sdf.bat on your Desktop with the following text: @obabel.exe %1 –O "%~ndp1.%~n0" If you drag-and-drop a chemical file onto this, the file will be converted to an SDF file. (Rename to mol2.bat for mol2 files, etc.)
  • 30. Alignment ‱ Open Babel does not have any code to determine the maximum common substructure (MCS) – Sponsorship opportunity ahoy! ‱ 2D and 3D alignment is supported –align – Based on Kabsch alignment (minimised RMSD) – You either have to align the whole molecule (atoms should be in same order) or else a specified substructure (SMARTS) ‱ When aligning 3D structures I find it useful to -- join the results into a single structure and view in 3D viewer (e.g. Avogadro)
  • 31. Spectrophores ‱ Donated by Silicos-it, http://silicos-it.com/ ‱ Usage: obspectrophore –i myfile.extn ‱ Requires 3D structure – Note: it does not complain if you give it a 2D structure – 3D conformation dependent, but orientation independent ‱ 48-value descriptor based on electrostatic, lipophilic and electrophilic property values at points on a grid (or cage) and the atomic shape deviation
  • 32. Spectrophores ‱ Donated by Silicos-it, http://silicos-it.com/ ‱ Usage: obspectrophore –i myfile.extn ‱ Requires 3D structure – Note: it does not complain if you give it a 2D structure – 3D conformation dependent, but orientation independent ‱ 48-value descriptor based on electrostatic, lipophilic and electrophilic property values at points on a grid (or cage) and the atomic shape deviation ‱ Custom code require to use spectrophores for similarity ‱ Silicos-it have previously trained Self-Organising Maps (SOMs) using spectrophores for known classes of compounds and used them to predict novel compounds for a particular class
  • 33. Progamming with Open Babel ‱ Sometimes the GUI or command-line interface does not do exactly what you want – You can write your own applications or scripts ‱ Choice of C++, Python, Java, .NET, Perl – But C++ and Python best supported ‱ Python is well-established in chemistry – Relatively easy to learn – Small number of commands – Can do a lot in a few lines ‱ Since the full Open Babel library is quite large, to make it easy to get started we provide a Python module Pybel – Makes it easy to do the most common operations – Very small number of classes and functions – The full library is still available under-the-hood ‱ Google “Open Babel Python”
  • 34. Using the Python Bindings import pybel # Read a molecule inputfile = pybel.readfile(“mol”, “tmp.mol”) mol = next(inputfile) print(mol.molwt) # Show molecular weight
  • 35. Using the Python Bindings import pybel # Loop over multiple molecules inputfile = pybel.readfile(“sdf”, “tmp.sdf”) for mol in inputfile: # Show molecular weight print(mol.molwt)
  • 36. Using the Python Bindings import pybel # Loop over multiple molecules inputfile = pybel.readfile(“sdf”, “tmp.sdf”) for mol in inputfile: if (mol.title.endswith(“_active”) and mol.wt > 100 and “S” in mol.formula): # Show molecular weight print(mol.molwt)
  • 37. Using the Python Bindings import pybel # Loop over multiple molecules inputfile = pybel.readfile(“sdf”, “tmp.sdf”) outputfile = pybel.Outputfile(“smi”, “tmp.smi”) for mol in inputfile: if (mol.title.endswith(“_active”) and mol.wt > 100 and “S” in mol.formula): # Add the molecule to the output file outputfile.write(mol)
  • 38. Learn by playing at the command-line
  • 39. A cry for help Like mailing lists? openbabel- discuss@lists.sf.net Like forums? http://forums.openbabel.org Like to email a developer directly? We will ask you to email the list :-) Don’t forget to read the docs first and Google it Image: Tintin44 (Flickr) http://openbabel.org/docs

Notas do Editor

  1. OB is like a Swiss army knife, not a

  2. 
spork!
  3. Features of obabel, for full info see the docs.
  4. The same options are available at the command line

  5. 
in the online docs

  6. 
in the PDF and the book
.
  7. 
and in the GUI.
  8. “The 70s are calling. They want their depiction back.”
  9. Follow the links, or else this won’t make sense.
  10. Depiction of unspecified stereo.
  11. (Tech note: the “next” on the previous page is a Python keyword, and is implicit in the “for” loop)
  12. (Tech note: “endswith” and “in” above are features of Python string handling)