Skip to content

Instantly share code, notes, and snippets.

@JonasR
Created Aug 31, 2012
Embed
What would you like to do?
create plots
#!/bin/bash
for directory in `ls -d */`
do
cd $directory
echo now $directory
echo "First part"
for model in `ls | grep .xvg | grep -v -P "\.eps$" | grep -v rama|grep -v pressure|grep -v temperature | grep -v potential|grep -v totalEnergy`
do
MODELNAME=${model%%.[^.]*}
MODELNAME=${model}
echo "Processing model : "$MODELNAME
xmgrace -hardcopy -printfile $MODELNAME.eps -nxy $MODELNAME
done
echo "Second part"
for model in `ls | grep -v -P "\.eps$"| grep .xvg | grep rama`
do
MODELNAME=${model%.[^.]*}
MODELNAME=${model}
echo "Processing model : "$MODELNAME
xmgrace -hardcopy -printfile $MODELNAME.eps $MODELNAME
done
echo "Third part"
for model in `ls | grep .xvg | grep -v -P "\.eps$"| grep -P "pressure|temperature|potential|totalEnergy"`
do
MODELNAME=${model%.[^.]*}
MODELNAME=${model}
echo "Processing model : "$MODELNAME
xmgrace -hardcopy -printfile $MODELNAME.eps -nxy $MODELNAME -pexec "RUNAVG(S0,100)"
done
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment