From: Pawel Siuda (siuda.pawel_at_gmail.com)
Date: Wed Nov 28 2012 - 08:42:11 CST

Thanks John,

As you suggested, I was trying to write a script utilising user field.
However, I am kind of new to tcl and sth is still wrong with this script.
It is supposed to read in a pdb file, extract B value for each atom,
ascribing its value to 'user' and then create a representation of atoms
with specific values of B for all the frames of the trajectory. However, it
is not working properly - user values are not being ascribed properly.
Could you help me fix this problem?

Paweł

#########
display projection orthographic

set dane [open "hyd.pdb" r]
set numframes [molinfo top get numframes]
set sel [atomselect top "all"]
for {set i 0} {$i<$numframes} {incr i} {

  gets $dane
  gets $dane
  gets $dane
  gets $dane
  gets $dane
  for {set j 0} {$j < 15875} {incr j} {
  gets $dane war
  set lst [split $war " "]
  set k [llength $lst]
  set l [expr {$k - 1}]
  set z "[lindex $lst $l]"
  $sel set user $z
  }
  gets $dane
  gets $dane
  $sel frame $i
}
$sel delete

mol representation VDW 0.500000 10.000000
mol color Name
mol material Opaque
mol selection {user >= 4}
mol addrep top
set molid 0
set n [molinfo $molid get numreps]
for {set i 0} {$i < $n} {incr i} {
    mol selupdate $i $molid on
}
animate goto start
############

On Mon, Nov 26, 2012 at 10:51 PM, John Stone <johns_at_ks.uiuc.edu> wrote:

> Hi,
> You should be using one of the "user" fields to store anything that
> is time-varying. The current VMD PDB plugin does not try to store
> the various PDB fields as time-varying data because the "beta" field in
> VMD is not a time-varying field. That said, you can write a script
> that will load the PDBs and copy their beta fields into the user field
> for a given timestep if you like.
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Mon, Nov 26, 2012 at 10:41:15PM +0100, Pawel Siuda wrote:
> > Hi all,
> > I am trying to visualise a trajectory in which for every frame number
> of
> > molecules of interest is changing. I have used beta field in pdb file
> to
> > store a descriptor for every molecule in the system and I am trying
> to use
> > it to visualise molecules of interest. However, seems like VMD is not
> > updating values of beta field every frame.
> > I was using GUI (graphics>representations>selected atoms) to try to
> > visualise atoms with specified value of the beta field and I have
> checked
> > the 'update selection every frame ' button. I was also trying to use
> tcl
> > scripts (utilizing atomselect macros) to do the same, but with no
> success.
> > Selections based on distance do work fine in both cases, but based on
> beta
> > value seem not to work properly.
> > here is the code I was trying to use:
> > atomselect macro bett { beta > 4}
> > mol representation VDW 0.700000 20.000000
> > mol color Name
> > mol material Opaque
> > mol selection {bett}
> > mol addrep top
> > set molid 0
> > set n [molinfo $molid get numreps]
> > for {set i 0} {$i < $n} {incr i} {
> > A A mol selupdate $i $molid on
> > }
> > animate goto start
> > Can anyone help me with utilizing beta field to visualize changing
> number
> > of atoms during trajectory or give a clue hove to obtain this goal in
> some
> > other way?
> > PaweAA*
>
> --
> NIH Resource for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> http://www.ks.uiuc.edu/Research/vmd/ Fax: 217-244-6078
>