From: Jérôme Hénin (jhenin_at_ifr88.cnrs-mrs.fr)
Date: Mon Feb 21 2011 - 08:18:04 CST

Hi Iman,

If the atoms are labeled, you can obtain their indices with the Tcl
command "label". Here is an example that prints the indices:
foreach l [label list Atoms] { puts [lindex [lindex $l 0] 1]}

Based on this, you can write a script that builds a Tcl list of
indices and passes it to atomselect to create your selection.
Jerome

On 20 February 2011 19:18, Axel Kohlmeyer <akohlmey_at_gmail.com> wrote:
> On Sat, Feb 19, 2011 at 5:33 PM, Iman Salehinia <isalehinia_at_gmail.com> wrote:
>> Dear friends,
>> Is it possible to select atoms which are already labeled by picking from the
>> VMD display? After that, I want to save the coordinates of the selected
>> atoms which I know how to do that.
>
> labeling atoms on the screen and the atom select command are two completely
> different entities, so - to the best of my knowledge - there is no
> direct way to do
> that after the fact. however, VMD you can write script code that is triggered by
> clicking on atoms and would then record the selected atoms and allow to write
> them out.
>
> the poor man's version of this would be to log the vmd console output and
> look up the atom indices and build the selection based on index manually.
>
> axel.
>
>> Thanks,
>> Iman.
>
>
>
> --
> Dr. Axel Kohlmeyer
> akohlmey_at_gmail.com  http://goo.gl/1wk0
>
> Institute for Computational Molecular Science
> Temple University, Philadelphia PA, USA.
>
>