Archive for the Uncategorized Category

Recently I have been programming a java plug-in from which I needed to call the ChemSpider webservices, and I found that this wasn’t as straightforward as I was expecting, so I thought I would post how to do it in case it’s useful for anyone else who wants to do likewise.
The basic method I used was to use Apache Axis2 to generate java code for the WSDL’s of the main ChemSpider webservices. This java code is available here: chemspider_webservices_javasourcecode.zip and I have also made the compiled jar file available here: chemspider_webservices.jar. The ChemSpider webservices can be called from other java code by referencing this jar file (and the other axis library files).
This blog post describes how I generated and used this jar file. I was using the Eclipse IDE, so some of what I describe will be specific to that.
There is a similar jar file of some ChemSpider webservices which is available by downloading MZMine (the file chemspider-api.jar in the lib directory) and an example of its use can be seen by downloading the source code and looking at the file src\net\sf\mzmine\modules\peaklistmethods\identification\dbsearch\databases\ChemSpiderGateway.java). That jar file was generated using the previous version of Axis (just plain Axis, rather than Axis2) compared to this one. The example here may be easier to use as a start point since the full range of ChemSpider webservices are included in the jar file, there is a full description of how it was generated, the code used to generate the jar file is available and there are more examples of its use.

Generating the chemspider_webservices.jar file

To generate the java code from the WSDL of the ChemSpider webservices I used the WSDL2Java functionality of Apache Axis2. This is available in different forms, including an Eclipse plug-in which will directly import the java code generated into a project, but I found various bugs when trying to use the latest version of that, so just used the command line version.
I started off with generating the java code from the WSDL of the ChemSpider MassSpecAPI webservice:

  • I downloaded and unzipped the latest version of the Apache Axis2 binary distribution from their download page. I used version 1.6.1 of Axis2.
  • In the “bin” directory of this download there should be a file called java2wsdl.bat. Running this batch file from a command line saves a lot of time trying to set up the class paths correctly to run Java2WSDL. Before using it you should set up the following two environment variables:
    • AXIS2_HOME: Must point to the top level of the AXIS2 files which you just downloaded
    • JAVA_HOME: Must point at your Java Development Kit installation direcotry (e.g. C:\Program Files\Java\jre6)
  • To see a full list of the options available when running WSDL2Java simply open a command prompt and run the batch file with no options to obtain the Usage options – more information about these can be found in the Apache Axis2 user guide:
    • > axis2-1.6.1\bin\wsdl2java.bat
  • I ran it with options to specify to use the SOAP 1.2 port of the ChemSpider MassSpecAPI webservice (most ChemSpider webservices have the option of SOAP 1.1, SOAP 1.2, HTTP GET or HTTP POST), to generate synchronous code only (not asynchronous), and to use adb databinding (this is the default anyway):
    • > axis2-1.6.1\bin\wsdl2java.bat -uri http://www.chemspider.com/MassSpecAPI.asmx?WSDL -pn MassSpecAPISoap12 -s -d adb
  • This then generated the file MassSpecAPIStub.java which it automatically put in the package com.chemspider.www (so was the appropriate folder structure was created above it accordingly)
  • I repeated this processes with the other 4 main ChemSpider webservices:
    • > axis2-1.6.1\bin\wsdl2java.bat -uri http://www.chemspider.com/Search.asmx?WSDL -pn SearchSoap12 -s -d adb
    • > axis2-1.6.1\bin\wsdl2java.bat -uri http://www.chemspider.com/InChI.asmx?WSDL -pn InChISoap12 -s -d adb
    • > axis2-1.6.1\bin\wsdl2java.bat -uri http://www.chemspider.com/Spectra.asmx?WSDL -pn SpectraSoap12 -s -d adb
    • > axis2-1.6.1\bin\wsdl2java.bat -uri http://www.chemspider.com/OpenBabel.asmx?WSDL -pn OpenBabelWebServiceSoap12 -s -d adb
  • The folders and java class files generated by Java2WSDL (MassSpecAPIStub.java, SearchStub.java, InChIStub.java, SpectraStub.java and OpenBabelWebServiceStub.java) that were generated are available in the zip file chemspider_webservices_javasourcecode.zip for further reference
  • I then started a new Eclipse project, imported this generated File system into it
  • The generated classes rely on the Axis2 library files so these need to be added to the build path – in Eclipse this is done by right-clicking on the project in the Package Explorer, choosing Properties > Java Build Path > Libraries > Add External Jars and selecting all of the lib files in the lib folder of the Axis2 folder.
  • This project was exported as the jar file chemspider_webservices.jar

Using the chemspider_webservices.jar file as an external library jar file

The chemspider_webservices.jar file and all of the Apache Axis2 library jar files need adding to a java project as referenced libraries before it can be called. To do this in Eclipse right-click on the project in the Package Explorer, choose Properties > Java Build Path > Libraries > Add External Jars and select:

  • the chemspider_webservices.jar file (download it from chemspider_webservices.jar and save it locally)
  • all of the lib files in the lib folder of the Axis2 folder.

Once this has been done then the ChemSpider webservices can be called from the project. An example is shown below, and is also downloadable in text format from here. This has been structured into (pretty well self-contained) functions which can be easily called to retrieve the results of a particular operation of a webservice. In the main function these functions are called and the output written out.

Please note that you should put your obtains your own ChemSpider token from ChemSpider to set as the ChemSpiderToken value – to obtain this, register for a ChemSpider account, and look up your token from your user Profile page after logging in. Some tokens require your user account to be associated with the “Service Subscriber” role, which you can request from your user profile page.

package com.chemspider.www.examples;

import java.util.HashMap;
import java.util.Map;

import javax.swing.JOptionPane;

import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;

import com.chemspider.www.*;
import com.chemspider.www.InChIStub.InChIToCSIDResponse;
import com.chemspider.www.SearchStub.GetAsyncSearchResultResponse;
import com.chemspider.www.SearchStub.GetAsyncSearchStatusResponse;
import com.chemspider.www.SearchStub.SimpleSearchResponse;
import com.chemspider.www.MassSpecAPIStub.ArrayOfInt;
import com.chemspider.www.MassSpecAPIStub.ArrayOfString;
import com.chemspider.www.MassSpecAPIStub.ExtendedCompoundInfo;
import com.chemspider.www.MassSpecAPIStub.GetDatabasesResponse;
import com.chemspider.www.MassSpecAPIStub.GetExtendedCompoundInfoArrayResponse;
import com.chemspider.www.MassSpecAPIStub.SearchByMassAsyncResponse;

