Repository revision
16:32052c6c3310

Repository 'gmx_trj'
hg clone https://toolshed.g2.bx.psu.edu/repos/chemteam/gmx_trj

Modify/convert and concatate GROMACS trajectories tool metadata
Miscellaneous
using trjconv and trjcat
gmx_trj
toolshed.g2.bx.psu.edu/repos/chemteam/gmx_trj/gmx_trj/2022+galaxy2
2022+galaxy2
None
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/chemteam/gmx_trj/gmx_trj/2022+galaxy2 (this tool)
toolshed.g2.bx.psu.edu/repos/chemteam/gmx_trj/gmx_trj/2022+galaxy1
toolshed.g2.bx.psu.edu/repos/chemteam/gmx_trj/gmx_trj/2022+galaxy0
toolshed.g2.bx.psu.edu/repos/chemteam/gmx_trj/gmx_trj/2021.3+galaxy0
toolshed.g2.bx.psu.edu/repos/chemteam/gmx_trj/gmx_trj/2020.4+galaxy0
toolshed.g2.bx.psu.edu/repos/chemteam/gmx_trj/gmx_trj/2020.2+galaxy1
toolshed.g2.bx.psu.edu/repos/chemteam/gmx_trj/gmx_trj/2020.2+galaxy0
toolshed.g2.bx.psu.edu/repos/chemteam/gmx_trj/gmx_trj/2019.1.5
toolshed.g2.bx.psu.edu/repos/chemteam/gmx_trj/gmx_trj/2019.1.4
gmx_trj
Requirements (dependencies defined in the <requirements> tag set)
name version type
gromacs 2022 package
Additional information about this tool
#if $trj.trj_op == 'trjcat':
        mkdir trajs &&
        #set $file_count = 0  ## sets 1st input to 0
        #set $file_list = []
        #for $file_count, $file in enumerate($trj_input):  ## enumerates each input file, starting from 0
            #set $filename = "trajs/traj_%i.%s" % ($file_count, $file.ext)
            #silent $file_list.append($filename)
            ln -s '$file' '$filename' &&
        #end for
        
        ## runs inputs from a repeat block. By choosing each input, this allows the user to select individual input files at a time, as well as ensure the proper order.
        #for $traj_repeat in $trj.inputtrajs:
            #for $file in $traj_repeat.trj_input:
                #set $file_count = $file_count + 1 ## inputs from this repeat block will be numbered at + 1 ahead of inputs from first multiple select above
                #set $filename = "trajs/traj_%i.%s" % ($file_count, $file.ext)
                #silent $file_list.append($filename)
                ln -s '$file' '$filename' &&
            #end for
        #end for

        gmx trjcat
            -f 
            #for $filename in $file_list:
                '$filename'
            #end for
            $trj.cat
            -e '$time.e'

    #elif $trj.trj_op == 'trjconv':
        ln -s '$ndx_input' ./index.ndx &&
        ln -s '$str_input' ./str.${str_input.ext} &&
        ln -s '$trj_input' ./traj.${trj_input.ext} &&

        echo ## optionally pipe in the following
        #if $trj.fit.fit != 'none':
            '$trj.fit.index_fit'
        #end if
        #if $trj.pbc.pbc == 'cluster':
            '$trj.pbc.index_cluster'
        #end if
        '$trj.index_center'	'$trj.index_output' | gmx trjconv
      	-f ./traj.${trj_input.ext}
        -s ./str.${str_input.ext}
        #if $ndx_input:
            -n ./index.ndx
        #end if
        #if $trj.index_center:
            -center
        #end if
        #if $trj.sep:
            -sep
            -nzero 9  ## hopefully the traj has < 1 bn frames, or collection order will be wrong
        #end if
        -pbc $trj.pbc.pbc
        -ur $trj.ur
        -boxcenter $trj.boxcenter
        -fit $trj.fit.fit
        #if $time.e != -1:
            -e '$time.e'
        #end if
        #if $trj.skip:
            -skip $trj.skip
        #end if
    #end if

    -b '$time.b'
    -dt '$time.dt'
    -o ./output.${output_format} 
    >> verbose.txt 2>&1
    #if not $trj.sep:
        &&
        mv ./output.${output_format} '$output'
    #end if
    
None
False
Functional tests
name inputs outputs required files
Test-1 trj|trj_input: ['npt.xtc', 'nvt.xtc']
trj|cat: True
trj|trj_op: trjcat
time|b: 0
time|e: -1
time|dt: 0
name: value
npt.xtc
nvt.xtc
value
Test-2 trj|trj_input: npt.xtc
trj|inputtrajs_0|trj_input: nvt.xtc
trj|cat: True
trj|trj_op: trjcat
output_format: xtc
time|b: 0
time|e: -1
time|dt: 0
name: value
npt.xtc
nvt.xtc
value
Test-3 trj|trj_input: npt.xtc
trj|str_input: npt.tpr
trj|ndx_input: index.ndx
trj|index_output: 1
trj|index_center: 1
trj|pbc|pbc: mol
trj|ur: tric
time|b: 0
time|e: -1
time|dt: 0
name: value
npt.xtc
npt.tpr
index.ndx
value
Test-4 trj|trj_input: npt.xtc
trj|str_input: npt.tpr
trj|ndx_input: index.ndx
trj|index_output: 1
trj|index_center: 1
trj|pbc|pbc: mol
trj|ur: compact
trj|skip: 2
time|b: 0
time|e: -1
time|dt: 0
name: value
npt.xtc
npt.tpr
index.ndx
value
Test-5 trj|trj_input: npt.xtc
trj|str_input: npt.tpr
trj|ndx_input: index.ndx
trj|index_output: 0
trj|sep: sep
output_format: pdb
time|b: 0
time|e: -1
time|dt: 0
npt.xtc
npt.tpr
index.ndx