Macs in Chemistry

Insanely Great Science

openbabel

Adding substructure searching to a FileMaker Pro Database

 

Anyone who has had to store or search a collection of chemical structures rapidly realises that they need a software tool with a little chemical intelligence. Whilst there are a number of commercial databases they tend to be rather expensive and often require a knowledge of SQL or dedicated IT support. Fine for large corporations but not suitable for a single chemist or small group. In contrast FileMaker Pro is a popular desktop database with an easy to use interface (there are also server and mobile versions). Unfortunately whilst it is easy to use it does not support chemical structure based searching. Fortunately FileMaker Pro comes with an easy to use scripting interface and we can create scripts that run command line applications like Openbabel.

Findlistsearch

This tutorial shows how to add substructure and similarity searching to a FileMaker Pro database, full details are available here including download of example database.

Comments

Updating to Open Babel 3.0 from 2.x

 

Just a quick heads up, the update to version 3.0 breaks the API in a number of cases, and introduces some new behaviour behind-the-scenes.

For full details https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html.

In particular

The babel executable has been removed, and obabel should be used instead.

In OB 3.x, both openbabel.py and pybel.py live within the openbabel module

There are also changes to the handling of elements, atoms and bond flags, and aromaticity.



Comments

Installing Cheminformtics packages on a Mac

 

A while back I wrote a very popular page describing how to install a wide variety of chemiformatics packages on a Mac, since there have been some changes with Homebrew which have meant that a few of the scientific applications are no longer available so I've decided to rewrite the page on installing the missing packages using Anaconda.

I've also included a list of quick demos so you can everything is working as expected.

Full details are here

Packages include:

  • OpenBabel
  • RDKit
  • brew install cdk
  • chemspot
  • indigo
  • inchi
  • opsin
  • osra
  • pymol
  • oddt

In addition to gfortran and a selection of developers tools.

Comments

Google Sumer of code, Open Chemistry Projects

 

The details of some of the projects taking part in the Google Summer of Code are now online here https://summerofcode.withgoogle.com/organizations/6513013473935360/ under the Open Chemistry header.

Really interesting work includes 3-D coordinate generation, standardising fingerprint APIs, a framework for molecular validation, and standardization and molecular dynamics in Avogadro.

Good luck to all that are taking part!!


Comments

Google Summer of Code:- Open Chemistry

 

There are a number of interesting projects being undertaken in this years Google Summer of Code.

If you know of any students that might be interested then perhaps point them to the Open Chemistry Project.

The Open Chemistry project is a collection of open source, cross platform libraries and applications for the exploration, analysis and generation of chemical data. The organization is an umbrella of leading projects developed by long-time collaborators and innovators in open chemistry such as the Avogadro, Open Babel, and cclib projects. These three alone have been downloaded over 700,000 times and cited in over 2,000 academic papers. Our goal is to improve the state of the art, and facilitate the open exchange of chemical data and ideas while utilizing the best technologies from quantum chemistry codes, molecular dynamics, informatics, analytics, and visualization.

There is a list of the GSoC Ideas 2018 here but of course students can add their own.


Comments

Chemotion ELN: an Open Source electronic lab notebook for chemists in academia

 

A web-based chemistry ELN using the OpenBabel toolkit published recently https://doi.org/10.1186/s13321-017-0240-0DOI

The web based application is available as an Open Source software that offers modern solutions for chemical researchers. The Chemotion ELN is equipped with the basic functionalities necessary for the acquisition and processing of chemical data, in particular the work with molecular structures and calculations based on molecular properties. The ELN supports planning, description, storage, and management for the routine work of organic chemists. It also provides tools for communicating and sharing the recorded research data among colleagues. Meeting the requirements of a state of the art research infrastructure, the ELN allows the search for molecules and reactions not only within the user’s data but also in conventional external sources as provided by SciFinder and PubChem.

Project home page: https://github.com/ComPlat/chemotion_ELN

Developed/tested on Linux and Mac, deployed on Linux.

Other requirements: Modern internet browser supporting HTML5 and JavaScript. Recommended browsers: Chrome, Firefox (IE not supported).


Comments

MacBook Pro Touchbar to open man pages

 

I can't remember seeing this mentioned but if you are using a Terminal window on the new MacBook Pro with a Touchbar, if you type

obabel

the Touchbar illuminates as shown below, if you then touch "obabel" it opens the manual page for you in another window.

IMG_1348

touchbar1

Seems to work for other command line tools also.


Comments

Over 1000 downloads of iBabel

 

I just noticed that the latest version of iBabel has been downloaded over 1000 times, this is fantastic news and it certainly allows me to justify the effort put into creating the application.

3dviewers