public class WebServiceExamples {

/**
* @param args
*/

private static final Logger LOG = Logger.getLogger(WebServiceExamples.class.getName());

private static String ChemSpiderToken = "YOU NEED TO INSERT YOUR OWN TOKEN IN HERE";

public static void main(String[] args) {
BasicConfigurator.configure();

JOptionPane.showMessageDialog(null, "The compound with InChI InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H has CSID:"+get_InChI_InChIToCSID_Results("InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H"));

int[] SimpleSearchResults = get_Search_SimpleSearch_Results("taxol", ChemSpiderToken);
JOptionPane.showMessageDialog(null, "The first of "+SimpleSearchResults.length+" ChemSpider compound(s) returned by a search for Taxol has CSID:"+SimpleSearchResults[0]);

int[] inputCSIDs = new int[2];
inputCSIDs[0] = 236;
inputCSIDs[1] = 238;
Map> GetExtendedCompoundInfoArrayResults = get_MassSpecAPI_GetExtendedCompoundInfoArray_Results(inputCSIDs, ChemSpiderToken);
Map thisCompoundInfo = GetExtendedCompoundInfoArrayResults.get(238);
JOptionPane.showMessageDialog(null, "The Average Mass of the compound with CSID 238 is: "+thisCompoundInfo.get("AverageMass"));

String[] GetDatabaseResults = get_MassSpecAPI_GetDatabases_Results();
JOptionPane.showMessageDialog(null, "The first of "+GetDatabaseResults.length+" datasources in ChemSpider is:"+GetDatabaseResults[0]);

String SearchByMassAsyncResults = get_MassSpecAPI_SearchByMassAsync_Results(1100.0, 0.1,GetDatabaseResults, ChemSpiderToken);
JOptionPane.showMessageDialog(null, "Transaction ID for search on compounds with mass = 1100+/- 0.1 from any data source is" + SearchByMassAsyncResults);
JOptionPane.showMessageDialog(null, "The operation status of the search with this transaction ID is" + get_Search_GetAsyncSearchStatus_Results(SearchByMassAsyncResults, ChemSpiderToken));
int[] GetAsyncSearchResultResults = get_Search_GetAsyncSearchResult_Results(SearchByMassAsyncResults, ChemSpiderToken);
JOptionPane.showMessageDialog(null, "And the first of "+GetAsyncSearchResultResults.length+" ChemSpider compound(s) returned by the search has CSID:"+GetAsyncSearchResultResults[0]);
}

/**
* Function to call the InChIToCSID operation of ChemSpider's InChI SOAP 1.2 webservice (http://www.chemspider.com/InChI.asmx?op=InChIToCSID)
* Convert InChI to ChemSpider ID.
*
* @param inchi: string representing inchi to search ChemSpider for
* @return: string representing CSID returned
*/
public static String get_InChI_InChIToCSID_Results(String inchi) {
String Output = null;
try {

final InChIStub thisInChIstub = new InChIStub();
com.chemspider.www.InChIStub.InChIToCSID InChIToCSIDInput = new com.chemspider.www.InChIStub.InChIToCSID();
InChIToCSIDInput.setInchi(inchi);
final InChIToCSIDResponse thisInChIToCSIDResponse = thisInChIstub.inChIToCSID(InChIToCSIDInput);
Output = thisInChIToCSIDResponse.getInChIToCSIDResult();
} catch (Exception e) {
LOG.log(Level.ERROR, "Problem retrieving ChemSpider webservices", e);
}
return Output;
}

/**
* Function to call the SimpleSearch operation of ChemSpider's Search SOAP 1.2 webservice (http://www.chemspider.com/search.asmx?op=SimpleSearch)
* Search by Name, SMILES, InChI, InChIKey, etc. Returns a list of found CSIDs (first 100 - please use AsyncSimpleSearch instead if you like to get the full list). Security token is required.
*
* @param query: String representing search term (can be Name, SMILES, InChI, InChIKey)
* @param token: string containing your user token (listed at your http://www.chemspider.com/UserProfile.aspx page)
* @return: int[] array containing the ChemSpider IDs. If more than 100 are found then only the first 100 are returned.
*/
public static int[] get_Search_SimpleSearch_Results(String query, String token) {
int[] Output = null;
try {
final SearchStub thisSearchStub = new SearchStub();
com.chemspider.www.SearchStub.SimpleSearch SimpleSearchInput = new com.chemspider.www.SearchStub.SimpleSearch();
SimpleSearchInput.setQuery(query);
SimpleSearchInput.setToken(token);
final SimpleSearchResponse thisSimpleSearchResponse = thisSearchStub.simpleSearch(SimpleSearchInput);
Output = thisSimpleSearchResponse.getSimpleSearchResult().get_int();
} catch (Exception e) {
LOG.log(Level.ERROR, "Problem retrieving ChemSpider webservices", e);
}
return Output;
}

/**
* Function to call the GetDatabases operation of ChemSpider's MassSpecAPI SOAP 1.2 webservice (http://www.chemspider.com/massspecapi.asmx?op=GetDatabases)
* Get the list of datasources in ChemSpider.
*
* @return: the list of datasources in ChemSpider as a String Array
*/
public static String[] get_MassSpecAPI_GetDatabases_Results() {
String[] Output = null;
try {

final MassSpecAPIStub thisMassSpecAPIStub = new MassSpecAPIStub();
com.chemspider.www.MassSpecAPIStub.GetDatabases getDatabaseInput = new com.chemspider.www.MassSpecAPIStub.GetDatabases();
final GetDatabasesResponse thisGetDatabasesResponse = thisMassSpecAPIStub.getDatabases(getDatabaseInput);
Output = thisGetDatabasesResponse.getGetDatabasesResult().getString();
} catch (Exception e) {
LOG.log(Level.ERROR, "Problem retrieving ChemSpider webservices", e);
}
return Output;
}

/**
* Function to call the GetExtendedCompoundInfoArray operation of ChemSpider's MassSpecAPI SOAP 1.2 webservice (http://www.chemspider.com/massspecapi.asmx?op=GetExtendedCompoundInfoArray)
* Get array of extended record details by an array of CSIDs. Security token is required.
*
* @param CSIDs: integer array containing the CSIDs of compounds for which information will be returned
* @param token: string containing your user token (listed at your http://www.chemspider.com/UserProfile.aspx page)
* @return: a Map> containing the results array for each CSID (with Properties CSID, MF, SMILES, InChIKey, AverageMass, MolecularWeight, MonoisotopicMass, NominalMass, ALogP, XLogP, CommonName)
*/
public static Map> get_MassSpecAPI_GetExtendedCompoundInfoArray_Results(int[] CSIDs, String token) {
Map> Output = new HashMap>();
try {
final MassSpecAPIStub thisMassSpecAPIStub = new MassSpecAPIStub();
ArrayOfInt inputCSIDsArrayofInt = new ArrayOfInt();
inputCSIDsArrayofInt.set_int(CSIDs);
com.chemspider.www.MassSpecAPIStub.GetExtendedCompoundInfoArray getGetExtendedCompoundInfoArrayInput = new com.chemspider.www.MassSpecAPIStub.GetExtendedCompoundInfoArray();
getGetExtendedCompoundInfoArrayInput.setCSIDs(inputCSIDsArrayofInt);
getGetExtendedCompoundInfoArrayInput.setToken(token);
final GetExtendedCompoundInfoArrayResponse thisGetExtendedCompoundInfoArrayResponse = thisMassSpecAPIStub.getExtendedCompoundInfoArray(getGetExtendedCompoundInfoArrayInput);
ExtendedCompoundInfo[] thisExtendedCompoundInfo = thisGetExtendedCompoundInfoArrayResponse.getGetExtendedCompoundInfoArrayResult().getExtendedCompoundInfo();
for (int i=0; i Map thisCompoundExtendedCompoundInfoArrayOutput = new HashMap();
thisCompoundExtendedCompoundInfoArrayOutput.put("CSID", Integer.toString(thisExtendedCompoundInfo[i].getCSID()));
thisCompoundExtendedCompoundInfoArrayOutput.put("MF", thisExtendedCompoundInfo[i].getMF());
thisCompoundExtendedCompoundInfoArrayOutput.put("SMILES", thisExtendedCompoundInfo[i].getSMILES());
thisCompoundExtendedCompoundInfoArrayOutput.put("InChI", thisExtendedCompoundInfo[i].getInChI());
thisCompoundExtendedCompoundInfoArrayOutput.put("InChIKey", thisExtendedCompoundInfo[i].getInChIKey());
thisCompoundExtendedCompoundInfoArrayOutput.put("AverageMass", Double.toString(thisExtendedCompoundInfo[i].getAverageMass()));
thisCompoundExtendedCompoundInfoArrayOutput.put("MolecularWeight", Double.toString(thisExtendedCompoundInfo[i].getMolecularWeight()));
thisCompoundExtendedCompoundInfoArrayOutput.put("MonoisotopicMass", Double.toString(thisExtendedCompoundInfo[i].getMonoisotopicMass()));
thisCompoundExtendedCompoundInfoArrayOutput.put("NominalMass", Double.toString(thisExtendedCompoundInfo[i].getNominalMass()));
thisCompoundExtendedCompoundInfoArrayOutput.put("ALogP", Double.toString(thisExtendedCompoundInfo[i].getALogP()));
thisCompoundExtendedCompoundInfoArrayOutput.put("XLogP", Double.toString(thisExtendedCompoundInfo[i].getXLogP()));
thisCompoundExtendedCompoundInfoArrayOutput.put("CommonName", thisExtendedCompoundInfo[i].getCommonName());
Output.put(thisExtendedCompoundInfo[i].getCSID(), thisCompoundExtendedCompoundInfoArrayOutput);
}

} catch (Exception e) {
LOG.log(Level.ERROR, "Problem retrieving ChemSpider webservices", e);
}
return Output;
}

/**
* Function to call the SearchByMass2 operation of ChemSpider's MassSpecAPI SOAP 1.2 webservice (http://www.chemspider.com/massspecapi.asmx?op=SearchByMass2)
* Search ChemSpider by mass +/- range.
*
* @param Mass: The compounds returned have a mass (Double) within the range Mass +/- Range
* @param Range: The compounds returned have a mass (Double) within the range Mass +/- Range
* @return: the ChemSpider IDs of compounds returned (as a String Array)
*/
public static String get_MassSpecAPI_SearchByMassAsync_Results(Double mass, Double range, String[] dbs, String token) {
String Output = null;
try {
final MassSpecAPIStub thisMassSpecAPIStub = new MassSpecAPIStub();
com.chemspider.www.MassSpecAPIStub.SearchByMassAsync getSearchByMassAsyncInput = new com.chemspider.www.MassSpecAPIStub.SearchByMassAsync();
getSearchByMassAsyncInput.setMass(mass);
getSearchByMassAsyncInput.setRange(range);
ArrayOfString inputDBsArrayofString = new ArrayOfString();
inputDBsArrayofString.setString(dbs);
getSearchByMassAsyncInput.setDbs(inputDBsArrayofString);
getSearchByMassAsyncInput.setToken(token);
final SearchByMassAsyncResponse thisSearchByMassAsyncResponse = thisMassSpecAPIStub.searchByMassAsync(getSearchByMassAsyncInput);
Output = thisSearchByMassAsyncResponse.getSearchByMassAsyncResult();
} catch (Exception e) {
LOG.log(Level.ERROR, "Problem retrieving ChemSpider webservices", e);
}
return Output;
}

/**
* Function to call the GetAsyncSearchStatus operation of ChemSpider's Search SOAP 1.2 webservice (http://www.chemspider.com/search.asmx?op=GetAsyncSearchStatus)
* Query asynchronous operation status. Requires transaction ID returned by AsynchSearch operation. Security token is required.
*
* @param rid: String representing transaction ID returned from a previous search
* @param token: string containing your user token (listed at your http://www.chemspider.com/UserProfile.aspx page)
* @return: String describing status of this search - can have values Unknown or Created or Scheduled or Processing or Suspended or PartialResultReady or ResultReady or Failed or TooManyRecords
*/
public static String get_Search_GetAsyncSearchStatus_Results(String rid, String token) {
String Output = null;
try {
final SearchStub thisSearchStub = new SearchStub();
com.chemspider.www.SearchStub.GetAsyncSearchStatus GetAsyncSearchStatusInput = new com.chemspider.www.SearchStub.GetAsyncSearchStatus();
GetAsyncSearchStatusInput.setRid(rid);
GetAsyncSearchStatusInput.setToken(token);
final GetAsyncSearchStatusResponse thisGetAsyncSearchStatusResponse = thisSearchStub.getAsyncSearchStatus(GetAsyncSearchStatusInput);
Output = thisGetAsyncSearchStatusResponse.getGetAsyncSearchStatusResult().toString();
} catch (Exception e) {
LOG.log(Level.ERROR, "Problem retrieving ChemSpider webservices", e);
}
return Output;
}

/**
* Function to call the GetAsyncSearchResult operation of ChemSpider's Search SOAP 1.2 webservice (http://www.chemspider.com/search.asmx?op=GetAsyncSearchResult)
* Returns the list of CSIDs found by AsynchSearch operation. Security token is required.
*
* @param rid: String representing transaction ID returned from a previous search
* @param token: string containing your user token (listed at your http://www.chemspider.com/UserProfile.aspx page)
* @return: int[] array containing the ChemSpider IDs.
*/
public static int[] get_Search_GetAsyncSearchResult_Results(String rid, String token) {
int[] Output = null;
try {
final SearchStub thisSearchStub = new SearchStub();
com.chemspider.www.SearchStub.GetAsyncSearchResult GetAsyncSearchResultInput = new com.chemspider.www.SearchStub.GetAsyncSearchResult();
GetAsyncSearchResultInput.setRid(rid);
GetAsyncSearchResultInput.setToken(token);
final GetAsyncSearchResultResponse thisGetAsyncSearchResultResponse = thisSearchStub.getAsyncSearchResult(GetAsyncSearchResultInput);
Output = thisGetAsyncSearchResultResponse.getGetAsyncSearchResultResult().get_int();
} catch (Exception e) {
LOG.log(Level.ERROR, "Problem retrieving ChemSpider webservices", e);
}
return Output;
}

}

