Hi Spyros,

so you want to visualize how often each atom matches your GREP query? 
You could put that count number as b-factor and then do a spectrum 
coloring. Example:

python
# load one of the homology models
cmd.load('tem1_mod445.pdb')

# set b-factor to zero for all atoms
cmd.alter('all', 'b=0')

# increment b-factor for each GREP line
for line in open('output.txt'):
     line = line.split(':', 1)[-1]
     name = line[12:16]
     resi = line[22:26]
     cmd.alter('resi %s and name %s' % (resi, name), 'b=b+1')

# show spheres, colored from yellow to red according to count
cmd.show_as('spheres')
cmd.spectrum('b', 'yellow_red', quiet=0)
python end

Cheers,
   Thomas

Spyros Charonis wrote, On 08/31/12 17:21:
> Dear PyMOL community, 
> 
> I have a python script that reads a directory of ~500 homology models 
> generated from a pipeline (I used a PDB file as a template to generate 
> the models). 
> It extracts residues that have charge-bearing atoms on them. When using 
> GREP/EGREP to query a specific coordinate (e.g. 29.010) against the dataset
> and to determine which and in how many homology models it is present, 
> the output looks like so:
> 
> ./tem1_mod445.pdb:ATOM         CE1 HIS A 130      -3.832  -1.260  29.010 
>                          
> ./tem1_mod446.pdb:ATOM         CE1 HIS A 130      -3.832  -1.260  29.010 
>                          
> ./tem1_mod461.pdb:ATOM         CE1 HIS A 130      -3.832  -1.260  29.010 
>                          
> 
> ./tem1_mod179.pdb:ATOM         NZ  LYS A 151     -12.607   8.920  29.049 
>                          
> ./tem1_mod180.pdb:ATOM         NZ  LYS A 151     -12.607   8.920  29.049 
>                          
> 
> and so forth..... 
> 
> The ./tem1_mod**** string refers to the specific homology model file 
> that contains the atom. 
> 
> QUESTION
> Once I have collected all atoms that I possess z-coordinates values 
> within a range (29 - 54), Is there a way to map these onto a template PDB 
> structure (in my case 3NY8 - adrenergic receptor). In other words, 
> having collected hundreds of atomic coordinates (all from charged 
> residues and 
> all with z-values between 29.000 - 54.000 angstroms) across several 
> different homology models (my dataset contains ~500 models) 
> is there a way to visualize (using the z-coordinate spatial value as the 
> criterion) them on a single PDB file? 
> The reason I would like to do this is to observe any patterns in the 
> occurrence of charge throughout the transmembrane region of receptor 
> proteins. 
> 
> Many thanks in advance.
> 
> Regards,
> Spyros Charonis   

-- 
Thomas Holder
MPI for Developmental Biology
Spemannstr. 35
D-72076 Tübingen

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to