TABLE OF CONTENTS
::pwtk::path::energies
SYNOPSIS
proc ::pwtk::path::energies {pathFile} {
PURPOSE
Get total energies from the path file and identify the TS image.
BEWARE
Energies in the path file are in Hartrees
ARGUMENTS
- pathFile -- neb.x path file
- index -- index of image for which to return the energy
RETURN VALUE
Dictionary with the following keys: nImages iTS Emax E(1) E(2)... E(nImage), where:
- nImages -- number of images
- iTS -- index of the TS image
- Emax -- energy of the TS
- E(1), E(2)... E(nImage) -- energies of images (nImage == number of images)
SOURCE
::pwtk::fileMustExist $pathFile "neb.x path file" set iTS 1 set Emax -1e20 set pathL [split [::pwtk::readFile $pathFile] \n] set nImages [::pwtk::path::nImages $pathFile] foreach ind [lsearch -all $pathL Image:*] { incr i if { $i > $nImages } { # we are past the 'ENERGIES, POSITIONS AND GRADIENTS' section break } set E($i) [lindex $pathL $ind+1] if { $E($i) > $Emax } { set Emax $E($i) set iTS $i } } set result [dict create nImages $nImages iTS $iTS Emax $Emax] for {set i 1} {$i <= $nImages} {incr i} { dict append result E($i) $E($i) } return $result }