Disclaimer: I’m new to Java programming, so please excuse me if you are a java expert and I’ve said something obvious, offended you with my code or used the wrong terminology anywhere.

Only two days until the start of this year’s Fall ACS meeting in Denver. The ChemSpider team is busy preparing for the meeting, packing bags, polishing talks and honing workshop skills.

Please drop by and say “Hi!”

We’d like to repeat our invitation to everyone at the conference to drop by the RSC booth (Booth 1100). Where, of course you can chat with the ChemSpider team, get a quick demo (and find out more about our latest features), pick up our hot-off-the-press User Guide or scoop some exclusive ChemSpider goodies!

To celebrate the release of the new iPhone/iPad app* we have a limited number of covers for 3G and 4G iPhones as well as iPads

*The app itself is free to download from the AppStore.

You can also find out about lots of other things that the RSC does: from publishing books and journals to the promotion of chemistry worldwide. We’ll also have lots of information on our new e-membership option, which is making its’ debut at this meeting. Also keep an eye out for members of our Editorial staff from journals including: OBC, MedChemComm, PCCP, Soft Matter and RSC Advances, who will be scouring the conference in search of lots of new and exciting research.

Natural Product & Synthetic Chemists

I’d like to make an extra special invitation to any Synthetic chemists and Natural products chemists – from PhD students to Professors (please pass this on to all your friends and colleagues who will be at the meeting). The ChemSpider team really wants to hear about your research. Tell us about your latest publication or the work that you are most proud of, and we can make sure that your key compounds from these publications are in ChemSpider, on a platform freely accessible to chemists everywhere. If you are more interested in methodology you shouldn’t feel left out – ask us about ChemSpider Synthetic Pages.

 

