[gmx-users] Bash scripting and Gromacs

Mark Abraham mark.j.abraham at gmail.com
Tue Apr 26 17:57:51 CEST 2016


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 <fcannini at gmail.com> wrote:

> 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
> > ${HOME}/output/${simulation}.xtc -n -pbc mol -ur compact -fit trans  <
> > ${HOME}/enter.txt
> >
> > and gromacs sent
> >
> >    trjconv -s md_resp_complex?.tpr -f md_resp_complex?.trr -o
> >
> /nfs_homes/clouddyn/MD_bench/Resp_cyt_cluster/output/resp_complex_conf7.xtc
> > -n -pbc mol -ur compact -fit trans
> >
> >
> > Is it possible specify more flexible e.g 1 of any character or 2 of
> > any characters within the file name etc like REGEX syntax
> >
> > Thanks!
>
> Brace expansion can be useful in such cases too:
> http://www.thegeekstuff.com/2010/06/bash-shell-brace-expansion/
>
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>


More information about the gromacs.org_gmx-users mailing list