From: Ajasja Ljubetič (
Date: Fri Oct 29 2010 - 15:10:54 CDT


set sel [atomselect top "z>-1 and z <1"]
$sel get {x y}

will select everything lying in the xy plane betwen z>-1 and z<1 and output
the x y coordinates.

when designing a new selection it is most useful to create a new
representation and enter the selection there, so one can see exactly which
atoms are selected.


2010/10/29 Christian Jorgensen <>

> Hi all,
> I am trying to write a Tcl script for calculating the xy-plane of my
> molecules in the solvent box as given in the trajectory, dcd, output file. I
> want to know the coordinates of the molecule(s) in the xy-plane, and then I
> want to map this number density distribution of all atoms of the trajectory
> onto the z-axis to create a slice of volume
> xyz
> Question: Does anyone know a command in Tcl to make a selection (when the
> .tcl script is source in VMD) to select a flat xy-region and output the
> coordinates?
> Any help would be most appreciated!
> christian