ChemSpider related talks and workshops

Antony Williams (most-definitely the hardest working man I know) is giving a number of talks and workshops (details below) which are sure to be entertaining as well as thought-provoking and will be well-worth squeezing into your schedule.

We look forward to meeting you.

 

“Aligning scientific expertise and passion through a career path in the chemical sciences”

Colorado Convention Center, Room: 110, Sunday 28th August 2011, 1.40PM – 2PM

 

“Chemistry in the hand: The delivery of structure databases and spectroscopy gaming on mobile devices

Colorado Convention Center, Room: 110, Monday 29th August 2011, 9.05AM – 9.35AM

 

“ChemSpider: Does community engagement work to build a quality online resource for chemists?”

Colorado Convention Center, Room: 110, Tuesday 30th August, 10.10AM – 10.50AM

 

“An Introduction to ChemSpider – A Combination Platform of Free Chemistry Database, Free Prediction Engines and Wiki Environment”

Colorado Convention Center, Room 503, Wednesday 31th August 2011, 08.30AM – 11AM

 

“Structure representations in public chemistry databases: The challenges of validating the chemical structures for 200 top-selling drugs”

Colorado Convention Center, Room: 110, Wednesday 31st August 2011, 10.45AM – 11.05AM

As I mentioned in my blog post a few weeks ago, over the last few months we have been hard at work trying to improve how we organise all of the information and features that can be found when you view a ChemSpider record. And now you can see the fruits of our labour.

We hope that you find the changes we’ve made give you a better and easier user experience. While we think that the changes will be clear and intuitive, I’d like to highlight a few key features in my next few posts.

Inline help

When you look at compound pages and other useful pages, you should now see a lot more Question mark symbols dottedInline Help question symbol throughout the pages. We’ve called this approach inline help: rather than giving you an in-depth help resource on a separate page or as a PDF, it is much more useful to have a little snippet of help right at the point in the page where you need it. Clicking on the question mark symbol should bring up a yellow text box with short guidance (where there is a need to provide more complete help, we’ll provide a link to a page which contains much more detailed information). Of course, do let us know if you have any suggestions for improvements to the help text.

