TABLE OF CONTENTS
::pwtk::pwo::getForces
SYNOPSIS
proc ::pwtk::pwo::getForces {args} {
USAGE
::pwtk::pwo::getForces [-k] pwoFile [index]
PURPOSE
Get the index-th atomic forces (i.e. "Forces acting on atoms") from pw.x output file (in Ry/Bohr units)
RETURN VALUE
If -k option is specified then it returns atomic forces with the keyword line:
ATOMIC_FORCES fx1 fy1 fz1 fx2 fy2 fz2 fx3 fy3 fz3 ....
otherwise it returns:
fx1 fy1 fz1 fx2 fy2 fz2 fx3 fy3 fz3 ....
ARGUMENTS
- -k --- (optional) option to request to include the ATOMIC_FORCES line in the result
- pwoFile --- pw.x output file
- index --- (optional, default = end) sequential index of the atomic forces to extract. The first forces in the output file have the index of 0, while for the last reported forces positions a string "end" can be used.
SOURCE
return [eval ::pwtk::pwo::getStructData forces $args] }