TABLE OF CONTENTS


::pwtk::pwo::getStruct

SYNOPSIS

proc ::pwtk::pwo::getStruct {args} {

USAGE

   ::pwtk::pwo::getStruct [-k] pwoFile [index]

PURPOSE

Get the index-th structure (CELL_PARAMETERS and ATOMIC_POSITIONS) from pw.x output file, i.e.:

RETURN VALUE

If -k option is specified then it returns atomic positions with keyword line:

     CELL_PARAMETERS (alat)
        ax ay az
        bx by bz
        cx cy cz

     ATOMIC_POSITIONS (alat)
        AtmPos1   x1 y1 z1   [if_pos(1) if_pos(2) if_pos(3)]
        AtmPos2   x2 y2 z2   [if_pos(1) if_pos(2) if_pos(3)]
        AtmPos3   x3 y3 z3   [if_pos(1) if_pos(2) if_pos(3)]
        ....    

else it return

        ax ay az
        bx by bz
        cx cy cz

        AtmPos1   x1 y1 z1   [if_pos(1) if_pos(2) if_pos(3)]
        AtmPos2   x2 y2 z2   [if_pos(1) if_pos(2) if_pos(3)]
        AtmPos3   x3 y3 z3   [if_pos(1) if_pos(2) if_pos(3)]
        ....    

BEWARE

CELL_PARAMETERS card is returned only if the card is found in the PWO output file unless index==0 or index==end (in this case, the initial lattice-vectors are returned).

ARGUMENTS

SOURCE

    return [eval ::pwtk::pwo::getStructData both $args]
}