Thursday 19 August 2010

Boston ACS Fall 2010



I am just preparing the last few tweaks to my poster before I present it in the ( CINF Scholarship for Scientific Excellence) (Chemical Information) on Sunday the 22nd of August. This should be an exciting event, there are 8 other posters. The posters range in content from semantic web applications, through to toxicity prediction and virtual screening.


With regards to the rest of the program, unfortunately I can not stay past Monday, however some talks that I would have liked (may not get to see on Sunday) to have seen include:

In the general papers

1.#84, Chemistry in your hand by Dr Anthony J. Williams (ChemSpider).


2. #86 Extracting information from the IUPAC Green Book, by Prof Jeremy G Frey from the University of Southampton.

Data Intensive Drug Design
1. #12 Public-domain data resources at the European Bioinformatics Institute and their use in drug discovery, by Christoph Steinbeck.

2. #16 Data drive life sciences: The Pyramids meet the Tower of Babel by
Dr. Rajarshi Guha, NIH.


Recent Progress in Chemical Structure Representation


1. #67 Recent IUPAC recommendations for chemical structure representation: An overview by Mr. Jonathan Brecher, CambridgeSoft.

2.#69 Line notations as unique identifiers by Krisztina Boda PhD.

There are also a number of presentations from the Semantic Web in Chemistry division.

#4 Chemical e-Science Information Cloud (ChemCloud): A semantic web based eScience
infrastructure, by Prof. Dr. Adrian Paschke, FIZ Chemie, Berlin.

#36 ChemicalTagger:A tool for semantic text-mining in chemistry
by Dr Lezan Hawizy, University of Cambridge.

Sunday 8 August 2010

Wrapping it all up




Since I'm going to be dealing with quite a lot of C++ code, it's interesting to know how one could use this functionality from a different programming language all in the cozy environment of one's own living room -the Eclipse IDE.

To get started, all we need is three ingredients: eclipse, SWIG and the SWIG plugin for eclipse called sKWash. For those unfamiliar with SWIG, according to their website, it is

"a software development tool that connects programs written in C and C++ with a variety of high-level programming languages."

Essentially you take some C or C++ code,

/* File : example.c */

#include
double My_variable = 3.0;

int fact(int n) {
if (n <= 1) return 1;
else return n*fact(n-1);
}

int my_mod(int x, int y) {
return (x%y);
}

char *get_time()
{
time_t ltime;
time(<ime);
return ctime(<ime);
}


write an interface file

/* example.i */
%module example
%{
/* Put header files here or function declarations like below */
extern double My_variable;
extern int fact(int n);
extern int my_mod(int x, int y);
extern char *get_time();
%}

extern double My_variable;
extern int fact(int n);
extern int my_mod(int x, int y);
extern char *get_time();


build the module, i.e. for python:




unix % swig -python example.i
unix % gcc -c example.c example_wrap.c \
-I/usr/local/include/python2.1
unix % ld -shared example.o example_wrap.o -o _example.so


We can now use the Python module as follows :

>>> import example
>>> example.fact(5)
120
>>> example.my_mod(7,3)
1
>>> example.get_time()
'Sun Feb 11 23:01:07 1996'
>>>

This however involves the command line. The advantage of sKWash is that it provides a GUI to SWIG through eclipse. An example of its usage is shown here; which can of course be extended to more complicated code such as the conversion of whole libraries e.g. with Quantlib a C++ library for quantitative finance. The library can then be used from the desired programming language.

In brief, you create two C++ projects in eclipse, one to store your main code, the other as a container for the C++ wrapper generation. Then create a Java or "target language" project you require in eclipse, this acts as the container for wrapper code for the target language. In the final stage create a sKWash project and specify the C++ wrapper generation project and the target language project. Eclipse will then generate the interface files, then build the project. The wrapper code should now be displayed in your wrapper projects.

Sunday 1 August 2010

Mash it all together using Yahoo! Pipes



I came across Yahoo Pipes! completely by random. It is essentially a web application provided by Yahoo! to build data mashups from web feeds, web pages and other web services and has a GUI to simplify the process.

One application of Yahoo Pipes! that I found of interest, was to aggregate data on jobs taken from the CCL.net (Computational Chemistry Jobs Board) by Sara Nichols, a postdoc in the McCammon group.



She has created a pipe capable of producing either RSS feeds or JSON that can be incorporated into webpages.