changeset 4:40071ff77285 draft

planemo upload for repository https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/main/pm_muairss_read commit 70a4d37ecdf5d586703cfc509922311e95d3205c
author muon-spectroscopy-computational-project
date Tue, 18 Jul 2023 13:26:40 +0000
parents 276a25ab05f2
children 17da9f67ed33
files config.py muon_macros.xml pm_muairss_read.xml test-data/Si_uep_min_cluster_1.cell test-data/Si_uep_min_cluster_2.cell test-data/clustout-uep-kmeans.dat test-data/clustout-uep-kmeans.txt
diffstat 7 files changed, 424 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config.py	Tue Jul 18 13:26:40 2023 +0000
@@ -0,0 +1,18 @@
+import yaml
+
+
+def main():
+    with open("params.yaml") as f:
+        existing_params = yaml.safe_load(f)
+
+    with open("incoming_params") as f:
+        incoming_params = yaml.safe_load(f)
+
+    merged_params = {**existing_params, **incoming_params}
+
+    with open("params.yaml", "w") as f:
+        yaml.safe_dump(merged_params, f)
+
+
+if __name__ == "__main__":
+    main()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/muon_macros.xml	Tue Jul 18 13:26:40 2023 +0000
@@ -0,0 +1,29 @@
+<macros>
+    <xml name="dftb_set">
+        <param type="select" name="dftb_set" value="3ob-3-1" display="radio" label="DFTB parameter set" help="The parameter set to use for DFTB+. Currently supported are: 3ob-3-1 and pbc-0-3. See help section at the bottom of the page for details.">
+            <option value="3ob-3-1">3ob-3-1</option>
+            <option value="pbc-0-3">pbc-0-3</option>
+        </param>
+    </xml>
+    <xml name="dftb+">
+        <expand macro="dftb_set"/>
+        <param type="boolean" name="dftb_pbc" label="Use periodic boundary conditions" help="Whether to turn on periodic boundary conditions in DFTB+." checked="true"/>
+    </xml>
+    <xml name="dftb_optionals">
+        <param type="text" argument="dftb_optionals" value="[]" optional="true" label="DFTB optional files" help="Additional optional json files to activate for DFTBArgs (for example, dftd3.json will use DFTD3 dispersion forces for 3ob-3-1 if DFTB+ has been compiled to support them)."/>
+    </xml>
+    <xml name="k_points_grid">
+        <param type="text" argument="k_points_grid" value="[1,1,1]" label="K-points grid" help="List of three integer k-points. Default is [1,1,1].">
+            <validator type="regex" message="Input should only contain whitespace, '[', ']', ',' and digits.">^[\s\d,\[\]]+$</validator>
+        </param>
+    </xml>
+    <!-- version of underlying tool (PEP 440) -->
+    <!-- citation should be updated with every underlying tool version -->
+    <!-- concept is not updated, and should only be used for referencing the idea of the software -->
+    <token name="@MUSPINSIM_VERSION@">2.2.1</token>
+    <token name="@MUSPINSIM_CITATION@">10.5281/zenodo.7733979</token>
+    <token name="@MUSPINSIM_CONCEPT@">10.5281/zenodo.6517626</token>
+    <token name="@PYMUONSUITE_VERSION@">0.3.0</token>
+    <token name="@PYMUONSUITE_CITATION@">10.5281/zenodo.8026711</token>
+    <token name="@PYMUONSUITE_CONCEPT@">10.5281/zenodo.7025643</token>
+</macros>
\ No newline at end of file
--- a/pm_muairss_read.xml	Fri Feb 03 15:39:29 2023 +0000
+++ b/pm_muairss_read.xml	Tue Jul 18 13:26:40 2023 +0000
@@ -1,67 +1,165 @@
-<tool id="pm_muairss_read" name="PyMuonSuite AIRSS Cluster" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.05" license="MIT">
+<tool id="pm_muairss_read" name="PyMuonSuite AIRSS Cluster" version="@PYMUONSUITE_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.05" license="MIT">
     <description>run clustering for optimised structures</description>
     <macros>