iBabel started out as an AppleScript Studio application designed as a front-end to OpenBabel DOI, this was updated several times and is now an ApplescriptObjC application built with Xcode. As well as acting as a front-end to OpenBabel it also provided a front-end to tools built on OpenBabel and a molecule viewer using a selection of javascript viewers via an embedded web view.

I’m occasionally asked about the best way to install OpenBabel and I usually refer people to the page I wrote on installing cheminformatics tools on a Mac, this gives instructions on how to install a wide variety of cheminformatics toolkits and applications.

If you only want to install Openbabel then the best way is to use Homebrew.

Homebrew is a package manager for Mac OSX that installs packages in it’s own directory then symlinks the files to /usr/local. To install Homebrew you first need to have access to the command line tools for Xcode, the easiest way to do this is to download Xcode from the Mac Appstore

  1. Start Xcode on the Mac.
  2. Choose Preferences from the Xcode menu.
  3. In the General panel, click Downloads.
  4. On the Downloads window, choose the Components tab.
  5. Click the Install button next to Command Line Tools. You are asked for your Apple Developer login during the install process.

Or You can download the Xcode command line tools directly from the developer portal as a .dmg file. https://developer.apple.com/downloads/index.action. On the "Downloads for Apple Developers" list, select the Command Line Tools entry that you want.

To install Homebrew type this command in the Terminal

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

Then type

brew doctor

The 'brew doctor' command checks everything is fine. e.g. it will warn if the developer tools are missing, and if there are unexpected items in /usr/local/bin and /usr/local/lib that may clash and might need to be deleted.

It is a good idea to first update the package list

brew update

To install a range of cheminformatics packages we can use a custom “tap” created by Matt

brew tap mcs07/cheminformatics

Then to specifically install Openbabel use

brew install mcs07/cheminformatics/open-babel

To check OpenBabel is working type this in a Terminal window:

obabel -:'C1=CC=CC=C1F' -ocan 
Fc1ccccc1   
1 molecule converted

Comments

OpenBabel 2.4.0 released

 

A major new update to OpenBabel has been released, version 2.4.0 is a significant change and is highly recommended.

