>    1. color by b-factor (Smita Bhatia)

> --__--__--

> Message: 1
> Date: Thu, 25 Sep 2003 18:49:51 -0400 (EDT)
> From: Smita Bhatia <sm...@mailer.sb.fsu.edu>
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] color by b-factor

> Hello all,
> I have colored and rendered a pdb file in pymol according to the
> b-factor.
> What i would like to do is to also show a vertical/horizontal
> color bar indiacting the b-factor variation. is there a way to do this
> in pymol?

Hello Smita,

I had the same problem a while ago and worked out the following:

1. Create a pdb-file which contains CA positions only, whereas the numbers
correspond to your wanted increments of colors. Be sure that CA's are
separated by a contant value, say 5 Angstroem.

example (30 zones):
=======

ATOM      1  CA  LYS C   1       0.000   0.000   0.000  1.00 20.00
C
ATOM      2  CA  LYS C   2       5.000   0.000   0.000  1.00 20.00
C
ATOM      3  CA  LYS C   3      10.000   0.000   0.000  1.00 20.00
C
ATOM      4  CA  LYS C   4      15.000   0.000   0.000  1.00 20.00
C
ATOM      5  CA  LYS C   5      20.000   0.000   0.000  1.00 20.00
C
ATOM      6  CA  LYS C   6      25.000   0.000   0.000  1.00 20.00
C
ATOM      7  CA  LYS C   7      30.000   0.000   0.000  1.00 20.00
C
ATOM      8  CA  LYS C   8      35.000   0.000   0.000  1.00 20.00
C
ATOM      9  CA  LYS C   9      40.000   0.000   0.000  1.00 20.00
C
ATOM     10  CA  LYS C  10      45.000   0.000   0.000  1.00 20.00
C
ATOM     11  CA  LYS C  11      50.000   0.000   0.000  1.00 20.00
C
ATOM     12  CA  LYS C  12      55.000   0.000   0.000  1.00 20.00
C
ATOM     13  CA  LYS C  13      60.000   0.000   0.000  1.00 20.00
C
ATOM     14  CA  LYS C  14      65.000   0.000   0.000  1.00 20.00
C
ATOM     15  CA  LYS C  15      70.000   0.000   0.000  1.00 20.00
C
ATOM     16  CA  LYS C  16      75.000   0.000   0.000  1.00 20.00
C
ATOM     17  CA  LYS C  17      80.000   0.000   0.000  1.00 20.00
C
ATOM     18  CA  LYS C  18      85.000   0.000   0.000  1.00 20.00
C
ATOM     19  CA  LYS C  19      90.000   0.000   0.000  1.00 20.00
C
ATOM     20  CA  LYS C  20      95.000   0.000   0.000  1.00 20.00
C
ATOM     21  CA  LYS C  21     100.000   0.000   0.000  1.00 20.00
C
ATOM     22  CA  LYS C  22     105.000   0.000   0.000  1.00 20.00
C
ATOM     23  CA  LYS C  23     110.000   0.000   0.000  1.00 20.00
C
ATOM     24  CA  LYS C  24     115.000   0.000   0.000  1.00 20.00
C
ATOM     25  CA  LYS C  25     120.000   0.000   0.000  1.00 20.00
C
ATOM     26  CA  LYS C  26     125.000   0.000   0.000  1.00 20.00
C
ATOM     27  CA  LYS C  27     130.000   0.000   0.000  1.00 20.00
C
ATOM     28  CA  LYS C  28     135.000   0.000   0.000  1.00 20.00
C
ATOM     29  CA  LYS C  29     140.000   0.000   0.000  1.00 20.00
C
ATOM     30  CA  LYS C  30     145.000   0.000   0.000  1.00 20.00
C
ATOM     31  CA  LYS C  31     150.000   0.000   0.000  1.00 20.00
C

- - - - - -

2. Load this new pseudobar-pdb file into PyMOL, make bonds between increment
1 and increment 2 [increment 2 and increment 3 and so on...], define/assign
a smooth color for each increment (copy colors definition from automatically
created colors made by b-factor script) and show the b-factor bar as lines:

example:
========

load pseudobar.pdb
create zone1, pseudobar and res 1:2
create zone2, pseudobar and res 2:3
create zone3, pseudobar and res 3:4
create zone4, pseudobar and res 4:5
create zone5, pseudobar and res 5:6
create zone6, pseudobar and res 6:7
create zone7, pseudobar and res 7:8
create zone8, pseudobar and res 8:9
create zone9, pseudobar and res 9:10
create zone10, pseudobar and res 10:11
create zone11, pseudobar and res 11:12
create zone12, pseudobar and res 12:13
create zone13, pseudobar and res 13:14
create zone14, pseudobar and res 14:15
create zone15, pseudobar and res 15:16
create zone16, pseudobar and res 16:17
create zone17, pseudobar and res 17:18
create zone18, pseudobar and res 18:19
create zone19, pseudobar and res 19:20
create zone20, pseudobar and res 20:21
create zone21, pseudobar and res 21:22
create zone22, pseudobar and res 22:23
create zone23, pseudobar and res 23:24
create zone24, pseudobar and res 24:25
create zone25, pseudobar and res 25:26
create zone26, pseudobar and res 26:27
create zone27, pseudobar and res 27:28
create zone28, pseudobar and res 28:29
create zone29, pseudobar and res 29:30
create zone30, pseudobar and res 30:31

hide nonbonded, pseudobar

