Commit 4874ad14 by Francois Gygi

added -range option to plot scripts


git-svn-id: http://qboxcode.org/svn/qb/trunk@1804 cba15fb0-1239-40c8-b417-11db7ca47a34
parent ef722f1e
#!/bin/bash
# econst.plt: plot <econst> in one or more MD simulations
# use: econst.plt mdrun1.r [mdrun2.r ...]
if [ $1 == "-range" ]
then
range=$2
shift 2
fi
gnuplot -persist <<EOF
fit a*x+b "<grep -h econst $*" u 0:2 via a,b
fit c "<grep -h econst $*" u 0:2 via c
p "<grep -h econst $*" u 2 w l, a*x+b, c
fit $range a*x+b "<grep -h econst $*" u 0:2 via a,b
fit $range c "<grep -h econst $*" u 0:2 via c
p $range "<grep -h econst $*" u 2 w l, a*x+b, c
print "Econst_avg=",c," dE/dt=",a
EOF
#!/bin/bash
# econst_cmp.plt: compare <econst> in two MD simulations
# use: econst_cmp.plt mdrun1.r mdrun2.r
if [ $1 == "-range" ]
then
range=$2
shift 2
fi
gnuplot -persist <<EOF
plot "<grep '<econst>' $1" u 2 w l, "<grep '<econst>' $2" u 2 w l
plot $range "<grep econst $1" u 2 w l, "<grep econst $2" u 2 w l
EOF
#!/bin/bash
# econste.plt: plot <econst> and <etotal> in one or more MD simulations
# use: econste.plt mdrun1.r [mdrun2.r ...]
if [ $1 == "-range" ]
then
range=$2
shift 2
fi
gnuplot -persist <<EOF
p "<grep -h econst $*" u 2 w l, "<grep -h '<etotal>' $*" u 2 w l
p $range "<grep -h econst $*" u 2 w l, "<grep -h '<etotal>' $*" u 2 w l
EOF
#!/bin/bash
if [ $1 == "-range" ]
then
range=$2
shift 2
fi
gnuplot -persist <<EOF
p $range "<grep -h econst $*" u 2 w l, "<grep -h '<etotal>' $*" u 2 w l, "<grep -h '<ekin_ec>' $*" u 2 w l
EOF
#!/bin/bash
if [ $1 == "-range" ]
then
range=$2
shift 2
fi
gnuplot -persist <<EOF
plot $range "<grep -h eigenvalue_sum $*" u 2 w l
EOF
#!/bin/bash
if [ $1 == "-range" ]
then
range=$2
shift 2
fi
gnuplot -persist <<EOF
plot $range "<grep -h enthalpy $*" u 2 w l
EOF
#!/bin/bash
# etotal.plt: plot <etotal> in one or more simulations
# use: etotal.plt run1.r [run2.r ...]
if [ $1 == "-range" ]
then
range=$2
shift 2
fi
gnuplot -persist <<EOF
plot "<grep -h '<etotal>' $*" u 2 w l
plot $range "<grep -h '<etotal>' $*" u 2 w l
EOF
#!/bin/bash
# etotal_cmp.plt: compare <etotal> in two MD simulations
# use: etotal_cmp.plt mdrun1.r mdrun2.r
if [ $1 == "-range" ]
then
range=$2
shift 2
fi
gnuplot -persist <<EOF
set grid
plot "<grep '<etotal>' $1" u 2 w l, "<grep '<etotal>' $2" u 2 w l
plot $range "<grep '<etotal>' $1" u 2 w l, "<grep '<etotal>' $2" u 2 w l
EOF
#!/bin/bash
# etotal_int.plt: plot <etotal_int> in one or more simulations
# use: etotal_int.plt run1.r [run2.r ...]
if [ $1 == "-range" ]
then
range=$2
shift 2
fi
gnuplot -persist <<EOF
plot "<grep -h etotal $*" u 2 w l
set grid
plot $range "<grep -h etotal_int $*" u 2 w l
EOF
#!/bin/bash
# etotal_int_cmp.plt: compare <etotal_int> in two simulations
# use: etotal_int_cmp.plt run1.r run2.r
if [ $1 == "-range" ]
then
range=$2
shift 2
fi
gnuplot -persist <<EOF
plot "<grep '<etotal_int>' $1" u 2 w l, "<grep '<etotal_int>' $2" u 2 w l
plot $range "<grep etotal $1" u 2 w l, "<grep etotal $2" u 2 w l
EOF
#!/bin/bash
# force.plt: plot all components of ionic forces in one or more simulations
# use: force.plt mdrun1.r [mdrun2.r ...]
if [ $1 == "-range" ]
then
range=$2
shift 2
fi
gnuplot -persist <<EOF
p "<grep -h force $*" u 2, "" u 3, "" u 4, 0
p $range "<grep -h force $*" u 2, "" u 3, "" u 4, 0
EOF
#!/bin/bash
# sigma.plt: plot stress tensor components in one or more simulations
# use: sigma.plt mdrun1.r [mdrun2.r ...]
if [ $1 == "-range" ]
then
range=$2
shift 2
fi
gnuplot -persist <<EOF
plot "<grep -h sigma_xx $*" u 2 w l, "<grep -h sigma_yy $*" u 2 w l, \
plot $range "<grep -h sigma_xx $*" u 2 w l, "<grep -h sigma_yy $*" u 2 w l, \
"<grep -h sigma_zz $*" u 2 w l, "<grep -h sigma_xy $*" u 2 w l, \
"<grep -h sigma_yz $*" u 2 w l, "<grep -h sigma_xz $*" u 2 w l, 0
fit sxx "<grep -h '<sigma_xx' $*" u 0:2 via sxx
fit syy "<grep -h '<sigma_yy' $*" u 0:2 via syy
fit szz "<grep -h '<sigma_zz' $*" u 0:2 via szz
fit sxy "<grep -h '<sigma_xy' $*" u 0:2 via sxy
fit syz "<grep -h '<sigma_yz' $*" u 0:2 via syz
fit sxz "<grep -h '<sigma_xz' $*" u 0:2 via sxz
print "avg sxx: ", sxx
print "avg syy: ", syy
print "avg szz: ", szz
print "avg sxy: ", sxy
print "avg syz: ", syz
print "avg sxz: ", sxz
EOF
#!/bin/bash
# temp_ion.plt: plot <temp_ion> in one or more MD simulations
# use: temp_ion.plt mdrun1.r [mdrun2.r ...]
if [ $1 == "-range" ]
then
range=$2
shift 2
fi
gnuplot -persist <<EOF
fit a*x+b "<grep -h temp_ion $*" u 0:2 via a,b
fit c "<grep -h temp_ion $*" u 0:2 via c
p "<grep -h temp_ion $*" u 2 w l, a*x+b, c
print "Tavg=",c," dT/dt=",a
fit $range a*x+b "<grep -h temp_ion $*" u 0:2 via a,b
fit $range c "<grep -h temp_ion $*" u 0:2 via c
p $range "<grep -h temp_ion $*" u 2 w l, a*x+b, c
print "Tavg=",c," dT/dt=",a
EOF
#!/bin/bash
# volume.plt: plot the unit cell volume during one or more MD simulations
# use: volume.plt mdrun1.r [mdrun2.r ...]
if [ $1 == "-range" ]
then
range=$2
shift 2
fi
gnuplot -persist <<EOF
set grid
plot "<grep -h '<unit_cell_volume>' $*" u 2 w l
plot $range "<grep -h '<unit_cell_volume>' $*" u 2 w l
EOF
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment