TABLE OF CONTENTS


71-tabulate

DESCRIPTION

This example shows how to use the PWTK "tabulate" feature to automatically produce snapshots of structures for a set of pw.x output files with xcrysden (www.xcrysden.org) and tabulate them. A similar procedure is also available for a set of pw.x input files (see below).

BEWARE

The ::pwtk::pwo::tabulateStructs requires at least one xcrysden script file, which can be produced by manually visualizing the structure from a given pw.x output file with xcrysden. After the structure display is properly set, save the xcrysden script via the menu: "File-->Save Current State".

This example utilizes the bg.pwtk example to produce a set of pw.x output files.

EXAMPLE SOURCE FILE

tabulate.pwtk

SOURCE

# activate the restart mode
#
# (bg.pwtk uses child background processes, hence we need to propagate the restart mode)
propagate {
    restart on
}
import bg.pwtk


# sort the O/Al(111)-1x1-2L pw.x output files by energy

set pwoFiles [::pwtk::pwo::sortFiles -by energy relax-z.O-*,*.Al111-1x1-2L.out]

# make snapshots of the pw.x output files stored in the $pwoFiles variable
# (a similar command exists for pw.x input files, see ::pwtk::pwi::tabulateStructs)

::pwtk::pwo::tabulateStructs -lc -reduce 2 -xcd 2 -ncol 6 structures.tex $pwoFiles topview.xcrysden


# let's compile the LaTeX file

print "Compiling the LaTeX file: structures.tex"
try {
    exec pdflatex structures.tex
    exec pdflatex structures.tex
    print "The compiled LaTeX file is available at [file join [pwd] structures.pdf]"
}

# we can display the generated PDF file with ::pwtk::display
display structures.pdf