-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathruntmp.csh
41 lines (34 loc) · 983 Bytes
/
runtmp.csh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#! /bin/csh -f
echo "# type MPa gas" > info.txt
# gcmc (time, ps, integer)
set ps = ZZZZZ
# temperature, K
set t = XXXXX
# pressure, MPa
foreach mpa ( YYYYY )
cp -r main ${mpa}MPa
cd ${mpa}MPa
echo "clear" > in.lmp1
echo "variable temp1 index ${t}" >> in.lmp1
echo "variable mpa index ${mpa}" >> in.lmp1
cat in.lmp1 in.lmp-linux > in.lmp
sed -i "s/tgcmc/${ps}/" in.lmp
lammps < in.lmp
@ i = ( ${ps} + 20 ) * 1900
@ max = ( ${ps} + 20 ) * 2000
echo ${i},${max}
echo -n > data.txt
while ( ${i} <= ${max} )
grep " ${i} " log.lammps >> data.txt
echo ${i}
@ i = ${i} + 100
end
script -c 'gnuplot stats.gpl' stats.txt
echo "# MPa gas" > meam_and_std.txt
grep " Mean: " stats.txt >> meam_and_std.txt
grep " Std Dev: " stats.txt >> meam_and_std.txt
grep " Mean: " stats.txt >> ../info.txt
rm in.lmp1 in.lmp2 in.lmp_restart2
cd ..
end
#gnuplot plot_p_vs_wt.gpl