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
- latvec -- unit-cell lattice vectors (specified either as a vector of 9 numbers, {v1x v1y v1z v2x v2y v2z v3x v3y v3z}, or 3x3 list of lists)
- coor -- atomic crystal coordinates
RETURN VALUE
- atomic Cartesian coordinates in the same units as 'latvec'
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 }