-        <!-- version of underlying tool (PEP 440) -->
-        <token name="@TOOL_VERSION@">0.2.3</token>
         <!-- version of this tool wrapper (integer) -->
         <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{Sturniolo_pymuon-suite_2022,
-                author = {Sturniolo, Simone and Liborio, Leandro and Chadwick, Eli and Murgatroyd, Laura and Laverack, Adam and Mudaraddi, Anish and {Muon Spectroscopy Computational Project}},
-                license = {GPL-3.0},
-                month = {8},
-                title = {{pymuon-suite}},
-                url = {https://github.com/muon-spectroscopy-computational-project/pymuon-suite},
-                version = {v0.2.3},
-                doi = {10.5281/zenodo.7025644},
-                year = {2022}
-            }
-        </token>
+        <import>muon_macros.xml</import>
+        <xml name="supercell">
+            <param type="text" argument="supercell" value="1" label="Supercell" help="Supercell size and shape to use when saving cluster structures. This can either be a single int, a list of three integers or a 3x3 matrix of integers. For a single number a diagonal matrix will be generated with the integer repeated on the diagonals. For a list of three numbers a diagonal matrix will be generated where the diagonal elements are set to the list. A matrix will be used directly as is. Default is a 3x3 identity matrix.">
+                <validator type="regex" message="Input should only contain whitespace, '[', ']', ',' and digits.">^[\s\d,\[\]]+$</validator>
+            </param>
+        </xml>
     </macros>
     <creator>
         <person givenName="Jyothish" familyName="Thomas" identifier="https://orcid.org/0000-0003-4724-6924"/>
         <person givenName="Eli" familyName="Chadwick" url="https://github.com/elichad" identifier="https://orcid.org/0000-0002-0035-6475"/>
+        <person givenName="Patrick" familyName="Austin" url="https://github.com/patrick-austin" identifier="https://orcid.org/0000-0002-6279-7823"/>
         <organization url="https://muon-spectroscopy-computational-project.github.io/index.html" name="The Muon Spectroscopy Computational Project"/>
     </creator>
     <requirements>
-        <requirement type="package" version="@TOOL_VERSION@">pymuonsuite</requirement>
+        <requirement type="package" version="@PYMUONSUITE_VERSION@">pymuonsuite</requirement>
+        <requirement type="package" version="3.0">zip</requirement>
     </requirements>
     <required_files>
         <include type="literal" path="get_out_folder.py"/>
+        <include type="literal" path="config.py"/>
     </required_files>
     <command detect_errors="exit_code"><![CDATA[
         unzip '$optimisation_results' &&
         if test -f "params.yaml"; then echo "params.yaml present"; else echo "params.yaml missing" && exit 64; fi
         && if ( test -f input_structure.* ) ; then echo "input structure present"; else echo "input structure missing" && exit 64; fi
-        && out_folder="`python '${__tool_directory__}/get_out_folder.py'`" &&
-        pm-muairss -t r input_structure.* params.yaml
+        && out_folder="`python '${__tool_directory__}/get_out_folder.py'`"
+        && python '${__tool_directory__}/config.py' 
+        && pm-muairss -t r input_structure.* params.yaml
+        #if $clustering_save.clustering_save_format != "none":
+            && ln -s *_clusters/* minimal_clusters
+        #end if
     ]]></command>
+    <configfiles>
+        <configfile filename="incoming_params">clustering_method: $clustering.clustering_method
+#if $clustering.clustering_method == "hier":
+clustering_hier_t: $clustering.clustering_hier_t
+#else if $clustering.clustering_method == "kmeans":
+clustering_kmeans_k: $clustering.clustering_kmeans_k
+#end if
+#if $clustering_save.clustering_save_format != "none":
+clustering_save_type: structures
+clustering_save_format: $clustering_save.clustering_save_format
+supercell: $clustering_save.supercell.replace('__ob__', '[').replace('__cb__', ']')
+#if $clustering_save.clustering_save_format == "cell":
+mu_symbol: $clustering_save.mu_symbol
+#end if
+#end if</configfile>
+    </configfiles>
     <inputs>
         <param type="data" name="optimisation_results" label="optimised muonated structures (.zip)" format="zip" help="A zip folder containing a set of optimised muonated structures, the original structure, and a YAML parameter file. See below for the expected folder structure."/>
+        <conditional name="clustering">
+            <param type="select" argument="clustering_method" display="radio" label="Clustering method" value="hier">
+                <option value="hier">hierarchical</option>
+                <option value="kmeans">k-means</option>
+            </param>
+            <when value="hier">
+                <param type="float" argument="clustering_hier_t" value="0.3" min="0.0" optional="true" label="t parameter for hierarchical clustering"/>
+            </when>
+            <when value="kmeans">
+                <param type="integer" argument="clustering_kmeans_k" value="4" min="0" optional="true" label="Number of clusters for k-means clustering"/>
+            </when>
+        </conditional>
+        <conditional name="clustering_save">
+            <param argument="clustering_save_format" type="select" label="Clustering Save Format" help="If set, for each cluster a structural file with the specified format will be generated, corresponding to the structure in the cluster with minimal energy.">
+                <option value="none" selected="true">Do not generate</option>
+                <option value="cell">CELL</option>
+                <option value="cif">CIF</option>
+                <option value="xyz">XYZ</option>
+            </param>
+            <when value="none"/>
+            <when value="cell">
+                <expand macro="supercell"/>
+                <param argument="mu_symbol" type="text" value="H:mu" optional="true" label="Muon symbol" help="The symbol to use for the muon when writing out the CASTEP custom species. Should be a valid chemical symbol followed by `:`, then custom text."/>
+            </when>
+            <when value="cif">
+                <expand macro="supercell"/>
+            </when>
+            <when value="xyz">
+                <expand macro="supercell"/>
+            </when>
+        </conditional>
     </inputs>
     <outputs>
         <data label="Cluster report for $optimisation_results.name" name="cluster_report" format="txt" from_work_dir="${out_folder}/*clusters.txt"/>
         <data label="Cluster data for $optimisation_results.name" name="cluster_data" format="txt" from_work_dir="${out_folder}/*clusters.dat"/>
+        <collection name="saved_structures" type="list" label="Minimal energy structures" format="txt">
+            <filter>clustering_save["clustering_save_format"] != "none"</filter>
+            <discover_datasets pattern="__name_and_ext__" directory="minimal_clusters"/>
+        </collection>
     </outputs>
     <tests>
         <test expect_num_outputs="2">
             <param name="optimisation_results" value="uep-out.zip" ftype="zip"/>
+            <conditional name="clustering">
+                <param name="clustering_hier_t" value="0.2"/>
+            </conditional>
             <output name="cluster_report" file="clustout-uep.txt" ftype="txt" lines_diff="2"/>
             <output name="cluster_data" file="clustout-uep.dat" ftype="txt"/>
         </test>
+        <test expect_num_outputs="3">
+            <param name="optimisation_results" value="uep-out.zip" ftype="zip"/>
+            <conditional name="clustering">
+                <param name="clustering_hier_t" value="0.2"/>
+            </conditional>
+            <conditional name="clustering_save">
+                <param name="clustering_save_format" value="cell"/>
+            </conditional>
+            <output name="cluster_report" file="clustout-uep.txt" ftype="txt" lines_diff="2"/>
+            <output name="cluster_data" file="clustout-uep.dat" ftype="txt"/>
+            <output_collection name="saved_structures" type="list" count="2"/>
+        </test>
+        <!-- Test optional save params -->
+        <test expect_num_outputs="3">
+            <param name="optimisation_results" value="uep-out.zip" ftype="zip"/>
+            <conditional name="clustering">
+                <param name="clustering_hier_t" value="0.2"/>
+            </conditional>
+            <conditional name="clustering_save">
+                <param name="clustering_save_format" value="cell"/>
+                <param name="supercell" value="2"/>
+                <param name="mu_symbol" value="H:nu"/>
+            </conditional>
+            <output name="cluster_report" file="clustout-uep.txt" ftype="txt" lines_diff="2"/>
+            <output name="cluster_data" file="clustout-uep.dat" ftype="txt"/>
+            <output_collection name="saved_structures" type="list" count="2">
+                <element name="Si_uep_min_cluster_1" file="Si_uep_min_cluster_1.cell"/>
+                <element name="Si_uep_min_cluster_2" file="Si_uep_min_cluster_2.cell"/>
+            </output_collection>
+        </test>
         <test expect_num_outputs="2">
             <param name="optimisation_results" value="dftb-out.zip" ftype="zip"/>
+            <conditional name="clustering">
+                <param name="clustering_hier_t" value="0.2"/>
+            </conditional>
             <output name="cluster_report" file="clustout-dftb.txt" ftype="txt" lines_diff="2"/>
             <output name="cluster_data" file="clustout-dftb.dat" ftype="txt"/>
         </test>
+        <!-- Test overwrite of values in the existing params.yaml -->
+        <test expect_num_outputs="2">
+            <param name="optimisation_results" value="uep-out.zip" ftype="zip"/>
+            <conditional name="clustering">
+                <param name="clustering_method" value="kmeans"/>
+                <param name="clustering_kmeans_k" value="2"/>
+            </conditional>
+            <!-- kmeans gives predictable clusters, but orders them randomly -->
+            <!-- To prevent this from affecting tests, sort the lines -->
+            <!-- in the report and use regex matching for the dat file -->
+            <output name="cluster_report" file="clustout-uep-kmeans.txt" ftype="txt" lines_diff="2" sort="true"/>
+            <output name="cluster_data" file="clustout-uep-kmeans.dat" ftype="txt" compare="re_match"/>
+        </test>
     </tests>
     <help><![CDATA[
         Given a set of optimised muonated structures, clusters the structures based on similarity.
 
+        This is intended to be used with the output from '`PyMuonSuite AIRSS UEP Optimise`_'.
         If you used the 'Run UEP optimisation' tool for optimisation, the output from that tool can be used as the input to this one.
-        If you are bringing files from elsewhere, make sure they fit the expected zip folder structure:
+        If you are bringing files from elsewhere (such as running PyMuonSuite from the command line, or with a different optimisation calculator), make sure they fit the expected zip folder structure:
 
         .. code-block::
 
@@ -77,24 +175,23 @@
             ├─ input.cell
             ├─ params.yaml
 
-        This folder represents a run with the output folder name ``muon-airss-out``, the structure name ``struct``, and the UEP calculator.
-        If you use different parameters, these names should match your own settings. (``dftb+`` and ``castep`` are used as folder names for the respective calculators)
-
+        This folder represents a run with the output folder name ``muon-airss-out``, the structure name ``struct``, and the ``uep`` calculator.
+        If you use different parameters, these names should match your own settings (``dftb+`` and ``castep`` are used as folder names for the respective calculators).
         The zip folder itself has been named ``optimised-structures.zip`` in this example, but it doesn't matter what you call it.
 
         The files ``input.cell`` and ``params.yaml`` must have those exact names. ``input.cell`` should be your original structure file,
-        and ``params.yaml`` is the YAML parameter file used to configure the clustering (as well as any prior muonation and optimisation).
-        You should have created this YAML file using the 'Create YAML for pm-muairss' tool or written it yourself, then passed it into the
-        'Generate muon structures' tool or pm-muairss.
+        and ``params.yaml`` is the YAML parameter file used to configure the muonation and optimisation.
+        This file is created automatically when using '`PyMuonSuite AIRSS UEP Optimise`_'.
+        Any parameters relating to the clustering process present in the original file will be overwritten with the values selected here.
 
         Command-line usage: pm-muairss [-h] -t r structures parameter_file
 
+        .. _PyMuonSuite AIRSS UEP Optimise: /tool_runner?tool_id=pm_uep_opt
+
         PyMuonSuite is distributed under the GPLv3 license. This tool wrapper is distributed under the MIT license.
     ]]></help>
     <citations>
-        <citation type="bibtex">
-            @TOOL_CITATION@
-        </citation>
+        <citation type="doi">@PYMUONSUITE_CITATION@</citation>
         <citation type="doi">10.1063/1.5024450</citation>
         <citation type="doi">10.1063/1.5085197</citation>
         <citation type="doi">10.1063/5.0012381</citation>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/Si_uep_min_cluster_1.cell	Tue Jul 18 13:26:40 2023 +0000
@@ -0,0 +1,91 @@
+#######################################################
+#CASTEP cell file: Si_clusters/uep/Si_uep_min_cluster_1.cell
+#Created using the Atomic Simulation Environment (ASE)#
+#######################################################
+
+%BLOCK LATTICE_CART
+10.950902  0.000000  0.000000
+ 0.000000 10.950902 -0.000000
+ 0.000000 -0.000000 10.950902
+%ENDBLOCK LATTICE_CART
+
+%BLOCK POSITIONS_ABS
+Si  0.000000  0.000000  0.000000
+Si  4.106588  4.106588  1.368863
+Si  2.737726  0.000000  2.737726
+Si  4.106588  1.368863  4.106588
+Si  0.000000  2.737726  2.737726
+Si  1.368863  1.368863  1.368863
+Si  1.368863  4.106588  4.106588
+Si  2.737726  2.737726  0.000000
+Si  0.000000  0.000000  5.475451
+Si  4.106588  4.106588  6.844314
+Si  2.737726  0.000000  8.213177
+Si  4.106588  1.368863  9.582039
+Si  0.000000  2.737726  8.213177
+Si  1.368863  1.368863  6.844314
+Si  1.368863  4.106588  9.582039
+Si  2.737726  2.737726  5.475451
+Si  0.000000  5.475451  0.000000
+Si  4.106588  9.582039  1.368863
+Si  2.737726  5.475451  2.737726
+Si  4.106588  6.844314  4.106588
+Si  0.000000  8.213177  2.737726
+Si  1.368863  6.844314  1.368863
+Si  1.368863  9.582039  4.106588
+Si  2.737726  8.213177  0.000000
+Si  0.000000  5.475451  5.475451
+Si  4.106588  9.582039  6.844314
+Si  2.737726  5.475451  8.213177
+Si  4.106588  6.844314  9.582039
+Si  0.000000  8.213177  8.213177
+Si  1.368863  6.844314  6.844314
+Si  1.368863  9.582039  9.582039
+Si  2.737726  8.213177  5.475451
+Si  5.475451  0.000000  0.000000
+Si  9.582039  4.106588  1.368863
+Si  8.213177  0.000000  2.737726
+Si  9.582039  1.368863  4.106588
+Si  5.475451  2.737726  2.737726
+Si  6.844314  1.368863  1.368863
+Si  6.844314  4.106588  4.106588
+Si  8.213177  2.737726  0.000000
+Si  5.475451  0.000000  5.475451
+Si  9.582039  4.106588  6.844314
+Si  8.213177  0.000000  8.213177
+Si  9.582039  1.368863  9.582039
+Si  5.475451  2.737726  8.213177
+Si  6.844314  1.368863  6.844314
+Si  6.844314  4.106588  9.582039
+Si  8.213177  2.737726  5.475451
+Si  5.475451  5.475451  0.000000
+Si  9.582039  9.582039  1.368863
+Si  8.213177  5.475451  2.737726
+Si  9.582039  6.844314  4.106588
+Si  5.475451  8.213177  2.737726
+Si  6.844314  6.844314  1.368863
+Si  6.844314  9.582039  4.106588
+Si  8.213177  8.213177  0.000000
+Si  5.475451  5.475451  5.475451
+Si  9.582039  9.582039  6.844314
+Si  8.213177  5.475451  8.213177
+Si  9.582039  6.844314  9.582039
+Si  5.475451  8.213177  8.213177
+Si  6.844314  6.844314  6.844314
+Si  6.844314  9.582039  9.582039
+Si  8.213177  8.213177  5.475451
+H:nu  2.737259  2.736006  2.738945
+%ENDBLOCK POSITIONS_ABS
+
+%BLOCK SPECIES_GAMMA
+radsectesla
+H:nu 851615456.5978916
+%ENDBLOCK SPECIES_GAMMA
+
+%BLOCK SPECIES_MASS
+AMU
+H:nu 0.1134289259
+%ENDBLOCK SPECIES_MASS
+
+KPOINT_MP_GRID: 1 1 1
+FIX_ALL_CELL: True
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/Si_uep_min_cluster_2.cell	Tue Jul 18 13:26:40 2023 +0000
@@ -0,0 +1,91 @@
+#######################################################
+#CASTEP cell file: Si_clusters/uep/Si_uep_min_cluster_2.cell
+#Created using the Atomic Simulation Environment (ASE)#
+#######################################################
+
+%BLOCK LATTICE_CART
+10.950902  0.000000  0.000000
+ 0.000000 10.950902 -0.000000
+ 0.000000 -0.000000 10.950902
+%ENDBLOCK LATTICE_CART
+
+%BLOCK POSITIONS_ABS
+Si  0.000000  0.000000  0.000000
+Si  4.106588  4.106588  1.368863
+Si  2.737726  0.000000  2.737726
+Si  4.106588  1.368863  4.106588
+Si  0.000000  2.737726  2.737726
+Si  1.368863  1.368863  1.368863
+Si  1.368863  4.106588  4.106588
+Si  2.737726  2.737726  0.000000
+Si  0.000000  0.000000  5.475451
+Si  4.106588  4.106588  6.844314
+Si  2.737726  0.000000  8.213177
+Si  4.106588  1.368863  9.582039
+Si  0.000000  2.737726  8.213177
+Si  1.368863  1.368863  6.844314
+Si  1.368863  4.106588  9.582039
+Si  2.737726  2.737726  5.475451
+Si  0.000000  5.475451  0.000000
+Si  4.106588  9.582039  1.368863
+Si  2.737726  5.475451  2.737726
+Si  4.106588  6.844314  4.106588
+Si  0.000000  8.213177  2.737726
+Si  1.368863  6.844314  1.368863
+Si  1.368863  9.582039  4.106588
+Si  2.737726  8.213177  0.000000
+Si  0.000000  5.475451  5.475451
+Si  4.106588  9.582039  6.844314
+Si  2.737726  5.475451  8.213177
+Si  4.106588  6.844314  9.582039
+Si  0.000000  8.213177  8.213177
+Si  1.368863  6.844314  6.844314
+Si  1.368863  9.582039  9.582039
+Si  2.737726  8.213177  5.475451
+Si  5.475451  0.000000  0.000000
+Si  9.582039  4.106588  1.368863
+Si  8.213177  0.000000  2.737726
+Si  9.582039  1.368863  4.106588
+Si  5.475451  2.737726  2.737726
+Si  6.844314  1.368863  1.368863
+Si  6.844314  4.106588  4.106588
+Si  8.213177  2.737726  0.000000
+Si  5.475451  0.000000  5.475451
+Si  9.582039  4.106588  6.844314
+Si  8.213177  0.000000  8.213177
+Si  9.582039  1.368863  9.582039
+Si  5.475451  2.737726  8.213177
+Si  6.844314  1.368863  6.844314
+Si  6.844314  4.106588  9.582039
+Si  8.213177  2.737726  5.475451
+Si  5.475451  5.475451  0.000000
+Si  9.582039  9.582039  1.368863
+Si  8.213177  5.475451  2.737726
+Si  9.582039  6.844314  4.106588
+Si  5.475451  8.213177  2.737726
+Si  6.844314  6.844314  1.368863
+Si  6.844314  9.582039  4.106588
+Si  8.213177  8.213177  0.000000
+Si  5.475451  5.475451  5.475451
+Si  9.582039  9.582039  6.844314
+Si  8.213177  5.475451  8.213177
+Si  9.582039  6.844314  9.582039
+Si  5.475451  8.213177  8.213177
+Si  6.844314  6.844314  6.844314
+Si  6.844314  9.582039  9.582039
+Si  8.213177  8.213177  5.475451
+H:nu  4.793737  3.419626  4.793651
+%ENDBLOCK POSITIONS_ABS
+
+%BLOCK SPECIES_GAMMA
+radsectesla
+H:nu 851615456.5978916
+%ENDBLOCK SPECIES_GAMMA
+
+%BLOCK SPECIES_MASS
+AMU
+H:nu 0.1134289259
+%ENDBLOCK SPECIES_MASS
+
+KPOINT_MP_GRID: 1 1 1
+FIX_ALL_CELL: True
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/clustout-uep-kmeans.dat	Tue Jul 18 13:26:40 2023 +0000
@@ -0,0 +1,2 @@
+1	1?2	-8\.4\d+	-8\.4\d+	\d\.\d+e?-?\d{0,2}	\d\.\d+	\d\.\d+	\d\.\d+
+2	1?2	-8\.4\d+	-8\.4\d+	\d\.\d+e?-?\d{0,2}	\d\.\d+	\d\.\d+	\d\.\d+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/clustout-uep-kmeans.txt	Tue Jul 18 13:26:40 2023 +0000
@@ -0,0 +1,66 @@
+
+****************************
+|                          |
+|       PYMUON-SUITE       |
+|  MuAirss Clusters report |
+|                          |
+****************************
+
+Name: Si
+Date: 2022-06-21 09:32:03.839222
+Structure file(s): input_structure.cell
+Parameter file: params.yaml
+
+Clustering method: k-Means
+    k = 2
+
+
+*******************
+
+Clusters for Si:
+CALCULATOR: uep
+	2 clusters found
+
+
+	-----------
+	Cluster 1
+	-----------
+	Structures: 12
+
+	Energy (eV):
+	Minimum		Average		StDev
+	-8.49		-8.49		0.00
+
+	Minimum energy structure: Si_1
+
+
+	Structure list:
+	Si_1	Si_2	Si_5	Si_6	
+	Si_7	Si_8	Si_9	Si_10	
+	Si_11	Si_12	Si_13	Si_14	
+
+	-----------
+	Cluster 2
+	-----------
+	Structures: 2
+
+	Energy (eV):
+	Minimum		Average		StDev
+	-8.43		-8.43		0.00
+
+	Minimum energy structure: Si_3
+
+
+	Structure list:
+	Si_3	Si_4	
+
+	----------
+
+	Similarity (ranked):
+	1 <--> 2 (distance = 0.218)
+
+--------------------------
+
+
+==========================
+