Installing ChemSpider Plugin for LabTrove

From LabTrove Documentation
Jump to: navigation, search

The ChemSpider plugin for LabTrove is designed to scan the content of a Entry to extract keywords (using OSCAR), which it then sends off to ChemSpider to retrieve information about each keyword. This is then displayed as a list of keywords underneath the Entry that when clicked display ChemSpider information about that keyword in page.


  1. Install Java.
    sudo apt-get install openjdk-6-jre
  2. Download OSCAR to /usr/local/bin/.
    sudo wget -O /usr/local/bin/oscar4-all-4.1.2-with-dependencies.jar
  3. From the LabTrove base directory, import the MySQL tables for the ChemSpider plugin.
     mysql -u root -p labtrove < install/sql/update-chemspider.sql
  4. Enable ChemSpider plugin in config.php by adding chemspider to $ct_config['plugins'].
  5. Register for an account on ChemSpider:
  6. Once your account is enabled login and go to:
    On this page there should be a field labelled Security token, copy this down.
  7. Edit config.php once again and enter the security token copied previously into $ct_config['chemspider']['security_token'].
  8. Create a write-able log file called /var/log/oscar.log
    sudo touch /var/log/oscar.log
    sudo chmod 666 /var/log/oscar.log
  9. Start the QueryOscarServer from the /lib/scripts folder of LabTrove with the following command line:
    java -cp /usr/local/bin/oscar4-all-4.1.2-with-dependencies.jar QueryOscarServer >> /var/log/oscar.log 2>&1 &
    Make sure that if you are using a different version of Oscar you change this command as appropriate.

Using the ChemSpider Plugin

When you create a new Notebook you can choose whether by default you want Entries to be examined for keywords that are then looked up in ChemSpider. For each Entry you can decide whether to use the ChemSpider plugin when you publish a Entry. The ChemSpider plugin only sends the keywords it has extracted locally to the remote ChemSpider service. However, if you are concerned about even a list of keywords being sent to an external service you should opt not to use ChemSpider plugin for these Entries.

When you publish a Entry that has been set to use the ChemSpider plugin. The Entry should save and be displayed almost immediately. However, the ChemSpider Info section takes a while to be generated, so this will initially appear empty. If you wait 10 seconds or so and refresh the page the ChemSpider Info section should display the keywords extracted and the accompanying ChemSpider properties for each keyword.