Code Monkey home page Code Monkey logo

sdf_viewer's Introduction

sdf_viewer.py - an interactive SDF viewer

by Axel Pahl

axelpahl at gmx dot de

license: BSD, see license.txt in this folder

News

  • 2015-05-28: This is the first version that runs under Python2 and Python3 (with the latest RDKit master compiled for the respective Python version)

Introduction

SDF_Viewer is a Python program that uses RDKit, PyQt and Matplotlib to display chemical structure data files (SDF) and display their properties in charts. The program runs under Python2 and Python3, has been developed on and for Linux but was also tested on Windows.

Usage

  • For features and usage of the program, see also sdf_viewer.pdf, included in this folder (presented on RDKit UGM 2014).

  • When performing fact searches, please remember that number field names are prefixed with "n_" and text field names are prefixed with "s_". The program uses this to determine the plottable fields and the fields that can be used for the "colorby" option.

    • a search in the field that is displayed as "pIC50" in the table would therefore have to look like this in the query entry field: n_pIC50 >= 8
    • and a search in the text field "family" accordingly like this (values are converted to lower-case in the text search): "a.1" in s_family
    • field names beginning with "k_" (key, e.g. "k_molid") are used neither for plotting nor for coloring, but can be used in fact searching.
  • When the opened SDF does not follow this field naming scheme, the program tries to guess the types of the fields and renames them accordingly.

  • Searches can be performed in the original sdf as well as in any other sublist derived from it by earlier searches. Just click on the respective entry in the table that lists all the search results to make it the base for the next search.

  • The open in browser button is used to call a website for the displayed record. The function of the open in browser button can be defined in the sdf_viewer_config.py file (2 examples are given)

    • when defined, a url template is formatted with an sdf property (e.g. "k_molid") and the url is passed to webbrowser.open(url)
  • A local version of the config file sdf_viewer_config.py can be stored in a ~/.sdf_viewer/ dir

  • Saved sessions can be opened again under the name of the original sd file, e.g. when the original file was openend as ugm2014_bzr (with or without .sdf) then the saved session can also be loaded as ugm2014_bzr

  • The functions used by the sdf_viewer are bundled in the module sdf_tools.py and can also be accessed e.g. from an IPython session. A few examples are given in the included IPython notebook nb_example.ipynb

Planned Improvements (many based on discussions during the RDKit UGM 2014)

  • combine search results with or
  • show molecule grid of selected records
  • include editable property ("s_remark")
  • rename property
  • select calculable properties
  • create some unit tests

sdf_viewer's People

Contributors

apahl avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.