From: syma (syma.khalid_at_bioch.ox.ac.uk)
Date: Wed Oct 19 2005 - 04:39:12 CDT

Hi Axel,

Thanks for your help. The thing is , I have a file (produced by two other
tcl scripts) in which the binning has already been done. This file contains
data in 3 columns eg:

0 10-20 0
0 21-30 1
0 31-40 1
0 41-50 2
1 10-20 1
1 21-30 0

etc.

Where column 1 is frame number, column 2 is range of z coordinate and column
3 is occurrences of prot-lipid interaction during that frame and in that z
coordinate range.

Please could you show me how the mk3drama.tcl script could be modified to
read in and plot this data? I am not a programmer!

Thank you for your patience and help.

-Syma

-----Original Message-----
From: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] On Behalf Of
Axel Kohlmeyer
Sent: 12 October 2005 19:35
To: syma
Cc: vmd-l_at_ks.uiuc.edu
Subject: Re: vmd-l: binning data for each frame and coordinate

On Wed, 12 Oct 2005, syma wrote:

SM> Hi,

hi,

SM> I was just wondering if there is a way for me to create a 3d data set
with
SM> tcl? The exact problem is:

yes there is.

SM> I have a file containing the resid and centre of mass of every lipid
SM> molecule in contact with protein atoms during a trajectory. So I have
this
SM> info for every frame of my trajectory.
SM>
SM> Is there anyway of binning one of the com coordinates (eg z coordinate)
for
SM> each frame, so I end up with number of contacts as a function of time
and z
SM> coordinate?

please have a look at:
http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-vmd/part6.html#c
hap8_sect5
which creates a phi/psi histogram from a trajectory.

the main thing is, that you can have a two dimensional array and
you need to compute the proper indexes for the binning. it is
probably more obvious, if you convert the line:

incr data([expr int(($phi + 180.0) * $w)],[expr int(($psi + 180.0) * $w)])

into:

set ix [expr int(($phi +180.0) * $w)]
set iy [expr int(($psi +180.0) * $w)]
incr data($ix,$iy)

regards,
        axel.

SM>
SM> If so please can someone help me get started with some of the code.
SM> Thank you, in advance.
SM>
SM> -Syma
SM>
SM> ***************************************************
SM>
SM> Dr Syma Khalid
SM> Department of Biochemistry,
SM> University of Oxford
SM> South Parks Road,
SM> Oxford
SM> OX1 3QU
SM> U.K.
SM>
SM>
SM>
SM> ***************************************************
SM>
SM>
SM>

--
=======================================================================
Axel Kohlmeyer    e-mail: akohlmey_at_cmm.upenn.edu, tel: ++1-215-898-1582
Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.