Previous changeset 1:b30217097125 (2022-09-15) Next changeset 3:e002cee8f707 (2023-07-18) |
Commit message:
planemo upload for repository https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/main/muspinsim commit 4f06b404d8b7fb83995f3052faa7e2ec7811f507 |
modified:
muspinsim.xml test-data/fitting_data.dat test-data/hfine.dat test-data/hfine_powder.dat |
added:
test-data/celio.in test-data/celio.log test-data/fitting_fit_report.txt |
removed:
test-data/fitting_fitreport.txt |
b |
diff -r b30217097125 -r 136ed45d1ea9 muspinsim.xml --- a/muspinsim.xml Thu Sep 15 10:23:28 2022 +0000 +++ b/muspinsim.xml Fri Feb 03 15:39:01 2023 +0000 |
[ |
@@ -1,28 +1,29 @@ -<tool id="muspinsim" name="MuSpinSim Simulate" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.01"> +<tool id="muspinsim" name="MuSpinSim Simulate" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.05" license="MIT"> <description>perform spin dynamics calculations for muon science experiments</description> <macros> <!-- version of underlying tool (PEP 440) --> - <token name="@TOOL_VERSION@">1.1.0</token> + <token name="@TOOL_VERSION@">2.0.2</token> <!-- version of this tool wrapper (integer) --> - <token name="@WRAPPER_VERSION@">1</token> + <token name="@WRAPPER_VERSION@">0</token> <!-- citation should be updated with every underlying tool version --> <!-- typical fields to update are version, month, year, and doi --> <token name="@TOOL_CITATION@"> @software{muspinsim, - author = {Sturniolo, Simone and Liborio, Leandro and Owen, Josh and Mudaraddi, Anish and {Muon Spectroscopy Computational Project}}, + author = {Sturniolo, Simone and Liborio, Leandro and Owen, Josh and Mudaraddi, Anish and Davies, Joel and Wilkinson, John and {Muon Spectroscopy Computational Project}}, license = {MIT}, title = {{muspinsim}}, url = {https://github.com/muon-spectroscopy-computational-project/muspinsim}, - version = {v1.1.0}, - month = {5}, - year = {2022}, - doi = {10.5281/zenodo.6563074} + version = {v2.0.2}, + month = {1}, + year = {2023} + doi = {10.5281/zenodo.7568830} } </token> </macros> <creator> <person givenName="Anish" familyName="Mudaraddi" identifier="https://orcid.org/0000-0002-2135-2705"/> <person givenName="Eli" familyName="Chadwick" url="https://github.com/elichad" identifier="https://orcid.org/0000-0002-0035-6475"/> + <person givenName="Joel" familyName="Davies" url="https://github.com/joelvdavies" identifier="https://orcid.org/0000-0002-4153-6819"/> <organization url="https://muon-spectroscopy-computational-project.github.io/index.html" name="The Muon Spectroscopy Computational Project"/> </creator> <requirements> @@ -30,29 +31,31 @@ </requirements> <command detect_errors="exit_code"><![CDATA[ ## remove spaces in names - mu_sim_name=\$(sed 's/ //g' <<< "$mu_sim.name") && + mu_sim_name=\$(sed 's/ //g' <<< '$mu_sim.name') && + ## input file name without extension + mu_in_name=\${mu_sim_name%.*} && ## create links - ln -s $mu_sim \$mu_sim_name && + ln -s '$mu_sim' \$mu_sim_name && ## grab 'name' field from input file, if it doesn't exist, set name as 'muspinsim' mu_out=\$(grep -A1 '^name' \$mu_sim_name | grep -v 'name' | sed -e 's/^[ \t]*//') && - fitreport_out=\${mu_out:-"fitting_data"}_fitreport.txt && + fit_report_out=\${mu_in_name:-"fitting_data"}_fit_report.txt && mu_out=\${mu_out:-"muspinsim"} && log_out=\$(echo \$mu_sim_name | cut -d '.' -f1).log && ## if fitting data required, check if fitting data exists ## create symlink and change filepath in input file to point to symlink - if grep '^fitting_data' $mu_sim; then + if grep '^fitting_data' '$mu_sim'; then if [[ '$mu_exp_in.name' != 'None' ]]; then - mu_exp_in_name=\$(sed 's/ //g' <<< "$mu_exp_in.name") && - ln -s $mu_exp_in \$mu_exp_in_name && + mu_exp_in_name=\$(sed 's/ //g' <<< '$mu_exp_in.name') && + ln -s '$mu_exp_in' \$mu_exp_in_name && sed -iE "/^fitting_data/{n;s/([^)]*)/(\"\$mu_exp_in_name\")/g}" \$mu_sim_name; else - echo "fitting data required, but no experiment data given" && exit 64; + echo "Fitting data required, but no experiment data given" && exit 64; fi; fi && muspinsim \$mu_sim_name && mkdir data && mv \$mu_out*.dat data && - if test -f \$fitreport_out; then mv -f \$fitreport_out fit_report.txt; fi && + if test -f \$fit_report_out; then mv -f \$fit_report_out fit_report.txt; fi && mv \$log_out log_out.log ]]></command> <inputs> @@ -74,7 +77,7 @@ <test expect_num_outputs="2"> <param name="mu_sim" value="hfine.in" ftype="txt"/> <output_collection name="muspinsim_results" type="list"> - <element name="hfine.dat" file="hfine.dat" ftype="txt" lines_diff="4"/> + <element name="hfine.dat" file="hfine.dat" ftype="txt" compare="re_match"/> </output_collection> <output name="log_out" file="hfine.log" ftype="txt" compare="re_match"/> </test> @@ -89,10 +92,17 @@ </output_collection> <output name="log_out" file="hfine_powder.log" ftype="txt" compare="re_match"> <assert_contents> - <has_size value="802"/> + <has_size value="803" delta="2"/> </assert_contents> </output> </test> + <test expect_num_outputs="2"> + <param name="mu_sim" value="celio.in" ftype="txt"/> + <output_collection name="muspinsim_results" type="list"> + <element name="celio.dat" file="generic_out.dat" ftype="txt" compare="re_match_multiline"/> + </output_collection> + <output name="log_out" file="celio.log" ftype="txt" compare="re_match"/> + </test> <test expect_num_outputs="3"> <param name="mu_sim" value="fitting.in" ftype="txt"/> <param name="mu_exp_in" value="fitting_input.dat" ftype="txt"/> @@ -104,7 +114,7 @@ <has_size value="17145"/> </assert_contents> </output> - <output name="fit_report" file="fitting_fitreport.txt" ftype="txt" lines_diff="4"/> + <output name="fit_report" file="fitting_fit_report.txt" ftype="txt" lines_diff="2"/> </test> <test expect_num_outputs="2"> <param name="mu_sim" value="multi_out.in" ftype="txt"/> |
b |
diff -r b30217097125 -r 136ed45d1ea9 test-data/celio.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/celio.in Fri Feb 03 15:39:01 2023 +0000 |
b |
@@ -0,0 +1,12 @@ +name + celio +spins + mu F F +dipolar 1 2 + 0 0 1 +dipolar 1 3 + 0 0 -1 +celio + 8 4 +time + range(0, 10, 100) |
b |
diff -r b30217097125 -r 136ed45d1ea9 test-data/celio.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/celio.log Fri Feb 03 15:39:01 2023 +0000 |
[ |
@@ -0,0 +1,10 @@ +\[INFO\] \[MainThread\] \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] Launching MuSpinSim calculation from file: celio.in +\[INFO\] \[MainThread\] \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] Using X axis: +\[INFO\] \[MainThread\] \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] t => 100 points +\[INFO\] \[MainThread\] \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] Created spin system with spins: +\[INFO\] \[MainThread\] \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] mu F F +\[INFO\] \[MainThread\] \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] Adding dipolar term to spins 1-2 +\[INFO\] \[MainThread\] \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] Adding dipolar term to spins 1-3 +\[INFO\] \[MainThread\] \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] Total number of configurations to simulate: 1 +\[INFO\] \[MainThread\] \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] Total number of configurations to average: 1 +\[INFO\] \[MainThread\] \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] Simulation completed in [\d\.]+ seconds \ No newline at end of file |
b |
diff -r b30217097125 -r 136ed45d1ea9 test-data/fitting_data.dat --- a/test-data/fitting_data.dat Thu Sep 15 10:23:28 2022 +0000 +++ b/test-data/fitting_data.dat Fri Feb 03 15:39:01 2023 +0000 |
[ |
@@ -1,5 +1,5 @@ -# MUSPINSIM v.1.0.3 -# Output file written on Thu Mar 31 18:26:46 2022 +# MUSPINSIM v.\d+.\d+.\d+ +# Output file written on [A-Za-z]{3} [A-Za-z]{3} [ 1-3][0-9] \d{2}:\d{2}:\d{2} \d{4} # Parameters used: # 0.000000000000000000e+00 5.000000000000000000e-01 |
b |
diff -r b30217097125 -r 136ed45d1ea9 test-data/fitting_fit_report.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/fitting_fit_report.txt Fri Feb 03 15:39:01 2023 +0000 |
b |
@@ -0,0 +1,11 @@ +Fitting process for fitting_data completed +Success achieved: True +Final absolute error <|f-f_targ|>: 0.004596737036516675 +Number of simulations: 40 +Number of iterations: 20 + +==================== + +Values found for fitting variables: + + g = 3.0368750000000104 \ No newline at end of file |
b |
diff -r b30217097125 -r 136ed45d1ea9 test-data/fitting_fitreport.txt --- a/test-data/fitting_fitreport.txt Thu Sep 15 10:23:28 2022 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,11 +0,0 @@ -Fitting process for fitting_data completed -Success achieved: True -Final absolute error <|f-f_targ|>: 0.0 -Number of simulations: 40 -Number of iterations: 20 - -==================== - -Values found for fitting variables: - - g = 3.0368750000000104 \ No newline at end of file |
b |
diff -r b30217097125 -r 136ed45d1ea9 test-data/hfine.dat --- a/test-data/hfine.dat Thu Sep 15 10:23:28 2022 +0000 +++ b/test-data/hfine.dat Fri Feb 03 15:39:01 2023 +0000 |
[ |
b'@@ -1,104 +1,104 @@\n-# MUSPINSIM v.1.0.3\n-# Output file written on Thu Mar 31 15:40:40 2022\n+# MUSPINSIM v.\\d+.\\d+.\\d+\n+# Output file written on [A-Za-z]{3} [A-Za-z]{3} [ 1-3][0-9] \\d{2}:\\d{2}:\\d{2} \\d{4}\n # Parameters used:\n-# \n-0.000000000000000000e+00 4.999999999999998890e-01\n-1.010101010101010100e-03 4.994966691179709706e-01\n-2.020202020202020200e-03 4.979887032076987241e-01\n-3.030303030303030300e-03 4.954821743156765934e-01\n-4.040404040404040401e-03 4.919871753490889787e-01\n-5.050505050505050067e-03 4.875177794352362204e-01\n-6.060606060606060601e-03 4.820919832540180305e-01\n-7.070707070707071135e-03 4.757316345716551820e-01\n-8.080808080808080801e-03 4.684623442674461513e-01\n-9.090909090909090468e-03 4.603133832077952459e-01\n-1.010101010101010013e-02 4.513175643827646022e-01\n-1.111111111111111154e-02 4.415111107797444201e-01\n-1.212121212121212120e-02 4.309335095262674664e-01\n-1.313131313131313087e-02 4.196273528892829896e-01\n-1.414141414141414227e-02 4.076381667711305168e-01\n-1.515151515151515194e-02 3.950142273927994552e-01\n-1.616161616161616160e-02 3.818063669026254825e-01\n-1.717171717171717127e-02 3.680677686931705939e-01\n-1.818181818181818094e-02 3.538537532504715255e-01\n-1.919191919191919060e-02 3.392215553979679443e-01\n-2.020202020202020027e-02 3.242300938320686887e-01\n-2.121212121212121340e-02 3.089397338773567370e-01\n-2.222222222222222307e-02 2.934120444167325203e-01\n-2.323232323232323274e-02 2.777095499752527119e-01\n-2.424242424242424240e-02 2.618954789559355678e-01\n-2.525252525252525207e-02 2.460335090412980041e-01\n-2.626262626262626174e-02 2.301875107858028791e-01\n-2.727272727272727140e-02 2.144212904316786794e-01\n-2.828282828282828454e-02 1.987983329837022806e-01\n-2.929292929292929420e-02 1.833815465774912001e-01\n-3.030303030303030387e-02 1.682330091706445430e-01\n-3.131313131313131354e-02 1.534137185767177891e-01\n-3.232323232323232320e-02 1.389833468485564272e-01\n-3.333333333333333287e-02 1.250000000000000278e-01\n-3.434343434343434254e-02 1.115199840334724080e-01\n-3.535353535353535220e-02 9.859757821558334800e-02\n-3.636363636363636187e-02 8.628481651367872485e-02\n-3.737373737373737154e-02 7.463127807341971010e-02\n-3.838383838383838120e-02 6.368388758106133252e-02\n-3.939393939393939087e-02 5.348672631430317903e-02\n-4.040404040404040054e-02 4.408085464254181407e-02\n-4.141414141414141714e-02 3.550414669125571965e-02\n-4.242424242424242681e-02 2.779113783626911693e-02\n-4.343434343434343647e-02 2.097288564198256100e-02\n-4.444444444444444614e-02 1.507684480352292078e-02\n-4.545454545454545581e-02 1.012675659637563008e-02\n-4.646464646464646547e-02 6.142553278648238413e-03\n-4.747474747474747514e-02 3.140277830901400113e-03\n-4.848484848484848481e-02 1.132019356728866666e-03\n-4.949494949494949447e-02 1.258644042037293520e-04\n-5.050505050505050414e-02 1.258644042036738409e-04\n-5.151515151515151381e-02 1.132019356728866666e-03\n-5.252525252525252347e-02 3.140277830901400113e-03\n-5.353535353535353314e-02 6.142553278648238413e-03\n-5.454545454545454281e-02 1.012675659637560233e-02\n-5.555555555555555247e-02 1.507684480352285139e-02\n-5.656565656565656908e-02 2.097288564198256100e-02\n-5.757575757575757874e-02 2.779113783626911693e-02\n-5.858585858585858841e-02 3.550414669125571965e-02\n-5.959595959595959808e-02 4.408085464254177244e-02\n-6.060606060606060774e-02 5.348672631430315128e-02\n-6.161616161616161741e-02 6.368388758106127701e-02\n-6.262626262626262708e-02 7.463127807341965458e-02\n-6.363636363636362980e-02 8.628481651367858607e-02\n-6.464646464646464641e-02 9.859757821558332025e-02\n-6.565656565656566301e-02 1.115199840334725467e-01\n-6.666666666666666574e-02 1.249999999999998612e-01\n-6.767676767676768235e-02 1.389833468485564827e-01\n-6.868686868686868507e-02 1.534137185767177891e-01\n-6.969696969696970168e-02 1.682330091706444875e-01\n-7.070707070707070441e-02 1.833815465774910891e-01\n-7.171717171717172101e-02 1.987983329837023083e-01\n-7.272727272727272374e-02 2.144212904316786517e-01\n-7.373737373737374035e-02 2.301875107858027680e'..b'5252525252525\\d{5}e-02 2\\.4603350904129\\d{5}e-01\n+2\\.6262626262626\\d{5}e-02 2\\.3018751078580\\d{5}e-01\n+2\\.7272727272727\\d{5}e-02 2\\.1442129043167\\d{5}e-01\n+2\\.8282828282828\\d{5}e-02 1\\.9879833298370\\d{5}e-01\n+2\\.9292929292929\\d{5}e-02 1\\.8338154657749\\d{5}e-01\n+3\\.0303030303030\\d{5}e-02 1\\.6823300917064\\d{5}e-01\n+3\\.1313131313131\\d{5}e-02 1\\.5341371857671\\d{5}e-01\n+3\\.2323232323232\\d{5}e-02 1\\.3898334684855\\d{5}e-01\n+3\\.3333333333333\\d{5}e-02 1\\.2500000000000\\d{5}e-01\n+3\\.4343434343434\\d{5}e-02 1\\.1151998403347\\d{5}e-01\n+3\\.5353535353535\\d{5}e-02 9\\.8597578215583\\d{5}e-02\n+3\\.6363636363636\\d{5}e-02 8\\.6284816513678\\d{5}e-02\n+3\\.7373737373737\\d{5}e-02 7\\.4631278073419\\d{5}e-02\n+3\\.8383838383838\\d{5}e-02 6\\.3683887581061\\d{5}e-02\n+3\\.9393939393939\\d{5}e-02 5\\.3486726314303\\d{5}e-02\n+4\\.0404040404040\\d{5}e-02 4\\.4080854642541\\d{5}e-02\n+4\\.1414141414141\\d{5}e-02 3\\.5504146691255\\d{5}e-02\n+4\\.2424242424242\\d{5}e-02 2\\.7791137836269\\d{5}e-02\n+4\\.3434343434343\\d{5}e-02 2\\.0972885641982\\d{5}e-02\n+4\\.4444444444444\\d{5}e-02 1\\.5076844803522\\d{5}e-02\n+4\\.5454545454545\\d{5}e-02 1\\.0126756596375\\d{5}e-02\n+4\\.6464646464646\\d{5}e-02 6\\.1425532786482\\d{5}e-03\n+4\\.7474747474747\\d{5}e-02 3\\.1402778309014\\d{5}e-03\n+4\\.8484848484848\\d{5}e-02 1\\.1320193567288\\d{5}e-03\n+4\\.9494949494949\\d{5}e-02 1\\.2586440420372\\d{5}e-04\n+5\\.0505050505050\\d{5}e-02 1\\.2586440420370\\d{5}e-04\n+5\\.1515151515151\\d{5}e-02 1\\.1320193567288\\d{5}e-03\n+5\\.2525252525252\\d{5}e-02 3\\.1402778309014\\d{5}e-03\n+5\\.3535353535353\\d{5}e-02 6\\.1425532786482\\d{5}e-03\n+5\\.4545454545454\\d{5}e-02 1\\.0126756596375\\d{5}e-02\n+5\\.5555555555555\\d{5}e-02 1\\.5076844803522\\d{5}e-02\n+5\\.6565656565656\\d{5}e-02 2\\.0972885641982\\d{5}e-02\n+5\\.7575757575757\\d{5}e-02 2\\.7791137836269\\d{5}e-02\n+5\\.8585858585858\\d{5}e-02 3\\.5504146691255\\d{5}e-02\n+5\\.9595959595959\\d{5}e-02 4\\.4080854642541\\d{5}e-02\n+6\\.0606060606060\\d{5}e-02 5\\.3486726314303\\d{5}e-02\n+6\\.1616161616161\\d{5}e-02 6\\.3683887581061\\d{5}e-02\n+6\\.2626262626262\\d{5}e-02 7\\.4631278073419\\d{5}e-02\n+6\\.3636363636363\\d{5}e-02 8\\.6284816513678\\d{5}e-02\n+6\\.4646464646464\\d{5}e-02 9\\.8597578215583\\d{5}e-02\n+6\\.5656565656565\\d{5}e-02 1\\.1151998403347\\d{5}e-01\n+6\\.6666666666666\\d{5}e-02 1\\.2499999999999\\d{5}e-01\n+6\\.7676767676767\\d{5}e-02 1\\.3898334684855\\d{5}e-01\n+6\\.8686868686868\\d{5}e-02 1\\.5341371857671\\d{5}e-01\n+6\\.9696969696969\\d{5}e-02 1\\.6823300917064\\d{5}e-01\n+7\\.0707070707070\\d{5}e-02 1\\.8338154657749\\d{5}e-01\n+7\\.1717171717171\\d{5}e-02 1\\.9879833298370\\d{5}e-01\n+7\\.2727272727272\\d{5}e-02 2\\.1442129043167\\d{5}e-01\n+7\\.3737373737373\\d{5}e-02 2\\.3018751078580\\d{5}e-01\n+7\\.4747474747474\\d{5}e-02 2\\.4603350904129\\d{5}e-01\n+7\\.5757575757575\\d{5}e-02 2\\.6189547895593\\d{5}e-01\n+7\\.6767676767676\\d{5}e-02 2\\.7770954997525\\d{5}e-01\n+7\\.7777777777777\\d{5}e-02 2\\.9341204441673\\d{5}e-01\n+7\\.8787878787878\\d{5}e-02 3\\.0893973387735\\d{5}e-01\n+7\\.9797979797979\\d{5}e-02 3\\.2423009383206\\d{5}e-01\n+8\\.0808080808080\\d{5}e-02 3\\.3922155539796\\d{5}e-01\n+8\\.1818181818181\\d{5}e-02 3\\.5385375325047\\d{5}e-01\n+8\\.2828282828282\\d{5}e-02 3\\.6806776869317\\d{5}e-01\n+8\\.3838383838383\\d{5}e-02 3\\.8180636690262\\d{5}e-01\n+8\\.4848484848484\\d{5}e-02 3\\.9501422739279\\d{5}e-01\n+8\\.5858585858585\\d{5}e-02 4\\.0763816677113\\d{5}e-01\n+8\\.6868686868686\\d{5}e-02 4\\.1962735288928\\d{5}e-01\n+8\\.7878787878787\\d{5}e-02 4\\.3093350952626\\d{5}e-01\n+8\\.8888888888888\\d{5}e-02 4\\.4151111077974\\d{5}e-01\n+8\\.9898989898989\\d{5}e-02 4\\.5131756438276\\d{5}e-01\n+9\\.0909090909090\\d{5}e-02 4\\.6031338320779\\d{5}e-01\n+9\\.1919191919191\\d{5}e-02 4\\.6846234426744\\d{5}e-01\n+9\\.2929292929292\\d{5}e-02 4\\.7573163457165\\d{5}e-01\n+9\\.3939393939393\\d{5}e-02 4\\.8209198325401\\d{5}e-01\n+9\\.4949494949494\\d{5}e-02 4\\.8751777943523\\d{5}e-01\n+9\\.5959595959595\\d{5}e-02 4\\.9198717534908\\d{5}e-01\n+9\\.6969696969696\\d{5}e-02 4\\.9548217431567\\d{5}e-01\n+9\\.7979797979797\\d{5}e-02 4\\.9798870320769\\d{5}e-01\n+9\\.8989898989898\\d{5}e-02 4\\.9949666911797\\d{5}e-01\n+1\\.0000000000000\\d{5}e-01 4\\.9999999999999\\d{5}e-01\n\\ No newline at end of file\n' |
b |
diff -r b30217097125 -r 136ed45d1ea9 test-data/hfine_powder.dat --- a/test-data/hfine_powder.dat Thu Sep 15 10:23:28 2022 +0000 +++ b/test-data/hfine_powder.dat Fri Feb 03 15:39:01 2023 +0000 |
[ |
@@ -1,5 +1,5 @@ -# MUSPINSIM v.1.0.3 -# Output file written on Thu Mar 31 15:53:05 2022 +# MUSPINSIM v.\d+.\d+.\d+ +# Output file written on [A-Za-z]{3} [A-Za-z]{3} [ 1-3][0-9] \d{2}:\d{2}:\d{2} \d{4} # Parameters used: # 0.000000000000000000e+00 4.999999999999978906e-01 |