Inline hep text

 

Default infobox ordering*

Many users indicate they most often look for names (or name-structure associations), physical properties and spectral data, so we have put this information at the beginning of the record. Now when you come to a record, by default the Names infobox is the first box listed followed by the Properties, Spectra and the Articles infoboxes.

None of your favourite infoboxes have been removed (in fact we’ve created some new ones – see later). If you don’t like the default order, it is easy to change the ordering of the infoboxes by clicking on the titlebar and dragging them up or down the record. ChemSpider will remember your order and will use this for all future visits to the site from that PC (in the same browser/profile).

*If you have visited the site before ChemSpider will remember your previous settings. If you want to see the new default order you will need to clear your browser history or delete the ChemSpider cookies that are saved in your profile.

 

New infoboxes: Searches and Chemical Vendors

ChemSpider has always had great features, for instance:

The Similar Search – that allows you to find records for compounds that have the same skeleton, but have different stereochemistry or isotopic labels

The ability to load the structure from the current record into a structure search, so that you are able to modify it and construct a new search.

However, this hasn’t always been made very clear, in our redesigned compound page we have aimed to make these powerful search tools easier to discover and understand.

The Searches Infobox

Now you can find these all together in the Searches infobox – along with our Google Scholar custom queries which allow you to perform one search across publications using all of the validated synonyms (saving you from having to perform many separate searches for individual synonyms). We also help you to perform ‘structure searches’ of Google (in the form of an InChIkey search).

The Search infobox

The Chemical Vendors Infobox

We’ve also created an infobox  just to display Chemical vendor information, so that it is much quicker to find if the compound in the record is commercially available.

The record for Sparteine with it's Chemical vendors infobox

 

In my next post I’ll finish off discussing the improvements that we’ve made to the site. But of course, if you have any comments or questions about the features I’ve discussed here, please leave a comment below, or send an email to the ChemSpider inbox.

 

 

There are multiple structure drawing editors on ChemSpider. And we could add more! For example, one we don’t have is JSDraw and we also don’t have the ChemDoodle components in place, yet, though I am VERY impressed with the spectral display components that are integrated into the SpectralGame that ChemSpider supports. Compared to just a few years ago there is now an abundance of structure drawing editors in the form of Applets and JavaScript Editors. So many in fact that it can be confusing to the user. The user in reality should not worry about the technology behind the editor. It should be quite simple, especially when it comes to something as simple as the editor being the interface to querying ChemSpider. It should display perfectly on the browser(s) and platform(s) used by the user, it should be intuitive and easy to use (preferably without having to resort to reading help files), and essentially, it should “do what I want it to do”. Not at all an unreasonable list of demands right? Not so easy to deliver on mind you!

On ChemSpider we have multiple structure drawing editors. If you visit this page and open up the selection window by using “Click to Edit” you will see the editor below and, underneath the editor shown, a series of editors that you can choose from.

Structure Editors on ChemSpider

There has to be an order of listing the editors…the listed order is NOT a preferred order from our point of view. Just a list. We have heard feedback from numerous people about their preferred editor. Some live and breath the Java Molecular Editor (JME). Some prefer Accelrys JDraw because they already use Accelrys Draw. Many think that Elemental is a great Javascript Editor.

We are left with a choice….leave all editors (which has a cost in time to support them, keep them updated, tested etc) or reduce the number of editors to just a couple (or three). So, we welcome your input, on this blog post as a comment, or via the survey on SurveyMonkey here. We’d like your input to help steer our decision. Thanks

COPIED FROM THE CHEMCONNECTOR BLOG

Unless you have no interest in sports, or have your head under a stone, you will be aware of the fact that the next Olympics will be held in London in 2012. Peter Scott (one of the editors of ChemSpider SyntheticPages) and I were recently discussing how much of a role chemistry plays now in modern sports. I’m a runner, cyclist, swimmer and overall sporting type of guy and depend on wicking materials to keep me cool, nutritional support to get me through my 100-150 mile bike rides in a day, glide stick to “stop me chafing” (ow!) and graphite grease to silence the rattling chain on my bike. In fact it doesn’t matter what sport I am doing it is easy to notice the influence that chemistry has on my improved performance at my tender age of, ahem, just over 40 (and holding, for a while now).

I was reminiscing with Peter that Sir Graham Richards and I were chatting about pyrenes about a year ago and we lamented on how Benzo[CD]pyrene, shown here, looks just like the Olympic rings. There is another rather well known “Olympic molecule” of course, already captured on Wikipedia and named Olympiadane. It looks rather complex to synthesize and personally I think the benzopyrene looks a lot more like the Olympic rings so I attached the synonym Olympicene to it! In fact, if you search ChemSpider using the name Olympicene you will find it.

In a recent discussion about our online crowdsourced database of syntheses, ChemSpider SyntheticPages,(and not distracted at all by the conversation about the Olympics going to the UK next year!!!)  I mentioned again to Peter the molecule Olympicene and he searched ChemSpider to find it. We agreed that it would be fun to know how easy it would be too synthesize it and if it was done it would be a good synthesis to add to ChemSpider SyntheticPages. That was enough to trigger Peter into action and chat with one of his colleagues to see if he can make it.

And so it starts…the trials and tribulations of how to synthesize the chemical Olympicene will be captured on ChemSpider SyntheticPages step by step. We’re not sure how complex a synthesis it will be..time will tell. It will be great to add the analytical data to ChemSpider too as it gets generated..including all the intermediate reaction steps and associated data. ChemSpider and CSSP were designed to support projects like this so it will be a fun story to watch it work through.

If YOU have any thoughts about good synthetic approaches for what seems like a simple molecule post them on this blog. Actually, why not try synthesizing yourself and add your syntheses to SyntheticPages!? Every contribution is issued a DOI for your publication list!

It might be ideal to get a  number of synthetic approaches posted on ChemSpider SyntheticPages and see which one is the best! Watch this space. Also, I’ve set up a Twitter account to capture the progress at @Olympicene. Enjoy!

