view minim.xml @ 2:ea7b9183bf30 draft

planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/tools/gromacs commit 7ba07c3130a2170e8f91acc4a81f5626563a79eb
author chemteam
date Thu, 28 Mar 2019 10:15:48 -0400
parents 911eb71ccd1f
children c1e98d48b8b4
line wrap: on
line source

<tool id="gmx_em" name="GROMACS energy minimization" version="@VERSION@">
    <description>of the system prior to equilibration and production MD</description>
    <macros>
        <import>macros.xml</import>
    </macros>

    <expand macro="requirements" />

    <command detect_errors="exit_code"><![CDATA[

        #if $mdp.mdpfile == 'custom':
            ln -s '$mdp.mdp_input' ./minim.mdp &&
        #else:
            ln -s '$minim' ./minim.mdp &&
        #end if

        ln -s '$gro_input' ./solv_ions.gro &&
        ln -s '$top_input' ./top_input.top &&
  
        gmx grompp -f ./minim.mdp -c ./solv_ions.gro -r ./solv_ions.gro -p ./top_input.top -o em.tpr &>> verbose.txt &&
        gmx mdrun -deffnm em &>> verbose.txt
        
    ]]></command>
        <configfiles>
            <!-- .mdp files for the gromacs simulation -->
            <configfile name="minim">
                #if $mdp.mdpfile == 'default':
                    ; minim.mdp - used as input into grompp to generate em.tpr
                    integrator  = $mdp.integrator    ; Algorithm (steep = steepest descent minimization)
                    emtol    = $mdp.emtol     ; Stop minimization when the maximum force is less than this value
                    emstep      = $mdp.emstep      ; Energy step size
                    nsteps    = $mdp.md_steps      ; Maximum number of (minimization) steps to perform

                    ; Parameters describing how to find the neighbors of each atom and how to calculate the interactions
                    nstlist        = 1        ; Frequency to update the neighbor list and long range forces
                    cutoff-scheme   = $mdp.cutoffscheme
                    ns_type        = grid    ; Method to determine neighbor list (simple, grid)
                    coulombtype      = $mdp.coulombtype    ; Treatment of long range electrostatic interactions
                    rcoulomb      = $mdp.rcoulomb    ; Short-range electrostatic cut-off
                    rlist       = $mdp.rlist ; Cut-off distance for the short-range neighbor list.
                    rvdw        = $mdp.rvdw    ; Short-range Van der Waals cut-off
                    pbc            = xyz     ; Periodic Boundary Conditions (yes/no)
                #end if
            </configfile>
        </configfiles>

    <inputs>
        <param argument="gro_input" type="data" format='gro' label="GRO structure file."/>
        <param argument="top_input" type="data" format='top' label="Topology (TOP) file."/>
        <param name="capture_log" type="boolean" value="false" label="Generate Detailed Log" help="Generate detailed log information that can be summarized with ParseLog."/>

        <conditional name="mdp">
            <param name="mdpfile" type="select" label="Parameter input">
                <option value="custom">Upload own MDP file</option>
                <option value="default">Use default (partially customisable) setting</option>
            </param>
            <when value="custom">
                <param argument="mdp_input" type="data" format='mdp' label="MD parameters (MDP) file (optional; default settings if not set)."/>
            </when>

            <when value="default">
                <param argument="integrator" type="select" label="Choice of integrator.">
                    <option value="steep">Steepest descent algorithm.</option>
                    <option value="cg">Conjugate gradient algorithm.</option>
                    <option value="l-bfgs">Quasi-Newtonian algorithm.</option>
                </param>
                <param argument="cutoffscheme" type="select" label="Neighbor searching.">
                    <option value="Verlet">Generate a pair list with buffering.</option>
                    <option value="group">Generate a pair list for groups of atoms.</option>
                </param>
                <param argument="coulombtype" type="select" label="Electrostatics.">
                    <option value="PME">Fast smooth Particle-Mesh Ewald (SPME) electrostatics.</option>
                    <option value="P3M-AD">Particle-Particle Particle-Mesh algorithm with analytical derivative.</option>
                    <option value="Reaction-Field-zero">Reaction field electrostatics.</option>
                </param>
                <param argument="rcoulomb" value="1.0" type="float" label="Distance for the Coulomb cut-off."/>
                <param argument="rlist" value="1.0" type="float" label="Cut-off distance for the short-range neighbor list. Ignored if the Verlet cutoff scheme is set."/>
                <param argument="rvdw" value="1.0" type="float" label="Short range van der Waals cutoff."/>
                <param argument="md_steps" type="integer" label="Number of steps for the MD simulation" value="0" min="0" max="1000000" help="MD steps" />
                <param argument="emtol" type="float" label="EM tolerance" value="0" min="0" max="10000" help="The minimization is converged when the maximum force is smaller than this value" />
                <param argument="emstep" type="float" label="Maximum step size /nm" value="0.01" min="0.0001" max="1.0" help="Initial step size in nm." />
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="output1" format="gro" from_work_dir="em.gro"/>
        <data name="report" format="txt" from_work_dir="verbose.txt">
            <filter>capture_log</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="gro_input" value="solv_ions.gro" />
            <param name="top_input" value="topol_solv.top" />
            <param name="mdpfile" value="default" />
            <param name="integrator" value="steep" />
            <param name="cutoffscheme" value="Verlet" />
            <param name="coulombtype" value="PME" />
            <param name="rcoulomb" value="1.0" />
            <param name="rlist" value="1.0" />
            <param name="md_steps" value="50000" />
            <param name="emtol" value="1000.0" />
            <param name="emstep" value="0.01" />

            <output name="output1" file="em.gro" ftype="gro" compare="sim_size"/>
        </test>
        <test>
            <param name="gro_input" value="solv_ions.gro" />
            <param name="top_input" value="topol_solv.top" />
            <param name="mdpfile" value="custom" />
            <param name="mdp_input" value="minim.mdp" />
            <output name="output1" file="em.gro" ftype="gro" compare="sim_size"/>
        </test>

    </tests>
    <help><![CDATA[

Upload GRO and TOP files for energy minimisation. To take advantage of all GROMACS features, upload an MDP file with simulation parameters. Otherwise, choose parameters through the Galaxy interface. See http://manual.gromacs.org/documentation/2018/user-guide/mdp-options.html for more information on the options.

    ]]></help>

    <expand macro="citations" />
</tool>