2
|
1 <tool id="ctb_ob_svg_depiction" name="Visualisation">
|
|
2 <description>of compounds</description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="2.3.2">openbabel</requirement>
|
|
5 </requirements>
|
|
6 <command>
|
|
7 <![CDATA[
|
|
8 obabel -i${infile.ext} $infile
|
|
9 $embed_molecule_as_cml
|
|
10 $draw_all_carbon_atoms
|
|
11 -xC
|
|
12 -O
|
|
13 $outfile -o$oformat
|
|
14 #if str($sort) != "none":
|
|
15 --sort $sort
|
|
16 #end if
|
|
17 #if str($display_name) != "None" and len(str($display_name)) > 0 and str($display_name) != 'title':
|
|
18 --append "$display_name"
|
|
19 --title ""
|
|
20 #end if
|
|
21 $thick_lines
|
|
22 2>&1
|
|
23 ]]>
|
|
24 </command>
|
|
25 <inputs>
|
|
26 <param name="infile" type="data" format="mol,sdf,smi,inchi" label="Input format"/>
|
|
27 <param name="embed_molecule_as_cml" type="boolean" truevalue="-e" falsevalue="" label="Embed molecule as CML"/>
|
|
28 <param name="draw_all_carbon_atoms" type="boolean" truevalue="-a" falsevalue="" label="draw all carbon atoms"/>
|
|
29 <param name="thick_lines" type="boolean" truevalue="-xt" falsevalue="" label="use thicker lines"/>
|
|
30
|
|
31 <param name='display_name' type='select' format='text' label="The property which is displayed under the molecule">
|
|
32 <option value='title'>Molecule's title</option>
|
|
33 <option value='MW'>Molecular Weight</option>
|
|
34 <option value='abonds'>Number of aromatic bonds</option>
|
|
35 <option value='atoms'>Number of atoms</option>
|
|
36 <option value='bonds'>Number of bonds</option>
|
|
37 <option value='cansmi'>Canonical SMILES</option>
|
|
38 <option value='cansmiNS'>Canonical SMILES without isotopes or stereo</option>
|
|
39 <option value='dbonds'>Number of double bonds</option>
|
|
40 <option value='formula'>Chemical formula</option>
|
|
41 <option value='HBA1'>Number of Hydrogen Bond Acceptors 1 (JoelLib)</option>
|
|
42 <option value='HBA2'>Number of Hydrogen Bond Acceptors 2 (JoelLib)</option>
|
|
43 <option value='HBD'>Number of Hydrogen Bond Donors (JoelLib)</option>
|
|
44 <option value='InChI'>IUPAC InChI identifier</option>
|
|
45 <option value='L5'>Lipinski Rule of Five</option>
|
|
46 <option value='logP'>octanol/water partition coefficient</option>
|
|
47 <option value='MR'>molar refractivity</option>
|
|
48 <option value='nF'>Number of Fluorine Atoms</option>
|
|
49 <option value='s'>SMARTS filter</option>
|
|
50 <option value='sbonds'>Number of single bonds</option>
|
|
51 <option value='smarts'>SMARTS filter</option>
|
|
52 <option value='tbonds'>Number of triple bonds</option>
|
|
53 <option value='TPSA'>topological polar surface area</option>
|
|
54 </param>
|
|
55
|
|
56 <param name='sort' type='select' format='text' label="Sorting the displayed molecules by">
|
|
57 <option value='none'>No sorting</option>
|
|
58 <option value='MW'>Molecular Weight</option>
|
|
59 <option value='abonds'>Number of aromatic bonds</option>
|
|
60 <option value='atoms'>Number of atoms</option>
|
|
61 <option value='bonds'>Number of bonds</option>
|
|
62 <option value='dbonds'>Number of double bonds</option>
|
|
63 <option value='HBA1'>Number of Hydrogen Bond Acceptors 1 (JoelLib)</option>
|
|
64 <option value='HBA2'>Number of Hydrogen Bond Acceptors 2 (JoelLib)</option>
|
|
65 <option value='HBD'>Number of Hydrogen Bond Donors (JoelLib)</option>
|
|
66 <option value='L5'>Lipinski Rule of Five</option>
|
|
67 <option value='logP'>octanol/water partition coefficient</option>
|
|
68 <option value='MR'>molar refractivity</option>
|
|
69 <option value='nF'>Number of Fluorine Atoms</option>
|
|
70 <option value='sbonds'>Number of single bonds</option>
|
|
71 <option value='tbonds'>Number of triple bonds</option>
|
|
72 <option value='TPSA'>topological polar surface area</option>
|
|
73 </param>
|
|
74
|
|
75 <param name='oformat' type='select' format='text' label="Format of the resulting picture">
|
|
76 <option value='svg'>SVG</option>
|
|
77 <option value='png'>PNG</option>
|
|
78 </param>
|
|
79
|
|
80 </inputs>
|
|
81 <outputs>
|
|
82 <data name="outfile" type="data" format="png" label="${tool.name} on ${on_string}">
|
|
83 <change_format>
|
|
84 <when input="oformat" value="svg" format="svg"/>
|
|
85 </change_format>
|
|
86 </data>
|
|
87 </outputs>
|
|
88 <tests>
|
|
89 <test>
|
|
90 <param name="infile" ftype="smi" value="8_mol.smi" />
|
|
91 <param name="embed_molecule_as_cml" value="" />
|
|
92 <param name="draw_all_carbon_atoms" value="-a" />
|
|
93 <param name="thick_lines" value="-xt" />
|
|
94 <param name='display_name' value="title" />
|
|
95 <param name='sort' value='none' />
|
|
96 <output name="outfile" ftype="svg" file="ob_depiction_svg_on_8_mol.svg" />
|
|
97 </test>
|
|
98 </tests>
|
|
99 <help>
|
|
100 <![CDATA[
|
|
101
|
|
102 .. class:: infomark
|
|
103
|
|
104 **What this tool does**
|
|
105
|
|
106 Creates an .svg or .png image of a small set of molecules (few hundreds). Based on Open Babel PNG_/SVG_ 2D depiction.
|
|
107
|
|
108 .. _PNG: http://openbabel.org/docs/dev/FileFormats/PNG_2D_depiction.html
|
|
109 .. _SVG: http://openbabel.org/docs/dev/FileFormats/SVG_2D_depiction.html
|
|
110
|
|
111 -----
|
|
112
|
|
113 .. class:: warningmark
|
|
114
|
|
115 **Hint**
|
|
116
|
|
117 Use only libraries with at most a few hundred molecules.
|
|
118
|
|
119 -----
|
|
120
|
|
121 .. class:: infomark
|
|
122
|
|
123 **Cite**
|
|
124
|
|
125 `Open Babel`_
|
|
126
|
|
127 .. _Open Babel: http://openbabel.org/wiki/Main_Page
|
|
128
|
|
129 ]]>
|
|
130 </help>
|
|
131 </tool>
|