We will be hosting a training session for ChemSpider at the ACS meeting in Denver. Please register early.

An Introduction to ChemSpider – A Combination Platform of Free Chemistry Database, Free Prediction Engines and Wiki Environment

Where: Colorado Convention Center
Room: 503
When: Wednesday, August 31, 8:30 AM – 11:00 AM

>> Click here to register for this workshop
ChemSpider has become one of the premier free online chemistry resources used by many thousands of chemists around the world every day. Hosting over 26 million unique chemical entities, sourced from over 400 separate data sources, ChemSpider provides access to experimental and predicted data, links to patents and publications and uniquely offers the ability to deposit and share their own data online. With the intention of integrating and curating public chemistry resources for the community ChemSpider encourages participation from chemists around the world. Integrated to Wikipedia, Google Patents, Google Books, Google Scholar and PubMed, as well as to the RSC Publishing platform, ChemSpider provides access to chemistry contained in millions of articles. This training session will provide an overview of searching ChemSpider and will discuss how to deposit data and participate in curating the existing information. We will also provide an overview of ChemSpider SyntheticPages, our venture into providing a community-based resource of semantically enriched synthetic procedures and allowing community peer review. This will be an interactive session and you are encouraged to bring your laptops to work along and ask questions regarding present and future capabilities. ChemSpider is built for the community and we welcome your comments about how to make it better for your needs.

I’m sure that by now everyone has noticed that the ChemSpider homepage design changed just over a month ago. A few features moved around, the Molecules of Interest section was retired and perhaps most significantly the Search box was given a dose of CSID: 5791, becoming bigger and more prominent.

The reason for this wasn’t just to make the site more attractive (though I think it does look ‘prettier’). Our motivation for the change is to deliver a site that makes it easier for users to interact with and understand. And by doing so, hopefully make it quicker and simpler for you to get your tasks done using ChemSpider. The refresh of the homepage is hopefully illustrative of this: We think that as most users come to ChemSpider to search for information – it should be easy to get straight into a search, hence the greater emphasis on this feature.

In the next few days we will release another upgrade to the interface which is centered on making it easier to understand the data presented in the compound Record View pages. I’ll post a blog entry dealing with some of the key features in the next few days.

The development of ChemSpider is an ongoing process, and we are aware that even after this upgrade there will be aspects of the compound Record View pages that will need more work (and also other parts of the site that still need development). It’s not going to be easy: ChemSpider brings together a rich and varied set of data from a large number of sources – this poses many challenges. We also realise that there are many different tasks that each of you – as users – want to perform, and it is always going to be difficult to reconcile all of the different opinions/needs.

However, we are trying to make the site better for you. And therefore, we’d really like to know your opinions on the changes (please test new features for a few days first). We welcome your feedback on the redesign either in the form of blog comments or email feedback (chemspider-at-rsc.org).

Over the next week – keep your eyes peeled for the upgrade and my accompanying blog post which will endeavor to give you a good introduction to the new features.

Connecting chemistry and mass spectrometry on the internet in the very first Chemistry World live webinar on 31 January, discover the powerful combination of the modern mass spectrometry and the ChemSpider database of chemical structures in metabolomics research.

Dr Antony Williams of the RSC and Dr John Shockcor from Waters will be speaking on:

Connecting Chemistry and Mass Spectrometry on the Internet – ChemSpider
Monday 31 January 2011

Join the live webinar – Register Here

Or

Be part of the active audience at The Royal Society of Chemistry, London, UK – Register Here

This Chemistry World webinar is brought to you in partnership with ChemSpider and Waters.

I’ll shortly be announcing the details of a seminar we will be holding at the end of January regarding Metabolomics and ChemSpider. The details will come shortly. However, to parallel that seminar I want to be proactive in announcing that we will be holding a round-table discussion for scientists interested in further refining how ChemSpider can be extended to serve the metabolomics community. An outline of the meeting is provided below. If you are interested in participating please respond to me directly at williams”AT”rsc”DOT”org by the deadline listed below. We will cap the attendance fairly quickly and are specifically looking for people who can be vocal about their needs and how we may be able to help with ChemSpider as a platform.

Metabolomics Round Table – Delivering Value to the Metabolomics Community via ChemSpider, a Public Domain Database

Hosts: John Shockcor, Waters and Antony Williams, Royal Society of Chemistry

When: January 31st, 2011

Venue: Fish Room, Royal Society of Chemistry, Burlington House, London

The metabolomics community presently utilizes public domain databases such as KEGG, LipidMap, DrugBank and a myriad of other online resources to assist in the analysis of data. However, rich as these resources are, they are limited in scope, are challenged by known data quality issues, and are not directly focused on serving the needs of the metabolomics community. ChemSpider is an online resource for the chemistry community hosted by the Royal Society of Chemistry with the intention of linking together online chemistry resources, cleaning and curating chemistry related data and collectively serving a number of communities. ChemSpider has been used by members of the mass spectrometry community, including instrument vendors, for the past 3 years. This roundtable meeting is to provide an overview of how ChemSpider is presently used by scientists working in the domain of metabolomics and garner feedback from the existing user base as well as new potential users to help define how ChemSpider can be enhanced to further support the needs of this community.

Antony Williams, VP of Strategic Development and host of ChemSpider at RSC, and John Shockcor, Director of Life Sciences Business Development at Waters Corp, invite you to attend this half day meeting to provide input to steer development of ChemSpider to address the needs of the metabolomics community. This meeting will be followed by a public seminar and networking meeting in the RSC’s new Chemistry Center. An outline of the agenda is given below.

If you are interested in attending please express your interest by sending an email to williamsa@rsc.org by January 21st, 2011

12 – 1pm Arrival, Buffet Lunch

1-1:15pm Logistics and Intros

1:15-1:30pm An introduction to ChemSpider, Antony Williams

1:30-2:00pm Integrating ChemSpider and Metabolomics workflows, John Shockcor

2:00-4:00pm Round table discussion – How can ChemSpider expand to support the metabolomics community?

4:00-4:45pm Prioritization process

4:45-5:00pm Summary and Close

5:00-6:00pm Break

