small tweaks

This commit is contained in:
Axel Kohlmeyer
2022-02-14 18:07:29 -05:00
parent c46dd3675a
commit 9a200c9b79
2 changed files with 12 additions and 7 deletions

View File

@ -9,15 +9,15 @@ pair_coeff * * @FORTRANFILE@ @ELEM1@ @ELEM2@
variable etot equal etotal
variable press equal press
thermo_style custom pe etotal press
thermo_style custom pe etotal press
run 0
run 0 post no
variable efor equal ${etot}
variable pfor equal ${press}
thermo_style custom pe etotal v_efor press v_pfor
run 0
run 0 post no
pair_coeff * * @PYTHONFILE@ @ELEM1@ @ELEM2@
@ -25,9 +25,13 @@ variable epyt equal ${etot}
variable ppyt equal ${press}
thermo_style custom pe etotal v_epyt press v_ppyt
run 0
run 0 post no
variable e equal "1 - v_epyt/v_efor"
variable p equal "1 - v_ppyt/v_pfor"
variable de equal v_epyt-v_efor
variable dp equal v_ppyt-v_pfor
print "Relative energy and pressure error for pair @ELEM1@ @ELEM2@ de = $e; dp = $p" append ../errors.dat
print "Absolute energy and pressure error for pair @ELEM1@ @ELEM2@ de = ${de}; dp = ${dp}" append ../errors.dat

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash
elements=(Cu Ag Au Ni Pd Pt Al Pb Fe Mo Ta W Mg Co Ti Zr)
elements=(Cu Ag Au Ni Pd Pt Al Pb Fe Mo Ta W Mg Co Ti Zr Cr)
LMP=${LMP-../../../src/lmp_serial}
rm -r tmp
for ((i=0; i< ${#elements[@]}; i=$i+1))
@ -18,14 +19,14 @@ do
sed -i "s/@ELEM1@/${e1}/g" EAM.input
sed -i "s/@ELEM2@/${e2}/g" EAM.input
./a.out < EAM.input
mv "${e1}${e2}_Zhou04.eam.alloy" ${fortranfile}
mv "${e1}${e2}.eam.alloy" ${fortranfile}
python create_eam.py -n ${e1} ${e2}
mv "${e1}${e2}.eam.alloy" ${pythonfile}
sed -i "s/@ELEM1@/${e1}/g" in.lmp
sed -i "s/@ELEM2@/${e2}/g" in.lmp
sed -i "s/@PYTHONFILE@/${pythonfile}/g" in.lmp
sed -i "s/@FORTRANFILE@/${fortranfile}/g" in.lmp
lmp -i in.lmp
${LMP} -i in.lmp
cd ../
rm -r tmp
done