[gmx-users] Bash scripting and Gromacs

James Starlight jmsstarlight at gmail.com
Tue Apr 26 11:00:18 CEST 2016


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
${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,


More information about the gromacs.org_gmx-users mailing list