diff --git a/tools/vasp2xyz/outcar2xyz/multipleFrames-outcars2nep-exyz.sh b/tools/vasp2xyz/outcar2xyz/multipleFrames-outcars2nep-exyz.sh index 76c2c18fb..1f1c6fca6 100755 --- a/tools/vasp2xyz/outcar2xyz/multipleFrames-outcars2nep-exyz.sh +++ b/tools/vasp2xyz/outcar2xyz/multipleFrames-outcars2nep-exyz.sh @@ -34,8 +34,16 @@ converged_files=() non_converged_files=() for file in $(find "$read_dire" -name "OUTCAR"); do + NSW=$(grep "number of steps for IOM" "$file" | awk '{print $3}') + + if [ "$NSW" -ne 0 ]; then + converged_files+=("$file") + continue + fi + 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 if [ "$actual_steps" -lt "$NELM" ]; then converged_files+=("$file")