TABLE OF CONTENTS


::pwtk::coorToCartesian

SYNOPSIS

proc ::pwtk::coorToCartesian {latvec coor} {

PURPOSE

Transform crystal coordinates to Cartesian coordinates. The transformed coordinates will be in the same unit as the input unit-cell vectors.

ARGUMENTS

RETURN VALUE

SOURCE

    set cartCoor {}

    set latvec [matricize $latvec]
    foreach line [split [purifyCoor $coor] \n] {
        if { [llength $line] == 4 || [llength $line] == 7 } {
            set abc [lassign $line asym]
            append cartCoor "$asym [::math::linearalgebra::matmul $abc $latvec]\n"
        }
    }
    return $cartCoor
}