comparison pm_muairss_write.xml @ 0:0679aeb7cefc draft

planemo upload for repository https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/main/pm_muairss_write commit d130cf2c46d933fa9d0214ddbd5ddf860f322dc4
author muon-spectroscopy-computational-project
date Thu, 25 Aug 2022 16:19:08 +0000
parents
children 150301c057b0
comparison
equal deleted inserted replaced
-1:000000000000 0:0679aeb7cefc
1 <tool id="pm_muairss_write" name="PyMuonSuite AIRSS Generate" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.01">
2 <description>generate muonated structures</description>
3 <macros>
4 <!-- version of underlying tool (PEP 440) -->
5 <token name="@TOOL_VERSION@">0.2.1</token>
6 <!-- version of this tool wrapper (integer) -->
7 <token name="@WRAPPER_VERSION@">1</token>
8 <!-- citation should be updated with every underlying tool version -->
9 <!-- typical fields to update are version, month, year, and doi -->
10 <token name="@TOOL_CITATION@">
11 @software{pymuon-suite,
12 author = {Sturniolo, Simone and Liborio, Leandro and Chadwick, Eli and Murgatroyd, Laura and Laverack, Adam and {Muon Spectroscopy Computational Project}},
13 license = {GPL-3.0},
14 title = {{pymuon-suite}},
15 url = {https://github.com/muon-spectroscopy-computational-project/pymuon-suite},
16 version = {v0.2.1},
17 month = {2},
18 year = {2022},
19 doi = {}
20 }
21 </token>
22 </macros>
23 <creator>
24 <person givenName="Eli" familyName="Chadwick" url="https://github.com/elichad" identifier="https://orcid.org/0000-0002-0035-6475"/>
25 <person givenName="Jyothish" familyName="Thomas" identifier="https://orcid.org/0000-0003-4724-6924"/>
26 <organization url="https://muon-spectroscopy-computational-project.github.io/index.html" name="The Muon Spectroscopy Computational Project"/>
27 </creator>
28 <requirements>
29 <requirement type="package" version="@TOOL_VERSION@">pymuonsuite</requirement>
30 <requirement type="package" version="3.0">zip</requirement>
31 </requirements>
32 <command detect_errors="exit_code"><![CDATA[
33 structure_name_internal="input_structure.$structure.ext" &&
34 ln -s $structure \$structure_name_internal &&
35 ln -s $params params.yaml &&
36 #if str($iscastep.iscastep_sel)=="true":
37 castep_param_name=\$(sed 's/ //g' <<< "$castep_param.name") &&
38 ln -s $castep_param \$castep_param_name &&
39 sed -i '/^castep_param: /{h;s/:.*/: $castep_param.name/};\${x;/^$/{s//castep_param: $castep_param.name/;H};x}' params.yaml &&
40 #end if
41 pm-muairss -t w \$structure_name_internal params.yaml &&
42 out_folder="`python ${__tool_directory__}/get_out_folder.py`" &&
43 #if str($iscastep.iscastep_sel)=="true":
44 zip -r out_zip.zip \$out_folder params.yaml \$structure_name_internal \$castep_param_name &&
45 #else if str($iscastep.iscastep_sel)=="false":
46 zip -r out_zip.zip \$out_folder params.yaml \$structure_name_internal &&
47 #end if
48 #if $testing=="true" and str($iscastep.iscastep_sel)=="true":
49 grep "castep_param" params.yaml > tree.txt &&
50 #end if
51 find \$out_folder >> tree.txt
52
53 ]]></command>
54 <inputs>
55 <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)."/>
56 <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."/>
57 <conditional name="iscastep">
58 <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).">
59 <option value="false">no</option>
60 <option value="true">yes</option>
61 </param>
62 <when value="true">
63 <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."/>
64 </when>
65 <when value="false"/>
66 </conditional>
67 <param type="hidden" name="testing" label="Test mode" value="false"/>
68 </inputs>
69 <outputs>
70 <data label="Muonated $structure.name using $params.name" name="muonated_structures" format="zip" from_work_dir="out_zip.zip"/>
71 <data label="File tree (testing only)" name="file_tree" format="txt" from_work_dir="tree.txt" hidden="true">
72 <filter>(testing == "true")</filter>
73 </data>
74 </outputs>
75 <tests>
76 <!-- CASTEP with out_folder and castep_param specified, param as txt -->
77 <test expect_num_outputs="2">
78 <param name="structure" value="Si.cell" ftype="cell"/>
79 <param name="testing" value="true"/>
80 <param name="params" value="configcastep_t_with_out_folder_and_castep_param.yaml" ftype="yaml"/>
81 <conditional name="iscastep">
82 <param name="iscastep_sel" value="true"/>
83 <param name="castep_param" value="Si.param" ftype="txt"/>
84 </conditional>
85 <output name="file_tree" file="tree_castep_t_with_out_folder_and_castep_param.txt" ftype="txt" sort="true" />
86 </test>
87 <!-- CASTEP with out_folder and castep_param specified, param as yaml -->
88 <test expect_num_outputs="2">
89 <param name="structure" value="Si.cell" ftype="cell"/>
90 <param name="testing" value="true"/>
91 <param name="params" value="configcastep_t_with_out_folder_and_castep_param.yaml" ftype="yaml"/>
92 <conditional name="iscastep">
93 <param name="iscastep_sel" value="true"/>
94 <param name="castep_param" value="Si.param" ftype="yaml"/>
95 </conditional>
96 <output name="file_tree" file="tree_castep_t_with_out_folder_and_castep_param.txt" ftype="txt" sort="true" />
97 </test>
98 <!-- CASTEP with no out_folder and no castep_param specified in yaml file -->
99 <test expect_num_outputs="2">
100 <param name="structure" value="Si.cell" ftype="cell"/>
101 <param name="testing" value="true"/>
102 <param name="params" value="configcastep_t_no_out_folder_no_castep_param.yaml" ftype="yaml"/>
103 <conditional name="iscastep">
104 <param name="iscastep_sel" value="true"/>
105 <param name="castep_param" value="Si.param"/>
106 </conditional>
107 <output name="file_tree" file="tree_castep_t_no_outfolder_and_castep_param.txt" ftype="txt" sort="true" />
108 </test>
109 <!-- DFTB+ -->
110 <test expect_num_outputs="2">
111 <param name="structure" value="Si.cell" ftype="cell"/>
112 <param name="testing" value="true"/>
113 <param name="params" value="configdftb_t.yaml" ftype="yaml"/>
114 <output name="file_tree" file="tree_dftb.txt" ftype="txt" sort="true" />
115 </test>
116 <!-- UEP with CELL -->
117 <test expect_num_outputs="2">
118 <param name="structure" value="Si.cell" ftype="cell"/>
119 <param name="testing" value="true"/>
120 <param name="params" value="configuep_t.yaml" ftype="yaml"/>
121 <output name="file_tree" file="tree_uep.txt" ftype="txt" sort="true">
122 <assert_contents>
123 <has_size value="734"/>
124 </assert_contents>
125 </output>
126 </test>
127 <!-- UEP with XYZ -->
128 <test expect_failure="true">
129 <param name="structure" value="Si.xyz" ftype="xyz"/>
130 <param name="testing" value="true"/>
131 <param name="params" value="configuep_t.yaml" ftype="yaml"/>
132 <assert_stderr>
133 <has_text text="TypeError: cannot unpack non-iterable NoneType object"/>
134 </assert_stderr>
135 </test>
136 <!-- UEP with extended XYZ -->
137 <test expect_num_outputs="2">
138 <param name="structure" value="Si.extxyz" ftype="extxyz"/>
139 <param name="testing" value="true"/>
140 <param name="params" value="configuep_t.yaml" ftype="yaml"/>
141 <output name="file_tree" file="tree_uep.txt" ftype="txt" sort="true">
142 <assert_contents>
143 <has_size value="734"/>
144 </assert_contents>
145 </output>
146 </test>
147 <!-- UEP with CIF -->
148 <test expect_num_outputs="2">
149 <param name="structure" value="Si.cif" ftype="cif"/>
150 <param name="testing" value="true"/>
151 <param name="params" value="configuep_t.yaml" ftype="yaml"/>
152 <output name="file_tree" file="tree_uep.txt" ftype="txt" sort="true">
153 <assert_contents>
154 <has_size value="734"/>
155 </assert_contents>
156 </output>
157 </test>
158 <!-- check that file_tree filter works -->
159 <test expect_num_outputs="1">
160 <param name="structure" value="Si.cell" ftype="cell"/>
161 <param name="testing" value="false"/>
162 <param name="params" value="configuep_t.yaml" ftype="yaml"/>
163 </test>
164 </tests>
165 <help><![CDATA[
166 Given an input structure, this tool generates a set of duplicate structures, each with a single muon added in a random location. These are known as "muonated" structures.
167
168 The YAML file controls many factors of the structure generation. We recommend using the '`YAML config generator`_' tool to create the file, but you can also write and upload it yourself following the `pm-muairss documentation`_.
169
170 The resulting structures will be returned as a zip folder. This zip folder can be used as input for the '`Generate UEP outputs`_' tool, or downloaded for use outside Galaxy.
171
172 Command-line usage: pm-muairss -t w structure_file parameter_file
173
174 .. _pm-muairss documentation: https://github.com/muon-spectroscopy-computational-project/pymuon-suite/blob/master/docs/muairss-gen-docs.md
175 .. _YAML config generator: /tool_runner?tool_id=pm_yaml_config
176 .. _Generate UEP outputs: /tool_runner?tool_id=pm_uep_opt_write
177 ]]></help>
178 <citations>
179 <citation type="bibtex">
180 @misc{github,
181 author = {{Muon Spectroscopy Computational Project}},
182 year = {2021},
183 title = {pymuon-suite 0.2.0},
184 publisher = {GitHub},
185 url = {https://github.com/muon-spectroscopy-computational-project/pymuon-suite/}
186 }
187 </citation>
188 <citation type="bibtex">
189 @article{airss,
190 author = {Liborio, L. and Sturniolo, S. and Jochym, D.},
191 title = {Computational prediction of muon stopping sites using ab initio random structure searching (AIRSS)},
192 journal = {The Journal of Chemical Physics},
193 volume = {148},
194 pages = {134114},
195 year = {2018},
196 doi={10.1063/1.5024450},
197 URL={
198 https://doi.org/10.1063/1.5024450
199 },
200 eprint={
201 https://doi.org/10.1063/1.5024450
202 }
203 }
204 </citation>
205 <citation type="bibtex">
206 @article{doi:10.1063/1.5085197,
207 author = {Sturniolo,Simone and Liborio,Leandro and Jackson,Samuel },
208 title = {Comparison between density functional theory and density functional tight binding approaches for finding the muon stopping site in organic molecular crystals},
209 journal = {The Journal of Chemical Physics},
210 volume = {150},
211 number = {15},
212 pages = {154301},
213 year = {2019},
214 doi = {10.1063/1.5085197},
215 URL = {
216 https://doi.org/10.1063/1.5085197
217 },
218 eprint = {
219 https://doi.org/10.1063/1.5085197
220 }
221 }
222 </citation>
223 <citation type="bibtex">
224 @article{doi:10.1063/5.0012381,
225 author = {Sturniolo,Simone and Liborio,Leandro },
226 title = {Computational prediction of muon stopping sites: A novel take on the unperturbed electrostatic potential method},
227 journal = {The Journal of Chemical Physics},
228 volume = {153},
229 number = {4},
230 pages = {044111},
231 year = {2020},
232 doi = {10.1063/5.0012381},
233 URL = {
234 https://doi.org/10.1063/5.0012381
235 },
236 eprint = {
237 https://doi.org/10.1063/5.0012381
238 },
239 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. }
240 }
241 </citation>
242 <citation type="bibtex">
243 @TOOL_CITATION@
244 </citation>
245 </citations>
246 </tool>