bond (/zone1//C/1/CA),(/zone1//C/2/CA)
bond (/zone2//C/2/CA),(/zone2//C/3/CA)
bond (/zone3//C/3/CA),(/zone3//C/4/CA)
bond (/zone4//C/4/CA),(/zone4//C/5/CA)
bond (/zone5//C/5/CA),(/zone5//C/6/CA)
bond (/zone6//C/6/CA),(/zone6//C/7/CA)
bond (/zone7//C/7/CA),(/zone7//C/8/CA)
bond (/zone8//C/8/CA),(/zone8//C/9/CA)
bond (/zone9//C/9/CA),(/zone9//C/10/CA)
bond (/zone10//C/10/CA),(/zone10//C/11/CA)
bond (/zone11//C/11/CA),(/zone11//C/12/CA)
bond (/zone12//C/12/CA),(/zone12//C/13/CA)
bond (/zone13//C/13/CA),(/zone13//C/14/CA)
bond (/zone14//C/14/CA),(/zone14//C/15/CA)
bond (/zone15//C/15/CA),(/zone15//C/16/CA)
bond (/zone16//C/16/CA),(/zone16//C/17/CA)
bond (/zone17//C/17/CA),(/zone17//C/18/CA)
bond (/zone18//C/18/CA),(/zone18//C/19/CA)
bond (/zone19//C/19/CA),(/zone19//C/20/CA)
bond (/zone20//C/20/CA),(/zone20//C/21/CA)
bond (/zone21//C/21/CA),(/zone21//C/22/CA)
bond (/zone22//C/22/CA),(/zone22//C/23/CA)
bond (/zone23//C/23/CA),(/zone23//C/24/CA)
bond (/zone24//C/24/CA),(/zone24//C/25/CA)
bond (/zone25//C/25/CA),(/zone25//C/26/CA)
bond (/zone26//C/26/CA),(/zone26//C/27/CA)
bond (/zone27//C/27/CA),(/zone27//C/28/CA)
bond (/zone28//C/28/CA),(/zone28//C/29/CA)
bond (/zone29//C/29/CA),(/zone29//C/30/CA)
bond (/zone30//C/30/CA),(/zone30//C/31/CA)

show lines, pseudobar

set_color farbe1=[ 0.0, 0.0, 1.0 ]
set_color farbe2=[ 0.0, 0.1, 1.0 ]
set_color farbe3=[ 0.0, 0.3, 1.0 ]
set_color farbe4=[ 0.0, 0.4, 1.0 ]
set_color farbe5=[ 0.0, 0.6, 1.0 ]
set_color farbe6=[ 0.0, 0.7, 1.0 ]
set_color farbe7=[ 0.0, 0.8, 1.0 ]
set_color farbe8=[ 0.0, 1.0, 1.0 ]
set_color farbe9=[ 0.0, 1.0, 0.9 ]
set_color farbe10=[ 0.0, 1.0, 0.8 ]
set_color farbe11=[ 0.0, 1.0, 0.6 ]
set_color farbe12=[ 0.0, 1.0, 0.5 ]
set_color farbe13=[ 0.0, 1.0, 0.3 ]
set_color farbe14=[ 0.0, 1.0, 0.2 ]
set_color farbe15=[ 0.0, 1.0, 0.1 ]
set_color farbe16=[ 0.1, 1.0, 0.0 ]
set_color farbe17=[ 0.2, 1.0, 0.0 ]
set_color farbe18=[ 0.3, 1.0, 0.0 ]
set_color farbe19=[ 0.5, 1.0, 0.0 ]
set_color farbe20=[ 0.6, 1.0, 0.0 ]
set_color farbe21=[ 0.8, 1.0, 0.0 ]
set_color farbe22=[ 0.9, 1.0, 0.0 ]
set_color farbe23=[ 1.0, 1.0, 0.0 ]
set_color farbe24=[ 1.0, 0.8, 0.0 ]
set_color farbe25=[ 1.0, 0.7, 0.0 ]
set_color farbe26=[ 1.0, 0.6, 0.0 ]
set_color farbe27=[ 1.0, 0.4, 0.0 ]
set_color farbe28=[ 1.0, 0.3, 0.0 ]
set_color farbe29=[ 1.0, 0.1, 0.0 ]
set_color farbe30=[ 1.0, 0.0, 0.0 ]

color farbe1, zone1
color farbe2, zone2
color farbe3, zone3
color farbe4, zone4
color farbe5, zone5
color farbe6, zone6
color farbe7, zone7
color farbe8, zone8
color farbe9, zone9
color farbe10, zone10
color farbe11, zone11
color farbe12, zone12
color farbe13, zone13
color farbe14, zone14
color farbe15, zone15
color farbe16, zone16
color farbe17, zone17
color farbe18, zone18
color farbe19, zone19
color farbe20, zone20
color farbe21, zone21
color farbe22, zone22
color farbe23, zone23
color farbe24, zone24
color farbe25, zone25
color farbe26, zone26
color farbe27, zone27
color farbe28, zone28
color farbe29, zone29
color farbe30, zone30

set line_radius=2.5
set antialias=on
set direct=0.75
set orthoscopic=1
set spec_power=200
set spec_reflect=1.5
bg_color white

set_view (\
     1.000000000,    0.000000000,    0.000000000,\
     0.000000000,    1.000000000,    0.000000000,\
     0.000000000,    0.000000000,    1.000000000,\
     0.000000000,    0.000000000, -368.746154785,\
    75.000000000,    0.000000000,    0.000000000,\
   278.746154785,  484.996124268,    1.000000000 )

- - - - -

I hope this will fullfil your needs, Smita!

Cheers,
Bartholomeus

Reply via email to