Re: [gmx-users] Bash scripting and Gromacs

2016-04-26 Thread Mark Abraham
Or since you have a highly predictable sequence of integers, use a loop over them! Bash built in printf can also be useful here. Stackoverflow.com is a good friend for recipes. Mark On Tue, 26 Apr 2016 17:52 Fabricio Cannini wrote: > On 26-04-2016 10:33, James Starlight

Re: [gmx-users] Bash scripting and Gromacs

2016-04-26 Thread Fabricio Cannini
On 26-04-2016 10:33, James Starlight wrote: No, in my case it recognize ? like a ? in script I have for sim in ${HOME}/${tit}* ; do if [[ -d $sim ]]; then simulation=$(basename "$sim") cd ${sim} rm dd_dump_err*.pdb trjconv -s md_${tit}?.tpr -f md_${tit}?.trr -o

Re: [gmx-users] Bash scripting and Gromacs

2016-04-26 Thread Kutzner, Carsten
> On 26 Apr 2016, at 15:33, James Starlight wrote: > > No, in my case it recognize ? like a ? > > in script I have > > for sim in ${HOME}/${tit}* ; do > if [[ -d $sim ]]; then > simulation=$(basename "$sim") > cd ${sim} > rm dd_dump_err*.pdb > trjconv -s

Re: [gmx-users] Bash scripting and Gromacs

2016-04-26 Thread James Starlight
No, in my case it recognize ? like a ? in script I have for sim in ${HOME}/${tit}* ; do if [[ -d $sim ]]; then simulation=$(basename "$sim") cd ${sim} rm dd_dump_err*.pdb trjconv -s md_${tit}?.tpr -f md_${tit}?.trr -o ${HOME}/output/${simulation}.xtc -n -pbc mol -ur compact -fit trans

Re: [gmx-users] Bash scripting and Gromacs

2016-04-26 Thread Kutzner, Carsten
> On 26 Apr 2016, at 11:22, James Starlight wrote: > > Exactly the problem was there! > > BTW how to define selection more carefully (avoiding using *) tpr and > trr to be sure that always only 1 file is selected assuming that all > relevant trajectories and topologies

Re: [gmx-users] Bash scripting and Gromacs

2016-04-26 Thread James Starlight
Exactly the problem was there! BTW how to define selection more carefully (avoiding using *) tpr and trr to be sure that always only 1 file is selected assuming that all relevant trajectories and topologies are differs only on the digit e.g resp_complex_conf7/md_resp_complex_conf7.tpr

Re: [gmx-users] Bash scripting and Gromacs

2016-04-26 Thread Kutzner, Carsten
> On 26 Apr 2016, at 11:00, James Starlight wrote: > > Hello, > > I faced with the folliwing problem: > > I try to make small script which will loop several folders > corresponded to the invididual simulations and procecc each trajectory > searching them by the keyword