view pm_asephonons.xml @ 4:b47a2fd2b10f draft default tip

planemo upload for repository https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/main/pm_asephonons commit 389608650050596b28bc0c055de9f98c513a6f65
author muon-spectroscopy-computational-project
date Thu, 18 Jul 2024 09:07:17 +0000
parents fd28cbdb134e
children
line wrap: on
line source

<tool id="pm_asephonons" name="PyMuonSuite Phonons" version="@PYMUONSUITE_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.05" license="MIT">
    <description>calculate phonons using ASE and DFTB+</description>
    <macros>
        <!-- version of this tool wrapper (integer) -->
        <token name="@WRAPPER_VERSION@">1</token>
        <import>muon_macros.xml</import>
    </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"/>
        <organization url="https://muon-spectroscopy-computational-project.github.io/index.html" name="The Muon Spectroscopy Computational Project"/>
    </creator>
    <requirements>
        <!-- note versioning is different due to multiple dependencies -->
        <requirement type="package" version="@PYMUONSUITE_VERSION@">pymuonsuite</requirement>
        <requirement type="package" version="21.2">dftbplus</requirement>
        <requirement type="package" version="1.22.4">numpy</requirement> <!-- pinned due to numpy/ASE/DFTB+ incompatibility https://github.com/dftbplus/dftbplus/issues/1064 -->
        <requirement type="package" version="3.0">zip</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        structure_name_internal='input_structure.$pbc.structure.ext' &&
        ln -s '$pho_params' pho_params.yaml &&
        ln -s '$pbc.structure' \$structure_name_internal &&
        cat pho_params.yaml &&
        err=0 &&
        pm-asephonons \$structure_name_internal pho_params.yaml || err=\$? &&
        echo "Asephonons output:" &&
        cat asephonons.out &&
        if [ \$err != 0 ] ; then echo "errored" && exit 24 ; fi &&
        ln -s '${name}_phonons.txt' phonon_report.txt &&
        zip -r out_zip.zip '$name' '${name}_phonons.txt' asephonons.out band.out pho_params.yaml
    ]]></command>
    <configfiles>
        <configfile name="pho_params">name: $name
