From: Kailee (kaileeamber_at_googlemail.com)
Date: Fri Jun 15 2007 - 12:21:13 CDT

Dear John,
Thank you.

By reading the tutorials on tcl script and some others' script online, I
think I now have some basic understanding of tcl and found out it is a
really useful tool. While I am still reading books on tcl, I took a try to
write the script myself:

proc collision_bfactor {
set f [open $fname "w"]
set nf [molinfo top get numframes]
set sel1 [atomselect top "protein"]
set sel2 [atomselect top "resname GAS"]
for {set i 0} {$i < $nf} {incr i} {
$sel1 frame $i
$sel1 update
 $sel2 frame $i
$sel2 update
set lists [measure contacts 0.5 $sel1 $sel2]
set l1_atoms [lindex $lists 0]
set l2_atoms [lindex $lists 1]
set length [llength $l2_atoms]
........

This is the part I want to find out the collision times of gas molecules
with each protein atoms for every frame of the trajectories, there must be
quite a few mistakes, and the next thing I want to do is sum the collision
times for all the frames and put these numbers to the B-factor of according
protein atoms, then save as pdb file (or whatever VMD can read), I don't
have any idea how to do this. I appreciate it very much for any suggestions
on how to do it, and corrections on my script. Thank you very much!

With my best regards,
Kailee

On 6/13/07, John Stone <johns_at_ks.uiuc.edu> wrote:
>
>
> Hi,
> I don't know of one off hand, and I don't have time to write one
> for you, but I don't expect that it would be too difficult. Give it
> a try and see how you do. If you can at least get started on it others
> should be able to help you tune it up and finish it.
>
> John Stone
> vmd_at_ks.uiuc.edu
>
>
> On Tue, Jun 12, 2007 at 02:58:36PM +0100, Kailee wrote:
> > Dear John,
> >
> > Thank you for your reply. As I am not very skilled with tcl script,
> can I
> > ask is there any similar scripts written by others that I can modify
> from?
> >
> > Thank you.
> > Best regards,
> > Kailee
> >
> >
> > On 6/11/07, John Stone <johns_at_ks.uiuc.edu> wrote:
> > >
> > >
> > >Hi,
> > >You could do this using a script combining the output of
> > >the "measure contacts" commands with your own code to update
> > >the per-atom Beta field per-collision. You can probably get
> > >"measure contacts" to do the hard part of the work, after which you
> > >will just need to shuffle the output to the beta fields of the affected
> > >atoms.
> > >
> > >Cheers,
> > >John Stone
> > >vmd_at_ks.uiuc.edu
> > >
> > >On Mon, Jun 11, 2007 at 06:10:30PM +0100, Kailee wrote:
> > >> Dear all,
> > >>
> > >> I want to analyse a trajectory file from AMBER (.mdcrd), which is a
> MD
> > >> simulation of some gas molecules diffusing into a protein. Is there
> any
> > >way
> > >> to calculate the number of times each protein atom collides with the
> gas
> > >> molecules, and then store the number of collisions for each protein
> atom
> > >in
> > >> the B-factor of the PDB file so that I can visualise the structure in
> > >VMD?
> > >>
> > >> Thank you for any suggestions.
> > >>
> > >> Best regards,
> > >> Kailee
> > >
> > >--
> > >NIH Resource for Macromolecular Modeling and Bioinformatics
> > >Beckman Institute for Advanced Science and Technology
> > >University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> > >Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> > >WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
> > >
>
> --
> NIH Resource for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
>