TABLE OF CONTENTS
::pwtk::pwi::getPrimVec
SYNOPSIS
proc ::pwtk::pwi::getPrimVec {} {
PURPOSE
Get lattice vectors from the pw.x input data (in alat units), i.e.:
ax ay az bx by bz cx cy cz
If ibrav == 0 (no CELL_PARAMETERS card) an empty string is returned.
SOURCE
set vec [::pwtk::input::cardGetContent CELL_PARAMETERS] set nl "" foreach line [split $vec \n] { # check for syntax correctness set len [llength $line] if { $len == 3 } { append new_vec ${nl}${line} set nl "\n" } elseif { $len > 0 } { # it's not an empty line -> SYNTAX error pwtk::error "syntax error in CELL_PARAMETERS card, line = $line" } } return $new_vec }