6:30pm Public Seminar

By now most of you are through the holiday season and recovering from the expenditures, both expected and unexpected, through the late nights and the joy of spending time with friends and family alike. The New Year provides a great time to reflect on the past year and think about what is coming in the year ahead…and making plans. For ChemSpider it has been a good year. Our reputation has continued to expand, our user base has increased, our staffing has increased and our participation in some major projects both within RSC and with international efforts for managing data have expanded. We won three awards, we recommitted to quality above quantity and we have worked hard to build a team of cheminformatics experts and programmers who can continue the charge to revolutionize the integration and delivery of chemistry-related data.

With this team in place we are set to make a lot of changes and enhancements in the coming year. This will be the year of deprecation. We have been busily flagging “bad” data…obvious errors that have found their way into the database. These will be dealt with, both in our database as well in other databases where we have migrated some of these erroneous data. A usability study has been conducted and the data are being analyzed and reviewed. An action plan to implement the appropriate changes based on this user feedback will be put in place early in 2011. This will be the year of RDF’ing ChemSpider…a certain community has been waiting for us to get this in place. We are committed to delivering it. We already started integrating the RSC Publishing Platform with ChemSpider through compound pages…a project to perform text-mining across the RSC article archive and link to ChemSpider will be initiated in 2011. Our much discussed “ChemSpider Education” project is underway and led by Martin Walker from SUNY Potsdam. The first view will be exposed at the ACS meeting in Spring. ChemSPider Synthetic Pages will continue to expand with new content and we are already busy assembling hundreds of spectra to deposit onto ChemSpider. We should be able to add another 1000 spectra in the next few weeks.

2011 is going to be an exciting year for ChemSpider…we hope you visit, give us feedback and challenge us to be our best. We are out to serve you, our community of users.

Hi…ChemSpiderman (Antony Williams) here..I am about to start traveling and I will be giving a presentation next week in the UK. I have been working on some validation of online public domain chemistry databases. In doing this work I realized that what would be of benefit would be to hear from the community what databases you feel can be trusted and to what level. Please visit the online survey and provide me your feedback. This would be very useful for my presentation. If you could do this in the next 48 hours I would be very grateful. Thanks!

Click here to take my survey!!!

The ChemSpider web services are intended to allow you to use the functionality of ChemSpider and query the data in it in your own website or program or script. There are many different webservices as described here, and also many different ways to use them.

One example of how to use them was sent to us by Jimmy Moore from the University of Manchester. He includes a call on the SimpleSearch operation of the Search web service in a perl script. THis searches the whole of ChemSpider by an input value which can be the molecule’s name, SMILES string, InChI, InChIKey, and returns the ChemSpider ID:

use strict;
my $unknown = shift;
use SOAP::Lite on_action => sub {sprintf '"%s%s"', @_};
my $token = ' '; # Your token value should be input here. I'm not going to give mine away!
my $service = SOAP::Lite -> uri('http://www.chemspider.com/')
-> proxy('http://www.chemspider.com/Search.asmx');
my $output = $service->call(SOAP::Data->name('SimpleSearch')
-> attr({xmlns => 'http://www.chemspider.com/'})
=> SOAP::Data->name('query')->value($unknown)->type('')
=> SOAP::Data->name('token')->value($token)->type(''));
my @result = $output->valueof('//SimpleSearchResult/int');
print @result;

For further background, and also an example of a perl script which uses the SMILESToInChI operation of the InChI web service see his blog page.

Please note that to use this (and some of the other) web services you need to obtain a token, by registering with ChemSpider (if you have not already), and then logging into ChemSpider and viewing your Profile page. The Security Token shown needs to be copied into the perl script itself in Jimmy’s example.

Also note that you will need to install the SOAP::Lite for Perl modules to your Perl library to run this script if you don’t already.

If you have an example of how you have used the ChemSpider web services then please reply to this ChemSpider forum post. More examples will inspire more new ideas, and also make it easier for other people trying to do similar things.

We hope you’ve had an opportunity to take a look at the revamped website. If you would like to share your thoughts on usability and design or site performance please take a moment to click on the “Give Feedback” button on the website. This will really help us to make the ChemSpider user experience even better.

 Kampyle feedback

My presentation today at the Wolfram Data Summit in Washington DC gave me a chance to rant about the quality of data online and ask the question who really cares? Many of the database hosts don’t appear to care (most don’t respond to emails when I find errors, very few give anyway to annotate an error for example). The talk seemed to be well received and shocked a few people.

Recently I co-authored a publication with Harry Pence for the Journal of Chemical Education. And today the news that it is published online. Please follow the instructions below if you want to be one of the first 50 people to obtain a copy.

“Your article, ChemSpider: An Online Chemical Information Resource, is now available on the Journal of Chemical Education website.  To view your article, please click on the ACS Articles on Request link below:

http://pubs.acs.org/articlesonrequest/AOR-gUuatr3ABq9RiePFMyaK

As part of the ACS Articles on Request e-prints service,  ACS authors may choose to e-mail or post this link on their website to distribute up to 50 free e-prints of their final published article to interested colleagues during the first 12 months of publication. After that 12 month period any author’s article may be accessed without restriction via the same author-directed link that appears above.  The link directs readers to the Full Text version of the article on the ACS Publications website.

Please note: To access the Articles on Request link, please log in to the Publications website using your ACS ID.  If you do not have an ACS ID, you will need to Register for one for free by clicking on “Register” near the top right corner of the website.”

The first circular for the 16th RSC-SCI Medicinal Chemistry Symposium, 11-14 September 2011, Churchill College, Cambridge, UK is now available here.

The Scientifc Program includes:-

Strategies to success – H-PGDS inhibitors for the treatment of inflamatory disorders, Sukanthini Thurauratnam, Sanofi -Aventis

Discovery on next generation glucokinase activators, Mike Waring, AstraZeneca
Inhalation by design, Paul Glosson, Pfizer

Bromodomains a new class of epigenetic targets for small molecule drug discovery, Jason Witherington, GSK

GPCR Structure based drug design using stabilised receptors(StaRs), Miles Congreve, Heptares
GS-9350: a novel pharmacoenhancer, Lianhong Xu, Gilead Sciences

