[xcrysden] Re: XCrysDen stereo
Tone Kokalj
xcrysden@democritos.it
Fri, 24 Jun 2005 11:06:45 +0200
--=-S+ayQEIQSlDJfafi41tz
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Wed, 2005-06-22 at 16:34 +0200, Gerardo Ballabio wrote:
> May I ask you a few things:
>
> - is there a scripting command to turn on stereo?
Let me answer a more general question: "Is there a scripting command for
this or that?"
Basically, xcrysden scripts are Tcl scripts: therein one can use the
whole
Tcl/Tk + all the Tcl-procedures of xcrysden. The "scripting::" namespace
(interface) was created to facilitate some (say, the most common)
operations. Therefore if one wants to achieve some speciality in the
script: look at xcrysden Tcl-code and call the proper procedure with
proper arguments (I know this can be very hard due to spaghetti nature
of xcrysden code).
To answer your particular question: you can turn the stereo mode on
by adding the line: Style3D draw stereo
> - how can I set properties from the "molecular surface settings"
> window? E.g., solid surface with transparency? I couldn't find that
> in the documentation.
By looking in the code (files: menu.tcl, pseudoDen.tcl) I created small
script that does the job (for demo see attached molsurf.tcl script).
> - I've seen there's a scripting command to switch to fullscreen
> display. However I haven't find how to do that in interactive mode,
> is it possible?
Yes, of course: see the http://www.xcrysden.org/doc/intro.html
(section 1.3.1 Mouse events for display window). You need to
double-click
the left-mouse button to toggle the fullscreen display.
>
> And a couple of problems:
> - When in fullscreen mode, if I open any window from the menus (e.g.,
> the exit dialog!), it is obscured by the main display window, which
> stays always on top and I can't raise anything above it. I don't know
> if it's a window manager thing (I run Gnome/Metacity).
Apparently, there is a bad interaction between the Tk and the window
manager (I have the same problems) when the fullscreen mode is on: I use
fullscreen only for display, when I do something else, I rather maximize
the main window.
> - if I go fullscreen and then back in normal mode, right-clicking to
> open the popup menu doesn't work any more. Instead I get an error
> dialog saying "Error: bad window path name "%W"".
Thanks for info. This is a bug. I will fix it.
Regards, Tone
--=-S+ayQEIQSlDJfafi41tz
Content-Disposition: attachment; filename=molsurf.tcl
Content-Type: text/x-tcl; name=molsurf.tcl; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
global env
scripting::open --xsf $env(XCRYSDEN_TOPDIR)/examples/XSF_Files/2.xsf
global check pDen
# configuration options for molecular surface (look at
# Tcl/pseudoDen.tcl for the meaning of individual items)
set pDen(type) gauss
set pDen(radius) cov
set pDen(level) 1.0
set pDen(cutoff) 1.0
set pDen(colorscheme) atomic
set pDen(drawstyle) wire
set pDen(surfacetype) molsurf
set pDen(resolution) 0.35
set pDen(transparent) 0
set pDen(shademodel) smooth
set pDen(monocolor) {0.8 0.8 0.2}
# the two lines below will turn on the "1st" molecular surface with
# default settings
set check(pseudoDens) 1
PseudoDensity
# if after some time one whish to change something, then use:
after 5000 ; # delay in ms
# set new configuration options
set pDen(resolution) 0.25
set pDen(transparent) 1
set pDen(colorscheme) mono
set pDen(drawstyle) solid
# load this new values:
PseudoDenDefaults 0 ; # "0" is index for 1st mol-surf
# update the mol-surf display:
PseudoDenUpdateSurf 0 ; # "0" is index for 1st mol-surf
--=-S+ayQEIQSlDJfafi41tz--