comparison trj.xml @ 0:bb0053c4e4f2 draft

"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/tools/gromacs commit 03127e495a0a1a022928c1a03527974c9e81b5a1"
author chemteam
date Tue, 21 Jan 2020 07:29:43 -0500
parents
children e9cc595562b8
comparison
equal deleted inserted replaced
-1:000000000000 0:bb0053c4e4f2
1 <tool id="gmx_trj" name="Modify/convert GROMACS trajectories" version="@VERSION@">
2 <description>using trjconv and trjcat</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6
7 <expand macro="requirements" />
8
9 <command detect_errors="exit_code"><![CDATA[
10
11 #if $trj.trj_op == 'trjcat':
12 mkdir trajs &&
13 #for $value, $file in enumerate($trj_input):
14 ln -s '$file' trajs/traj_${value}.${file.ext} &&
15 #end for
16
17 gmx trjcat
18 -f trajs/traj* ## here we assume that they all have the same ext, probably reasonable
19 $trj.cat
20 -e '$time.e'
21
22 #elif $trj.trj_op == 'trjconv':
23 ln -s '$ndx_input' ./index.ndx &&
24 ln -s '$str_input' ./str.${str_input.ext} &&
25 ln -s '$trj_input' ./traj.${trj_input.ext} &&
26 #if $trj.center:
27 echo '$trj.index_center $trj.index_output' | gmx trjconv
28 #else
29 echo '$trj.index_output' | gmx trjconv
30 #end if
31 -f ./traj.${trj_input.ext}
32 -s ./str.${str_input.ext}
33 -n ./index.ndx
34 $trj.center
35 -pbc $trj.pbc
36 -ur $trj.ur
37 -boxcenter $trj.boxcenter
38 #if $time.e != -1:
39 -e '$time.e'
40 #end if
41
42 #end if
43
44 -b '$time.b'
45 -dt '$time.dt'
46 -o ./output.${output_format} &&
47
48 mv ./output.${output_format} '$output'
49
50 ]]></command>
51
52 <inputs>
53 <conditional name="trj">
54 <param name="trj_op" type="select" label="Modify a trajectory or concatenate multiple trajectories?">
55 <option value="trjconv">Modify (trjconv)</option>
56 <option value="trjcat">Concatenate (trjcat)</option>
57 </param>
58 <when value="trjconv">
59 <param name="trj_input" type="data" format='xtc,trr' label="Input trajectory" help="In XTC or TRR format."/>
60 <param name="str_input" type="data" format='pdb,gro,tpr' label="Input structure" help="In PDB, GRO or TPR format."/>
61 <param name="ndx_input" type="data" format='ndx' label="Index (NDX) file" help="In NDX format."/>
62 <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).">
63 <validator type="regex" message="Only numeric values allowed">^[0-9]*$</validator>
64 </param>
65 <param name="center" type="boolean" label="Center system in box" truevalue="-center" falsevalue=""/>
66 <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.">
67 <validator type="regex" message="Only numeric values allowed">^[0-9]*$</validator>
68 </param>
69 <param name="pbc" type="select" label="PBC treatment" >
70 <option value="none">none</option>
71 <option value="mol">mol</option>
72 <option value="res">res</option>
73 <option value="atom">atom</option>
74 <option value="nojump">nojump</option>
75 <option value="cluster">cluster</option>
76 <option value="whole">whole</option>
77 </param>
78 <param name="ur" type="select" label="Unit cell representation" >
79 <option value="rect">rect</option>
80 <option value="tric" selected="true">tric</option>
81 <option value="zero">zero</option>
82 </param>
83 <param name="boxcenter" type="select" label="Center for PBC and centering treatment" >
84 <option value="rect">rect</option>
85 <option value="tric">tric</option>
86 <option value="compact">compact</option>
87 </param>
88 </when>
89 <when value="trjcat">
90 <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"/>
91 <param name="cat" type="boolean" label="Do not discard double time frames" truevalue="-cat" falsevalue="-nocat"/>
92 </when>
93 </conditional>
94 <param name="output_format" type="select" label="Output format" >
95 <option value="xtc">XTC</option>
96 <option value="trr">TRR</option>
97 <option value="pdb">PDB</option>
98 <option value="gro">GRO</option>
99 </param>
100 <section title="Time" name='time' expanded="true">
101 <param name="b" type="integer" label="Start time" help="Time (ps) of first frame to read from trajectory" value="0" min="0"/>
102 <param name="e" type="integer" label="End time" help="Time (ps) of last frame to read from trajectory" value="-1" min="-1"/> <!-- stupidly this has different default values for trjconv and trjcat -->
103 <param name="dt" type="integer" label="Write frames at this time interval (ps)" help="Only write frame when t is exactly divisible by this value. Leave as 0 to record all frames." value="0" min="0"/>
104 </section>
105 <expand macro="log" />
106 </inputs>
107 <outputs>
108 <data name="output" format="xtc">
109 <change_format>
110 <when input="output_format" value="trr" format="trr"/>
111 <when input="output_format" value="xtc" format="xtc"/>
112 <when input="output_format" value="gro" format="dcd"/>
113 <when input="output_format" value="pdb" format="pdb"/>
114 </change_format>
115 </data>
116 </outputs>
117 <tests>
118 <test>
119 <!-- gmx trjcat -f npt.xtc nvt.xtc -cat -o test.xtc -->
120 <param name="trj_op" value="trjcat" />
121 <param name="trj_input" value="npt.xtc,nvt.xtc" />
122 <param name="b" value="0" />
123 <param name="e" value="-1" />
124 <param name="dt" value="0" />
125 <param name="cat" value="true" />
126 <output name="output" file="trjcat.xtc" ftype="xtc"/>
127 </test>
128 <test>
129 <!-- echo '1 1' | gmx trjconv -f npt.xtc -s npt.tpr -n -center -pbc mol -ur compact -o npt_c.xtc -->
130 <param name="trj_op" value="trjconv" />
131 <param name="trj_input" value="npt.xtc" />
132 <param name="str_input" value="npt.tpr" ftype="tpr"/>
133 <param name="ndx_input" value="index.ndx" />
134 <param name="b" value="0" />
135 <param name="e" value="-1" />
136 <param name="dt" value="0" />
137 <param name="index_output" value="1" />
138 <param name="index_center" value="1" />
139 <param name="center" value="true" />
140 <param name="pbc" value="mol" />
141 <param name="ur" value="compact" />
142 <param name="ur" value="tric" />
143 <output name="output" file="trjconv.xtc" ftype="xtc"/>
144 </test>
145 </tests>
146 <help><![CDATA[
147
148 .. class:: infomark
149
150 **What it does**
151
152 This tool allows manipulation of GROMACS trajectories, drawing on the trjcat and trjconv commands.
153
154 _____
155
156
157 .. class:: infomark
158
159 **Input**
160
161 - One or more trajectory file (XTC or TRR)
162 - Structure file (optional)
163 - Various options can be set
164
165 _____
166
167
168 .. class:: infomark
169
170 **Output**
171
172 - GROMACS trajectory or structure file (XTC, TRR, PDB, GRO)
173
174
175 ]]></help>
176 <expand macro="citations" />
177 </tool>