From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Jan 25 2021 - 23:55:19 CST

Hi,
  Rather than directly sourcing the script files that make up the
plugin, the best approach is to load the plugin using just the
"package require cliptool" command.

If you're running VMD without a GUI, you would need to make
changes to the source code and/or pull the key routines into your
own scripts.

It's not entirely clear if the only variable you're trying to access
is ::ClipTool::eye_vector, but I would expect that should work fine
under normal circumstances.

The "mol new" command with no associated molecule files is likely
triggering a bug/limitation in the cliptool code which is expecting
the top molecule to contain at least one graphical representation.
Without a graphical representation, there are no clipping planes
to define/query. I suggest that instead of adding "mol new" you
only create the molecule at the time you actually load a molecular
structure file.

Best,
  John Stone
  vmd_at_ks.uiuc.edu

On Mon, Jan 18, 2021 at 06:58:43PM +0100, Edgar Galicia wrote:
> Dear users,
>
> I want to use the eye_vector variable from the clipping tool to cut some mols but I???m having problems. I already tried to source the cliptool1.0 package from the same script and from the .vmdrc file without success. If I run as a first instruction
>
> set dir /home/edgargalicia/local/vmd/lib/plugins/noarch/tcl/cliptool1.0
> source $dir/pkgIndex.tcl
> package require cliptool
> ::ClipTool::eye_vector
>
> it gives me a good value
>
> /home/edgargalicia/PROGRAMS/vmd-1.9.3/plugins/noarch/tcl/cliptool1.0/
> 1.0
> 0.0 0.0 -1.0
>
> But after the statement mol new ??? I got
>
> can't read "whichclip": no such variable
>
> Using the GUI is quite easy to hit the normal follows view toggle but I am running a tcl script and that is not an option. Can you help me to extract the eye_vector?
>
> Best regards,
> Edgar G.
> ____________________________________________
> Edgar Galicia-Andrés, PhD
> Institute of Molecular Modeling and Simulation
> University of Natural Resources and Life Sciences
> Muthgasse 18/VI-54
> A-1190 Vienna, Austria
>

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/