Mercurial > repos > muon-spectroscopy-computational-project > pm_uep_opt
comparison pm_uep_opt.xml @ 3:523d44fcd03f draft
planemo upload for repository https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/main/pm_uep_opt commit 4f06b404d8b7fb83995f3052faa7e2ec7811f507
author | muon-spectroscopy-computational-project |
---|---|
date | Fri, 03 Feb 2023 15:40:08 +0000 |
parents | 8f41a71fc710 |
children | ec5f6b22417c |
comparison
equal
deleted
inserted
replaced
2:8f41a71fc710 | 3:523d44fcd03f |
---|---|
1 <tool id="pm_uep_opt" name="PyMuonSuite AIRSS UEP Optimise" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.01"> | 1 <tool id="pm_uep_opt" name="PyMuonSuite AIRSS UEP Optimise" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.05" license="MIT"> |
2 <description>run UEP optimisation</description> | 2 <description>run UEP optimisation</description> |
3 <macros> | 3 <macros> |
4 <!-- version of underlying tool (PEP 440) --> | 4 <!-- version of underlying tool (PEP 440) --> |
5 <token name="@TOOL_VERSION@">0.2.1</token> | 5 <token name="@TOOL_VERSION@">0.2.3</token> |
6 <!-- version of this tool wrapper (integer) --> | 6 <!-- version of this tool wrapper (integer) --> |
7 <token name="@WRAPPER_VERSION@">1</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{pymuon-suite, | 11 @software{Sturniolo_pymuon-suite_2022, |
12 author = {Sturniolo, Simone and Liborio, Leandro and Chadwick, Eli and Murgatroyd, Laura and Laverack, Adam and {Muon Spectroscopy Computational Project}}, | 12 author = {Sturniolo, Simone and Liborio, Leandro and Chadwick, Eli and Murgatroyd, Laura and Laverack, Adam and Mudaraddi, Anish and {Muon Spectroscopy Computational Project}}, |
13 license = {GPL-3.0}, | 13 license = {GPL-3.0}, |
14 month = {8}, | |
14 title = {{pymuon-suite}}, | 15 title = {{pymuon-suite}}, |
15 url = {https://github.com/muon-spectroscopy-computational-project/pymuon-suite}, | 16 url = {https://github.com/muon-spectroscopy-computational-project/pymuon-suite}, |
16 version = {v0.2.1}, | 17 version = {v0.2.3}, |
17 month = {2}, | 18 doi = {10.5281/zenodo.7025644}, |
18 year = {2022}, | 19 year = {2022} |
19 doi = {} | |
20 } | 20 } |
21 </token> | 21 </token> |
22 </macros> | 22 </macros> |
23 <creator> | 23 <creator> |
24 <person givenName="Jyothish" familyName="Thomas" identifier="https://orcid.org/0000-0003-4724-6924"/> | 24 <person givenName="Jyothish" familyName="Thomas" identifier="https://orcid.org/0000-0003-4724-6924"/> |
32 <required_files> | 32 <required_files> |
33 <include type="literal" path="run.sh"/> | 33 <include type="literal" path="run.sh"/> |
34 <include type="literal" path="get_out_folder.py"/> | 34 <include type="literal" path="get_out_folder.py"/> |
35 </required_files> | 35 </required_files> |
36 <command detect_errors="exit_code"><![CDATA[ | 36 <command detect_errors="exit_code"><![CDATA[ |
37 unzip "$muonated_structures" && | 37 unzip '$muonated_structures' && |
38 if test -f "params.yaml"; then echo "params.yaml present"; else echo "params.yaml missing" && exit 64; fi && | 38 if test -f "params.yaml"; then echo "params.yaml present"; else echo "params.yaml missing" && exit 64; fi && |
39 if ( test -f input_structure.* ) ; then echo "input structure present"; else echo "input structure missing" && exit 64; fi && | 39 if ( test -f input_structure.* ) ; then echo "input structure present"; else echo "input structure missing" && exit 64; fi && |
40 charge_density_name=\$(sed 's/ //g' <<< "$charge_density.name") && | 40 ## PyMuonSuite will attempt to load '<chden_seed>.den_fmt' and |
41 ln -s $charge_density \$charge_density_name && | 41 ## '<chden_seed>.castep', but $charge_density.name may or may not end |
42 x="\$charge_density_name" && | 42 ## with '.den_fmt' so strip any extension and manually include 'den_fmt' |
43 echo "calculated seed name \$x" && | 43 ## and '.castep' in the linked file names |
44 ln -s $castep_log "\${x%%.*}.castep" && | 44 charge_density_name=\$(sed 's/ //g' <<< '$charge_density.name') && |
45 out_folder="`python ${__tool_directory__}/get_out_folder.py`" && | 45 charge_density_seed=\${charge_density_name%%.*} && |
46 echo "Calculated seed name \$charge_density_seed" && | |
47 ln -s '$charge_density' \$charge_density_seed.den_fmt && | |
48 ln -s '$castep_log' \$charge_density_seed.castep && | |
49 out_folder="`python '${__tool_directory__}/get_out_folder.py'`" && | |
46 find \$out_folder -type f -name "*.yaml" | xargs sed -i "s#^chden_path: .*#chden_path: .\/#g" && | 50 find \$out_folder -type f -name "*.yaml" | xargs sed -i "s#^chden_path: .*#chden_path: .\/#g" && |
47 find \$out_folder -type f -name "*.yaml" | xargs sed -i "s#^chden_seed: .*#chden_seed: \${x%%.*}#g" && | 51 find \$out_folder -type f -name "*.yaml" | xargs sed -i "s#^chden_seed: .*#chden_seed: \$charge_density_seed#g" && |
48 bash ${__tool_directory__}/run.sh \$out_folder && | 52 bash '${__tool_directory__}/run.sh' \$out_folder && |
49 zip -r out_zip.zip \$out_folder params.yaml input_structure.* && | 53 zip -r out_zip.zip \$out_folder params.yaml input_structure.* && |
50 find \$out_folder > tree.txt | 54 find \$out_folder > tree.txt |
51 ]]></command> | 55 ]]></command> |
52 <inputs> | 56 <inputs> |
53 <param type="data" name="muonated_structures" label="Muonated structures (.zip)" format="zip" help="A zip folder containing muonated structures, as generated by the 'Generate muonated structures' tool or pm-muairss."/> | 57 <param type="data" name="muonated_structures" label="Muonated structures (.zip)" format="zip" help="A zip folder containing muonated structures, as generated by the 'Generate muonated structures' tool or pm-muairss."/> |
54 <param type="data" name="charge_density" label="Charge density file (.den_fmt)" format="txt" help="The charge density file created by CASTEP during your initial DFT simulation for the structure."/> | 58 <param type="data" name="charge_density" label="Charge density file (.den_fmt)" format="den_fmt" help="The charge density file created by CASTEP during your initial DFT simulation for the structure."/> |
55 <param type="data" name="castep_log" label="CASTEP log (.castep)" format="txt" help="The CASTEP log for your initial DFT simulation for the structure."/> | 59 <param type="data" name="castep_log" label="CASTEP log (.castep)" format="castep" help="The CASTEP log for your initial DFT simulation for the structure."/> |
56 <param type="hidden" name="testing" label="Test mode" value="false"/> | 60 <param type="hidden" name="testing" label="Test mode" value="false"/> |
57 </inputs> | 61 </inputs> |
58 <outputs> | 62 <outputs> |
59 <data label="UEP results for $muonated_structures.name" name="uep_results" format="zip" from_work_dir="out_zip.zip"/> | 63 <data label="UEP results for $muonated_structures.name" name="uep_results" format="zip" from_work_dir="out_zip.zip"/> |
60 <data label="File tree (testing only)" name="file_tree" format="txt" from_work_dir="tree.txt" hidden="true"> | 64 <data label="File tree (testing only)" name="file_tree" format="txt" from_work_dir="tree.txt" hidden="true"> |
63 </outputs> | 67 </outputs> |
64 <tests> | 68 <tests> |
65 <test expect_num_outputs="2"> | 69 <test expect_num_outputs="2"> |
66 <param name="testing" value="true"/> | 70 <param name="testing" value="true"/> |
67 <param name="muonated_structures" value="muonated.zip" ftype="zip"/> | 71 <param name="muonated_structures" value="muonated.zip" ftype="zip"/> |
68 <param name="charge_density" value="Si.den_fmt" ftype="txt"/> | 72 <param name="charge_density" value="Si.den_fmt" ftype="den_fmt"/> |
69 <param name="castep_log" value="Si.castep" ftype="txt"/> | 73 <param name="castep_log" value="Si.castep" ftype="castep"/> |
70 <output name="file_tree" file="tree.txt" ftype="txt" sort="true"> | 74 <output name="file_tree" file="tree.txt" ftype="txt" sort="true"> |
71 <assert_contents> | 75 <assert_contents> |
72 <has_size value="1780"/> | 76 <has_size value="1780"/> |
73 </assert_contents> | 77 </assert_contents> |
74 </output> | 78 </output> |
75 </test> | 79 </test> |
76 <test expect_num_outputs="2"> | 80 <test expect_num_outputs="2"> |
77 <param name="testing" value="true"/> | 81 <param name="testing" value="true"/> |
78 <param name="muonated_structures" value="muonated-default-folder.zip" ftype="zip"/> | 82 <param name="muonated_structures" value="muonated-default-folder.zip" ftype="zip"/> |
79 <param name="charge_density" value="Si.den_fmt" ftype="txt"/> | 83 <param name="charge_density" value="Si.den_fmt" ftype="den_fmt"/> |
80 <param name="castep_log" value="Si.castep" ftype="txt"/> | 84 <param name="castep_log" value="Si.castep" ftype="castep"/> |
81 <output name="file_tree" file="tree-default-folder.txt" sort="true"/> | 85 <output name="file_tree" file="tree-default-folder.txt" sort="true"/> |
82 </test> | 86 </test> |
83 <test expect_failure="true"> | 87 <test expect_failure="true"> |
84 <param name="testing" value="true"/> | 88 <param name="testing" value="true"/> |
85 <param name="muonated_structures" value="muonated-default-folder.zip" ftype="zip"/> | 89 <param name="muonated_structures" value="muonated-default-folder.zip" ftype="zip"/> |
86 <param name="castep_log" value="Si.castep" ftype="txt"/> | 90 <param name="castep_log" value="Si.castep" ftype="castep"/> |
87 <param name="charge_density" value="Sifail.den_fmt" ftype="txt"/> | 91 <param name="charge_density" value="Sifail.den_fmt" ftype="den_fmt"/> |
88 <assert_stderr> | 92 <assert_stderr> |
89 <has_text text="Error: FMT file has no header"/> | 93 <has_text text="Error: FMT file has no header"/> |
90 </assert_stderr> | 94 </assert_stderr> |
91 </test> | 95 </test> |
92 <!-- check that file_tree filter works --> | 96 <!-- check that file_tree filter works --> |
93 <test expect_num_outputs="1"> | 97 <test expect_num_outputs="1"> |
94 <param name="testing" value="false"/> | 98 <param name="testing" value="false"/> |
95 <param name="muonated_structures" value="muonated.zip" ftype="zip"/> | 99 <param name="muonated_structures" value="muonated.zip" ftype="zip"/> |
96 <param name="charge_density" value="Si.den_fmt" ftype="txt"/> | 100 <param name="charge_density" value="Si.den_fmt" ftype="den_fmt"/> |
97 <param name="castep_log" value="Si.castep" ftype="txt"/> | 101 <param name="castep_log" value="Si.castep" ftype="castep"/> |
102 </test> | |
103 <!-- Check that the chden parameters are set correctly when $charge_density.name does not have the .den_fmt extension --> | |
104 <test expect_num_outputs="2"> | |
105 <param name="testing" value="true"/> | |
106 <param name="muonated_structures" value="muonated.zip" ftype="zip"/> | |
107 <param name="charge_density" value="Si_den_fmt" ftype="den_fmt"/> | |
108 <param name="castep_log" value="Si.castep" ftype="castep"/> | |
109 <output name="file_tree" file="tree.txt" ftype="txt" sort="true"> | |
110 <assert_contents> | |
111 <has_size value="1780"/> | |
112 </assert_contents> | |
113 </output> | |
98 </test> | 114 </test> |
99 </tests> | 115 </tests> |
100 <help><![CDATA[ | 116 <help><![CDATA[ |
101 Given a set of input muonated structures (structures containing a muon), applies UEP optimisation to refine them. | 117 Given a set of input muonated structures (structures containing a muon), applies UEP optimisation to refine them. |
102 | 118 |
104 The structure you used as input to the '`Generate muonated structures`_' tool or pm-muairss beforehand should come from the same simulation run. | 120 The structure you used as input to the '`Generate muonated structures`_' tool or pm-muairss beforehand should come from the same simulation run. |
105 | 121 |
106 Command-line usage: pm-uep-opt [-h] [-t {r,w}] structures parameter_file | 122 Command-line usage: pm-uep-opt [-h] [-t {r,w}] structures parameter_file |
107 | 123 |
108 .. _Generate muonated structures: /tool_runner?tool_id=pm_muairss_write | 124 .. _Generate muonated structures: /tool_runner?tool_id=pm_muairss_write |
125 | |
126 PyMuonSuite is distributed under the GPLv3 license. This tool wrapper is distributed under the MIT license. | |
109 ]]></help> | 127 ]]></help> |
110 <citations> | 128 <citations> |
111 <citation type="bibtex"> | 129 <citation type="bibtex"> |
112 @TOOL_CITATION@ | 130 @TOOL_CITATION@ |
113 </citation> | 131 </citation> |
114 <citation type="bibtex"> | 132 <citation type="doi">10.1063/1.5024450</citation> |
115 @article{airss, | 133 <citation type="doi">10.1063/1.5085197</citation> |
116 author = {Liborio, L. and Sturniolo, S. and Jochym, D.}, | 134 <citation type="doi">10.1063/5.0012381</citation> |
117 title = {Computational prediction of muon stopping sites using ab initio random structure searching (AIRSS)}, | |
118 journal = {The Journal of Chemical Physics}, | |
119 volume = {148}, | |
120 pages = {134114}, | |
121 year = {2018}, | |
122 doi={10.1063/1.5024450}, | |
123 URL={ | |
124 https://doi.org/10.1063/1.5024450 | |
125 }, | |
126 eprint={ | |
127 https://doi.org/10.1063/1.5024450 | |
128 } | |
129 } | |
130 </citation> | |
131 <citation type="bibtex"> | |
132 @article{doi:10.1063/1.5085197, | |
133 author = {Sturniolo,Simone and Liborio,Leandro and Jackson,Samuel }, | |
134 title = {Comparison between density functional theory and density functional tight binding approaches for finding the muon stopping site in organic molecular crystals}, | |
135 journal = {The Journal of Chemical Physics}, | |
136 volume = {150}, | |
137 number = {15}, | |
138 pages = {154301}, | |
139 year = {2019}, | |
140 doi = {10.1063/1.5085197}, | |
141 URL = { | |
142 https://doi.org/10.1063/1.5085197 | |
143 }, | |
144 eprint = { | |
145 https://doi.org/10.1063/1.5085197 | |
146 } | |
147 } | |
148 </citation> | |
149 <citation type="bibtex"> | |
150 @article{doi:10.1063/5.0012381, | |
151 author = {Sturniolo,Simone and Liborio,Leandro }, | |
152 title = {Computational prediction of muon stopping sites: A novel take on the unperturbed electrostatic potential method}, | |
153 journal = {The Journal of Chemical Physics}, | |
154 volume = {153}, | |
155 number = {4}, | |
156 pages = {044111}, | |
157 year = {2020}, | |
158 doi = {10.1063/5.0012381}, | |
159 URL = { | |
160 https://doi.org/10.1063/5.0012381 | |
161 }, | |
162 eprint = { | |
163 https://doi.org/10.1063/5.0012381 | |
164 }, | |
165 abstract = { Finding the stopping site of the muon in a muon-spin relaxation experiment is one of the main problems of muon spectroscopy, and computational techniques that make use of quantum chemistry simulations can be of great help when looking for this stopping site. The most thorough approach would require the use of simulations, such as Density Functional Theory (DFT), to test and optimise multiple possible sites, accounting for the effect that the added muon has on its surroundings. However, this can be computationally expensive and sometimes unnecessary. Hence, in this work, we present a software implementation of the Unperturbed Electrostatic Potential (UEP) Method: an approach used for finding the muon stopping site in crystalline materials. The UEP method requires only one DFT calculation, necessary to compute the electronic density. This, in turn, is used to calculate the minima of the crystalline material’s electrostatic potential and the estimates of the muon stopping site, relying on the approximation that the muon’s presence does not significantly affect its surroundings. One of the main UEP’s assumptions is that the muon stopping site will be one of the crystalline material’s electrostatic potential minima. In this regard, we also propose some symmetry-based considerations about the properties of this crystalline material’s electrostatic potential, in particular, which sites are more likely to be its minima and why the unperturbed approximation may be sufficiently robust for them. We introduce the Python software package pymuon-suite and the various utilities it provides to facilitate these calculations, and finally, we demonstrate the effectiveness of the method with some chosen example systems. } | |
166 } | |
167 </citation> | |
168 <citation type="bibtex"> | 135 <citation type="bibtex"> |
169 @article {castep, | 136 @article {castep, |
170 author = {Clark, S. J. and Segall, M. D. and Pickard, C. J. and Hasnip, P. J. and Probert, M. I. J. and Refson, K. and Payne, M. C.}, | 137 author = {Clark, S. J. and Segall, M. D. and Pickard, C. J. and Hasnip, P. J. and Probert, M. I. J. and Refson, K. and Payne, M. C.}, |
171 title = {First principles methods using CASTEP}, | 138 title = {First principles methods using CASTEP}, |
172 journal = {Zeitschrift fuer Kristallographie}, | 139 journal = {Zeitschrift fuer Kristallographie}, |