phonon_kpoint_grid: $phonon_kpoint_grid.replace('__ob__', '[').replace('__cb__', ']')
kpoint_grid: $kpoint_grid.replace('__ob__', '[').replace('__cb__', ']')
force_tol: $force_tol
dftb_set: $dftb_set
pbc: $pbc.pbc
force_clean: false</configfile>
    </configfiles>
    <inputs>
        <param argument="name" type="text" value="struct" label="Structure name" help="Name of the structure."/>
        <param argument="phonon_kpoint_grid" type="text" value="[1, 1, 1]" label="Phonon k-points">
            <validator type="regex" message="Input should only contain whitespace, '[', ']', ',' and digits.">^[\s\d,\[\]]+$</validator>
        </param>
        <param argument="kpoint_grid" type="text" value="[1, 1, 1]" label="K-points used for DFTB+ calculation">
            <validator type="regex" message="Input should only contain whitespace, '[', ']', ',' and digits.">^[\s\d,\[\]]+$</validator>
        </param>
        <param argument="force_tol" type="float" min="0.0" value="0.01" label="Force tolerance for optimisation"/>
        <expand macro="dftb_set"/>
        <conditional name="pbc">
            <param argument="pbc" type="select" display="radio" multiple="false" label="Use periodic boundary conditions (PBC)" help="Whether to turn on PBC conditions in DFTB+. Note that XYZ files cannot be used with PBC.">
                <option selected="true" value="true">Yes</option>
                <option value="false">No</option>
            </param>
            <when value="true">
                <param name="structure" type="data" format="cell, cif, extxyz" label="Structure file" help="The structure to generate the phonon report from. Accepted file types: CELL, CIF, XYZ (extended ONLY)."/>
            </when>
            <when value="false">
                <param name="structure" type="data" format="cell, cif, extxyz, xyz" label="Structure file" help="The structure to generate the phonon report from. Accepted file types: CELL, CIF, XYZ (standard or extended)."/>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data label="phonons outputs on ${on_string}" name="phonon_outputs" format="zip" from_work_dir="out_zip.zip"/>
        <data label="phonon report on ${on_string}" name="phonon_report" format="txt" from_work_dir="phonon_report.txt"/>
    </outputs>
    <tests>
        <test expect_num_outputs="2">
            <param name="name" value="Si"/>
            <param name="dftb_set" value="pbc-0-3"/>
            <conditional name="pbc">
                <param name="structure" value="Si.cell" ftype="cell"/>
            </conditional>
            <output name="phonon_report" file="test_out.txt" ftype="txt" compare="re_match">
                <assert_contents>
                    <has_size value="8255" delta="20"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="2">
            <param name="name" value="Si"/>
            <param name="dftb_set" value="pbc-0-3"/>
            <conditional name="pbc">
                <param name="structure" value="Si.cif" ftype="cif"/>
            </conditional>
            <output name="phonon_report" file="test_out.txt" ftype="txt" compare="re_match">
                <assert_contents>
                    <has_size value="8255" delta="20"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="2">
            <param name="name" value="Si"/>
            <param name="dftb_set" value="pbc-0-3"/>
            <conditional name="pbc">
                <param name="pbc" value="false"/>
                <param name="structure" value="Si.xyz" ftype="xyz"/>
            </conditional>
            <output name="phonon_report" file="test_out.txt" ftype="txt" compare="re_match">
                <assert_contents>
                    <has_size value="8155" delta="20"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="2">
            <param name="name" value="Si"/>
            <param name="dftb_set" value="pbc-0-3"/>
            <conditional name="pbc">
                <param name="structure" value="Si.extxyz" ftype="extxyz"/>
            </conditional>
            <output name="phonon_report" file="test_out.txt" ftype="txt" compare="re_match">
                <assert_contents>
                    <has_size value="8255" delta="20"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
        usage: pm-asephonons structure params

        Given an input structure, this tool generates a phonon report for that structure using the parameters provided.

        PyMuonSuite is distributed under the GPLv3 license. This tool wrapper is distributed under the MIT license.

        All data is licensed under the Creative Commons Attribution-ShareAlike 4.0
        International License. The full text of the license can be found at:

        https://creativecommons.org/licenses/by-sa/4.0/legalcode

        For specific data sets remember to cite the following papers, by element :

        | **3-ob-1**

        +--------------+------------------------------------------------+-----------------------------------+------------------------------------+
        | [JCTC2013]   | \ J. Chem. Theory Comput., 2013, 9, 338-354.   | (O, N, C, H)                      | https://doi.org/10.1021/ct300849w  |
        +--------------+------------------------------------------------+-----------------------------------+------------------------------------+
        | [JCTC2014]   | \ J. Chem. Theory Comput., 2014, 10, 1518-1537.| (P,S-\*)                          | https://doi.org/10.1021/ct401002w  |
        +--------------+------------------------------------------------+-----------------------------------+------------------------------------+
        | [JCTC2015-1] | \ J. Phys. Chem. B, 2015, 119, 1062-1082.      | (Mg,Zn-\*)                        | https://doi.org/10.1021/jp506557r  |
        +--------------+------------------------------------------------+-----------------------------------+------------------------------------+
        | [JCTC2015-2] | \ J. Chem. Theory Comput., 2015, 11, 332-342.  | (Na,F,K,Ca,Cl,Br,I-\*)            | https://doi.org/10.1021/ct5009137  |
        +--------------+------------------------------------------------+-----------------------------------+------------------------------------+

        |
        | **pbc-0-3**

        +------------+--------------------------------------------------------------------------------------------+---------+------------------------------------------------+
        |   [SiC]    | \ E. Rauls, R. Gutierrez, J. Elsner, and Th. Frauenheim, Sol. State Comm. 111, 459 (1999)  | (Si-C)  | https://doi.org/10.1016/S0038-1098(99)00137-4  |
        +------------+--------------------------------------------------------------------------------------------+---------+------------------------------------------------+
        |   [SiO]    | \ C. Koehler, Z. Hajnal, P. Deak, Th. Frauenheim, S. Suhai, Phys. Rev. B 64, 085333 (2001) |  (Si-O) | https://doi.org/10.1103/PhysRevB.64.085333     |
        +------------+--------------------------------------------------------------------------------------------+---------+------------------------------------------------+
        | [Silicon]  | \ A. Sieck, Th. Frauenheim, and K. A. Jackson, phys. stat. sol. (b) 240, 537 (2003).       |  (Si)   | https://doi.org/10.1002/pssb.200301886         |
        +------------+--------------------------------------------------------------------------------------------+---------+------------------------------------------------+
        | [Fluorine] | \ C. Koehler and Th. Frauenheim, Surf. Sci. 600, 453 (2006).                               | \ (F)   | https://doi.org/10.1016/j.susc.2005.10.044     |
        +------------+--------------------------------------------------------------------------------------------+---------+------------------------------------------------+
        |   [Iron]   | \ C. Koehler, G. Seifert and Th. Frauenheim, Chem. Phys. 309, 23 (2005).                   |   (Fe)  | https://doi.org/10.1016/j.chemphys.2004.03.034 |
        +------------+--------------------------------------------------------------------------------------------+---------+------------------------------------------------+
        |   [SiSi]   | \ A. Sieck, PhD. Thesis, University of Paderborn, 2000.                                    | (Si-Si) | https://www.osti.gov/etdeweb/biblio/20249635   |
        +------------+--------------------------------------------------------------------------------------------+---------+------------------------------------------------+

        |
        | The full sets and all other data can be found at the following URLs:

        +----------+------------------------------------------------------------+
        |  3-ob-1  |   https://www.dftb.org/parameters/download/3ob/3ob-3-1-cc/ |
        +----------+------------------------------------------------------------+
        | pbc-0-3  |  https://www.dftb.org/parameters/download/pbc/pbc-0-3-cc/  |
        +----------+------------------------------------------------------------+

        |
    ]]></help>
    <citations>
        <citation type="doi">@PYMUONSUITE_CITATION@</citation>
        <citation type="doi">10.1063/1.5085197</citation>
        <citation type="bibtex">
            @article{larsen2017atomic,
                title={The atomic simulation environment—a Python library for working with atoms},
                author={Larsen, Ask Hjorth and Mortensen, Jens J{\o}rgen and Blomqvist, Jakob and Castelli, Ivano E and Christensen, Rune and Du{\l}ak, Marcin and Friis, Jesper and Groves, Michael N and Hammer, Bj{\o}rk and Hargus, Cory and others},
                journal={Journal of Physics: Condensed Matter},
                volume={29},
                number={27},
                pages={273002},
                year={2017},
                publisher={IOP Publishing}
            }
        </citation>
    </citations>
</tool>