view visualisation/ob_depiction_svg.xml @ 2:125da3a296ca draft default tip

Uploaded
author bgruening
date Wed, 15 Jul 2015 12:13:08 -0400
parents 527ecd2fc500
children
line wrap: on
line source

<tool id="ctb_ob_svg_depiction" name="Visualisation">
    <description>of compounds</description>
    <requirements>
        <requirement type="package" version="2.3.2">openbabel</requirement>
    </requirements>
    <command>
<![CDATA[
    obabel -i${infile.ext} $infile
        $embed_molecule_as_cml
        $draw_all_carbon_atoms
        -xC
        -O
        $outfile -o$oformat
        #if str($sort) != "none":
            --sort $sort
        #end if
        #if str($display_name) != "None" and len(str($display_name)) > 0 and str($display_name) != 'title':
            --append "$display_name"
            --title ""
        #end if
        $thick_lines
    2>&1
]]>
    </command>
    <inputs>
        <param name="infile" type="data" format="mol,sdf,smi,inchi" label="Input format"/>
        <param name="embed_molecule_as_cml" type="boolean" truevalue="-e" falsevalue="" label="Embed molecule as CML"/>
        <param name="draw_all_carbon_atoms" type="boolean" truevalue="-a" falsevalue="" label="draw all carbon atoms"/>
        <param name="thick_lines" type="boolean" truevalue="-xt" falsevalue="" label="use thicker lines"/>

        <param name='display_name' type='select' format='text' label="The property which is displayed under the molecule">
            <option value='title'>Molecule's title</option>
            <option value='MW'>Molecular Weight</option>
            <option value='abonds'>Number of aromatic bonds</option>
            <option value='atoms'>Number of atoms</option>
            <option value='bonds'>Number of bonds</option>
            <option value='cansmi'>Canonical SMILES</option>
            <option value='cansmiNS'>Canonical SMILES without isotopes or stereo</option>
            <option value='dbonds'>Number of double bonds</option>
            <option value='formula'>Chemical formula</option>
            <option value='HBA1'>Number of Hydrogen Bond Acceptors 1 (JoelLib)</option>
            <option value='HBA2'>Number of Hydrogen Bond Acceptors 2 (JoelLib)</option>
            <option value='HBD'>Number of Hydrogen Bond Donors (JoelLib)</option>
            <option value='InChI'>IUPAC InChI identifier</option>
            <option value='L5'>Lipinski Rule of Five</option>
            <option value='logP'>octanol/water partition coefficient</option>
            <option value='MR'>molar refractivity</option>
            <option value='nF'>Number of Fluorine Atoms</option>
            <option value='s'>SMARTS filter</option>
            <option value='sbonds'>Number of single bonds</option>
            <option value='smarts'>SMARTS filter</option>
            <option value='tbonds'>Number of triple bonds</option>
            <option value='TPSA'>topological polar surface area</option>
        </param>

        <param name='sort' type='select' format='text' label="Sorting the displayed molecules by">
            <option value='none'>No sorting</option>
            <option value='MW'>Molecular Weight</option>
            <option value='abonds'>Number of aromatic bonds</option>
            <option value='atoms'>Number of atoms</option>
            <option value='bonds'>Number of bonds</option>
            <option value='dbonds'>Number of double bonds</option>
            <option value='HBA1'>Number of Hydrogen Bond Acceptors 1 (JoelLib)</option>
            <option value='HBA2'>Number of Hydrogen Bond Acceptors 2 (JoelLib)</option>
            <option value='HBD'>Number of Hydrogen Bond Donors (JoelLib)</option>
            <option value='L5'>Lipinski Rule of Five</option>
            <option value='logP'>octanol/water partition coefficient</option>
            <option value='MR'>molar refractivity</option>
            <option value='nF'>Number of Fluorine Atoms</option>
            <option value='sbonds'>Number of single bonds</option>
            <option value='tbonds'>Number of triple bonds</option>
            <option value='TPSA'>topological polar surface area</option>
        </param>

        <param name='oformat' type='select' format='text' label="Format of the resulting picture">
            <option value='svg'>SVG</option>
            <option value='png'>PNG</option>
        </param>

    </inputs>
    <outputs>
        <data name="outfile" type="data" format="png" label="${tool.name} on ${on_string}">
            <change_format>
                <when input="oformat" value="svg" format="svg"/>
            </change_format>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="infile" ftype="smi" value="8_mol.smi" />
            <param name="embed_molecule_as_cml" value="" />
            <param name="draw_all_carbon_atoms" value="-a" />
            <param name="thick_lines" value="-xt" />
            <param name='display_name' value="title" />
            <param name='sort' value='none' />
            <output name="outfile" ftype="svg" file="ob_depiction_svg_on_8_mol.svg" />
        </test>
    </tests>
    <help>
<![CDATA[

.. class:: infomark

**What this tool does**

Creates an .svg or .png image of a small set of molecules (few hundreds). Based on Open Babel PNG_/SVG_ 2D depiction.

.. _PNG: http://openbabel.org/docs/dev/FileFormats/PNG_2D_depiction.html
.. _SVG: http://openbabel.org/docs/dev/FileFormats/SVG_2D_depiction.html

-----

.. class:: warningmark

**Hint**

Use only libraries with at most a few hundred molecules.

-----

.. class:: infomark

**Cite**

`Open Babel`_

.. _Open Babel: http://openbabel.org/wiki/Main_Page

]]>
  </help>
</tool>