From 9a200c9b79184c020315f385c8e7c97aca3b25a2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 14 Feb 2022 18:07:29 -0500 Subject: [PATCH] small tweaks --- tools/eam_database/test/in.lmp | 12 ++++++++---- tools/eam_database/test/test.sh | 7 ++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/tools/eam_database/test/in.lmp b/tools/eam_database/test/in.lmp index ecc8f2fc0c..d37bba5b09 100644 --- a/tools/eam_database/test/in.lmp +++ b/tools/eam_database/test/in.lmp @@ -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 + diff --git a/tools/eam_database/test/test.sh b/tools/eam_database/test/test.sh index dae46b5221..3f098902aa 100755 --- a/tools/eam_database/test/test.sh +++ b/tools/eam_database/test/test.sh @@ -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