comparison check.xml @ 0:abafe01a9fc2 draft

"planemo upload for repository https://github.com/mesocentre-clermont-auvergne/aubi_piaf commit 48a10de1b21f94ab8019d9d0e4a43e0bd9d0c31e-dirty"
author agpetit
date Wed, 25 May 2022 12:22:14 +0000
parents
children ae4b0af8efd3
comparison
equal deleted inserted replaced
-1:000000000000 0:abafe01a9fc2
1 <tool id="gmx_check" name="GROMACS check" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">
2 <description>using gmx check</description>
3 <macros>
4 <token name="@GALAXY_VERSION@">0</token>
5 <import>macros.xml</import>
6 </macros>
7 <expand macro="requirements" />
8 <command detect_errors="exit_code"><![CDATA[
9 #for $i, $choice in enumerate($analysis)
10 #if $choice.input_file.calculate_select == "info_traj":
11 ln -s '$choice.input_file.traj_file' './$i.$choice.input_file.traj_file.element_identifier';
12 gmx check
13 -f './$i.$choice.input_file.traj_file.element_identifier'
14 &> '${i}.Trajectory_information_for_"${choice.input_file.traj_file.element_identifier}".txt';
15 #elif $choice.input_file.calculate_select == "compare_traj":
16 ln -s '$choice.input_file.traj_file' './$i.$choice.input_file.traj_file.element_identifier';
17 ln -s '$choice.input_file.traj_file2' './$i.$choice.input_file.traj_file2.element_identifier';
18 gmx check
19 -f './$i.$choice.input_file.traj_file.element_identifier'
20 -f2 './$i.$choice.input_file.traj_file2.element_identifier'
21 $choice.input_file.rmsd
22 -tol '$choice.input_file.rel_tol'
23 -abstol '$choice.input_file.abs_tol'
24 &> '${i}.Compare_trajectories_between_"${choice.input_file.traj_file.element_identifier}"_and_"${choice.input_file.traj_file2.element_identifier}".txt';
25 #elif $choice.input_file.calculate_select == "info_struc":
26 ln -s '$choice.input_file.struc_file' './$i.$choice.input_file.struc_file.element_identifier';
27 gmx check
28 -c './$i.$choice.input_file.struc_file.element_identifier'
29 -vdwfac '$choice.input_file.vdwfac'
30 -bonlo '$choice.input_file.bonlo'
31 -bonhi '$choice.input_file.bonhi'
32 &> '${i}.Structure_information_for_"${choice.input_file.struc_file.element_identifier}".txt';
33 #elif $choice.input_file.calculate_select == "info_ener":
34 ln -s '$choice.input_file.ener_file' './$i.$choice.input_file.ener_file.element_identifier' ;
35 gmx check
36 -e './$i.$choice.input_file.ener_file.element_identifier'
37 &> '${i}.Energy_information_for_"${$choice.input_file.ener_file.element_identifier}".txt';
38 #elif $choice.input_file.calculate_select == "info_ind":
39 ln -s '$choice.input_file.ind_file' './$i.$choice.input_file.ind_file.element_identifier';
40 gmx check
41 -n './$i.$choice.input_file.ind_file.element_identifier'
42 &> '${i}.Index_information_for_"${choice.input_file.ind_file.element_identifier}".txt';
43 #elif $choice.input_file.calculate_select == "compare_ener":
44 ln -s '$choice.input_file.ener_file' './$i.$choice.input_file.ener_file.element_identifier';
45 ln -s '$choice.input_file.ener_file2' './$i.$choice.input_file.ener_file2.element_identifier';
46 gmx check
47 -e './$i.$choice.input_file.ener_file.element_identifier'
48 -e2 './$i.$choice.input_file.ener_file2.element_identifier'
49 -tol '$choice.input_file.rel_tol'
50 -abstol '$choice.input_file.abs_tol'
51 -lastener '$choice.input_file.lastener'
52 &> '${i}.Compare_energies_between_"${choice.input_file.ener_file.element_identifier}"_and_"${choice.input_file.ener_file2.element_identifier}".txt';
53 #else:
54 ln -s '$choice.input_file.top_file' './$i.$choice.input_file.top_file.element_identifier';
55 ln -s '$choice.input_file.top_file2' './$i.$choice.input_file.top_file2.element_identifier';
56 gmx check
57 -s1 './$i.$choice.input_file.top_file.element_identifier'
58 -s2 './$i.$choice.input_file.top_file2.element_identifier'
59 -abstol '$choice.input_file.abs_tol'
60 &> '${i}.Compare_topologies_between_"${choice.input_file.top_file.element_identifier}"_and_"${choice.input_file.top_file2.element_identifier}".txt';
61 #end if
62 #end for
63 ]]></command>
64 <inputs>
65 <repeat name="analysis" title="Type of analysis">
66 <conditional name="input_file">
67 <param name="calculate_select" type="select" label="Select the type of information you want to obtain">
68 <option value="info_traj">Information about a trajectory</option>
69 <option value="compare_traj">Compare two trajectories</option>
70 <option value="info_struc">Information about the system structure</option>
71 <option value="info_ener">Information about the system energy</option>
72 <option value="info_ind">Information about the system index</option>
73 <option value="compare_top">Compare two topologies</option>
74 <option value="compare_ener">Compare two energy files</option>
75 </param>
76 <when value="info_traj">
77 <param name="traj_file" type="data" format="xtc, trr, cpt, gro, g96, pdb, tng" label="Trajectory file" help="Enter the trajectory file. Accepted formats: xtc, trr, cpt, gro, g96, pdb, tng."/>
78 </when>
79 <when value="compare_traj">
80 <param name="traj_file" type="data" format="xtc, trr, cpt, gro, g96, pdb, tng" label="Trajectory file 1" help="Enter the first trajectory file. Accepted formats: xtc, trr, cpt, gro, g96, pdb, tng."/>
81 <param name="traj_file2" type="data" format="xtc, trr, cpt, gro, g96, pdb, tng" label="Trajectory file 2" help="Enter the second trajectory file. Accepted formats: xtc, trr, cpt, gro, g96, pdb, tng."/>
82 <param name="rmsd" type="boolean" truevalue="-rmsd" falsevalue="" label="Do you want to display the RMSD?"/>
83 <param name="rel_tol" type="float" max="1.0" value="0.001" label="Enter relative tolerance" help="Relative tolerance for comparing real values defined as 2*(a-b)/(|a|+|b|)."/>
84 <param name="abs_tol" type="float" max="1.0" value="0.001" optional="True" label="Enter absolute tolerance" help="Absolute tolerance, useful when sums are close to zero."/>
85 </when>
86 <when value="info_struc">
87 <param name="struc_file" type="data" format="tpr, gro, g96, pdb, brk, ent" label="Structure file" help="Enter the structure file. Accepted formats: tpr, gro, g96, pdb, brk, ent.">
88 <validator type="expression" message="Wrong file format">value.extension != 'edr' and value.extension != 'xtc'</validator>
89 </param>
90 <param name="vdwfac" type="float" max="1.0" value="0.8" label="Enter the fraction of sum of VdW radii sum"/>
91 <param name="bonlo" type="float" max="1.0" value="0.4" label="Enter the minimal fraction of sum of vdW radii for bonded atoms"/>
92 <param name="bonhi" type="float" max="1.0" value="0.7" label="Enter the maximal fraction of sum of vdW radii for bonded atoms"/>
93 </when>
94 <when value="info_ener">
95 <param name="ener_file" type="data" format="edr" label="Energy file" help="Enter the energy file. Accepted format: edr."/>
96 </when>
97 <when value="info_ind">
98 <param name="ind_file" type="data" format="ndx" label="Index file" help="Enter the index file. Accepted format: ndx."/>
99 </when>
100 <when value="compare_top">
101 <param name="top_file" type="data" format="tpr" label="Topology file 1" help="Enter the first topology file. Accepted format: tpr.">
102 <validator type="expression" message="Wrong file format">value.extension == 'tpr'</validator>
103 </param>
104 <param name="top_file2" type="data" format="tpr" label="Topology file 2" help="Enter the second topology file. Accepted format: tpr.">
105 <validator type="expression" message="Wrong file format">value.extension == 'tpr'</validator>
106 </param>
107 <param name="abs_tol" type="float" max="1.0" value="0.001" label="Enter absolute tolerance" help="Absolute tolerance, useful when sums are close to zero."/>
108 </when>
109 <when value="compare_ener">
110 <param name="ener_file" type="data" format="edr" label="Energy file 1" help="Enter the first energy file. Accepted format: edr."/>
111 <param name="ener_file2" type="data" format="edr" label="Energy file 2" help="Enter the second energy file. Accepted format: edr."/>
112 <param name="rel_tol" type="float" max="1.0" value="0.001" label="Enter relative tolerance" help="Relative tolerance for comparing real values defined as 2*(a-b)/(|a|+|b|)."/>
113 <param name="abs_tol" type="float" max="1.0" value="0.001" optional="True" label="Enter absolute tolerance" help="Absolute tolerance, useful when sums are close to zero."/>
114 <param name="lastener" type="text" value="all" label="Enter the last energy term to compare" help="Last energy term to compare. It makes sense to go up until the Pressure."/>
115 </when>
116 </conditional>
117 </repeat>
118 </inputs>
119 <outputs>
120 <data name="output">
121 <discover_datasets pattern="(?P&lt;name&gt;.+\.txt)$" ext="txt" visible="true" directory="" assign_primary_output="true"/>
122 </data>
123 </outputs>
124 <tests>
125 <test>
126 <repeat name="analysis">
127 <conditional name="input_file">
128 <param name="calculate_select" value="info_traj"/>
129 <param name="traj_file" value="nvt.xtc" ftype="xtc"/>
130 </conditional>
131 </repeat>
132 <output name="output" file="check_info_traj.txt" ftype="txt" lines_diff="4">
133 <assert_contents>
134 <has_n_lines n="38"/>
135 <has_text text="Reading frame"/>
136 <has_text text="# Atoms 94"/>
137 <has_text text="Step 11 0.1"/>
138 </assert_contents>
139 </output>
140 </test>
141 <test>
142 <repeat name="analysis">
143 <conditional name="input_file">
144 <param name="calculate_select" value="compare_traj"/>
145 <param name="traj_file" value="nvt.xtc" ftype="xtc"/>
146 <param name="traj_file2" value="npt.xtc" ftype="xtc"/>
147 <param name="rmsd" value="True"/>
148 <param name="rel_tol" value="0.1"/>
149 <param name="abs_tol" value="0.1"/>
150 </conditional>
151 </repeat>
152 <output name="output" file="check_compare_traj.txt" ftype="txt" lines_diff="4">
153 <assert_contents>
154 <has_n_lines n="62"/>
155 <has_text text="Reading frame"/>
156 <has_text text="Last frame 10 time 1.000"/>
157 <has_text text="x RMSD 0.135353"/>
158 </assert_contents>
159 </output>
160 </test>
161 <test>
162 <repeat name="analysis">
163 <conditional name="input_file">
164 <param name="calculate_select" value="info_struc"/>
165 <param name="struc_file" value="minim.gro" ftype="gro"/>
166 <param name="vdwfac" value="0.8"/>
167 <param name="bonlo" value="0.4"/>
168 <param name="bonhi" value="0.7"/>
169 </conditional>
170 </repeat>
171 <output name="output" file="check_info_structure.txt" ftype="txt" lines_diff="5">
172 <assert_contents>
173 <has_n_lines n="480"/>
174 <has_text text="94 atoms in file"/>
175 <has_text text="coordinates found"/>
176 <has_text text="box found"/>
177 <has_text text="no atoms found outside box"/>
178 <has_text text="atom# name residue r_vdw atom# name residue r_vdw distance"/>
179 </assert_contents>
180 </output>
181 </test>
182 <test>
183 <repeat name="analysis">
184 <conditional name="input_file">
185 <param name="calculate_select" value="info_ener"/>
186 <param name="ener_file" value="minim.edr" ftype="edr"/>
187 </conditional>
188 </repeat>
189 <repeat name="analysis">
190 <conditional name="input_file">
191 <param name="calculate_select" value="info_ind"/>
192 <param name="ind_file" value="index.ndx" ftype="ndx"/>
193 </conditional>
194 </repeat>
195 <output name="output" file="check_info_energy.txt" ftype="txt" lines_diff="4">
196 <assert_contents>
197 <has_n_lines n="67"/>
198 <has_text text="Reading energy frame 1 time 1.000 "/>
199 <has_text text="31 groups in energy file"/>
200 <has_text text="Timesteps at t=20 don't match (2, 1)"/>
201 <has_text text="Found 25 frames."/>
202 </assert_contents>
203 <discovered_dataset designation='1.Index_information_for_"index.ndx".txt' file="check_info_index.txt" ftype="txt" lines_diff="4">
204 <assert_contents>
205 <has_n_lines n="28"/>
206 <has_text text="Contents of index file"/>
207 <has_text text="Nr. Group #Entries First Last"/>
208 <has_text text=" 2 Protein-H 43 1 92"/>
209 <has_text text=" 10 Prot-Masses 92 1 92"/>
210 </assert_contents>
211 </discovered_dataset>
212 </output>
213 </test>
214 <test>
215 <repeat name="analysis">
216 <conditional name="input_file">
217 <param name="calculate_select" value="compare_top"/>
218 <param name="top_file" value="nvt.tpr" ftype="tpr"/>
219 <param name="top_file2" value="npt.tpr" ftype="tpr"/>
220 <param name="abs_tol" value="0.1"/>
221 </conditional>
222 </repeat>
223 <output name="output" file="check_compare_topology.txt" ftype="txt" lines_diff="4">
224 <assert_contents>
225 <has_n_lines n="1229"/>
226 <has_text text="maxresnr (7 - 5)"/>
227 <has_text text="comparing inputrec"/>
228 <has_text text="inputrec->nstxout (1000 - 50)"/>
229 <has_text text="ffparams->iparams[237]2: pos0A=( 1.25000000e-01, 1.25000000e-01, 0.00000000e+00)"/>
230 <has_text text="InteractionList entry[255] (259 - 236)"/>
231 </assert_contents>
232 </output>
233 </test>
234 <test>
235 <repeat name="analysis">
236 <conditional name="input_file">
237 <param name="calculate_select" value="compare_ener"/>
238 <param name="ener_file" value="minim.edr" ftype="edr"/>
239 <param name="ener_file2" value="outp.edr" ftype="edr"/>
240 <param name="rel_tol" value="0.1"/>
241 <param name="abs_tol" value="0.1"/>
242 <param name="lastener" value="Pressure"/>
243 </conditional>
244 </repeat>
245 <output name="output" file="check_compare_energy.txt" ftype="txt" lines_diff="4">
246 <assert_contents>
247 <has_n_lines n="199"/>
248 <has_text text="Reading energy frame"/>
249 <has_text text="enm[12] (- - Conserved En.)"/>
250 <has_text text="Angle step 1: 536.268, step 1: 188.647"/>
251 <has_text text="step (3 - 150)"/>
252 <has_text text="Coul. recip. step 14: 914.559, step 14: 304.201"/>
253 </assert_contents>
254 </output>
255 </test>
256 </tests>
257 <help><![CDATA[
258
259 .. class:: infomark
260
261 **What it does**
262
263 This tool reads a trajectory (.tng, .trr or .xtc), an energy file (.edr) or an index file (.ndx) and prints out useful information about them.
264
265 Option -c checks for presence of coordinates, velocities and box in the file, for close contacts (smaller than -vdwfac and not bonded, i.e. not between -bonlo and -bonhi, all relative to the sum of both Van der Waals radii) and atoms outside the box (these may occur often and are no problem). If velocities are present, an estimated temperature will be calculated from them.
266
267 If an index file, is given its contents will be summarized.
268
269 The program can compare two run input (.tpr) files when both -s1 and -s2 are supplied. When comparing run input files this way, the default relative tolerance is reduced to 0.000001 and the absolute tolerance set to zero to find any differences not due to minor compiler optimization differences, although you can of course still set any other tolerances through the options.Similarly a pair of trajectory files can be compared (using the -f2 option), or a pair of energy files (using the -e2 option).
270
271 _____
272
273 .. class:: infomark
274
275 **Inputs**
276
277 **Information about a trajectory**
278 - Trajectory file : -f option. Trajectory file in xtc, trr, cpt, gro, g96, pdb or tng format.
279
280 **Compare two trajectories**
281 - Trajectory file 1 : -f option. Trajectory file in xtc, trr, cpt, gro, g96, pdb or tng format.
282 - Trajectory file 2 : -f2 option. Trajectory file in xtc, trr, cpt, gro, g96, pdb or tng format.
283 - Do you want to display the RMSD? : -rmsd option. Print RMSD for x, v and f.
284 - Enter relative tolerance : -tol option. Relative tolerance for comparing real values.
285 - Enter absolute tolerance : -abstol option. Absolute tolerance, useful when sums are close to zero.
286
287 **Information about the structure of a system**
288 - Structure file : -c option. Structure file in tpr, gro, g96, pdb, brk or ent format.
289 - Enter the fraction of sum of VdW radii : -vdwfac option.
290 - Enter the minimal fraction of sum of vdW radii for bonded atoms : -bonlo option.
291 - Enter the maximal fraction of sum of vdW radii for bonded atoms : -bonhi option.
292
293 **Information about the energy of a system**
294 - Energy file : -e option. Energy file in edr format.
295
296 **Information about the index of a system**
297 - Index file : -n option. Index file in ndx format.
298
299 **Compare two topologies**
300 - Topology file 1 : -s1 option. Topology file in tpr format.
301 - Topology file 2 : -s2 option. Topology file in tpr format.
302 - Enter absolute tolerance : -abstol option. Absolute tolerance, useful when sums are close to zero.
303
304 **Compare two energy files**
305 - Energy file 1 : -e option. Energy file in edr format.
306 - Energy file 2 : -e2 option. Energy file in edr format.
307 - Enter relative tolerance : -tol option. Relative tolerance for comparing real values.
308 - Enter absolute tolerance : -abstol option. Absolute tolerance, useful when sums are close to zero.
309 - Enter the last energy term to compare : -lastener. Last energy term to compare (if not given all are tested). It makes sense to go up until the Pressure.
310
311 The -ab option is not implemented.
312
313 _____
314
315 .. class:: infomark
316
317 **Output**
318
319 - list with one or more TXT files. This file contains either information about the trajectory, the structure, the index or the energy, or a comparison between two trajectories, two topologies or two energy files.
320
321 ]]></help>
322 <citations>
323 <citation type="doi">10.1016/j.softx.2015.06.001</citation>
324 </citations>
325 </tool>