From 9b6dc6eb2a2e35c6d97f9b847fb6ab459d7d7475 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 31 Jul 2024 08:07:24 +0800 Subject: [PATCH] update convergence check --- .../outcar2xyz/multipleFrames-outcars2nep-exyz.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/vasp2xyz/outcar2xyz/multipleFrames-outcars2nep-exyz.sh b/tools/vasp2xyz/outcar2xyz/multipleFrames-outcars2nep-exyz.sh index da598e9ab..76c2c18fb 100755 --- a/tools/vasp2xyz/outcar2xyz/multipleFrames-outcars2nep-exyz.sh +++ b/tools/vasp2xyz/outcar2xyz/multipleFrames-outcars2nep-exyz.sh @@ -34,8 +34,14 @@ converged_files=() non_converged_files=() for file in $(find "$read_dire" -name "OUTCAR"); do + NELM=$(grep "NELM" "$file" | awk '{print $3}' | tr -d ';') + actual_steps=$(grep -c "Iteration" "$file") if grep -q "aborting loop because EDIFF is reached" "$file"; then - converged_files+=("$file") + if [ "$actual_steps" -lt "$NELM" ]; then + converged_files+=("$file") + else + non_converged_files+=("$file") + fi else non_converged_files+=("$file") fi