comparison pm_uep_opt.xml @ 0:e4097a3e3e75 draft

planemo upload for repository https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/main/pm_uep_opt commit d130cf2c46d933fa9d0214ddbd5ddf860f322dc4
author muon-spectroscopy-computational-project
date Thu, 25 Aug 2022 16:20:08 +0000
parents
children 904815426ba8
comparison
equal deleted inserted replaced
-1:000000000000 0:e4097a3e3e75
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">
2 <description>run UEP optimisation</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="Jyothish" familyName="Thomas" identifier="https://orcid.org/0000-0003-4724-6924"/>
25 <person givenName="Eli" familyName="Chadwick" url="https://github.com/elichad" identifier="https://orcid.org/0000-0002-0035-6475"/>
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 unzip "$muonated_structures" &&
34 if test -f "params.yaml"; then echo "params.yaml present"; else echo "params.yaml missing" && exit 64; fi &&
35 if ( test -f input_structure.* ) ; then echo "input structure present"; else echo "input structure missing" && exit 64; fi &&
36 charge_density_name=\$(sed 's/ //g' <<< "$charge_density.name") &&
37 ln -s $charge_density \$charge_density_name &&
38 x="\$charge_density_name" &&
39 echo "calculated seed name \$x" &&
40 ln -s $castep_log "\${x%%.*}.castep" &&
41 out_folder="`python ${__tool_directory__}/get_out_folder.py`" &&
42 find \$out_folder -type f -name "*.yaml" | xargs sed -i "s#^chden_path: .*#chden_path: .\/#g" &&
43 find \$out_folder -type f -name "*.yaml" | xargs sed -i "s#^chden_seed: .*#chden_seed: \${x%%.*}#g" &&
44 bash ${__tool_directory__}/run.sh \$out_folder &&
45 zip -r out_zip.zip \$out_folder params.yaml input_structure.* &&
46 find \$out_folder > tree.txt
47 ]]></command>
48 <inputs>
49 <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."/>
50 <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."/>
51 <param type="data" name="castep_log" label="CASTEP log (.castep)" format="txt" help="The CASTEP log for your initial DFT simulation for the structure."/>
52 <param type="hidden" name="testing" label="Test mode" value="false"/>
53 </inputs>
54 <outputs>
55 <data label="UEP results for $muonated_structures.name" name="uep_results" format="zip" from_work_dir="out_zip.zip"/>
56 <data label="File tree (testing only)" name="file_tree" format="txt" from_work_dir="tree.txt" hidden="true">
57 <filter>(testing == "true")</filter>
58 </data>
59 </outputs>
60 <tests>
61 <test>
62 <param name="testing" value="true"/>
63 <param name="muonated_structures" value="muonated.zip" ftype="zip"/>
64 <param name="charge_density" value="Si.den_fmt" ftype="txt"/>
65 <param name="castep_log" value="Si.castep" ftype="txt"/>
66 <output name="file_tree" file="tree.txt" ftype="txt" sort="true">
67 <assert_contents>
68 <has_size value="1780"/>
69 </assert_contents>
70 </output>
71 </test>
72 <test expect_num_outputs="2">
73 <param name="testing" value="true"/>
74 <param name="muonated_structures" value="muonated-default-folder.zip" ftype="zip"/>
75 <param name="charge_density" value="Si.den_fmt" ftype="txt"/>
76 <param name="castep_log" value="Si.castep" ftype="txt"/>
77 <output name="file_tree" file="tree-default-folder.txt" sort="true"/>
78 </test>
79 <test expect_failure="true">
80 <param name="testing" value="true"/>
81 <param name="muonated_structures" value="muonated-default-folder.zip" ftype="zip"/>
82 <param name="castep_log" value="Si.castep" ftype="txt"/>
83 <param name="charge_density" value="Sifail.den_fmt" ftype="txt"/>
84 <assert_stderr>
85 <has_text text="Error: FMT file has no header"/>
86 </assert_stderr>
87 </test>
88 <!-- check that file_tree filter works -->
89 <test expect_num_outputs="1">
90 <param name="testing" value="false"/>
91 <param name="muonated_structures" value="muonated.zip" ftype="zip"/>
92 <param name="charge_density" value="Si.den_fmt" ftype="txt"/>
93 <param name="castep_log" value="Si.castep" ftype="txt"/>
94 </test>
95 </tests>
96 <help><![CDATA[
97 Given a set of input muonated structures (structures containing a muon), applies UEP optimisation to refine them.
98
99 This tool requires CASTEP inputs for the UEP method, meaning your initial DFT simulation must have been done with CASTEP.
100 The structure you used as input to the '`Generate muonated structures`_' tool or pm-muairss beforehand should come from the same simulation run.
101
102 Command-line usage: pm-uep-opt [-h] [-t {r,w}] structures parameter_file
103
104 .. _Generate muonated structures: /tool_runner?tool_id=pm_muairss_write
105 ]]></help>
106 <citations>
107 <citation type="bibtex">
108 @TOOL_CITATION@
109 </citation>
110 <citation type="bibtex">
111 @article{airss,
112 author = {Liborio, L. and Sturniolo, S. and Jochym, D.},
113 title = {Computational prediction of muon stopping sites using ab initio random structure searching (AIRSS)},
114 journal = {The Journal of Chemical Physics},
115 volume = {148},
116 pages = {134114},
117 year = {2018},
118 doi={10.1063/1.5024450},
119 URL={
120 https://doi.org/10.1063/1.5024450
121 },
122 eprint={
123 https://doi.org/10.1063/1.5024450
124 }
125 }
126 </citation>
127 <citation type="bibtex">
128 @article{doi:10.1063/1.5085197,
129 author = {Sturniolo,Simone and Liborio,Leandro and Jackson,Samuel },
130 title = {Comparison between density functional theory and density functional tight binding approaches for finding the muon stopping site in organic molecular crystals},
131 journal = {The Journal of Chemical Physics},
132 volume = {150},
133 number = {15},
134 pages = {154301},
135 year = {2019},
136 doi = {10.1063/1.5085197},
137 URL = {
138 https://doi.org/10.1063/1.5085197
139 },
140 eprint = {
141 https://doi.org/10.1063/1.5085197
142 }
143 }
144 </citation>
145 <citation type="bibtex">
146 @article{doi:10.1063/5.0012381,
147 author = {Sturniolo,Simone and Liborio,Leandro },
148 title = {Computational prediction of muon stopping sites: A novel take on the unperturbed electrostatic potential method},
149 journal = {The Journal of Chemical Physics},
150 volume = {153},
151 number = {4},
152 pages = {044111},
153 year = {2020},
154 doi = {10.1063/5.0012381},
155 URL = {
156 https://doi.org/10.1063/5.0012381
157 },
158 eprint = {
159 https://doi.org/10.1063/5.0012381
160 },
161 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. }
162 }
163 </citation>
164 <citation type="bibtex">
165 @article {castep,
166 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.},
167 title = {First principles methods using CASTEP},
168 journal = {Zeitschrift fuer Kristallographie},
169 volume = {220},
170 pages = {567},
171 year = {2005}
172 }
173 </citation>
174 </citations>
175 </tool>