New file formats

  • DALTON output files (read only) and DALTON input files (read/write) (Casper Steinmann)
  • JSON format used by ChemDoodle (read/write) (Matt Swain)
  • JSON format used by PubChem (read/write) (Matt Swain)
  • LPMD's atomic configuration file (read/write) (Joaquin Peralta)
  • The format used by the CONTFF and POSFF files in MDFF (read/write) (Kirill Okhotnikov)
  • ORCA output files (read only) and ORCA input files (write only) (Dagmar Lenk)
  • ORCA-AICCM's extended XYZ format (read/write) (Dagmar Lenk)
  • Painter format for custom 2D depictions (write only) (Noel O'Boyle)
  • Siesta output files (read only) (Patrick Avery)
  • Smiley parser for parsing SMILES according to the OpenSMILES specification (read only) (Tim Vandermeersch)
  • STL 3D-printing format (write only) (Matt Harvey)
  • Turbomole AOFORCE output (read only) (Mathias Laurin)
  • A representation of the VDW surface as a point cloud (write only) (Matt Harvey)

New file format capabilities and options

  • AutoDock PDBQT: Options to preserve hydrogens and/or atom names (Matt Harvey)
  • CAR: Improved space group support in .car files (kartlee)
  • CDXML: Read/write isotopes (Roger Sayle)
  • CIF: Extract charges (Kirill Okhotnikov)
  • CIF: Improved support for space-groups and symmetries (Alexandr Fonari)
  • DL_Poly: Cell information is now read (Kirill Okhotnikov)
  • Gaussian FCHK: Parse alpha and beta orbitals (Geoff Hutchison)
  • Gaussian out: Extract true enthalpy of formation, quadrupole, polarizability tensor, electrostatic potential fitting points and potential values, and more (David van der Spoel)
  • MDL Mol: Read in atom class information by default and optionally write it out (Roger Sayle)
  • MDL Mol: Support added for ZBO, ZCH and HYD extensions (Matt Swain)
  • MDL Mol: Implement the MDL valence model on reading (Roger Sayle)
  • MDL SDF: Option to write out an ASCII depiction as a property (Noel O'Boyle)
  • mmCIF: Improved mmCIF reading (Patrick Fuller)
  • mmCIF: Support for atom occupancy and atom_type (Kirill Okhotnikov)
  • Mol2: Option to read UCSF Dock scores (Maciej Wójcikowski)
  • MOPAC: Read z-matrix data and parse (and prefer) ESP charges (Geoff Hutchison)
  • NWChem: Support sequential calculations by optionally overwriting earlier ones (Dmitriy Fomichev)
  • NWChem: Extract info on MEP(IRC), NEB and quadrupole moments (Dmitriy Fomichev)
  • PDB: Read/write PDB insertion codes (Steffen Möller)
  • PNG: Options to crop the margin, and control the background and bond colors (Fredrik Wallner)
  • PQR: Use a stored atom radius (if present) in preference to the generic element radius (Zhixiong Zhao)
  • PWSCF: Extend parsing of lattice vectors (David Lonie)
  • PWSCF: Support newer versions, and the 'alat' term (Patrick Avery)
  • SVG: Option to avoid addition of hydrogens to fill valence (Lee-Ping)
  • SVG: Option to draw as ball-and-stick (Jean-Noël Avila)
  • VASP: Vibration intensities are calculated (Christian Neiss, Mathias Laurin)
  • VASP: Custom atom element sorting on writing (Kirill Okhotnikov)

Other new features and improvements

  • 2D layout: Improved the choice of which bonds to designate as hash/wedge bonds around a stereo center (Craig James)
  • 3D builder: Use bond length corrections based on bond order from Pyykko and Atsumi (http://dx.doi.org/10.1002/chem.200901472) (Geoff Hutchison)
  • 3D generation: "--gen3d", allow user to specify the desired speed/quality (Geoff Hutchison)
  • Aromaticity: Improved detection (Geoff Hutchison)
  • Canonicalisation: Changed behaviour for multi-molecule SMILES. Now each molecule is canonicalized individually and then sorted. (Geoff Hutchison/Tim Vandermeersch)
  • Charge models: "--print" writes the partial charges to standard output after calculation (Geoff Hutchison)
  • Conformations: Confab, the systematic conformation generator, has been incorporated into Open Babel (David Hall/Noel O'Boyle)
  • Conformations: Initial support for ring rotamer sampling (Geoff Hutchison)
  • Conformer searching: Performance improvement by avoiding gradient calculation and optimising the default parameters (Geoff Hutchison)
  • EEM charge model: Extend to use additional params from http://dx.doi.org/10.1186/s13321-015-0107-1 (Tomáš Raček)
  • FillUnitCell operation: Improved behavior (Patrick Fuller)
  • Find duplicates: The "--duplicate" option can now return duplicates instead of just removing them (Chris Morley)
  • GAFF forcefield: Atom types updated to match Wang et al. J. Comp. Chem. 2004, 25, 1157 (Mohammad Ghahremanpour)
  • New charge model: EQeq crystal charge equilibration method (a speed-optimized crystal-focused charge estimator, http://pubs.acs.org/doi/abs/10.1021/jz3008485) (David Lonie)
  • New charge model: "fromfile" reads partial charges from a named file (Matt Harvey)
  • New conversion operation: "changecell", for changing cell dimensions (Kirill Okhotnikov)
  • New command-line utility: "obthermo", for extracting thermochemistry data from QM calculations (David van der Spoel)
  • New fingerprint: ECFP (Geoff Hutchison/Noel O'Boyle/Roger Sayle)
  • OBConversion: Improvements and API changes to deal with a long-standing memory leak (David Koes)
  • OBAtom::IsHBondAcceptor(): Definition updated to take into account the atom environment (Stefano Forli)
  • Performance: Faster ring-finding algorithm (Roger Sayle)
  • Performance: Faster fingerprint similarity calculations if compiled with -DOPTIMIZE_NATIVE=ON (Noel O'Boyle/Jeff Janes)
  • SMARTS matching: The "-s" option now accepts an integer specifying the number of matches required (Chris Morley)
  • UFF: Update to use traditional Rappe angle potential (Geoff Hutchison)

Language bindings

  • Bindings: Support compiling only the bindings against system libopenbabel (Reinis Danne)
  • Java bindings: Add example Scala program using the Java bindings (Reinis Danne)
  • New bindings: PHP (Maciej Wójcikowski)
  • PHP bindings: BaPHPel, a simplified interface (Maciej Wójcikowski)
  • Python bindings: Add 3D depiction support for Jupyter notebook (Patrick Fuller)
  • Python bindings, Pybel: calccharges() and convertdbonds() added (Patrick Fuller, Björn Grüning)
  • Python bindings, Pybel: compress output if filename ends with .gz (Maciej Wójcikowski)
  • Python bindings, Pybel: Residue support (Maciej Wójcikowski)

Development/Build/Install Improvements

  • Version control: move to git and GitHub from subversion and SourceForge
  • Continuous integration: Travis for Linux builds and Appveyor for Windows builds (David Lonie and Noel O'Boyle)
  • Python installer: Improvements to the Python setup.py installer and "pip install openbabel" (David Hall, Matt Swain, Joshua Swamidass)
  • Compilation speedup: Speed up compilation by combining the tests (Noel O'Boyle)
  • MacOSX: Support compiling with libc++ on MacOSX (Matt Swain)

Comments

Over 700 iBabel 3.6 Downloads

 

I just noticed that the latest version of iBabel has now been downloaded over 700 times since it was released at the start of the year.

iBabel started out as an AppleScript Studio application designed as a front-end to OpenBabel DOI, this was updated several times and is now an ApplescriptObjC application built with Xcode. As well as acting as a front-end to OpenBabel it also provided a front-end to tools built on OpenBabel and a molecule viewer.

viewersss


Comments

iBabel Downloads

 

I thought I'd have a look at the number of downloads of iBabel there have been since I announced the latest release last month. So far there have been over 250 downloads and there seems to be a steady stream of downloads as shown in the plot below.

ibabeldownloads

iBabel is a GUI (graphical user interface) for the open source cheminformatics toolkit OpenBabel. It also provides an interface to a variety of tools built using OpenBabel and a selection of molecule viewers


Comments

iBabel and Openbabel

 

A couple of readers have asked if they need to install OpenBabel in order to use iBabel. The answer is YES, iBabel is a graphical user interface that means you don't have to remember all the command line instructions in order to use OpenBabel.

3dviewers

More details here…

Comments

iBabel 3.6 is released

 

Bable

iBabel started out as an AppleScript Studio application designed as a front-end to OpenBabel DOI, this was updated several times and is now an ApplescriptObjC application built with Xcode. As well as acting as a front-end to OpenBabel it also provided a front-end to tools built on OpenBabel and a molecule viewer using a selection of java applets and plugins via an embedded web view.

This all worked perfectly for a while but various security issues mean that java applets and plugins via an embedded web view no longer function, in addition calls to remote web servers to provide javascript viewers also cause security issues. In addition OpenBabel has been substantially rewritten so that many of the small programs built on OpenBabel are no longer supported. This functionality has not been lost however, they have now been incorporated into the main OpenBabel program. Security updates, Sandboxing and changes within El Capitan also meant I had to update a number of features.

Now things have settled down a bit I've restarted work on iBabel and an update is now available.

I've transitioned most of the calls to babel over to obabel the differences are highlighted here and replaced the calls to the tools based built on OpenBabel with the new corresponding calls to obabel.

Updating the viewers however has taken more time than I expected with new security features in Mac OSX updates causing unexpected issues. Whilst not yet complete, I have removed all the java or plugin-based molecular viewers and replaced them with javascript versions.

Full details are here.

Comments

Scripting Openbabel

 

@MatToddChem recently tweeted

Chemdraw file containing lots of molecules --> separate png/jpg images of each molecule. Anyone got a script that automates that? #headache

Whilst it is possible to convert a ChemDraw file to an image the problem is you get a single png file containing all the structures. In order to get individual image files it is first necessary to separate the individual structures. The easiest way to this is to convert from cdx to SMILES format. We can then take each of the individual SMILES strings and generate an image using OpenBabel all controlled by an Applescript.

Comments

Python, Chemistry and a Mac 1

 

After I posted the page on setting up a Mac for Cheminformatics I was asked if I could do something similar for writing chemistry (or Science in general) Python scripts on a Mac. So I’ve written a “How to” page on setting up your Mac to use the iPython notebook and write simple scripts that use Pybel to access OpenBabel.

The page is here Python, Chemistry and a Mac 1, and I’ll probably add more pages/scripts in the future.

Comments

ChemmineOB

 

ChemmineOB provides an R interface to a subset of cheminformatics functionalities implemented by the OpelBabel C++ project. OpenBabel is an open source cheminformatics toolbox that includes utilities for structure format interconversions, descriptor calculations, compound similarity searching and more. ChemineOB aims to make a subset of these utilities available from within R. For non-developers, ChemineOB is primarily intended to be used from ChemmineR as an add-on package rather than used directly.

More details here

Comments

Rubabel: Wrapping OpenBabel with Ruby

I just saw this publication and I thought it might be of general interest.

Rubabel: Wrapping OpenBabel with Ruby

The number and diversity of wrappers for chemoinformatic toolkits suggests the diverse needs of the chemoinformatic community. While existing chemoinformatics libraries provide a broad range of utilities, many chemoinformaticians find compiled language libraries intimidating, time-consuming, arcane, and verbose. Although high-level language wrappers have been implemented, more can be done to leverage the intuitiveness of object-orientation, the paradigms of high-level languages, and the extensibility of languages such as Ruby. We introduce Rubabel, an intuitive, object-oriented suite of functionality that substantially increases the accessibily of the tools in the Open Babel chemoinformatics library.

Journal of Cheminformatics 2013, 5:35 DOI