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 blog post 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 blog post 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']. If you decide to download to a location other than /usr/local/bin/ or download a different version of OSCAR, you will need to adjust $ct_config['chemspider']['oscar_path'] and/or $ct_config['chemspider']['oscar_jar'] appropriately.
  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'].

Using the ChemSpider Plugin

PROPOSED: When you create a new blog you can choose whether by default you want posts to be examined for keywords that are then looked up in ChemSpider. For each blog post you can decide whether to use the ChemSpider plugin when you publish a post. 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 posts.

When you publish a post that has been set to use the ChemSpider plugin. The post 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 30 seconds or so and refresh the page the ChemSpider Info section should display the keywords extracted and the accompanying ChemSpider properties for each keyword.

Personal tools