From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Feb 27 2002 - 01:34:49 CST

Alan,
  Sorry I haven't written you back yet, I will try and get to debugging
your problem first thing tomorrow. I did have a couple of questions
that I need answered that will help though:
  1) is "GMP_SF.PDB" a real PDB, or something that just "resembles" a PDB?
  2) if it just resembles a PDB, could you send me a copy of that file
     so I can test here?
  3) for the beta question you had, you could just have VMD use
     the existing color ramp, I mainly wanted to point you to the
     area of the user manual that discusses how to rewrite the color
     table, and so on.. I can show you how to accomplish this if you like.

Let me know about the input file, and I'll give you script a try
tomorrow morning.

Thanks,
  John Stone
  vmd_at_ks.uiuc.edu
 

On Tue, Feb 26, 2002 at 03:16:22PM -0500, Alan Wilter Sousa da Silva wrote:
> Hi Dr. Stone
>
> My first attempt:
> -------------------------
> set filei "DMP_SF.PDB"
> set fid [open $filei r]
> set cont 0
> set cmax -1
> set cmin 1
> while { ![eof $fid] } {
> incr cont
> gets $fid line
> set c [lindex $line 9]
> if { $c >= $cmax } {
> set cmax $c
> }
> if { $c <= $cmin } {
> set cmin $c
> }
> }
> close $fid
> set fid [open $filei r]
> for {set i 1} {$i < $cont} {incr i} {
> gets $fid line
> set x [lindex $line 6]
> set y [lindex $line 7]
> set z [lindex $line 8]
> set c [lindex $line 9]
> #here I intend to map the colour
> draw color 8
> draw point [list $x $y $z]
> }
> close $fid
> puts $cmax:$cmin
> --------------------------
>
> But I'm having problem in mapping colour by charge value: 1) printing cmin
> along the loop I can see cmin getting the minimum value for charge but, I
> don't know why, this value is lost at the end of the loop! I can see only
> cmax value when "puts $cmax:$cmin".
>
> 2) Using color change rgb [ expr 17+i] abs(c) 0 0, f. ex., to map, I have
> problem because I can use only about 1000 different color. I don't want to
> re-invent the wheel, but how does VMD map RWB scheme over beta parameter
> for a PDB file?
>
> Meanwhile, I play around about how to fill the space between points.
>
> Again, many thanks for your attention.
>
>
> On Mon, 25 Feb 2002, John Stone wrote:
>
> >
> > Hi,
> > One correction to my pseudo-Tcl:
> >
> > > # (loop over all surface points)
> > > for {set i} {$i < numpoints} {incr i} {
> > > # map potential values to colors here...
> > > # see "tricolor_scale" and other routines in user's guide examples...
> > > # http://www.ks.uiuc.edu/Research/vmd/vmd-1.7.1/ug/node186.html
> > > draw color $c
> > >
> > > # extract surface points from files or lists here
> > > # see Tcl guides for reading files in Tcl scripts..
> > > # set x, y and z
> > >
> > > # draw geometry here...
> > > # http://www.ks.uiuc.edu/Research/vmd/vmd-1.7.1/ug/node167.html
> >
> > draw point [list $x $y $z]
> >
> > > }
> >
> >
> >
>
> --
> -----------------------
> Alan Wilter S. da Silva
> -----------------------
> Laboratório de Física Biológica
> Instituto de Biofísica Carlos Chagas Filho
> Universidade do Brasil/UFRJ
> Rio de Janeiro, Brasil

-- 
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