comparison mudirac.xml @ 0:eaf0f01cc0f6 draft default tip

planemo upload for repository https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/tree/main/mudirac commit 389608650050596b28bc0c055de9f98c513a6f65
author muon-spectroscopy-computational-project
date Thu, 18 Jul 2024 09:07:00 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:eaf0f01cc0f6
1 <tool id="mudirac" name="MuDirac" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" profile="23.0" license="MIT">
2 <description>Muonic atom Dirac equation solver</description>
3 <macros>
4 <token name="@TOOL_VERSION@">1.0.1</token>
5 <token name="@WRAPPER_VERSION@">0</token>
6 </macros>
7 <creator>
8 <person givenName="Subindev" familyName="Devadasan" url="https://github.com/subindev-d" identifier="https://orcid.org/0009-0001-1723-4394"/>
9 <organization url="https://muon-spectroscopy-computational-project.github.io/index.html" name="The Muon Spectroscopy Computational Project"/>
10 </creator>
11 <requirements>
12 <requirement type="package" version="@TOOL_VERSION@">mudirac</requirement>
13 <requirement type="package" version="3.5.1">matplotlib</requirement>
14 </requirements>
15 <required_files>
16 <include type="literal" path="spectrum_plot.py"/>
17 </required_files>
18 <command detect_errors="exit_code"><![CDATA[
19 cat '$input_yaml' > input.in &&
20 mudirac input.in
21 #if $generate_spectrum.generate_spectrum_selector=='true':
22 && mkdir plots && python '${__tool_directory__}/spectrum_plot.py' 'input.spec.dat'
23
24 #if $generate_spectrum.spectrum_raw_data=='true':
25 '-f'
26 #end if
27
28 #end if
29 ]]></command>
30 <configfiles>
31 <configfile name="input_yaml">element: $element
32 isotope: $isotope
33 xr_lines: $xr_lines
34 uehling_correction: $uehling_correction.uehling_correction
35 #if $uehling_correction.uehling_correction=='true':
36 #if $uehling_correction.uehling_steps:
37 uehling_steps: $uehling_correction.uehling_steps
38 #end if
39 #if $uehling_correction.uehling_lowcut
40 uehling_lowcut: $uehling_correction.uehling_lowcut
41 #end if
42 #if $uehling_correction.uehling_highcut:
43 uehling_highcut: $uehling_correction.uehling_highcut
44 #end if
45 #end if
46 nuclear_model: $nuclear_model
47 output: $output_level
48 write_spec: $generate_spectrum.generate_spectrum_selector
49 #if $electronic_config:
50 electronic_config: $electronic_config
51 #end if
52 #if $max_E_iter:
53 max_E_iter: $max_E_iter
54 #end if
55 #if $max_nodes_iter:
56 max_nodes_iter: $max_nodes_iter
57 #end if
58 #if $max_state_iter:
59 max_state_iter: $max_state_iter
60 #end if
61 #if $generate_spectrum.generate_spectrum_selector=='true':
62 #if $spec_step
63 spec_step: $spec_step
64 #end if
65 #if $spec_linewidth
66 spec_linewidth: $spec_linewidth
67 #end if
68 #if $spec_expdec
69 spec_expdec: $spec_expdec
70 #end if
71 #end if</configfile>
72 </configfiles>
73 <inputs>
74 <param name="element" type="select" value="H" label="Element" help="Determines the nuclear charge. Can be any symbol in the periodic table up to Z=111, Roentgenium (Rg)" optional="false">
75 <!-- Period 1 -->
76 <option value="H">H</option>
77 <option value="He">He</option>
78 <!-- Period 2 -->
79 <option value="Li">Li</option>
80 <option value="Be">Be</option>
81 <option value="B">B</option>
82 <option value="C">C</option>
83 <option value="N">N</option>
84 <option value="O">O</option>
85 <option value="F">F</option>
86 <option value="Ne">Ne</option>
87 <!-- Period 3 -->
88 <option value="Na">Na</option>
89 <option value="Mg">Mg</option>
90 <option value="Al">Al</option>
91 <option value="Si">Si</option>
92 <option value="P">P</option>
93 <option value="S">S</option>
94 <option value="Cl">Cl</option>
95 <option value="Ar">Ar</option>
96 <!-- Period 4 -->
97 <option value="K">K</option>
98 <option value="Ca">Ca</option>
99 <option value="Sc">Sc</option>
100 <option value="Ti">Ti</option>
101 <option value="V">V</option>
102 <option value="Cr">Cr</option>
103 <option value="Mn">Mn</option>
104 <option value="Fe">Fe</option>
105 <option value="Co">Co</option>
106 <option value="Ni">Ni</option>
107 <option value="Cu">Cu</option>
108 <option value="Zn">Zn</option>
109 <option value="Ga">Ga</option>
110 <option value="Ge">Ge</option>
111 <option value="As">As</option>
112 <option value="Se">Se</option>
113 <option value="Br">Br</option>
114 <option value="Kr">Kr</option>
115 <!-- Period 5 -->
116 <option value="Rb">Rb</option>
117 <option value="Sr">Sr</option>
118 <option value="Y">Y</option>
119 <option value="Zr">Zr</option>
120 <option value="Nb">Nb</option>
121 <option value="Mo">Mo</option>
122 <option value="Tc">Tc</option>
123 <option value="Ru">Ru</option>
124 <option value="Rh">Rh</option>
125 <option value="Pd">Pd</option>
126 <option value="Ag">Ag</option>
127 <option value="Cd">Cd</option>
128 <option value="In">In</option>
129 <option value="Sn">Sn</option>
130 <option value="Sb">Sb</option>
131 <option value="Te">Te</option>
132 <option value="I">I</option>
133 <option value="Xe">Xe</option>
134 <!-- Period 6 -->
135 <option value="Cs">Cs</option>
136 <option value="Ba">Ba</option>
137 <option value="La">La</option>
138 <option value="Ce">Ce</option>
139 <option value="Pr">Pr</option>
140 <option value="Nd">Nd</option>
141 <option value="Pm">Pm</option>
142 <option value="Sm">Sm</option>
143 <option value="Eu">Eu</option>
144 <option value="Gd">Gd</option>
145 <option value="Tb">Tb</option>
146 <option value="Dy">Dy</option>
147 <option value="Ho">Ho</option>
148 <option value="Er">Er</option>
149 <option value="Tm">Tm</option>
150 <option value="Yb">Yb</option>
151 <option value="Lu">Lu</option>
152 <option value="Hf">Hf</option>
153 <option value="Ta">Ta</option>
154 <option value="W">W</option>
155 <option value="Re">Re</option>
156 <option value="Os">Os</option>
157 <option value="Ir">Ir</option>
158 <option value="Pt">Pt</option>
159 <option value="Au">Au</option>
160 <option value="Hg">Hg</option>
161 <option value="Tl">Tl</option>
162 <option value="Pb">Pb</option>
163 <option value="Bi">Bi</option>
164 <option value="Po">Po</option>
165 <option value="At">At</option>
166 <option value="Rn">Rn</option>
167 <!-- Period 7 -->
168 <option value="Fr">Fr</option>
169 <option value="Ra">Ra</option>
170 <option value="Ac">Ac</option>
171 <option value="Th">Th</option>
172 <option value="Pa">Pa</option>
173 <option value="U">U</option>
174 <option value="Np">Np</option>
175 <option value="Pu">Pu</option>
176 <option value="Am">Am</option>
177 <option value="Cm">Cm</option>
178 <option value="Bk">Bk</option>
179 <option value="Cf">Cf</option>
180 <option value="Es">Es</option>
181 <option value="Fm">Fm</option>
182 <option value="Md">Md</option>
183 <option value="No">No</option>
184 <option value="Lr">Lr</option>
185 <option value="Rf">Rf</option>
186 <option value="Db">Db</option>
187 <option value="Sg">Sg</option>
188 <option value="Bh">Bh</option>
189 <option value="Hs">Hs</option>
190 <option value="Mt">Mt</option>
191 <option value="Ds">Ds</option>
192 <option value="Rg">Rg</option>
193 </param>
194 <param name="isotope" type="integer" value="-1" label="which isotope of the element to consider" help=" Important to determine the mass of the nucleus and its size. Default is -1,
195 which means the most common isotope for the element will be used." optional="false">
196 <validator type="in_range" min="-1" max="283"/>
197 </param>
198 <param name="xr_lines" type="text" label="the transition or transitions for which energy and rates are desired" help=" Each line must be expressed using the conventional IUPAC notation [Jenkins et al., 1991].
199 Multiple lines can be separated by commas. For example: K1-L2,K1-L3 . In addition, colons can be used to indicate ranges of lines. The notation K1:L3-M1 would compute the lines K1-M1, L1-M1, L2-M1 and L3-M1.
200 Note that if some of these lines are forbidden by selection rules, they will simply be skipped. A double colon, like K1:L3-K1:L3 would loop on both sides, and not count all repeated lines." optional="false">
201 <validator type="empty_field" message="This input shoule not be empty"/>
202 </param>
203 <param name="nuclear_model" type="select" label="Model used to describe the nucleus">
204 <option value="POINT" selected="true"> point charge </option>
205 <option value="SPHERE"> finite size, uniformly charged spherical nucleus </option>
206 <option value="FERMI2"> Fermi 2-term charge distribution </option>
207 </param>
208 <conditional name="uehling_correction">
209 <param name="uehling_correction" type="select" display="radio" label="Uehling correction" help="whether to turn on the Uehling correction or not">
210 <option value="false" selected="true">False</option>
211 <option value="true">True</option>
212 </param>
213 <when value="false"/>
214 <when value="true">
215 <param name="uehling_steps" type="integer" value="100" min="0" label="integration steps for the Uehling potential." help=" Higher numbers will make the Uehling energy more precise but increase computation times. Default is 100."/>
216 <param name="uehling_lowcut" type="float" value="0" min="0" label="low cutoff for Uehling potential" help="under low cutoff, the radius will be considered 0. Default is 0."/>
217 <param name="uehling_highcut" type="float" value="" min="0" label="high cutoff for Uehling potential" help="over high cutoff, the radius will be considered r > > c . Default is INFINITY." optional="true"/>
218 </when>
219 </conditional>
220 <param name="electronic_config" type="text" value="" label="electronic configuration to use in order to describe the negative charge background" help="Can be a full string describing the configuration (e.g. 1s2 2s2 2p2),
221 an element symbol to represent the default configuration of that atom when neutral (e.g. C) or a mix of the two (e.g. [He] 2s2 2p2)" optional="true"/>
222 <param name="max_E_iter" type="integer" value="100" min="0" label="maximum number of iterations to perform when searching for the energy of a state." help="If exceeded, convergence will fail. Increase this value for slow convergences that are however progressing. Default is 100."/>
223 <param name="max_nodes_iter" type="integer" value="100" min="0" label="maximum number of iterations to perform when searching for a starting energy value that gives a state the expected number of nodes." help="If exceeded, convergence will fail. Should generally not need to be adjusted. Default is 100."/>
224 <param name="max_state_iter" type="integer" value="100" min="0" label=" maximum number of iterations to perform when searching for a state." help=" This loop encloses both node-based and energy-based search. Once a state is converged, the program checks again that it has the correct number of nodes.
225 If it does not, the state is stored for future use and to provide an upper or lower limit to the energy of the searches and then the process is repeated. This number represents how much can the process be repeated before failing. Should not generally need to be adjusted. Default is 100."/>
226 <param name='output_level' type="boolean" value="false" falsevalue="1" truevalue="2" label="Produce states and transition matrices" help="Also produce each of the states in a separate file as well as the transition matrices for each line"/>
227 <conditional name="generate_spectrum">
228 <param name="generate_spectrum_selector" type="select" display="radio" value="false" label="Generate spectrum" help="Generate spectrum using the transition lines found broadened with Gaussian functions">
229 <option value="false" selected="true">False</option>
230 <option value="true">True</option>
231 </param>
232 <when value="false"/>
233 <when value="true">
234 <param name="spectrum_raw_data" type="boolean" checked="false" label="Generate raw spectrum file" help="Enabling this will produce raw data of the spectrum in csv format."/>
235 <param name="spec_step" type="float" value="100" min="0" label="Spectrum step" help="energy step for the simulated spectrum, in eV. Default is 1E2 eV."/>
236 <param name="spec_linewidth" type="float" value="1000" min="0" label="Spectrum line width" help="Gaussian broadening width for the simulated spectrum, in eV. Default is 1E3."/>
237 <param name="spec_expdec" type="float" min="0" label="Exponential decay parameter" help="Defines the sensitivity factor E_dec, in eV. If set, multiplies the entire spectrum by exp(-E/E_dec) . If unset, no decay applied." optional="true"/>
238 </when>
239 </conditional>
240 </inputs>
241 <outputs>
242 <data name="output" format="tabular" label="Output of ${tool.name} (${element})" from_work_dir="input.xr.out"/>
243 <collection name="states" format="tabular" label="States (${element})" type="list">
244 <filter>output_level==True</filter>
245 <discover_datasets pattern="(input)\.(?P&lt;designation&gt;[KLMNOPQ]\d).out" format="tabular" visible="true" />
246 </collection>
247 <collection name="transition_matrices" format="tabular" label="Transition matrices (${element})" type="list">
248 <filter>output_level==True</filter>
249 <discover_datasets pattern="(input)\.(?P&lt;designation&gt;[KLM]\d-[KLM]\d).tmat.out" format="tabular" visible="true" />
250 </collection>
251 <data name="log_out" label="log file of ${tool.name} (${element})" format="txt" from_work_dir="input.log"/>
252 <data name="error_log" label="Error log file of ${tool.name} (${element})" format="txt" from_work_dir="input.err"/>
253 <data name="spectrum" label="Spectrum (${element})" format="png" from_work_dir="plots/input.spec.dat.png">
254 <filter>generate_spectrum['generate_spectrum_selector']=='true'</filter>
255 </data>
256 <data name="spectrum_raw_data" label="Raw data file of ${tool.name} (${element}) spectrum" format="tabular" from_work_dir="plots/spectrum.csv">
257 <filter>generate_spectrum['generate_spectrum_selector']=='true' and generate_spectrum['spectrum_raw_data']==True</filter>
258 </data>
259 </outputs>
260 <tests>
261 <test expect_num_outputs="3">
262 <param name="element" value="Au"/>
263 <param name="isotope" value="197"/>
264 <param name="xr_lines" value="K1-L2,K1-L3"/>
265 <output name="output" file="Au_basic.xr.out" ftype="tabular" compare="diff"/>
266 <output name="error_log">
267 <assert_contents>
268 <has_size max="0"/>
269 </assert_contents>
270 </output>
271 </test>
272 <test expect_num_outputs="3">
273 <param name="element" value="Au"/>
274 <param name="isotope" value="197"/>
275 <param name="xr_lines" value="K1-L2,K1-L3"/>
276 <param name="max_E_iter" value="100"/>
277 <param name="max_nodes_iter" value="100"/>
278 <param name="max_state_iter" value="100"/>
279 <output name="output" file="Au_basic.xr.out" ftype="tabular" compare="diff"/>
280 <output name="error_log">
281 <assert_contents>
282 <has_size max="0"/>
283 </assert_contents>
284 </output>
285 </test>
286 <test expect_num_outputs="3">
287 <param name="element" value="Au"/>
288 <param name="isotope" value="197"/>
289 <param name="xr_lines" value="K1-L2,K1-L3"/>
290 <param name="nuclear_model" value="FERMI2"/>
291 <conditional name="uehling_correction">
292 <param name="uehling_correction" value="true"/>
293 </conditional>
294 <param name="electronic_config" value="Au"/>
295 <output name="output" file="Au.xr.out" ftype="tabular" compare="diff"/>
296 <output name="error_log">
297 <assert_contents>
298 <has_size max="0"/>
299 </assert_contents>
300 </output>
301 </test>
302 <test expect_num_outputs="5">
303 <param name="element" value="Au"/>
304 <param name="isotope" value="197"/>
305 <param name="xr_lines" value="K1-L2,K1-L3"/>
306 <param name="output_level" value="true"/>
307 <output name="output" file="Au_basic.xr.out" ftype="tabular" compare="diff"/>
308 <output_collection name="states" count="3" type="list">
309 <element name="K1" file="Au.K1.out" ftype="tabular" compare="diff"/>
310 <element name="L2" file="Au.L2.out" ftype="tabular" compare="diff"/>
311 <element name="L3" file="Au.L3.out" ftype="tabular" compare="diff"/>
312 </output_collection>
313 <output_collection name="transition_matrices" count="2" type="list">
314 <element name="K1-L2" file="Au.K1-L2.tmat.out" ftype="tabular" compare="diff"/>
315 <element name="K1-L3" file="Au.K1-L3.tmat.out" ftype="tabular" compare="diff"/>
316 </output_collection>
317 <output name="error_log">
318 <assert_contents>
319 <has_size max="0"/>
320 </assert_contents>
321 </output>
322 </test>
323 <test expect_num_outputs="4">
324 <param name="element" value="Au"/>
325 <param name="isotope" value="197"/>
326 <param name="xr_lines" value="K1-L2,K1-L3"/>
327 <conditional name='generate_spectrum'>
328 <param name="generate_spectrum_selector" value="true"/>
329 </conditional>
330 <output name="output" file="Au_basic.xr.out" ftype="tabular" compare="diff"/>
331 <output name="error_log">
332 <assert_contents>
333 <has_size max="0"/>
334 </assert_contents>
335 </output>
336 </test>
337 <test expect_num_outputs="5">
338 <param name="element" value="Au"/>
339 <param name="isotope" value="197"/>
340 <param name="xr_lines" value="K1-L2,K1-L3"/>
341 <conditional name='generate_spectrum'>
342 <param name="generate_spectrum_selector" value="true"/>
343 <param name="spectrum_raw_data" value="true"/>
344 </conditional>
345 <output name="output" file="Au_basic.xr.out" ftype="tabular" compare="diff"/>
346 <output name="error_log">
347 <assert_contents>
348 <has_size max="0"/>
349 </assert_contents>
350 </output>
351 </test>
352 </tests>
353 <help><![CDATA[
354 MuDirac is a simulation software that integrates the Dirac equation for muonic atoms to compute their X-Ray transition energies;
355 Full documentation: https://muon-spectroscopy-computational-project.github.io/mudirac/
356 ]]></help>
357 <citations>
358 <citation type="doi">10.1002/xrs.3212</citation>
359 <citation type="doi">10.1002/xrs.1300200308</citation>
360 </citations>
361 </tool>