Commit b7768b66 by Francois Gygi

added plot scripts


git-svn-id: http://qboxcode.org/svn/qb/trunk@1418 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 97f42347
#!/bin/bash
# cell.plt: plot cell parameters during an MD simulation
gnuplot -persist <<EOF
plot "<grep -h -A3 '<unit_cell' $* | grep a=" u 2 w l, \
"<grep -h -A3 '<unit_cell' $* | grep a=" u 3 w l, \
"<grep -h -A3 '<unit_cell' $* | grep a=" u 4 w l, \
"<grep -h -A3 '<unit_cell' $* | grep b=" u 2 w l, \
"<grep -h -A3 '<unit_cell' $* | grep b=" u 3 w l, \
"<grep -h -A3 '<unit_cell' $* | grep b=" u 4 w l, \
"<grep -h -A3 '<unit_cell' $* | grep c=" u 2 w l, \
"<grep -h -A3 '<unit_cell' $* | grep c=" u 3 w l, \
"<grep -h -A3 '<unit_cell' $* | grep c=" u 4 w l, 0
fit ax "<grep -h -A3 '<unit_cell' $* | grep a=" u 0:2 via ax
fit ay "<grep -h -A3 '<unit_cell' $* | grep a=" u 0:3 via ay
fit az "<grep -h -A3 '<unit_cell' $* | grep a=" u 0:4 via az
fit bx "<grep -h -A3 '<unit_cell' $* | grep b=" u 0:2 via bx
fit by "<grep -h -A3 '<unit_cell' $* | grep b=" u 0:3 via by
fit bz "<grep -h -A3 '<unit_cell' $* | grep b=" u 0:4 via bz
fit cx "<grep -h -A3 '<unit_cell' $* | grep c=" u 0:2 via cx
fit cy "<grep -h -A3 '<unit_cell' $* | grep c=" u 0:3 via cy
fit cz "<grep -h -A3 '<unit_cell' $* | grep c=" u 0:4 via cz
print "avg a: ", ax, ay, az
print "avg b: ", bx, by, bz
print "avg c: ", cx, cy, cz
EOF
#!/bin/bash
# econst.plt: plot <econst> in one or more MD simulations
# use: econst.plt mdrun1.r [mdrun2.r ...]
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
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
gnuplot -persist <<EOF
plot "<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 ...]
gnuplot -persist <<EOF
p "<grep -h econst $*" u 2 w l, "<grep -h '<etotal>' $*" u 2 w l
EOF
#!/bin/bash
# econste_cmp.plt: compare <econst> and <etotal> in two MD simulations
# use: econste_cmp.plt mdrun1.r mdrun2.r
gnuplot -persist <<EOF
p "<grep -h econst $1" u 2 w l, "<grep -h '<etotal>' $1" u 2 w l, \
"<grep -h econst $2" u 2 w l, "<grep -h '<etotal>' $2" u 2 w l
EOF
#!/bin/bash
# etotal.plt: plot <etotal> in one or more simulations
# use: etotal.plt run1.r [run2.r ...]
gnuplot -persist <<EOF
plot "<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
gnuplot -persist <<EOF
set grid
plot "<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 ...]
gnuplot -persist <<EOF
plot "<grep -h etotal $*" 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
gnuplot -persist <<EOF
plot "<grep '<etotal_int>' $1" u 2 w l, "<grep '<etotal_int>' $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 ...]
gnuplot -persist <<EOF
p "<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 ...]
gnuplot -persist <<EOF
plot "<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 ...]
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
EOF
#!/bin/bash
# volume.plt: plot the unit cell volume during one or more MD simulations
# use: volume.plt mdrun1.r [mdrun2.r ...]
gnuplot -persist <<EOF
set grid
plot "<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