TABLE OF CONTENTS


::pwtk::pwi::getXSF

SYNOPSIS

proc ::pwtk::pwi::getXSF {} {

DESCRIPTION

Return the XSF-formatted structural data from the current pw.x input data.

SOURCE

    set input  [::fileutil::tempfile pw.]
    set output [::fileutil::tempfile xsf.]

    ::pwtk::pwi_fprint $input
    
    set pwi2xsf [::pwtk::getExecutable [::pwtk::getVar_ PWI2XSF]]
    if { $pwi2xsf eq {} } {
        ::pwtk::error "cannot find the PWI-to-XSF (aka pwi2xsf.sh) converter" 1
    }

    ::pwtk::try_exec -- $pwi2xsf $input > $output
    return [::pwtk::readFile $output]
}