[gmx-users] Bash scripting and Gromacs
Kutzner, Carsten
ckutzne at gwdg.de
Tue Apr 26 11:11:28 CEST 2016
> On 26 Apr 2016, at 11:00, James Starlight <jmsstarlight at gmail.com> 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
> trr_file="md_resp_complex_conf"
>
>
> #!/bin/bash
>
> HOME="/nfs_homes/clouddyn/MD_bench/Resp_cyt_cluster"
> trr_file="md_resp_complex_conf"
> tit="resp_complex"
>
> rm -r ${HOME}/output
> mkdir ${HOME}/output
> source /prog/gm502/bin/GMXRC
>
> for sim in ${HOME}/${tit}* ; do
> if [[ -d $sim ]]; then
> simulation=$(basename "$sim")
> pushd ${sim}
> rm dd_dump_err*.pdb
> trjconv -s ${HOME}/ref.gro -f ${trr_file}*.trr -o
if there are several files that match your ${trr_file}* pattern, then
bash will give you all of those. Try leaving away the *
or delete the other .trr files in that dir to make get only
one file there.
Carsten
> ${HOME}/output/${simulation}.xtc -n
> popd
> fi
> done
>
>
>
> finally I ontained
>
> trjconv -s /nfs_homes/clouddyn/MD_bench/Resp_cyt_cluster/ref.gro -f
> md_resp_complex_conf7_go.trr md_resp_complex_conf7.trr -o
> /nfs_homes/clouddyn/MD_bench/Resp_cyt_cluster/output/resp_complex_conf7.xtc
> -n -pbc nojump -ur compact -fit trans
>
>
> here you see that the problem that the trajectory is repeated twisely
> after -f which is the source of the error:
>
> -f md_resp_complex_conf7_go.trr md_resp_complex_conf7.trr
>
> Why this issue occures? As you see in my scriopt I defined all proprly
>
> trjconv -s ${HOME}/ref.gro -f ${trr_file}*.trr -o
> ${HOME}/output/${simulation}.xtc -n
>
>
> Thanks!
>
> J,
> --
> 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