VMD-L Mailing List
From: Alan Wilter Sousa da Silva (alan_at_biof.ufrj.br)
Date: Tue Feb 26 2002 - 14:16:22 CST
- Next message: Jim Phillips: "Upcoming NAMD Workshop"
- Previous message: John Stone: "Re: Plotting elect. pot. surface"
- In reply to: John Stone: "Re: Plotting elect. pot. surface"
- Next in thread: John Stone: "Re: Plotting elect. pot. surface"
- Reply: John Stone: "Re: Plotting elect. pot. surface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
- Next message: Jim Phillips: "Upcoming NAMD Workshop"
- Previous message: John Stone: "Re: Plotting elect. pot. surface"
- In reply to: John Stone: "Re: Plotting elect. pot. surface"
- Next in thread: John Stone: "Re: Plotting elect. pot. surface"
- Reply: John Stone: "Re: Plotting elect. pot. surface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]