Skip to content

Commit

Permalink
checkforce updated
Browse files Browse the repository at this point in the history
checkforce updated to cope with reading OUTCAR when no forces have yet
been written to disk.
  • Loading branch information
bjmorgan committed Jan 5, 2012
1 parent 8597cda commit 723336b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions checkforce 100755 → 100644
@@ -1,8 +1,8 @@
#! /usr/bin/perl -w

# checkforce v0.2.2
# checkforce v0.2.3
# Checks for convergence of geometry optimisations in VASP
# last updated November 14, 2011
# last updated 5/1/12
# written by Benjamin J. Morgan

use Getopt::Long;
Expand Down Expand Up @@ -37,7 +37,7 @@ Optional arguments:
Standard output:
remainder: < sum{force on atom - force convergence} / number of atoms >
maximum: < max non-converged forces >
maxiumum: < max non-converged forces >
not-opt: < number of non-converged forces > / < number of atoms >\n";
exit 0;
}
Expand Down Expand Up @@ -105,5 +105,9 @@ while (@outcar) {
if ($verbose){
print "$theseforces\n";
}
#printf "%g %g $g\n", $excessforce/$nforces, $maxforce, $noverforce;
printf "remainder:\t%g\nmaximum:\t%g\nnot-opt:\t%g / %g\n", $excessforce/$nforces, $maxforce, $noverforce, $nforces;

if (defined $nforces) { # check that at least one set of forces has been outputted
printf "remainder:\t%g\nmaximum:\t%g\nnot-opt:\t%g / %g\n", $excessforce/$nforces, $maxforce, $noverforce, $nforces;
} else {
printf "remainder:\t#\nmaximum:\t#\nnot-opt:\t# / #\n";
}

0 comments on commit 723336b

Please sign in to comment.