comparison pm_muairss_write.xml @ 2:8e5dbded3070 draft default tip

planemo upload for repository https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/main/pm_muairss_write commit 4f06b404d8b7fb83995f3052faa7e2ec7811f507
author muon-spectroscopy-computational-project
date Fri, 03 Feb 2023 15:39:39 +0000
parents 150301c057b0
children
comparison
equal deleted inserted replaced
1:150301c057b0 2:8e5dbded3070
1 <tool id="pm_muairss_write" name="PyMuonSuite AIRSS Generate" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.01"> 1 <tool id="pm_muairss_write" name="PyMuonSuite AIRSS Generate" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.05" license="MIT">
2 <description>generate muonated structures</description> 2 <description>generate muonated structures</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="Eli" familyName="Chadwick" url="https://github.com/elichad" identifier="https://orcid.org/0000-0002-0035-6475"/> 24 <person givenName="Eli" familyName="Chadwick" url="https://github.com/elichad" identifier="https://orcid.org/0000-0002-0035-6475"/>
31 </requirements> 31 </requirements>
32 <required_files> 32 <required_files>
33 <include type="literal" path="get_out_folder.py"/> 33 <include type="literal" path="get_out_folder.py"/>
34 </required_files> 34 </required_files>
35 <command detect_errors="exit_code"><![CDATA[ 35 <command detect_errors="exit_code"><![CDATA[
36 structure_name_internal="input_structure.$structure.ext" && 36 structure_name_internal='input_structure.$structure.ext' &&
37 ln -s $structure \$structure_name_internal && 37 ln -s '$structure' \$structure_name_internal &&
38 ln -s $params params.yaml && 38 ln -s '$params' params.yaml &&
39 #if str($iscastep.iscastep_sel)=="true": 39 echo '$castep_param' &&
40 castep_param_name=\$(sed 's/ //g' <<< "$castep_param.name") && 40 #if $castep_param:
41 ln -s $castep_param \$castep_param_name && 41 castep_param_name=\$(sed 's/ //g' <<< '$castep_param.name') &&
42 sed -i '/^castep_param: /{h;s/:.*/: $castep_param.name/};\${x;/^$/{s//castep_param: $castep_param.name/;H};x}' params.yaml && 42 ln -s '$castep_param' \$castep_param_name &&
43 sed -i '/^castep_param: /{h;s/:.*/: '"\$castep_param_name"'/};\${x;/^$/{s//castep_param: '"\$castep_param_name"'/;H};x}' params.yaml &&
44 #if $script_file:
45 script_file_name=\$(sed 's/ //g' <<< '$script_file.name') &&
46 ln -s '$script_file' \$script_file_name &&
47 sed -i '/^script_file: /{h;s/:.*/: '"\$script_file_name"'/};\${x;/^$/{s//script_file: '"\$script_file_name"'/;H};x}' params.yaml &&
48 #end if
49 #end if
50 #if $allpos_ext!="none":
51 sed -i '/^allpos_filename: /{h;s/:.*/: allpos.$allpos_ext/};\${x;/^$/{s//allpos_filename: allpos.$allpos_ext/;H};x}' params.yaml &&
43 #end if 52 #end if
44 pm-muairss -t w \$structure_name_internal params.yaml && 53 pm-muairss -t w \$structure_name_internal params.yaml &&
45 out_folder="`python ${__tool_directory__}/get_out_folder.py`" && 54 out_folder="`python '${__tool_directory__}/get_out_folder.py'`" &&
46 #if str($iscastep.iscastep_sel)=="true": 55 #if $castep_param:
47 zip -r out_zip.zip \$out_folder params.yaml \$structure_name_internal \$castep_param_name && 56 zip -r out_zip.zip \$out_folder params.yaml \$structure_name_internal \$castep_param_name &&
48 #else if str($iscastep.iscastep_sel)=="false": 57 #else:
49 zip -r out_zip.zip \$out_folder params.yaml \$structure_name_internal && 58 zip -r out_zip.zip \$out_folder params.yaml \$structure_name_internal &&
50 #end if 59 #end if
51 #if $testing=="true" and str($iscastep.iscastep_sel)=="true": 60 #if $allpos_ext!="none":
61 mv allpos.$allpos_ext allpos &&
62 #end if
63 #if $testing=="true" and $castep_param:
52 grep "castep_param" params.yaml > tree.txt && 64 grep "castep_param" params.yaml > tree.txt &&
53 #end if 65 #end if
54 find \$out_folder >> tree.txt 66 find \$out_folder >> tree.txt
55 67
56 ]]></command> 68 ]]></command>
57 <inputs> 69 <inputs>
58 <param type="data" name="structure" label="Structure file" format="cell, cif, xyz, extxyz" help="The structure to add muons to. The original file will be preserved. Accepted file types: CELL, CIF, XYZ (standard or extended)."/> 70 <param type="data" name="structure" label="Structure file" format="cell, cif, xyz, extxyz" help="The structure to add muons to. The original file will be preserved. Accepted file types: CELL, CIF, XYZ (standard or extended)."/>
59 <param type="data" name="params" label="YAML parameter file" format="yaml" help="YAML parameters for this and subsequent tools. You can create this file using the [YAML config generator] tool."/> 71 <param type="data" name="params" label="YAML parameter file" format="yaml" help="YAML parameters for this and subsequent tools. You can create this file using the [YAML config generator] tool."/>
60 <conditional name="iscastep"> 72 <param type="data" name="castep_param" optional="true" label="CASTEP parameter file" format="param" help="CASTEP parameters (.param file) for the optimisation stage. These parameters will be copied for each muonated structure. Only required when the 'calculator' parameter is set to 'castep' in your chosen YAML file."/>
61 <param type="boolean" value="false" name="iscastep_sel" label="Does your configuration use the CASTEP calculator?" help="Select 'Yes' if the 'calculator' parameter is set to 'castep' in your chosen YAML file (not case sensitive)."> 73 <param type="data" name="script_file" label="Submission script template (optional)" format="txt" help="Template script for submitting to an HPC job scheduler. Occurences of {seedname} will be replaced with the unique input directory for each job." optional="true"/>
62 <option value="false">no</option> 74 <param type="select" name="allpos_ext" value="none" label="Format for file containing all muon positions (optional)" help="If set, generates an extra output file containing all the muon positions using the specified file type.">
63 <option value="true">yes</option> 75 <option value="none">Do not generate</option>
64 </param> 76 <option value="cell">CELL</option>
65 <when value="true"> 77 <option value="cif">CIF</option>
66 <param type="data" name="castep_param" label="CASTEP parameter file" format="txt,yaml" help="CASTEP parameters (.param file) for the optimisation stage. These parameters will be copied for each muonated structure."/> 78 <option value="xyz">XYZ</option>
67 </when> 79 </param>
68 <when value="false"/>
69 </conditional>
70 <param type="hidden" name="testing" label="Test mode" value="false"/> 80 <param type="hidden" name="testing" label="Test mode" value="false"/>
71 </inputs> 81 </inputs>
72 <outputs> 82 <outputs>
73 <data label="Muonated $structure.name using $params.name" name="muonated_structures" format="zip" from_work_dir="out_zip.zip"/> 83 <data label="Muonated $structure.name using $params.name" name="muonated_structures" format="zip" from_work_dir="out_zip.zip"/>
84 <data label="File containing the positions of all muon sites" name="allpos_file" from_work_dir="allpos" auto_format="true">
85 <filter>(allpos_ext != "none")</filter>
86 </data>
74 <data label="File tree (testing only)" name="file_tree" format="txt" from_work_dir="tree.txt" hidden="true"> 87 <data label="File tree (testing only)" name="file_tree" format="txt" from_work_dir="tree.txt" hidden="true">
75 <filter>(testing == "true")</filter> 88 <filter>(testing == "true")</filter>
76 </data> 89 </data>
77 </outputs> 90 </outputs>
78 <tests> 91 <tests>
79 <!-- CASTEP with out_folder and castep_param specified, param as txt --> 92 <!-- CASTEP with out_folder and castep_param specified, param as txt -->
80 <test expect_num_outputs="2"> 93 <test expect_num_outputs="2">
81 <param name="structure" value="Si.cell" ftype="cell"/> 94 <param name="structure" value="Si.cell" ftype="cell"/>
82 <param name="testing" value="true"/> 95 <param name="testing" value="true"/>
83 <param name="params" value="configcastep_t_with_out_folder_and_castep_param.yaml" ftype="yaml"/> 96 <param name="params" value="configcastep_t_with_out_folder_and_castep_param.yaml" ftype="yaml"/>
84 <conditional name="iscastep"> 97 <param name="castep_param" value="Si.param" ftype="param"/>
85 <param name="iscastep_sel" value="true"/>
86 <param name="castep_param" value="Si.param" ftype="txt"/>
87 </conditional>
88 <output name="file_tree" file="tree_castep_t_with_out_folder_and_castep_param.txt" ftype="txt" sort="true" /> 98 <output name="file_tree" file="tree_castep_t_with_out_folder_and_castep_param.txt" ftype="txt" sort="true" />
89 </test> 99 </test>
90 <!-- CASTEP with out_folder and castep_param specified, param as yaml --> 100 <!-- CASTEP with out_folder and castep_param specified, param as yaml -->
91 <test expect_num_outputs="2"> 101 <test expect_num_outputs="2">
92 <param name="structure" value="Si.cell" ftype="cell"/> 102 <param name="structure" value="Si.cell" ftype="cell"/>
93 <param name="testing" value="true"/> 103 <param name="testing" value="true"/>
94 <param name="params" value="configcastep_t_with_out_folder_and_castep_param.yaml" ftype="yaml"/> 104 <param name="params" value="configcastep_t_with_out_folder_and_castep_param.yaml" ftype="yaml"/>
95 <conditional name="iscastep"> 105 <param name="castep_param" value="Si.param" ftype="param"/>
96 <param name="iscastep_sel" value="true"/> 106 <output name="file_tree" file="tree_castep_t_with_out_folder_and_castep_param.txt" ftype="txt" sort="true" />
97 <param name="castep_param" value="Si.param" ftype="yaml"/> 107 </test>
98 </conditional> 108 <!-- CASTEP with spaces in param name -->
109 <test expect_num_outputs="2">
110 <param name="structure" value="Si.cell" ftype="cell"/>
111 <param name="testing" value="true"/>
112 <param name="params" value="configcastep_t_with_out_folder_and_castep_param.yaml" ftype="yaml"/>
113 <param name="castep_param" value="S i.param" ftype="param"/>
99 <output name="file_tree" file="tree_castep_t_with_out_folder_and_castep_param.txt" ftype="txt" sort="true" /> 114 <output name="file_tree" file="tree_castep_t_with_out_folder_and_castep_param.txt" ftype="txt" sort="true" />
100 </test> 115 </test>
101 <!-- CASTEP with no out_folder and no castep_param specified in yaml file --> 116 <!-- CASTEP with no out_folder and no castep_param specified in yaml file -->
102 <test expect_num_outputs="2"> 117 <test expect_num_outputs="2">
103 <param name="structure" value="Si.cell" ftype="cell"/> 118 <param name="structure" value="Si.cell" ftype="cell"/>
104 <param name="testing" value="true"/> 119 <param name="testing" value="true"/>
105 <param name="params" value="configcastep_t_no_out_folder_no_castep_param.yaml" ftype="yaml"/> 120 <param name="params" value="configcastep_t_no_out_folder_no_castep_param.yaml" ftype="yaml"/>
106 <conditional name="iscastep"> 121 <param name="castep_param" value="Si.param" ftype="param"/>
107 <param name="iscastep_sel" value="true"/>
108 <param name="castep_param" value="Si.param"/>
109 </conditional>
110 <output name="file_tree" file="tree_castep_t_no_outfolder_and_castep_param.txt" ftype="txt" sort="true" /> 122 <output name="file_tree" file="tree_castep_t_no_outfolder_and_castep_param.txt" ftype="txt" sort="true" />
123 </test>
124 <!-- CASTEP with allpos_ext xyz -->
125 <test expect_num_outputs="3">
126 <param name="structure" value="Si.cell" ftype="cell"/>
127 <param name="testing" value="true"/>
128 <param name="params" value="configcastep_t_with_out_folder_and_castep_param.yaml" ftype="yaml"/>
129 <param name="allpos_ext" value="xyz"/>
130 <param name="castep_param" value="Si.param" ftype="param"/>
131 <output name="file_tree" file="tree_castep_t_with_out_folder_and_castep_param.txt" ftype="txt" sort="true" />
132 <output name="allpos_file" file="allpos.xyz" />
133 </test>
134 <!-- CASTEP with allpos_ext cell -->
135 <test expect_num_outputs="3">
136 <param name="structure" value="Si.cell" ftype="cell"/>
137 <param name="testing" value="true"/>
138 <param name="params" value="configcastep_t_with_out_folder_and_castep_param.yaml" ftype="yaml"/>
139 <param name="allpos_ext" value="cell"/>
140 <param name="castep_param" value="Si.param" ftype="param"/>
141 <output name="file_tree" file="tree_castep_t_with_out_folder_and_castep_param.txt" ftype="txt" sort="true" />
142 <output name="allpos_file" file="allpos.cell" />
143 </test>
144 <!-- CASTEP with allpos_ext cif -->
145 <test expect_num_outputs="3">
146 <param name="structure" value="Si.cell" ftype="cell"/>
147 <param name="testing" value="true"/>
148 <param name="params" value="configcastep_t_with_out_folder_and_castep_param.yaml" ftype="yaml"/>
149 <param name="allpos_ext" value="cif"/>
150 <param name="castep_param" value="Si.param" ftype="param"/>
151 <output name="file_tree" file="tree_castep_t_with_out_folder_and_castep_param.txt" ftype="txt" sort="true" />
152 <output name="allpos_file" file="allpos.cif" />
153 </test>
154 <!-- CASTEP with script_file not specified in YAML file -->
155 <test expect_num_outputs="2">
156 <param name="structure" value="Si.cell" ftype="cell"/>
157 <param name="testing" value="true"/>
158 <param name="params" value="configcastep_t_with_out_folder_and_castep_param.yaml" ftype="yaml"/>
159 <param name="castep_param" value="Si.param" ftype="param"/>
160 <param name="script_file" value="submit.sh" ftype="txt"/>
161 <output name="file_tree" file="tree_castep_t_with_script_file.txt" ftype="txt" sort="true" />
162 </test>
163 <!-- CASTEP with script_file specified in YAML file -->
164 <test expect_num_outputs="2">
165 <param name="structure" value="Si.cell" ftype="cell"/>
166 <param name="testing" value="true"/>
167 <param name="params" value="configcastep_t_with_script_file.yaml" ftype="yaml"/>
168 <param name="castep_param" value="Si.param" ftype="param"/>
169 <param name="script_file" value="s u b m i t.sh" ftype="txt"/>
170 <output name="file_tree" file="tree_castep_t_with_script_file.txt" ftype="txt" sort="true" />
111 </test> 171 </test>
112 <!-- DFTB+ --> 172 <!-- DFTB+ -->
113 <test expect_num_outputs="2"> 173 <test expect_num_outputs="2">
114 <param name="structure" value="Si.cell" ftype="cell"/> 174 <param name="structure" value="Si.cell" ftype="cell"/>
115 <param name="testing" value="true"/> 175 <param name="testing" value="true"/>
175 Command-line usage: pm-muairss -t w structure_file parameter_file 235 Command-line usage: pm-muairss -t w structure_file parameter_file
176 236
177 .. _pm-muairss documentation: https://github.com/muon-spectroscopy-computational-project/pymuon-suite/blob/master/docs/muairss-gen-docs.md 237 .. _pm-muairss documentation: https://github.com/muon-spectroscopy-computational-project/pymuon-suite/blob/master/docs/muairss-gen-docs.md
178 .. _YAML config generator: /tool_runner?tool_id=pm_yaml_config 238 .. _YAML config generator: /tool_runner?tool_id=pm_yaml_config
179 .. _Generate UEP outputs: /tool_runner?tool_id=pm_uep_opt_write 239 .. _Generate UEP outputs: /tool_runner?tool_id=pm_uep_opt_write
240
241 PyMuonSuite is distributed under the GPLv3 license. This tool wrapper is distributed under the MIT license.
180 ]]></help> 242 ]]></help>
181 <citations> 243 <citations>
182 <citation type="bibtex"> 244 <citation type="bibtex">
183 @misc{github, 245 @misc{github,
184 author = {{Muon Spectroscopy Computational Project}}, 246 author = {{Muon Spectroscopy Computational Project}},
186 title = {pymuon-suite 0.2.0}, 248 title = {pymuon-suite 0.2.0},
187 publisher = {GitHub}, 249 publisher = {GitHub},
188 url = {https://github.com/muon-spectroscopy-computational-project/pymuon-suite/} 250 url = {https://github.com/muon-spectroscopy-computational-project/pymuon-suite/}
189 } 251 }
190 </citation> 252 </citation>
191 <citation type="bibtex"> 253 <citation type="doi">10.1063/1.5024450</citation>
192 @article{airss, 254 <citation type="doi">10.1063/1.5085197</citation>
193 author = {Liborio, L. and Sturniolo, S. and Jochym, D.}, 255 <citation type="doi">10.1063/5.0012381</citation>
194 title = {Computational prediction of muon stopping sites using ab initio random structure searching (AIRSS)},
195 journal = {The Journal of Chemical Physics},
196 volume = {148},
197 pages = {134114},
198 year = {2018},
199 doi={10.1063/1.5024450},
200 URL={
201 https://doi.org/10.1063/1.5024450
202 },
203 eprint={
204 https://doi.org/10.1063/1.5024450
205 }
206 }
207 </citation>
208 <citation type="bibtex">
209 @article{doi:10.1063/1.5085197,
210 author = {Sturniolo,Simone and Liborio,Leandro and Jackson,Samuel },
211 title = {Comparison between density functional theory and density functional tight binding approaches for finding the muon stopping site in organic molecular crystals},
212 journal = {The Journal of Chemical Physics},
213 volume = {150},
214 number = {15},
215 pages = {154301},
216 year = {2019},
217 doi = {10.1063/1.5085197},
218 URL = {
219 https://doi.org/10.1063/1.5085197
220 },
221 eprint = {
222 https://doi.org/10.1063/1.5085197
223 }
224 }
225 </citation>
226 <citation type="bibtex">
227 @article{doi:10.1063/5.0012381,
228 author = {Sturniolo,Simone and Liborio,Leandro },
229 title = {Computational prediction of muon stopping sites: A novel take on the unperturbed electrostatic potential method},
230 journal = {The Journal of Chemical Physics},
231 volume = {153},
232 number = {4},
233 pages = {044111},
234 year = {2020},
235 doi = {10.1063/5.0012381},
236 URL = {
237 https://doi.org/10.1063/5.0012381
238 },
239 eprint = {
240 https://doi.org/10.1063/5.0012381
241 },
242 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 optimize 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. }
243 }
244 </citation>
245 <citation type="bibtex"> 256 <citation type="bibtex">
246 @TOOL_CITATION@ 257 @TOOL_CITATION@
247 </citation> 258 </citation>
248 </citations> 259 </citations>
249 </tool> 260 </tool>