TABLE OF CONTENTS


::pwtk::pwi::tabulateStructs

SYNOPSIS

proc ::pwtk::pwi::tabulateStructs {args} {

USAGE

 ::pwtk::pwi::tabulateStructs  ?options?  latexFile  pwiFileList  xcrysdenScriptList

OPTIONS

PURPOSE

Plot with xcrysden the structures from the supplied list of pw.x input files ($pwiFileList) and arrange them into a table in LaTeX document ($latexFile).

To instruct xcrysden how to plot each structure, user has to provide at least one xcrysden script (i.e., the state-part of *.xcrysden file). If user supllies more then one xcrysden script ($xcrysdenScriptList), each structure will be plotted several times, i.e., once with each suppplied xcrysden script file.

OPTIONS

ARGUMENTS

SOURCE

    # parse args

    ::pwtk::printTitle TABULATE "tabulation of pw.x input files (::pwtk::pwi::tabulateStructs)"
    
    set options {
        {xcd.arg      1         "do we run xcrysden to make figures"}
        {reduce.arg   3         "reduce the dimensionality of structure"}
        {npage.arg    1         "number of pages the table will span (estimate only)"}
        {ncol.arg    -1         "number of columns (-1 means automatically determined)"}
    }
    array set opt [::cmdline::getoptions args $options [list [lindex [info level 0] 0] options:]]    

    lassign $args latexFile fileList xcrysScriptList
    
    if { $opt(xcd) == 1 } {
        ::pwtk::xcd::runScript 1
    } else {
        ::pwtk::xcd::runScript 0
    }

    # make structure figures

    pwtk::xcd::scriptHead { scripting::filter::pwscfInput $structureFile $reduce }
    set figList [::pwtk::xcd::makeFigs $fileList $xcrysScriptList ic $opt(reduce)]
    
    # make titles & texts ...
    
    foreach file $fileList {
        set prefix [file rootname [file tail $file]]
        lappend titleList $prefix
        lappend infoList [list  "input structure"]
    }
    
    set textList {}

    # puts all figures into latex longtable and write corresponding LaTeX file
    
    ::pwtk::latex::tabulateFigs $latexFile $figList $titleList $infoList $textList $opt(npage) $opt(ncol)
    ::pwtk::print "LaTeX file written to: $latexFile"
}