From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Sat Aug 05 2006 - 12:05:51 CDT

On 8/5/06, Shatadal Ghosh <shatadal_ghosh_at_hotmail.com> wrote:
> Hi,
>
> My problem is that I want to choose a subset of atoms based on a
> particular criterion. The criterion is whether the atom contains a
> particular value in a column in the pdb file. This column is appended to
> the pdb file at columns beyond the pdb specification so the pdb file can
> be visualised in vmd.

> Can I refer to the column number in a Tcl/Tk script? I am a Tcl/Tk
> newbie and I looked through the Tcl/Tk help but was unable to find a way
> to do it.

no. since this value is in a non-standard field, it will be completely ignored
by VMD. your best bet will be to first process the pdb file externally to
create a file, that only contains the data you want to use in the selection
string and then store it in the 'user' field. see. e.g.
http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-vmd/part3.html#chap5_sect3
for an example on how to store a propery in the user field and
http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-vmd/part3.html#chap5_sect4
for an example on how to read information from an external file.

with the data in the user field you can then have selections like: user = 1 or
user < 0 and so on.

> Basically how do I write the following (which is awk-like) in the Tk
> console?
>
> if ($<col number> == <some value>) >> atom_selection_1

VMD does not work like this.

> I went through the selection choices in the selections tab of the
> Graphical Representations window and there are some volindex, vol and
> interpvol keywords. Can these be used?

no.

cheers,
    axel.

>
> Thanks.
>
>
> ---
> avast! Antivirus: Outbound message clean.
> Virus Database (VPS): 0631-3, 08/04/2006
> Tested on: 8/5/2006 11:04:56 AM
> avast! - copyright (c) 2000-2006 ALWIL Software.
> http://www.avast.com
>
> _________________________________________________________________
> Don't just search. Find. Check out the new MSN Search!
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>
>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
  Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.