/usr/share/xcrysden/Tcl/gzmat.tcl is in xcrysden-data 1.5.60-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | #############################################################################
# Author: #
# ------ #
# Anton Kokalj Email: Tone.Kokalj@ijs.si #
# Department of Physical and Organic Chemistry Phone: x 386 1 477 3523 #
# Jozef Stefan Institute Fax: x 386 1 477 3811 #
# Jamova 39, SI-1000 Ljubljana #
# SLOVENIA #
# #
# Source: $XCRYSDEN_TOPDIR/Tcl/gzmat.tcl
# ------ #
# Copyright (c) 1996-2003 by Anton Kokalj #
#############################################################################
# ------------------------------------------------------------------------
# loads structure from Gaussian input file (requires babel)
# ------------------------------------------------------------------------
proc gzmat {filedir {viewmol_exists {}}} {
global xcMisc env system
if { ! [info exists xcMisc(babel)] } {
if [winfo exists .title] {
destroy .title
}
ErrorDialog "--gzmat option requires the definition of xcMisc(babel) in the ~/.xcrysden/custom-definitions"
exit
} else {
set env(BABEL) $xcMisc(babel)
}
# OpenBabel seems not to need BABEL_DIR variable !!!
#if { ! [info exists xcMisc(babel_dir)] && ! [info exists env(BABEL_DIR)] } {
# if [winfo exists .title] {
# destroy .title
# }
# ErrorDialog "neither xcMisc(babel_dir) nor environmental BABEL_DIR variables defined. Can't run BABEL."
# exit
#}
# xcMisc(babel_dir) has priority over env(BABEL_DIR)
if { [info exists xcMisc(babel_dir)] } {
set env(BABEL_DIR) $xcMisc(babel_dir)
}
set head [file rootname [file tail $filedir]]
puts stderr "Executing babel ..."
xcCatchExecReturnRedirectStdErr sh $system(TOPDIR)/scripts/gzmat2xsf.sh $filedir > $system(SCRDIR)/$head.xsf
if { ![file exists $system(SCRDIR)/$head.xsf] \
|| [file size $system(SCRDIR)/$head.xsf] == 0 } {
if [winfo exists .title] {
destroy .title
}
ErrorDialog "an error occured while executing BABEL program."
exit
}
if { $viewmol_exists == "" } {
ViewMol .
}
xsfOpen $system(SCRDIR)/$head.xsf
}
proc gzmat_menu {openwhat} {
global system
set filedir [tk_getOpenFile -defaultextension .xsf \
-filetypes {
{ {All Files} {.*} }
} -initialdir $system(PWD) -title $openwhat]
if { $filedir == "" } {
return
}
gzmat $filedir viewmol_exists
}
|