comparison muspinsim_config.xml @ 3:331d0776abb4 draft

planemo upload for repository https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/main/muspinsim_config commit 4f06b404d8b7fb83995f3052faa7e2ec7811f507
author muon-spectroscopy-computational-project
date Fri, 03 Feb 2023 15:39:07 +0000
parents 52d3a28902e8
children e1e338f56656
comparison
equal deleted inserted replaced
2:52d3a28902e8 3:331d0776abb4
1 <tool id="muspinsim_config" name="MuSpinSim Configure" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.01"> 1 <tool id="muspinsim_config" name="MuSpinSim Configure" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.05" license="MIT">
2 <description>define simulation parameters</description> 2 <description>define simulation parameters</description>
3 <macros> 3 <macros>
4 <!-- version of underlying tool (PEP 440) --> 4 <!-- version of underlying tool (PEP 440) -->
5 <token name="@TOOL_VERSION@">1.1.0</token> 5 <token name="@TOOL_VERSION@">2.0.2</token>
6 <!-- version of this tool wrapper (integer) --> 6 <!-- version of this tool wrapper (integer) -->
7 <token name="@WRAPPER_VERSION@">0</token> 7 <token name="@WRAPPER_VERSION@">0</token>
8 <!-- citation should be updated with every underlying tool version --> 8 <!-- citation should be updated with every underlying tool version -->
9 <!-- typical fields to update are version, month, year, and doi --> 9 <!-- typical fields to update are version, month, year, and doi -->
10 <token name="@TOOL_CITATION@"> 10 <token name="@TOOL_CITATION@">
11 @software{muspinsim, 11 @software{muspinsim,
12 author = {Sturniolo, Simone and Liborio, Leandro and Owen, Josh and Mudaraddi, Anish and {Muon Spectroscopy Computational Project}}, 12 author = {Sturniolo, Simone and Liborio, Leandro and Owen, Josh and Mudaraddi, Anish and Davies, Joel and Wilkinson, John and {Muon Spectroscopy Computational Project}},
13 license = {MIT}, 13 license = {MIT},
14 title = {{muspinsim}}, 14 title = {{muspinsim}},
15 url = {https://github.com/muon-spectroscopy-computational-project/muspinsim}, 15 url = {https://github.com/muon-spectroscopy-computational-project/muspinsim},
16 version = {v1.1.0}, 16 version = {v2.0.2},
17 month = {5}, 17 month = {1},
18 year = {2022}, 18 year = {2023}
19 doi = {10.5281/zenodo.6563074} 19 doi = {10.5281/zenodo.7568830}
20 } 20 }
21 </token> 21 </token>
22 <import>config_macros.xml</import>
22 </macros> 23 </macros>
23 <creator> 24 <creator>
24 <person givenName="Anish" familyName="Mudaraddi" identifier="https://orcid.org/0000-0002-2135-2705"/> 25 <person givenName="Anish" familyName="Mudaraddi" identifier="https://orcid.org/0000-0002-2135-2705"/>
25 <person givenName="Eli" familyName="Chadwick" url="https://github.com/elichad" identifier="https://orcid.org/0000-0002-0035-6475"/> 26 <person givenName="Eli" familyName="Chadwick" url="https://github.com/elichad" identifier="https://orcid.org/0000-0002-0035-6475"/>
27 <person givenName="Joel" familyName="Davies" url="https://github.com/joelvdavies" identifier="https://orcid.org/0000-0002-4153-6819"/>
26 <organization url="https://muon-spectroscopy-computational-project.github.io/index.html" name="The Muon Spectroscopy Computational Project"/> 28 <organization url="https://muon-spectroscopy-computational-project.github.io/index.html" name="The Muon Spectroscopy Computational Project"/>
27 </creator> 29 </creator>
28 <requirements> 30 <requirements>
29 <requirement type="package" version="@TOOL_VERSION@">muspinsim</requirement> 31 <requirement type="package" version="@TOOL_VERSION@">muspinsim</requirement>
30 </requirements> 32 </requirements>
31 <required_files> 33 <required_files>
32 <include type="literal" path="sample_fitting_data.dat"/> 34 <include type="literal" path="sample_fitting_data.dat"/>
33 <include type="literal" path="build_file.py"/> 35 <include type="literal" path="build_file.py"/>
34 </required_files> 36 </required_files>
35 <command detect_errors="exit_code"><![CDATA[ 37 <command detect_errors="exit_code"><![CDATA[
36 cp ${__tool_directory__}/sample_fitting_data.dat ./fitting_data.dat && 38 cp '${__tool_directory__}/sample_fitting_data.dat' ./fitting_data.dat &&
37 python ${__tool_directory__}/build_file.py inputs.json 39 python '${__tool_directory__}/build_file.py' inputs.json
38 ]]></command> 40 ]]></command>
39 <configfiles> 41 <configfiles>
40 <inputs name="inputs" filename="inputs.json" /> 42 <inputs name="inputs" filename="inputs.json"/>
41 </configfiles> 43 </configfiles>
42 <inputs> 44 <inputs>
43 <param type="text" name="out_file_prefix" label="Name" help="A name with which to label this configuration" optional="true" value="muspinsim" /> 45 <param type="text" name="out_file_prefix" label="Name" help="A name with which to label this configuration" optional="true" value="muspinsim"/>
44 <section name="spins" expanded="true" title="Spins"> 46 <section name="spins" expanded="true" title="Spins">
45 <repeat name="spins" title="Spins to simulate" min="1" help="Specify the spins to be used in the system. This should include a muon (mu) and one or more electrons (e)"> 47 <repeat name="spins" title="Spins to simulate" min="1" help="Specify the spins to be used in the system. This should include a muon (mu) and one or more electrons (e)">
46 <conditional name="spin_options"> 48 <conditional name="spin_options">
47 <param name="spin_preset" type="select" value="mu" label="Species" help="Select 'custom' to define own"> 49 <param name="spin_preset" type="select" value="mu" label="Species" help="Select 'custom' to define own">
48 <option selected="true" value="mu">mu</option> 50 <option selected="true" value="mu">mu</option>
57 <when value="e"/> 59 <when value="e"/>
58 </conditional> 60 </conditional>
59 </repeat> 61 </repeat>
60 </section> 62 </section>
61 <section name="interaction_params" expanded="true" title="Spin Interactions" help=""> 63 <section name="interaction_params" expanded="true" title="Spin Interactions" help="">
62 <repeat name="interactions" title="Interactions to simulate" help="Add couplings between spins, and/or dissipation terms. Interaction terms available: Zeeman, hyperfine, dipolar, quadrupolar or dissipation. See muspinsim docs for more info"> 64 <repeat name="interactions" title="Interactions to simulate" help="Add couplings between spins, and/or dissipation terms. Interaction terms available: Zeeman, hyperfine, dipolar, quadrupolar or dissipation. See MuSpinSim docs for more info">
63 <conditional name="interaction_options"> 65 <conditional name="interaction_options">
64 <param name="interaction" type="select" label="Choose interaction type"> 66 <param name="interaction" type="select" label="Choose interaction type">
65 <option value="zeeman">Zeeman</option> 67 <option value="zeeman">Zeeman</option>
66 <option value="hyperfine">hyperfine</option> 68 <option value="hyperfine">hyperfine</option>
67 <option value="dipolar">dipolar</option> 69 <option value="dipolar">dipolar</option>
68 <option value="quadrupolar">quadrupolar</option> 70 <option value="quadrupolar">quadrupolar</option>
69 <option value="dissipation">dissipation</option> 71 <option value="dissipation">dissipation</option>
70 </param> 72 </param>
71 <when value="zeeman"> 73 <when value="zeeman">
72 <param name="zeeman_index" type="integer" value="" label="Index of coupled spin" min="1" 74 <param name="zeeman_index" type="integer" value="" label="Index of coupled spin" min="1" help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/>
73 help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/> 75 <param name="zeeman_vector" type="text" value="" label="Zeeman coupling vector" help="Define 1X3 vector for local magnetic field coupling (T). Allows default expressions, constants and functions (see help)"/>
74 <param name="zeeman_vector" type="text" value="" label="Zeeman coupling vector"
75 help="Define 1X3 vector for local magnetic field coupling (T).
76 Allows default expressions, constants and functions (see help)"/>
77 </when> 76 </when>
78 <when value="hyperfine"> 77 <when value="hyperfine">
79 <param name="hfine_index" type="integer" value="" label="Index of nuclear coupled spin" min="1" 78 <param name="hfine_index" type="integer" value="" label="Index of nuclear coupled spin" min="1" help="Non-electronic spin - muon or otherwise. Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/>
80 help="Non-electronic spin - muon or otherwise. 79 <param name="hfine_e_index" type="integer" value="" optional="true" min="1" label="Index of electronic coupled spin" help="Optional, will use first defined electronic spin if unspecified"/>
81 Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/> 80 <param name="hfine_matrix" area="true" type="text" value="" label="Hyperfine coupling tensor" help="Define 3X3 tensor for coupling between electron and non-electron spins (in MHz). Allows default expressions, constants and functions (see help)">
82 <param name="hfine_e_index" type="integer" value="" optional="true" min="1" label="Index of electronic coupled spin"
83 help="Optional, will use first defined electronic spin if unspecified"/>
84 <param name="hfine_matrix" area="true" type="text" value="" label="Hyperfine coupling tensor"
85 help="Define 3X3 tensor for coupling between electron and non-electron spins (in MHz).
86 Allows default expressions, constants and functions (see help)">
87 <sanitizer> 81 <sanitizer>
88 <valid initial="string.printable"> 82 <valid initial="string.printable">
89 </valid> 83 </valid>
90 </sanitizer> 84 </sanitizer>
91 </param> 85 </param>
92 </when> 86 </when>
93 <when value="dipolar"> 87 <when value="dipolar">
94 <param name="di_index" type="integer" value="" min="1" label="Index of 1st coupled spin" 88 <param name="di_index" type="integer" value="" min="1" label="Index of 1st coupled spin" help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/>
95 help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/> 89 <param name="di_index_2" type="integer" value="" label="Index of 2nd coupled spin" help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/>
96 <param name="di_index_2" type="integer" value="" label="Index of 2nd coupled spin" 90 <param name="di_vector" type="text" value="" label="Dipole coupling vector" help="Define 1X3 vector for coupling between two spins (Angstrom). Allows default expressions, constants and functions (see help)"/>
97 help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/>
98 <param name="di_vector" type="text" value="" label="Dipole coupling vector"
99 help="Define 1X3 vector for coupling between two spins (Angstrom).
100 Allows default expressions, constants and functions (see help)"/>
101 </when> 91 </when>
102 <when value="quadrupolar"> 92 <when value="quadrupolar">
103 <param name="quad_index" type="integer" value="" label="Index of coupled spin" 93 <param name="quad_index" type="integer" value="" label="Index of coupled spin" help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/>
104 help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/> 94 <param name="quad_matrix" area="true" type="text" value="" label="Electric Field Gradient tensor" help="Define 3X3 tensor (in atomic units) for quadrupolar coupling. Allows default expressions, constants and functions (see help). Warning: spins with zero quadrupole moment will have zero coupling regardless of the input">
105 <param name="quad_matrix" area="true" type="text" value="" label="Electric Field Gradient tensor"
106 help="Define 3X3 tensor (in atomic units) for quadrupolar coupling.
107 Allows default expressions, constants and functions (see help).
108 Warning: spins with zero quadrupole moment will have zero coupling regardless of the input">
109 <sanitizer> 95 <sanitizer>
110 <valid initial="string.printable"> 96 <valid initial="string.printable">
111 </valid> 97 </valid>
112 </sanitizer> 98 </sanitizer>
113 </param> 99 </param>
114 </when> 100 </when>
115 <when value="dissipation"> 101 <when value="dissipation">
116 <param name="dis_index" type="integer" value="" label="Index of spin with dissipation" 102 <param name="dis_index" type="integer" value="" label="Index of spin with dissipation" help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/>
117 help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/> 103 <param name="dis_val" type="text" value="" label="Dissipation" help="Define dissipation term (MHz). Allows default expressions, constants and functions (see help)"/>
118 <param name="dis_val" type="text" value="" label="Dissipation"
119 help="Define dissipation term (MHz).
120 Allows default expressions, constants and functions (see help)"/>
121 </when> 104 </when>
122 </conditional> 105 </conditional>
123 </repeat> 106 </repeat>
124 </section> 107 </section>
125 <section name="experiment_params" expanded="true" title="Experiment Parameters"> 108 <section name="experiment_params" expanded="true" title="Experiment Parameters">
126 <conditional name="experiment"> 109 <conditional name="experiment">
127 <param name="experiment_preset" type="select" value='custom' display="radio" label="Experiment type" 110 <param name="experiment_preset" type="select" value="custom" display="radio" label="Experiment type" help="Experiment preset to use. Avoided Level Crossing (ALC): sets polarization to longitudinal, x-axis to field and y-axis to integral. Zero field: sets polarization to transverse, field to 0, x-axis to time and y-axis to asymmetry. Choose custom for no preset">
128 help="Experiment preset to use. Avoided Level Crossing (ALC): sets polarization to longitudinal, x-axis to field and y-axis to integral.
129 Zero field: sets polarization to transverse and field to 0. Choose custom for no preset">
130 <option value="alc">Avoided Level Crossing (ALC)</option> 111 <option value="alc">Avoided Level Crossing (ALC)</option>
131 <option value="zero_field">Zero Field</option> 112 <option value="zero_field">Zero Field</option>
132 <option selected="true" value="custom">Custom</option> 113 <option selected="true" value="custom">Custom</option>
133 </param> 114 </param>
134 <when value="alc"> 115 <when value="alc">
135 <repeat name="fields" title="Fields" help="Magnetic fields"> 116 <expand macro="restricted_axes_options"/>
136 <param name="field" type="text" value="0" label="Field" 117 <expand macro="fields"/>
137 optional="true" help="Optional, (default is 0). 118 <expand macro="temperatures"/>
138 Accepts 1X3 vector, or scalar value. Scalar value means field is assumed to be aligned with z axis. 119 <expand macro="orientations"/>
139 Allows default expressions, constants and functions, plus MHz, muon_gyr constants and special 'range()' function (see help section)"/> 120 <expand macro="euler_convention"/>
140 </repeat>
141 </when> 121 </when>
142 <when value="zero_field"> 122 <when value="zero_field">
143 <param name="x_axis" type="select" value="time" display="radio" label="X axis" 123 <expand macro="restricted_axes_options"/>
144 help="Range to use as X axis for output file(s)"> 124 <expand macro="times"/>
145 <option selected="true" value="time">time</option> 125 <expand macro="temperatures"/>
146 <option value="field">field</option> 126 <expand macro="orientations"/>
147 </param> 127 <expand macro="euler_convention"/>
148 <param name="y_axis" type="select" value="asymmetry" display="radio" label="Y axis" 128 <expand macro="celio_options"/>
149 help="Range to use as y axis for output file(s)
150 Asymmetry: use muon's polarization.
151 Integral: use muon's polarization integral over time.
152 WARNING: if integral chosen, 'time' parameter is ignored, and cannot be used as x-axis parameter ">
153 <option value="integral">integral</option>
154 <option selected="true" value="asymmetry">asymmetry</option>
155 </param>
156 </when> 129 </when>
157 <when value="custom"> 130 <when value="custom">
158 <param name="x_axis" type="select" value="time" display="radio" label="X axis" 131 <expand macro="axes_options"/>
159 help="Range to use as X axis for output file(s)"> 132 <expand macro="times"/>
160 <option selected="true" value="time">time</option> 133 <expand macro="fields"/>
161 <option value="field">field</option> 134 <expand macro="intrinsic_fields"/>
162 </param> 135 <expand macro="temperatures"/>
163 <param name="y_axis" type="select" value="asymmetry" display="radio" label="Y axis" 136 <expand macro="polarizations"/>
164 help="Range to use as y axis for output file(s) 137 <expand macro="orientations"/>
165 Asymmetry: use muon's polarization. 138 <expand macro="euler_convention"/>
166 Integral: use muon's polarization integral over time. 139 <expand macro="celio_options"/>
167 WARNING: if integral chosen, 'time' parameter is ignored, and cannot be used as x-axis parameter ">
168 <option value="integral">integral</option>
169 <option selected="true" value="asymmetry">asymmetry</option>
170 </param>
171 <repeat name="fields" title="Fields" help="Magnetic fields">
172 <param name="field" type="text" value="0" label="Field (T)"
173 optional="true" help="Optional, (default is 0).
174 Accepts 1X3 vector, or scalar value. Scalar value means field is assumed to be aligned with z axis.
175 Allows default expressions, constants and functions, plus MHz, muon_gyr constants and special 'range()' function (see help section)"/>
176 </repeat>
177 <repeat name="polarizations" title="Polarizations" help="The direction along which the muon
178 should be polarized when starting, as well as the one in which it will be measured.
179 Each entry will generate a separate calculation when muspinsim is run">
180 <conditional name="polarization_options">
181 <param name="polarization_preset" value="custom" type="select" display="radio" label="Polarization"
182 help="transverse: along x-axis, longitudinal: along z-axis, custom: define vector">
183 <option value="longitudinal">longditudinal</option>
184 <option value="transverse">transverse</option>
185 <option selected="true" value="custom">custom</option>
186 </param>
187 <when value="custom">
188 <param name="polarization" type="text" value="" label="Enter custom vector for polarization"
189 help="Accepts 1X3 vector.
190 Allows default expressions, constants and functions (see help section)"/>
191 </when>
192 <when value="longitudinal" />
193 <when value="transverse" />
194 </conditional>
195 </repeat>
196 </when> 140 </when>
197 </conditional> 141 </conditional>
198 <param name="average_axes" type="select" display="checkboxes" multiple="true" optional="true" value="orientation" label="Average axes"
199 help="Keywords that should have an average carried out over them. Each keyword ticked should have a range specified.
200 Keywords not ticked or set as X axis, but which have a range set, will generate separate calculations for each value in the range when muspinsim is run.">
201 <option selected="true" value="orientation">orientation</option>
202 <option value="polarization">polarization</option>
203 <option value="field">field</option>
204 <option value="time">time</option>
205 <option value="temperature">temperature</option>
206 </param>
207 <repeat name="orientations" title="Orientations" help="Orientations to use for crystallites - (define powder averages)">
208 <conditional name="orientation_options">
209 <param name="orientation_preset" type="select" display="radio" label="Orientation" optional="false"
210 help="Polar angles: Define two polar angles θ and ϕ, defining only the direction of the z-axis (recommended for powder averages).
211 Euler angles: Define 3 Euler angles defining a new frame, convention used is ZYZ by default.
212 Euler angles with weight: define 3 Euler angles and a weight (will be normalized automatically).
213 Euler angles helper function: eulrange(n).
214 Zaremba-Conroy-Wolfsberg helper function: zcw(n)">
215 <option value="2_polar">Polar angles</option>
216 <option value="3_euler">Euler angles</option>
217 <option value="4_euler">Euler angles with weight</option>
218 <option value="eulrange">Euler angles helper function (eulrange(n))</option>
219 <option selected="true" value="zcw">Zaremba-Conroy-Wolfsberg helper function (zcw(n))</option>
220 </param>
221 <when value="eulrange">
222 <param name="eul_n" type="text" value="0" label="n"
223 help="value for n for eulrange(n),
224 Allows default expressions, constants and functions.
225 WARNING: large values are more computationally expensive."
226 />
227 </when>
228 <when value="zcw">
229 <param name="zcw_n" type="text" value="0" label="n"
230 help="value for n for zcw(n)
231 Allows default expressions, constants and functions.
232 WARNING: large values are more computationally expensive."
233 />
234 </when>
235 <when value="2_polar">
236 <param name="theta" type="text" value="" label="θ (theta/inclination) angle"
237 help="All polar angle entries allow default expressions, constants and functions"/>
238 <param name="phi" type="text" value="" label="ϕ (phi/azimuth) angle"
239 help="All polar angle entries allow default expressions, constants and functions"/>
240 </when>
241 <when value="3_euler">
242 <param name="eul_1" type="text" value="" label="Euler angle 1"
243 help="All Euler angle entries allow default expressions, constants and functions"/>
244 <param name="eul_2" type="text" value="" label="Euler angle 2"
245 help="All Euler angle entries allow default expressions, constants and functions"/>
246 <param name="eul_3" type="text" value="" label="Euler angle 3"
247 help="All Euler angle entries allow default expressions, constants and functions"/>
248
249 </when>
250 <when value="4_euler">
251 <param name="eul_1" type="text" value="" label="Euler angle 1"
252 help="All Euler angle entries allow default expressions and constants"/>
253 <param name="eul_2" type="text" value="" label="Euler angle 2"
254 help="All Euler angle entries allow default expressions and constants"/>
255 <param name="eul_3" type="text" value="" label="Euler angle 3"
256 help="All Euler angle entries allow default expressions and constants"/>
257 <param name="weight" type="float" value="0" label="Weight"
258 help="Allows only floating point value, weights will automatically be normalised"/>
259 </when>
260 </conditional>
261 </repeat>
262 <param name="euler_convention" type="select" display="radio" label="Euler Convention"
263 help="Euler angle convention to use for orientation definitions (ignored if Euler angles not defined)">
264 <option selected="true" value="zyz">ZYZ</option>
265 <option value="zxz">ZXZ</option>
266 </param>
267 <repeat name="times" title="Time" help="A time or range of times (μs)">
268 <param name="time" type="text" label="Time"
269 help="Either a single time value or `range` function
270 Allows default expressions, default constants, and special 'range()' function (see help section)"
271 optional="true" value="range(0, 10, 101)"/>
272 </repeat>
273 <repeat name="temperatures" title="Temperature" help="Temperature or range of temperatures (K)">
274 <param name="temperature" type="text"
275 help="Either single value or 'range()' function
276 Allows default expressions, default constants, and special 'range()' function (see help section).
277 Warning: both density matrices and dissipative couplings for finite temperatures are only calculated approximatively, see muspinsim docs."
278 optional="true" value="inf"/>
279 </repeat>
280 </section> 142 </section>
281 <section name="fitting_params" expanded="true" title="Fitting Parameters"> 143 <section name="fitting_params" expanded="true" title="Fitting Parameters">
282 <conditional name="fitting_options"> 144 <conditional name="fitting_options">
283 <param name="fitting" type="select" display="radio" optional="false" value="" label="Fit experimental data with simulations" 145 <param name="fitting" type="select" display="radio" optional="false" value="" label="Fit experimental data with simulations" help="Fitting requires a file with data to fit. File must be given in MuSpinSim tool, or by manually setting filepath for keyword 'fitting_data' if running MuSpinSim externally">
284 help="Fitting requires a file with data to fit. File must be given in muspinsim tool, or by manually setting filepath for keyword 'fitting_data' if running muspinsim externally">
285 <option value="true">Yes</option> 146 <option value="true">Yes</option>
286 <option selected="true" value="">No</option> 147 <option selected="true" value="">No</option>
287 </param> 148 </param>
288 <when value="true"> 149 <when value="true">
289 <param name="fitting_method" type="select" display="radio" optional="false" value="nelder-mead" label="Method to use to fit the data" 150 <param name="fitting_method" type="select" display="radio" optional="false" value="nelder-mead" label="Method to use to fit the data" help="See the help section for a description of each method">
290 help="See the help section for a description of each method">
291 <option selected="true" value="nelder-mead">Nelder-Mead</option> 151 <option selected="true" value="nelder-mead">Nelder-Mead</option>
292 <option value="lbfgs">L-BFGS</option> 152 <option value="lbfgs">L-BFGS</option>
293 </param> 153 </param>
294 <repeat name="fitting_variables" title="Variable to fit to the experimental data"> 154 <repeat name="fitting_variables" title="Variable to fit to the experimental data">
295 <param name="var_name" type="text" optional="false" label="Name of the variable"/> 155 <param name="var_name" type="text" optional="false" label="Name of the variable"/>
296 <param name="start_val" type="text" value="0" label="Starting value" 156 <param name="start_val" type="text" value="0" label="Starting value" help="Allows default expressions, constants and functions, plus MHz, muon_gyr constants. Cannot contain names of other variables"/>
297 help="Allows default expressions, constants and functions, plus MHz, muon_gyr constants. Cannot contain names of other variables"/> 157 <param name="min_bound" type="text" value="-inf" label="minimum bound" help="Allows default expressions, constants and functions, plus MHz, muon_gyr constants"/>
298 <param name="min_bound" type="text" value="-inf" label="minimum bound" 158 <param name="max_bound" type="text" value="inf" label="maximum bound" help="Allows default expressions, constants and functions, plus MHz, muon_gyr constants"/>
299 help="Allows default expressions, constants and functions, plus MHz, muon_gyr constants"/>
300 <param name="max_bound" type="text" value="inf" label="maximum bound"
301 help="Allows default expressions, constants and functions, plus MHz, muon_gyr constants"/>
302 </repeat> 159 </repeat>
303 <param name="fitting_tolerance" type="float" optional='true' value="" label="Fitting Tolerance" 160 <param name="fitting_tolerance" type="float" optional="true" value="" label="Fitting Tolerance" help="Used as the tol parameter in Scipy's scipy.optimize.minimize method. Will use scipy defaults if left blank. Does not accept expressions/functions/constants"/>
304 help="Used as the tol parameter in Scipy's scipy.optimize.minimize method. Will use scipy defaults if left blank.
305 Does not accept expressions/functions/constants"
306 />
307 </when> 161 </when>
308 <when value=""/> 162 <when value=""/>
309 </conditional> 163 </conditional>
310 </section> 164 </section>
311 </inputs> 165 </inputs>
312 <outputs> 166 <outputs>
313 <data format="txt" label="muspinsim input file $out_file_prefix" name="out_file" from_work_dir="outfile.in" /> 167 <data format="txt" label="muspinsim input file $out_file_prefix" name="out_file" from_work_dir="outfile.in"/>
314 </outputs> 168 </outputs>
315 <tests> 169 <tests>
316 <test expect_num_outputs="1"> 170 <test expect_num_outputs="1">
317 <param name="out_file_prefix" value="test_1"/> 171 <param name="out_file_prefix" value="test_1"/>
318 <param name="spin_preset" value="custom"/> 172 <param name="spin_preset" value="custom"/>
319 <param name="spin" value="H"/> 173 <param name="spin" value="H"/>
320 <param name="spin_preset" value="mu"/> 174 <param name="spin_preset" value="mu"/>
321 <param name="interaction" value="zeeman"/> 175 <param name="interaction" value="zeeman"/>
322 <param name="zeeman_index" value="1" /> 176 <param name="zeeman_index" value="1"/>
323 <param name="zeeman_vector" value="1 0 0" /> 177 <param name="zeeman_vector" value="1 0 0"/>
324 <param name="zeeman_index" value="2" /> 178 <param name="zeeman_index" value="2"/>
325 <param name="zeeman_vector" value="2 0 0" /> 179 <param name="zeeman_vector" value="2 0 0"/>
326 <output name="out_file" file="test_1.in" ftype="txt" compare="diff" /> 180 <param name="y_axis" value="asymmetry"/>
181 <param name="x_axis" value="time"/>
182 <param name="average_axes" value="orientation"/>
183 <output name="out_file" file="test_1.in" ftype="txt" compare="diff"/>
327 </test> 184 </test>
328 <test expect_num_outputs="1"> 185 <test expect_num_outputs="1">
329 <param name="out_file_prefix" value="test_2"/> 186 <param name="out_file_prefix" value="test_2"/>
187 <param name="experiment_preset" value="custom"/>
330 <param name="spin_preset" value="e"/> 188 <param name="spin_preset" value="e"/>
331 <param name="spin_preset" value="mu"/> 189 <param name="spin_preset" value="mu"/>
332 <param name="interaction" value="hyperfine"/> 190 <param name="interaction" value="hyperfine"/>
333 <param name="hfine_index" value="1" /> 191 <param name="hfine_index" value="1"/>
334 <param name="hfine_matrix" value="[1 0 0 sin(10) (5*2) 0 10*pi 5 cos(20)]"/> 192 <param name="hfine_matrix" value="[1 0 0 sin(10) (5*2) 0 10*pi 5 cos(20)]"/>
335 <param name="time" value="range(0, 0.1)" /> 193 <param name="time" value="range(0, 0.1)"/>
336 <param name="y_axis" value="asymmetry" /> 194 <param name="y_axis" value="asymmetry"/>
337 <param name="field" value="1.0" /> 195 <param name="x_axis" value="time"/>
338 <param name="temperature" value="1.0" /> 196 <param name="field" value="1.0"/>
339 <output name="out_file" file="test_2.in" ftype="txt" compare="diff" /> 197 <param name="temperature" value="1.0"/>
198 <output name="out_file" file="test_2.in" ftype="txt" compare="diff"/>
340 </test> 199 </test>
341 <test expect_num_outputs="1"> 200 <test expect_num_outputs="1">
342 <param name="out_file_prefix" value="test_3"/> 201 <param name="out_file_prefix" value="test_3"/>
343 <param name="spin_preset" value="custom"/> 202 <param name="spin_preset" value="custom"/>
344 <param name="spin" value="H"/> 203 <param name="spin" value="H"/>
345 <param name="spin_preset" value="mu"/> 204 <param name="spin_preset" value="mu"/>
346 <param name="spin_preset" value="e"/> 205 <param name="spin_preset" value="e"/>
347 <param name="interaction" value="hyperfine"/> 206 <param name="interaction" value="hyperfine"/>
348 <param name="hfine_index" value="2" /> 207 <param name="hfine_index" value="2"/>
349 <param name="hfine_matrix" value="[580 5 10 5 580 9 10 9 580]"/> 208 <param name="hfine_matrix" value="[580 5 10 5 580 9 10 9 580]"/>
350 <param name="interaction" value="hyperfine"/> 209 <param name="interaction" value="hyperfine"/>
351 <param name="hfine_index" value="3" /> 210 <param name="hfine_index" value="3"/>
352 <param name="hfine_matrix" value="[(300/2) 3 4*10 ], [3 15*10 6-3+2] ,[4 5 15 ]"/> 211 <param name="hfine_matrix" value="[(300/2) 3 4*10 ], [3 15*10 6-3+2] ,[4 5 15 ]"/>
353 <param name="average_axes" value="polarization,temperature" /> 212 <param name="average_axes" value="orientation,temperature"/>
354 <param name="experiment_preset" value="alc" /> 213 <param name="experiment_preset" value="alc"/>
355 <param name="field" value="range(1.8, 2.6, 100)" /> 214 <param name="field" value="range(1.8, 2.6, 100)"/>
356 <param name="orientation_preset" value="zcw" /> 215 <param name="orientation_preset" value="zcw"/>
357 <param name="zcw_n" value="20" /> 216 <param name="zcw_n" value="20"/>
358 <output name="out_file" file="test_3.in" ftype="txt" compare="diff" /> 217 <output name="out_file" file="test_3.in" ftype="txt" compare="diff"/>
359 </test> 218 </test>
360 <test expect_num_outputs="1"> 219 <test expect_num_outputs="1">
361 <param name="out_file_prefix" value="test_4"/> 220 <param name="out_file_prefix" value="test_4"/>
362 <param name="spin_preset" value="custom"/> 221 <param name="spin_preset" value="custom"/>
363 <param name="spin" value="F"/> 222 <param name="spin" value="F"/>
373 <param name="di_index_2" value="3"/> 232 <param name="di_index_2" value="3"/>
374 <param name="di_vector" value="-0.9 -0.9 0"/> 233 <param name="di_vector" value="-0.9 -0.9 0"/>
375 <param name="interaction" value="dissipation"/> 234 <param name="interaction" value="dissipation"/>
376 <param name="dis_index" value="1"/> 235 <param name="dis_index" value="1"/>
377 <param name="dis_val" value="0.5"/> 236 <param name="dis_val" value="0.5"/>
378 <param name="average_axes" value="" /> 237 <param name="average_axes" value=""/>
379 <param name="experiment_preset" value="custom" /> 238 <param name="experiment_preset" value="custom"/>
380 <param name="field" value="1.5e-2 1.0e-2 1.0e-2"/> 239 <param name="field" value="1.5e-2 1.0e-2 1.0e-2"/>
381 <param name="field" value="0.01"/> 240 <param name="field" value="0.01"/>
241 <param name="intrinsic_field" value="1.6e-2 1.1e-2 1.1e-2"/>
242 <param name="intrinsic_field" value="0.02"/>
382 <param name="polarization_preset" value="custom"/> 243 <param name="polarization_preset" value="custom"/>
383 <param name="polarization" value="1 0 0"/> 244 <param name="polarization" value="1 0 0"/>
384 <param name="time" value="range(0,8.0,1000)"/> 245 <param name="time" value="range(0,8.0,1000)"/>
385 <param name="time" value="range(0,1.0)"/> 246 <param name="time" value="range(0,1.0)"/>
386 <param name="orientation_preset" value="eulrange"/> 247 <param name="orientation_preset" value="eulrange"/>
387 <param name="eul_n" value="10"/> 248 <param name="eul_n" value="10"/>
388 <output name="out_file" file="test_4.in" ftype="txt" compare="diff" /> 249 <param name="celio_enabled" value="true"/>
250 <param name="celio_k" value="10"/>
251 <output name="out_file" file="test_4.in" ftype="txt" compare="diff"/>
389 </test> 252 </test>
390 <test expect_num_outputs="1"> 253 <test expect_num_outputs="1">
391 <param name="out_file_prefix" value="test_5"/> 254 <param name="out_file_prefix" value="test_5"/>
392 <param name="spin_preset" value="mu"/> 255 <param name="spin_preset" value="mu"/>
393 <param name="interaction" value="dissipation"/> 256 <param name="interaction" value="dissipation"/>
394 <param name="dis_index" value="1"/> 257 <param name="dis_index" value="1"/>
395 <param name="dis_val" value="g"/> 258 <param name="dis_val" value="g"/>
396 <param name="experiment_preset" value="custom" /> 259 <param name="experiment_preset" value="custom"/>
397 <param name="field" value="1.0/muon_gyr" /> 260 <param name="field" value="1.0/muon_gyr"/>
261 <param name="intrinsic_field" value="2.0/muon_gyr"/>
398 <param name="fitting" value="true"/> 262 <param name="fitting" value="true"/>
399 <param name="var_name" value="g" /> 263 <param name="var_name" value="g"/>
400 <param name="min_bound" value="0.0" /> 264 <param name="min_bound" value="0.0"/>
401 <param name="fitting_tolerance" value="1.0" /> 265 <param name="fitting_tolerance" value="1.0"/>
402 <output name="out_file" file="test_5.in" ftype="txt" compare="diff" /> 266 <param name="celio_enabled" value="true"/>
267 <param name="celio_k" value="10"/>
268 <param name="celio_averages" value="4"/>
269 <output name="out_file" file="test_5.in" ftype="txt" compare="diff"/>
270 </test>
271 <test expect_num_outputs="1">
272 <param name="out_file_prefix" value="test_6"/>
273 <param name="experiment_preset" value="zero_field"/>
274 <param name="spin_preset" value="custom"/>
275 <param name="spin" value="H"/>
276 <param name="spin_preset" value="mu"/>
277 <param name="interaction" value="zeeman"/>
278 <param name="zeeman_index" value="1"/>
279 <param name="zeeman_vector" value="1 0 0"/>
280 <param name="zeeman_index" value="2"/>
281 <param name="zeeman_vector" value="2 0 0"/>
282 <param name="average_axes" value="orientation,temperature"/>
283 <output name="out_file" file="test_6.in" ftype="txt" compare="diff"/>
284 </test>
285 <test expect_num_outputs="1">
286 <param name="out_file_prefix" value="test_7"/>
287 <param name="experiment_preset" value="custom"/>
288 <param name="spin_preset" value="custom"/>
289 <param name="spin" value="H"/>
290 <param name="spin_preset" value="mu"/>
291 <param name="interaction" value="zeeman"/>
292 <param name="zeeman_index" value="1"/>
293 <param name="zeeman_vector" value="1 0 0"/>
294 <param name="zeeman_index" value="2"/>
295 <param name="zeeman_vector" value="2 0 0"/>
296 <param name="y_axis" value="integral"/>
297 <param name="x_axis" value="field"/>
298 <param name="average_axes" value="orientation,temperature"/>
299 <output name="out_file" file="test_7.in" ftype="txt" compare="diff"/>
403 </test> 300 </test>
404 </tests> 301 </tests>
405 <help><![CDATA[ 302 <help><![CDATA[
406 Tool to create input parameter file for Muspinsim. 303 Tool to create input parameter file for MuSpinSim.
407 304
408 305
409 This tool creates a structured text file with keywords and values which describe the system to model for Muspinsim. 306 This tool creates a structured text file with keywords and values which describe the system to model for MuSpinSim.
410 See muspinsim docs for more information https://muon-spectroscopy-computational-project.github.io/muspinsim/input/. 307 See MuSpinSim docs for more information https://muon-spectroscopy-computational-project.github.io/muspinsim/input/.
411 308
412 309
413 Muspinsim allows expressions and special functions to be used when defining certain keywords. This tool also allows this. 310 MuSpinSim allows expressions and special functions to be used when defining certain keywords. This tool also allows this.
414 Check the hint at the bottom of each input to see what, if any, special function or expressions can be used. 311 Check the hint at the bottom of each input to see what, if any, special function or expressions can be used.
415 312
416 313
417 Default expressions include the use of the operators :code:`+ - * /` and :code:`^` for exponentiation. Expressions 314 Default expressions include the use of the operators :code:`+ - * /` and :code:`^` for exponentiation. Expressions
418 should not contain whitespace. For example, use :code:`1+2` not :code:`1 + 2`. 315 should not contain whitespace. For example, use :code:`1+2` not :code:`1 + 2`.
467 - A second-order Quasi-Newton optimization algorithm 364 - A second-order Quasi-Newton optimization algorithm
468 - Makes use of second-order derivative (Hessian Matrix) to converge on optimum. 365 - Makes use of second-order derivative (Hessian Matrix) to converge on optimum.
469 - Scipy default tolerance is :code:`1e-5` 366 - Scipy default tolerance is :code:`1e-5`
470 ]]></help> 367 ]]></help>
471 <citations> 368 <citations>
472 <citation type="bibtex"> 369 <citation type="doi">10.1093/comjnl/7.4.308</citation>
473 @article{nelder_mead_1965,
474 title={A Simplex Method for Function Minimization},
475 volume={7},
476 doi={10.1093/comjnl/7.4.308},
477 number={4},
478 journal={The Computer Journal},
479 author={Nelder, J. A. and Mead, R.},
480 year={1965},
481 pages={308-313}
482 }
483 </citation>
484 <citation type="bibtex"> 370 <citation type="bibtex">
485 @book{nocedal_wright_2006, 371 @book{nocedal_wright_2006,
486 place={New York (NY)}, 372 place={New York (NY)},
487 title={Numerical Optimization}, 373 title={Numerical Optimization},
488 publisher={Springer}, 374 publisher={Springer},
489 author={Nocedal, Jorge and Wright, Stephen J}, 375 author={Nocedal, Jorge and Wright, Stephen J},
490 year={2006} 376 year={2006}
491 } 377 }
492 </citation> 378 </citation>
379 <citation type="doi">10.1103/PhysRevLett.56.2720</citation>
493 <citation type="bibtex"> 380 <citation type="bibtex">
494 @TOOL_CITATION@ 381 @TOOL_CITATION@
495 </citation> 382 </citation>
496 </citations> 383 </citations>
497 </tool> 384 </tool>