view md.xml @ 2:2e28934c1d8c draft default tip

"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/tools/gromacs commit b1b74e91a242f2de250761a79b17d77e68b1045f"
author chemteam
date Fri, 30 Aug 2019 15:07:22 -0400
parents 609d93596b61
children
line wrap: on
line source

<tool id="gmx_md" name="GROMACS production simulation" version="@VERSION@">
    <description>for data collection</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' ./md.mdp &&
        #end if
        #if $mdp.mdpfile == "default":
            ln -s '$md' ./md.mdp &&
        #end if

        ln -s '$gro_input' ./npt.gro &&
        ln -s '$cpt_input' ./npt.cpt &&
        ln -s '$top_input' ./top_input.top &&
        

        gmx grompp -f ./md.mdp -c ./npt.gro -t ./npt.cpt -p ./top_input.top -o md_0_1.tpr &>> verbose.txt &&
        gmx mdrun -deffnm md_0_1 &>> verbose.txt
 
        #if $str == 'pdb' or $str == 'both'
            && gmx editconf -f md_0_1.gro -o md_0_1.pdb &>> verbose.txt
        #end if


    ]]></command>
        <configfiles>
            <!-- .mdp file for the gromacs simulation -->
            <configfile name="md">
                #if $mdp.mdpfile == 'default':
                    title    = OPLS Lysozyme MD simulation 
                    ; Run parameters
                    integrator  = $mdp.integrator    ; leap-frog integrator
                    nsteps    = $mdp.md_steps  ; 2 * 500000 = 1000 ps (1 ns)
                    dt        = $mdp.step_length    ; 2 fs
                    ; Output control
                    nstxout            = $mdp.write_freq    ; save coordinates every 10.0 ps
                    nstvout            = $mdp.write_freq    ; save velocities every 10.0 ps
                    nstenergy          = $mdp.write_freq    ; save energies every 10.0 ps
                    nstlog            = $mdp.write_freq    ; update log file every 10.0 ps
                    nstxout-compressed  = $mdp.write_freq      ; save compressed coordinates every 10.0 ps
                                                    ; nstxout-compressed replaces nstxtcout
                    compressed-x-grps   = System    ; group(s) to write to the compressed trajectory file
                    ; Bond parameters
                    continuation          = yes    ; Restarting after NPT 
                    constraint_algorithm    = lincs      ; holonomic constraints 
                    constraints              = $mdp.constraints  ; all bonds (even heavy atom-H bonds) constrained
                    lincs_iter              = 1        ; accuracy of LINCS
                    lincs_order              = 4        ; also related to accuracy
                    ; Neighborsearching
                    cutoff-scheme   = $mdp.cutoffscheme
                    ns_type        = grid    ; search neighboring grid cells
                    nstlist        = 10      ; 20 fs, largely irrelevant with Verlet scheme
                    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
                    ; Electrostatics
                    coulombtype      = $mdp.coulombtype    ; method for electrostatics calculations e.g. PME
                    pme_order      = 4        ; cubic interpolation
                    fourierspacing  = 0.16    ; grid spacing for FFT
                    ; Temperature coupling is on
                    tcoupl    = V-rescale              ; modified Berendsen thermostat
                    tc-grps    = Protein Non-Protein  ; two coupling groups - more accurate
                    tau_t    = 0.1    0.1          ; time constant, in ps
                    ref_t    = $mdp.temperature $mdp.temperature           ; reference temperature, one for each group, in K
                    ; Pressure coupling is on
                    pcoupl            = Parrinello-Rahman      ; Pressure coupling on in NPT
                    pcoupltype          = isotropic              ; uniform scaling of box vectors
                    tau_p            = 2.0                ; time constant, in ps
                    ref_p            = 1.0                ; reference pressure, in bar
                    compressibility     = 4.5e-5              ; isothermal compressibility of water, bar^-1
                    ; Periodic boundary conditions
                    pbc    = xyz    ; 3-D PBC
                    ; Dispersion correction
                    DispCorr  = EnerPres  ; account for cut-off vdW scheme
                    ; Velocity generation
                    gen_vel    = no    ; Velocity generation is off
                #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 argument="cpt_input" type="data" format='cpt' label="Checkpoint (CPT) file from NVT run."/>
        
        <expand macro="md_inputs"/>
    </inputs>
    <outputs>
        <data name="output1" format="gro" from_work_dir="md_0_1.gro">
            <filter>str == 'gro' or str == 'both'</filter>
        </data>
        <data name="output2" format="pdb" from_work_dir="md_0_1.pdb">
            <filter>str == 'pdb' or str == 'both'</filter>
        </data>
        <data name="output3" format="trr" from_work_dir="md_0_1.trr">
            <filter>traj == 'trr' or traj == 'both'</filter>
        </data>
        <data name="output4" format="xtc" from_work_dir="md_0_1.xtc">
            <filter>traj == 'xtc' or traj == 'both'</filter>
        </data>

        <data name="report" format="txt" from_work_dir="verbose.txt">
            <filter>capture_log</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="gro_input" value="npt.gro" />
            <param name="top_input" value="topol_solv.top" />
            <param name="cpt_input" value="npt.cpt" />
            <param name="traj" value="trr"/>
            <param name="str" value="both"/>
            
            <expand macro="test_params"/>

            <output name="output1" file="md_0_1.gro" ftype="gro" compare="sim_size"/>
            <output name="output2" file="md_0_1.pdb" ftype="pdb" compare="sim_size"/>
            <output name="output3" file="md_0_1.trr" ftype="trr" compare="sim_size"/>
        </test>
        <test>
            <param name="gro_input" value="npt.gro" />
            <param name="top_input" value="topol_solv.top" />
            <param name="cpt_input" value="npt.cpt" />
            <param name="itp_input" value="posres.itp" />
            <param name="traj" value="xtc"/>
            <param name="str" value="pdb"/>
            
            <expand macro="test_params"/>
            
            <output name="output2" file="md_0_1.pdb" ftype="pdb" compare="sim_size"/>
            <output name="output4" file="md_0_1.xtc" ftype="xtc" compare="sim_size"/>
        </test>
        <test>
            <param name="gro_input" value="npt.gro" />
            <param name="top_input" value="topol_solv.top" />
            <param name="cpt_input" value="npt.cpt" />
            <param name="mdpfile" value="custom" />
            <param name="mdp_input" value="md.mdp" />
            <param name="traj" value="trr"/>
            <param name="str" value="gro"/>
            <output name="output1" file="md_0_1.gro" ftype="gro" compare="sim_size"/>
            <output name="output3" file="md_0_1.trr" ftype="trr" compare="sim_size"/>
        </test>
    </tests>
    <help><![CDATA[

Upload GRO and TOP files for the production simulation, as well as the checkpoint (CPT) file from the NPT equilibration. 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>