When you’re viewing a compound page in ChemSpider e.g. hydrogen peroxide there are several ways to find more detailed RSC information (articles and books) about that compound:

  1. In the “Articles” infobox, the results under the “Links & References” tab are links to various journals that have either been deposited or added by ChemSpider users. When the RSC enhances one of its articles, the most important compounds in the article are submitted to ChemSpider for deposition (see here for more details), and when this happens, the article details are also deposited so that a link will appear in this box. As such, there usually won’t be thousands of links in this box, but those that are there will for example pick up references to compounds which maybe aren’t named explicitly in the article (but for example are drawn out in a figure) and as such couldn’t be found by a simple text serach.
  2. The results under the “RSC Journals” tab in the “Articles” infobox are the results of passing a search into the RSC publishing platform to retrieve all of the journal articles that contain any approved synonym for the compound (in the “Identifiers” infobox under the “Names and Synonyms” tab). Since these lookups first appeared in ChemSpider 6 months ago (see here for more details) this platform has progressed from bring a beta version, to now being the fully-fledged publishing platform for searching on and delivering RSC journals, books and databases. To investigate the functionality of this platform more and refine your search results list, click on the link above the list of results to “Click here to explore results” and this will allow you to sort the results by date, or apply filters e.g. to restrict the results set by author, date range,  journal etc.). This is useful since for common chemicals, the list of results returned can be long.
  3.  The “RSC Books” tab under “Articles” performs a similar search on occurences of the approved synonyms but on RSC books rather than RSC journal articles.
  4. Likewise, the “RSC Databases” infobox shows search results of the same approved synonyms but this time the results are from the various RSC abstract databases named in its various tabs. This means that they contain references to the compounds in non-RSC articles.

Links to RSC Articles

With one week to go before the American Chemical Society meeting we have unveiled the new ChemSpider website for feedback and comments.We believe that we have made the site easier to navigate, more visually appealing and faster to navigate. The new site map should be very helpful in navigating the site.

We are presently gathering feedback from users with different browsers, updating some of our documentation and generally optimizing performance and navigation across the site. All feedback is welcomed…we’d love to hear from you!

website_redesign

Have you ever had a niggling feeling that you’ve been missing some corner of ChemSpider which might have a tool that will make your life much easier?

http://www.chemspider.com/Sitemap.aspx is the new sitemap for ChemSpider which lists all of the different pages in it and will help you to get an overview of all the different things that you can see and do on ChemSpider.

There are also brief descriptions about each page which will, where necessary, suggest input examples if you just want to try something out but aren’t quite sure what to type into the boxes. If you are a ChemSpider depositor or curator and view the sitemap when logged in you will see additional pages relevant to your assigned roles.

There will be two presentations and a training session about ChemSpider at the ACS meeting in Boston. We hope to see you there if you are attending the meeting. In any case the presentations will be uploaded after the conference onto the SlideShare site.

The presentations are:

Chemistry in your hand: Using mobile devices to access public chemistry compound data, August 26, 2010 1:30 pm, Boston Convention & Exhibition Center, Room: Room 156A

 

How community crowdsourcing and social networking is helping to build a quality online resource for chemists, August 22, 2010 10:25 am, Seaport Hotel, Room: Seaport Ballroom A

The training session is detailed below:

“An Overview and Update of RSC-ChemSpider Capabilities”

Tuesday, August 24, from 3:30-6pm,  Boston Convention and Exhibition Center, Room 102B

The Fall American Chemical Society meeting in Boston is just around the corner and we are finishing up the integration of some recent developments. As is usual we have way more things that we wanted to deliver than we have been able to implement. But we’ve always got more ideas so this is no surprise. The biggest change is the new website redesign that a number of readers of this blog voted on and influenced. In the next few days I will announce new features and integrations that we will be delivering, all being well!

Pillbox is defined on the website as “…enables rapid identification of unknown solid-dosage medications (tablets/capsules) based on physical characteristics and high-resolution images.” I first heard about PillBox when David Hale, “host” of Pillbox, and I were on the same speaking agenda at a meeting in Washington. David is a very engaging speaker and I really appreciated the visual nature of what they are working to deliver. Trying to identify the pharmaceutical ingredients in a pill from the color and pill imprint etc is tough…then comes PillBox.

Using the API provided to PillBox we have integrated ChemSpider directly to PillBox. So, in the future when you search on Viagra on ChemSpider and find Sildenafil Citrate you will see a new link to Pillbox (we are determining where on the page at present) and under there you will see the links to Pillbox.

A search on Viagra on Pillbox will show this:

pillbox1

but using the API we can show the information embedded into the ChemSpider page as show below.

pillbox2

Notice that all three Viagra dosages are shown and each can be opened to preview one at a time. 

This is simply one more example of integrating into the online resources becoming increasingly available and focusing on having ChemSpider being a structure-searchable hub connecting them together.

I have been at the BCCE conference here in Dallas for two days. I gave two talks in a session hosted by Harry Pence and Bob Belford, participated in their workshop on Social Networking and spoke about how to set up a blog and my experiences of blogging and today led a workshop on Online Public Compound Databases. Today was 3 hours of discussions, an agenda that was strict enough to keep us on focus but free enough to allow lots of questions and real time web-based searching. I really enjoyed the challenge of the session in terms of discussing the challenges of teaching web-based literacy in searching for chemistry online. The Powerpoint aspect of the presentation is on Slideshare below

A few weeks ago we won an award from Bio-IT World for Community Service. Allison Proffitt from Bio-IT world interviewed me recently in connection with the award and some of the history behind ChemSpider and wrote it up for the magazine. The resulting article is also available online here.

We are in the process of a website redesign with the intention to deliver a new look and feel in time for the ACS meeting. We have some draft pages available online and we would like YOUR feedback please!

We have five drafts of the Home page that we would like your comments on. Let us know which one is your favorite by giving us the number of your favorite when you comment as well as any other comments.

Home Page 1

Home Page 2

Home Page 3

Home Page 4 (static image)

Home Page 5 (static image)

The draft of our Chemical Record page is here:

Chemical Record Page

Comments and feedback welcome!