0
|
1 <tool id="compound_convert" name="Compound Convert">
|
|
2 <description>Converts various chemistry and molecular modeling data files</description>
|
|
3 <!--<parallelism method="multi" split_inputs="infile" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="outfile"></parallelism>
|
|
4 We can't use that currently, because a few output-datatypes, like the fastsearch index do not support merging. We need to patch galaxy to not abort in such a case
|
|
5 and run the job in non.multi mode.
|
|
6 -->
|
|
7 <requirements>
|
|
8 <requirement type="package" version="2.3.2">openbabel</requirement>
|
|
9 </requirements>
|
|
10 <command>
|
|
11 ## The command is a Cheetah template which allows some Python based syntax.
|
|
12 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
|
|
13
|
|
14 #if str($out_format) == 'fs':
|
|
15 ## For the fastsearch index we need to copy the original molecule files to the composite datatype of obfs.
|
|
16 ## Because openbabel likes file extensions, we give the molecule file a proper file extension.
|
|
17 mkdir $outfile.extra_files_path;
|
|
18 cp "${infile}" ${os.path.join($outfile.extra_files_path, 'molecule.%s' % $infile.ext )};
|
|
19 #end if
|
|
20
|
|
21 obabel -i "${infile.ext}"
|
|
22 #if str($out_format) == 'fs':
|
|
23 ${os.path.join($outfile.extra_files_path, 'molecule.%s' % $infile.ext )}
|
|
24 -o "${out_format}" -e
|
|
25 -O ${os.path.join($outfile.extra_files_path,'molecule.fs')}
|
|
26 #else:
|
|
27 "${infile}"
|
|
28 -o "${out_format}" -e
|
|
29 -O "${outfile}"
|
|
30 #end if
|
|
31
|
|
32 $remove_h
|
|
33 #if $iso_chi or $can or $exp_h:
|
|
34 -x$iso_chi$exp_h$can
|
|
35 #end if
|
|
36 #if $dative_bonds:
|
|
37 -b
|
|
38 #end if
|
|
39 #if int($ph) >= 0:
|
|
40 -p $ph
|
|
41 #end if
|
|
42 2>&1
|
|
43 </command>
|
|
44 <inputs>
|
|
45 <param name="infile" type="data" format="sdf,mol2,cml,inchi,smi" label="Select input file with molecules"/>
|
|
46 <param name="out_format" type="select" label="Output format">
|
|
47 <option value="acr">Carine ASCI Crystal</option>
|
|
48 <option value="alc">Alchemy format</option>
|
|
49 <option value="bgf">MSI BGF format</option>
|
|
50 <option value="box">Dock 3.5 Box format</option>
|
|
51 <option value="bs">Ball and Stick format</option>
|
|
52 <option value="c3d1">Chem3D Cartesian 1 format</option>
|
|
53 <option value="c3d2">Chem3D Cartesian 2 format</option>
|
|
54 <option value="caccrt">Cacao Cartesian format</option>
|
3
|
55 <option value="cache">CAChe MolStruct format</option>
|
|
56 <option value="cacint">Cacao Internal format</option>
|
0
|
57 <option value="can">Canonical SMILES format (can)</option>
|
|
58 <option value="cdxml">ChemDraw CDXML format</option>
|
3
|
59 <option value="cht">Chemtool format</option>
|
0
|
60 <option value="cif">Crystallographic Information File</option>
|
|
61 <option value="cml">Chemical Markup Language</option>
|
|
62 <option value="cmlr">CML Reaction format</option>
|
3
|
63 <option value="com">Gaussian 98/03 Cartesian Input</option>
|
|
64 <option value="copy">Copies raw text</option>
|
0
|
65 <option value="crk2d">Chemical Resource Kit 2D diagram format</option>
|
|
66 <option value="crk3d">Chemical Resource Kit 3D format</option>
|
3
|
67 <option value="csr">Accelrys/MSI Quanta CSR format</option>
|
|
68 <option value="cssr">CSD CSSR format</option>
|
0
|
69 <option value="ct">ChemDraw Connection Table format</option>
|
|
70 <option value="dmol">DMol3 coordinates format</option>
|
|
71 <!--<option value="ent">Protein Data Bank format</option>
|
3
|
72 <option value="fa">FASTA format</option>-->
|
|
73 <option value="fasta">FASTA format</option>
|
0
|
74 <option value="feat">Feature format</option>
|
3
|
75 <option value="fh">Fenske-Hall Z-Matrix format</option>
|
|
76 <option value="fix">SMILES FIX format</option>
|
|
77 <option value="fpt">Fingerprint format</option>
|
0
|
78 <option value="fract">Free Form Fractional format</option>
|
|
79 <option value="fs">Open Babel FastSearching database (fs)</option>
|
3
|
80 <!--<option value="fsa">FASTA format</option>-->
|
|
81 <option value="gamin">GAMESS Input</option>
|
|
82 <option value="gau">Gaussian 98/03 Cartesian Input</option>
|
|
83 <!--<option value="gjc">Gaussian 98/03 Cartesian Input</option>
|
|
84 <option value="gjf">Gaussian 98/03 Cartesian Input</option>-->
|
0
|
85 <option value="gpr">Ghemical format</option>
|
3
|
86 <option value="gr96">GROMOS96 format</option>
|
0
|
87 <option value="hin">HyperChem HIN format</option>
|
3
|
88 <option value="inchi">IUPAC InChI</option>
|
|
89 <option value="inp">GAMESS Input</option>
|
|
90 <option value="jin">Jaguar input format</option>
|
0
|
91 <!--<option value="mdl">MDL MOL format (mol)</option>-->
|
|
92 <option value="mmd">MacroModel format</option>
|
|
93 <option value="mmod">MacroModel format</option>
|
|
94 <option value="mol">MDL MOL format (mol)</option>
|
|
95 <option value="mol2">Sybyl Mol2 format (mol2)</option>
|
3
|
96 <option value="molreport">Open Babel molecule report</option>
|
0
|
97 <option value="mop">MOPAC Cartesian format</option>
|
|
98 <option value="mopcrt">MOPAC Cartesian format</option>
|
|
99 <option value="mopin">MOPAC Internal</option>
|
|
100 <option value="mpc">MOPAC Cartesian format</option>
|
3
|
101 <option value="mpd">Sybyl descriptor format</option>
|
|
102 <option value="mpqcin">MPQC simplified input format</option>
|
|
103 <option value="nw">NWChem input format</option>
|
0
|
104 <option value="pcm">PCModel format</option>
|
|
105 <option value="pdb">Protein Data Bank format (pdb)</option>
|
3
|
106 <option value="pov">POV-Ray input format</option>
|
0
|
107 <option value="pqs">Parallel Quantum Solutions format</option>
|
3
|
108 <option value="qcin">Q-Chem input format</option>
|
|
109 <option value="report">Open Babel report format</option>
|
0
|
110 <option value="rxn">MDL RXN format</option>
|
|
111 <!--<option value="sd">MDL MOL format</option>-->
|
|
112 <option value="sdf">MDL MOL format (sdf)</option>
|
|
113 <option value="smi">SMILES format (smi)</option>
|
|
114 <!--<option value="sy2">Sybyl Mol2 format</option>-->
|
|
115 <option value="tdd">Thermo format</option>
|
3
|
116 <option value="test">Test format</option>
|
0
|
117 <option value="therm">Thermo format</option>
|
|
118 <option value="tmol">TurboMole Coordinate format</option>
|
3
|
119 <option value="txyz">Tinker MM2 format</option>
|
0
|
120 <option value="unixyz">UniChem XYZ format</option>
|
|
121 <option value="vmol">ViewMol format</option>
|
3
|
122 <option value="xed">XED format</option>
|
0
|
123 <option value="xyz">XYZ cartesian coordinates format</option>
|
|
124 <option value="yob">YASARA.org YOB format</option>
|
3
|
125 <option value="zin">ZINDO input format</option>
|
0
|
126 </param>
|
|
127 <param name="iso_chi" type="boolean" label="Do not include isotopic or chiral markings (-xi)" truevalue="i" falsevalue="" checked="false" />
|
|
128 <param name="can" type="boolean" label="Output in canonical form (-xc)" truevalue="c" falsevalue="" checked="false" />
|
|
129 <param name="exp_h" type="boolean" label="Output explicit hydrogens as such (-xh)" truevalue="h" falsevalue="" checked="false" />
|
|
130 <param name="remove_h" type="boolean" label="Delete hydrogen atoms (-d)" truevalue="-d" falsevalue="" />
|
|
131 <param name="ph" size="3" type="float" value="-1" label="Add hydrogens appropriate for pH (-p)" help="-1 means deactivated"/>
|
|
132 <param name="dative_bonds" type="boolean" label="Convert dative bonds (e.g. [N+]([O-])=O to N(=O)=O) (-b)" truevalue="-b" falsevalue="" />
|
|
133 </inputs>
|
|
134 <outputs>
|
|
135 <data name="outfile" type="data" format="text" label="Convert to ${out_format.input.value_label} from ${on_string}">
|
|
136 <change_format>
|
|
137 <when input="out_format" value="sdf" format="sdf"/>
|
|
138 <when input="out_format" value="smi" format="smi"/>
|
|
139 <when input="out_format" value="mol2" format="mol2"/>
|
|
140 <when input="out_format" value="inchi" format="inchi"/>
|
|
141 <when input="out_format" value="cml" format="cml"/>
|
|
142 <when input="out_format" value="mol" format="mol"/>
|
|
143 <when input="out_format" value="pdb" format="pdb"/>
|
|
144 <when input="out_format" value="fs" format="obfs"/>
|
|
145 </change_format>
|
|
146 </data>
|
|
147 </outputs>
|
|
148 <help>
|
|
149
|
|
150 **What it does**
|
|
151
|
|
152 OpenBabel is a cross-platform program designed to interconvert between many file formats used in molecular modeling and computational chemistry and related areas.
|
|
153
|
|
154 -----
|
|
155
|
|
156
|
|
157 </help>
|
|
158 </tool>
|