Mercurial > repos > chemteam > gmx_trj
comparison trj.xml @ 5:cdf93d057569 draft
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/tools/gromacs commit 98e34b799346c6bbe5d28d4659d93d92cc7827cc"
author | chemteam |
---|---|
date | Tue, 20 Oct 2020 10:38:49 +0000 |
parents | 9363254ef848 |
children | 6dcfdac2dcae |
comparison
equal
deleted
inserted
replaced
4:9363254ef848 | 5:cdf93d057569 |
---|---|
1 <tool id="gmx_trj" name="Modify/convert GROMACS trajectories" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@"> | 1 <tool id="gmx_trj" name="Modify/convert GROMACS trajectories" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@"> |
2 <description>using trjconv and trjcat</description> | 2 <description>using trjconv and trjcat</description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 <token name="@GALAXY_VERSION@">0</token> | 5 <token name="@GALAXY_VERSION@">1</token> |
6 <xml name="fit_when" token_option="none"> | |
7 <when value="@OPTION@"> | |
8 <param name="index_fit" type="text" label="Index of group to use for fitting" help="Index of group to use for fitting - i.e. the group's position in the ndx file (using zero-based numbering, so the first group has index 0)."> | |
9 <validator type="regex" message="Only numeric values allowed">^[0-9]*$</validator> | |
10 </param> | |
11 </when> | |
12 </xml> | |
6 </macros> | 13 </macros> |
7 | 14 |
8 <expand macro="requirements" /> | 15 <expand macro="requirements" /> |
9 | 16 |
10 <command detect_errors="exit_code"><![CDATA[ | 17 <command detect_errors="exit_code"><![CDATA[ |
11 | |
12 #if $trj.trj_op == 'trjcat': | 18 #if $trj.trj_op == 'trjcat': |
13 mkdir trajs && | 19 mkdir trajs && |
14 #for $value, $file in enumerate($trj_input): | 20 #for $value, $file in enumerate($trj_input): |
15 ln -s '$file' trajs/traj_${value}.${file.ext} && | 21 ln -s '$file' trajs/traj_${value}.${file.ext} && |
16 #end for | 22 #end for |
22 | 28 |
23 #elif $trj.trj_op == 'trjconv': | 29 #elif $trj.trj_op == 'trjconv': |
24 ln -s '$ndx_input' ./index.ndx && | 30 ln -s '$ndx_input' ./index.ndx && |
25 ln -s '$str_input' ./str.${str_input.ext} && | 31 ln -s '$str_input' ./str.${str_input.ext} && |
26 ln -s '$trj_input' ./traj.${trj_input.ext} && | 32 ln -s '$trj_input' ./traj.${trj_input.ext} && |
27 #if $trj.center: | 33 |
28 echo '$trj.index_center $trj.index_output' | gmx trjconv | 34 echo ## optionally pipe in the following |
29 #else | 35 #if $trj.fit.fit != 'none': |
30 echo '$trj.index_output' | gmx trjconv | 36 '$trj.fit.index_fit' |
31 #end if | 37 #end if |
32 -f ./traj.${trj_input.ext} | 38 #if $trj.pbc.pbc == 'cluster': |
33 -s ./str.${str_input.ext} | 39 '$trj.pbc.index_cluster' |
40 #end if | |
41 '$trj.index_center' '$trj.index_output' | gmx trjconv | |
42 -f ./traj.${trj_input.ext} | |
43 -s ./str.${str_input.ext} | |
44 #if $ndx_input: | |
34 -n ./index.ndx | 45 -n ./index.ndx |
35 $trj.center | 46 #end if |
36 -pbc $trj.pbc | 47 #if $trj.index_center: |
37 -ur $trj.ur | 48 -center |
38 -boxcenter $trj.boxcenter | 49 #end if |
39 #if $time.e != -1: | 50 #if $trj.sep: |
40 -e '$time.e' | 51 -sep |
41 #end if | 52 -nzero 9 ## hopefully the traj has < 1 bn frames, or collection order will be wrong |
42 | 53 #end if |
54 -pbc $trj.pbc.pbc | |
55 -ur $trj.ur | |
56 -boxcenter $trj.boxcenter | |
57 -fit $trj.fit.fit | |
58 #if $time.e != -1: | |
59 -e '$time.e' | |
60 #end if | |
43 #end if | 61 #end if |
44 | 62 |
45 -b '$time.b' | 63 -b '$time.b' |
46 -dt '$time.dt' | 64 -dt '$time.dt' |
47 -o ./output.${output_format} && | 65 -o ./output.${output_format} && |
48 &>> verbose.txt && | 66 &>> verbose.txt |
49 mv ./output.${output_format} '$output' | 67 #if not $trj.sep: |
50 | 68 && |
69 mv ./output.${output_format} '$output' | |
70 #end if | |
51 ]]></command> | 71 ]]></command> |
52 | 72 |
53 <inputs> | 73 <inputs> |
54 <conditional name="trj"> | 74 <conditional name="trj"> |
55 <param name="trj_op" type="select" label="Modify a trajectory or concatenate multiple trajectories?"> | 75 <param name="trj_op" type="select" label="Modify a trajectory or concatenate multiple trajectories?"> |
56 <option value="trjconv">Modify (trjconv)</option> | 76 <option value="trjconv">Modify (trjconv)</option> |
57 <option value="trjcat">Concatenate (trjcat)</option> | 77 <option value="trjcat">Concatenate (trjcat)</option> |
58 </param> | 78 </param> |
59 <when value="trjconv"> | 79 <when value="trjconv"> |
60 <param name="trj_input" type="data" format='xtc,trr' label="Input trajectory" help="In XTC or TRR format."/> | 80 <param name="trj_input" type="data" format='xtc,trr,pdb,gro' label="Input trajectory" help="In XTC or TRR format; structure files with PDB or GRO format can also be used."/> |
61 <param name="str_input" type="data" format='pdb,gro,tpr' label="Input structure" help="In PDB, GRO or TPR format."/> | 81 <param name="str_input" type="data" format='pdb,gro,tpr' label="Input structure" help="In PDB, GRO or TPR format."/> |
62 <param name="ndx_input" type="data" format='ndx' label="Index (NDX) file" help="In NDX format."/> | 82 <param name="ndx_input" type="data" format='ndx' label="Index (NDX) file" optional="true" help="In NDX format. Optional."/> |
63 <param name="index_output" type="text" label="Index of group to save in the output" help="Index of group to save in the output - i.e. the group's position in the ndx file (using zero-based numbering, so the first group has index 0)."> | 83 <param name="index_output" value="0" type="text" label="Index of group to save in the output" help="Index of group to save in the output - i.e. the group's position in the ndx file (using zero-based numbering, so the first group has index 0)."> |
64 <validator type="regex" message="Only numeric values allowed">^[0-9]*$</validator> | 84 <validator type="regex" message="Only numeric values allowed">^[0-9]*$</validator> |
65 </param> | 85 </param> |
66 <param name="center" type="boolean" label="Center system in box" truevalue="-center" falsevalue=""/> | |
67 <param name="index_center" type="text" label="Index of group for centering" optional="true" help="Index of group for centering - i.e. the group's position in the ndx file (using zero-based numbering, so the first group has index 0). Leave blank if centering is not required."> | 86 <param name="index_center" type="text" label="Index of group for centering" optional="true" help="Index of group for centering - i.e. the group's position in the ndx file (using zero-based numbering, so the first group has index 0). Leave blank if centering is not required."> |
68 <validator type="regex" message="Only numeric values allowed">^[0-9]*$</validator> | 87 <validator type="regex" message="Only numeric values allowed">^[0-9]*$</validator> |
69 </param> | 88 </param> |
70 <param name="pbc" type="select" label="PBC treatment" > | 89 <param name="sep" type="select" label="Write each trajectory frame to a separate GRO or PDB file?" help="Results will be stored as a Galaxy collection. Only has effect with PDB or GRO output, otherwise ignored"> |
71 <option value="none">none</option> | 90 <option value="" selected="true">No</option> |
72 <option value="mol">mol</option> | 91 <option value="sep">Yes, write each frame separately</option> |
73 <option value="res">res</option> | 92 </param> |
74 <option value="atom">atom</option> | 93 <conditional name="pbc"> |
75 <option value="nojump">nojump</option> | 94 <param name="pbc" type="select" label="PBC treatment" > |
76 <option value="cluster">cluster</option> | 95 <option value="none">none</option> |
77 <option value="whole">whole</option> | 96 <option value="mol">mol</option> |
78 </param> | 97 <option value="res">res</option> |
79 <param name="ur" type="select" label="Unit cell representation" > | 98 <option value="atom">atom</option> |
80 <option value="rect">rect</option> | 99 <option value="nojump">nojump</option> |
100 <option value="cluster">cluster</option> | |
101 <option value="whole">whole</option> | |
102 </param> | |
103 <when value="cluster"> | |
104 <param name="index_cluster" type="text" label="Index of group to use for clustering" help="Index of group to use for clustering - i.e. the group's position in the ndx file (using zero-based numbering, so the first group has index 0)."> | |
105 <validator type="regex" message="Only numeric values allowed">^[0-9]*$</validator> | |
106 </param> | |
107 </when> | |
108 <when value="none" /> | |
109 <when value="mol" /> | |
110 <when value="res" /> | |
111 <when value="atom" /> | |
112 <when value="nojump" /> | |
113 <when value="whole" /> | |
114 </conditional> | |
115 <param name="ur" type="select" label="Unit cell representation" help="Only has effect in combination with PBC treatment of mol, res or atom"> | |
116 <option value="rect" selected="true">rect</option> | |
81 <option value="tric">tric</option> | 117 <option value="tric">tric</option> |
82 <option value="compact">compact</option> | 118 <option value="compact">compact</option> |
83 </param> | 119 </param> |
84 <param name="boxcenter" type="select" label="Center for PBC and centering treatment" > | 120 <param name="boxcenter" type="select" label="Center for PBC and centering treatment" > |
85 <option value="rect">rect</option> | 121 <option value="rect">rect</option> |
86 <option value="tric" selected="true">tric</option> | 122 <option value="tric" selected="true">tric</option> |
87 <option value="zero">zero</option> | 123 <option value="zero">zero</option> |
88 </param> | 124 </param> |
125 <conditional name="fit"> | |
126 <param name="fit" type="select" label="Fit molecule to reference structure in the reference file?" > | |
127 <option value="none" selected="true">No fitting</option> | |
128 <option value="rot+trans">rot+trans</option> | |
129 <option value="rotxy+transxy">rotxy+transxy</option> | |
130 <option value="translation">translation</option> | |
131 <option value="transxy">transxy</option> | |
132 <option value="progressive">progressive</option> | |
133 </param> | |
134 <when value="none"/> | |
135 <expand macro="fit_when" option="rot+trans"/> | |
136 <expand macro="fit_when" option="rotxy+transxy"/> | |
137 <expand macro="fit_when" option="translation"/> | |
138 <expand macro="fit_when" option="transxy"/> | |
139 <expand macro="fit_when" option="progressive"/> | |
140 </conditional> | |
89 </when> | 141 </when> |
90 <when value="trjcat"> | 142 <when value="trjcat"> |
91 <param name="trj_input" type="data" format='xtc,trr' label="Input trajectories" help="In XTC or TRR format, but please do not mix the two. Please note this tool does not currently take order into account when concatenating." multiple="true"/> | 143 <param name="trj_input" type="data" format='xtc,trr' label="Input trajectories" help="In XTC or TRR format, but please do not mix the two. Please note this tool does not currently take order into account when concatenating." multiple="true"/> |
92 <param name="cat" type="boolean" label="Do not discard double time frames" truevalue="-cat" falsevalue="-nocat"/> | 144 <param name="cat" type="boolean" label="Do not discard double time frames" truevalue="-cat" falsevalue="-nocat"/> |
145 <param name="sep" type="hidden" value="" /> | |
93 </when> | 146 </when> |
94 </conditional> | 147 </conditional> |
95 <param name="output_format" type="select" label="Output format" > | 148 <param name="output_format" type="select" label="Output format" > |
96 <option value="xtc">XTC</option> | 149 <option value="xtc">XTC</option> |
97 <option value="trr">TRR</option> | 150 <option value="trr">TRR</option> |
105 </section> | 158 </section> |
106 <expand macro="log" /> | 159 <expand macro="log" /> |
107 </inputs> | 160 </inputs> |
108 <outputs> | 161 <outputs> |
109 <data name="output" format="xtc"> | 162 <data name="output" format="xtc"> |
163 <filter>not trj.get("sep") or output_format in ["xtc", "trr"]</filter> | |
110 <change_format> | 164 <change_format> |
111 <when input="output_format" value="trr" format="trr"/> | 165 <when input="output_format" value="trr" format="trr"/> |
112 <when input="output_format" value="xtc" format="xtc"/> | 166 <when input="output_format" value="xtc" format="xtc"/> |
113 <when input="output_format" value="gro" format="gro"/> | 167 <when input="output_format" value="gro" format="gro"/> |
114 <when input="output_format" value="pdb" format="pdb"/> | 168 <when input="output_format" value="pdb" format="pdb"/> |
115 </change_format> | 169 </change_format> |
116 </data> | 170 </data> |
117 </outputs> | 171 <collection type="list" name="gro_frames" label="Trajectory frames"> |
172 <filter>trj.get("sep") and output_format == "gro"</filter> | |
173 <discover_datasets pattern="(?P<designation>^output[0-9]{9}\.gro$)" ext="gro"/> | |
174 </collection> | |
175 <collection type="list" name="pdb_frames" label="Trajectory frames"> | |
176 <filter>trj.get("sep") and output_format == 'pdb'</filter> | |
177 <discover_datasets pattern="(?P<designation>^output[0-9]{9}\.pdb$)" ext="pdb"/> | |
178 </collection> | |
179 <expand macro="log_outputs" /> | |
180 </outputs> | |
118 <tests> | 181 <tests> |
119 <test> | 182 <test> |
120 <!-- gmx trjcat -f npt.xtc nvt.xtc -cat -o test.xtc --> | 183 <!-- gmx trjcat -f npt.xtc nvt.xtc -cat -o test.xtc --> |
121 <param name="trj_op" value="trjcat" /> | 184 <param name="trj_op" value="trjcat" /> |
122 <param name="trj_input" value="npt.xtc,nvt.xtc" /> | 185 <param name="trj_input" value="npt.xtc,nvt.xtc" /> |
124 <param name="e" value="-1" /> | 187 <param name="e" value="-1" /> |
125 <param name="dt" value="0" /> | 188 <param name="dt" value="0" /> |
126 <param name="cat" value="true" /> | 189 <param name="cat" value="true" /> |
127 <output name="output" file="trjcat.xtc" ftype="xtc"/> | 190 <output name="output" file="trjcat.xtc" ftype="xtc"/> |
128 </test> | 191 </test> |
129 <!-- <test> --> | 192 <test> |
130 <!-- echo '1 1' | gmx trjconv -f npt.xtc -s npt.tpr -n -center -pbc mol -ur compact -o npt_c.xtc --> | 193 <!-- echo '1 1' | gmx trjconv -f npt.xtc -s npt.tpr -n -center -pbc mol -ur compact -o npt_c.xtc --> |
131 <!-- <param name="trj_op" value="trjconv" /> | 194 <!-- <param name="trj_op" value="trjconv" /> --> |
132 <param name="trj_input" value="npt.xtc" /> | 195 <param name="trj_input" value="npt.xtc" /> |
133 <param name="str_input" value="npt.tpr" ftype="tpr"/> | 196 <param name="str_input" value="npt.tpr" ftype="tpr"/> |
134 <param name="ndx_input" value="index.ndx" /> | 197 <param name="ndx_input" value="index.ndx" /> |
135 <param name="b" value="0" /> | 198 <param name="b" value="0" /> |
136 <param name="e" value="-1" /> | 199 <param name="e" value="-1" /> |
137 <param name="dt" value="0" /> | 200 <param name="dt" value="0" /> |
138 <param name="index_output" value="1" /> | 201 <param name="index_output" value="1" /> |
139 <param name="index_center" value="1" /> | 202 <param name="index_center" value="1" /> |
140 <param name="center" value="true" /> | |
141 <param name="pbc" value="mol" /> | 203 <param name="pbc" value="mol" /> |
142 <param name="ur" value="compact" /> | |
143 <param name="ur" value="tric" /> | 204 <param name="ur" value="tric" /> |
144 <output name="output" file="trjconv.xtc" ftype="xtc"/> | 205 <output name="output" file="trjconv.xtc" ftype="xtc"/> |
145 </test> --> | 206 </test> |
207 <test> | |
208 <!-- test sep flag --> | |
209 <param name="trj_input" value="npt.xtc" /> | |
210 <param name="str_input" value="npt.tpr" ftype="tpr"/> | |
211 <param name="ndx_input" value="index.ndx" /> | |
212 <param name="b" value="0" /> | |
213 <param name="e" value="-1" /> | |
214 <param name="dt" value="0" /> | |
215 <param name="index_output" value="0" /> | |
216 <param name="sep" value="sep" /> | |
217 <param name="output_format" value="pdb" /> | |
218 <output_collection name="pdb_frames" type="list"> | |
219 <element name="output00000007" ftype="pdb" file="frame7.pdb"/> | |
220 </output_collection> | |
221 </test> | |
146 </tests> | 222 </tests> |
147 <help><![CDATA[ | 223 <help><![CDATA[ |
148 | 224 |
149 .. class:: infomark | 225 .. class:: infomark |
150 | 226 |