[PyMOL] Distance measurment

2009-07-12 Thread Rotem Sertchook

Hi all

I have to measure a distance between one  atom in one molecule  
(object) and second atom in many molecules (objects) - to do so  
interactively there is no problem:

distance MODEL1//A/211/CA , ManyMODELS_*///100/CA.
How can I write a script  that will help to get the list of the  
distances. Any hints will be appreciated


Thank You
Rotem Sertchook



 
---

Rotem Sertchook, Ph.D.
Bioinformatics Unit, Biological Services
Weizmann Institute of Science,
Rehovot 76100, Israel.
 



--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
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

[PyMOL] PyMOLWiki MovieSchool

2009-07-12 Thread Jason Vertrees
PyMOLers,

There's a new tutorial on the PyMOLWiki for making movies with the newer 
PyMOL versions 1.2+.  It's detailed, covers concepts, and has scripts 
that you can directly copy/paste into PyMOL.  So, if you have time and 
want to learn about making movies in PyMOL, check out the PyMOLWiki's 
MovieSchool:

http://pymolwiki.org/index.php/MovieSchool

Hope this helps someone,

-- Jason

-- 
Jason Vertrees, PhD

Boston U. -- jas...@bu.edu
Dartmouth -- j...@cs.dartmouth.edu

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
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


Re: [PyMOL] PyMOL-users Digest, Vol 38, Issue 9

2009-07-12 Thread Jason Vertrees
> Message: 6
> Date: Sat, 11 Jul 2009 23:34:01 -0700
> From: Donnie Berkholz 
> Subject: [PyMOL] Comparing B-factors of aligned residues
> To: pymol-users@lists.sourceforge.net
> Message-ID: <20090712063401.ga10...@comet>
> Content-Type: text/plain; charset=us-ascii
> 
> Hi all,
> 
> I'm trying to compare the B-factors in two homologous proteins I aligned 
> using 'super'. I can create an alignment object mapping residue pairs 
> together, so I think what I want to do should be possible. I'd like to 
> somehow use that to map the *difference* between the two CA B's onto one 
> of the structures, then color it by B-factor and color unaligned 
> residues gray.
> 
> I can't even figure out how to get at the alignment object or what's in 
> it, much less how to do this. Could anyone help me?
> 
> -- Thanks, Donnie Donnie Berkholz P. Andrew Karplus lab Oregon State 
> University 


Donnie, you can find something similar in the interfaceResidues script 
on the PyMOLWiki:

   http://pymolwiki.org/index.php/InterfaceResidues


It shows you how to load something into the B-factors and calculate the 
difference using the q field.  Don't forget you can do

   super protein1, protein2, object=foo

and foo will be the alignment differences shown as CGO.  If you could 
extract the values of the lengths of those CGO lines you'd be done.

-- J

-- 
Jason Vertrees, PhD

Boston U. -- jas...@bu.edu
Dartmouth -- j...@cs.dartmouth.edu

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
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


Re: [PyMOL] Comparing B-factors of aligned residues

2009-07-12 Thread Donnie Berkholz
On 10:11 Sun 12 Jul , Jason Vertrees wrote:
> Donnie Berkholz wrote:
> > I'm trying to compare the B-factors in two homologous proteins I 
> > aligned using 'super'. I can create an alignment object mapping 
> > residue pairs together, so I think what I want to do should be 
> > possible. I'd like to somehow use that to map the *difference* 
> > between the two CA B's onto one of the structures, then color it by 
> > B-factor and color unaligned residues gray.
> > 
> > I can't even figure out how to get at the alignment object or what's 
> > in it, much less how to do this. Could anyone help me?
> 
> 
> Donnie, you can find something similar in the interfaceResidues script 
> on the PyMOLWiki:
> 
>http://pymolwiki.org/index.php/InterfaceResidues
> 
> 
> It shows you how to load something into the B-factors and calculate the 
> difference using the q field.  Don't forget you can do
> 
>super protein1, protein2, object=foo
> 
> and foo will be the alignment differences shown as CGO.  If you could 
> extract the values of the lengths of those CGO lines you'd be done.

Yeah, that's a nice use of the occupancy field. The problem is that I 
can't even figure out which subtractions to do without some way to 
access the residue mapping between the two nonidentical sequences that I 
know is calculated during alignment. In my original email, I mentioned 
that I'd discovered how to create that alignment object, I just can't 
figure out how to iterate over the residue numbers it's connecting.

I might have to do something annoying like threading one of the 
sequences onto the other structure so I can hack around this 
residue-mapping problem.

-- 
Thanks,
Donnie

Donnie Berkholz
P. Andrew Karplus lab
Oregon State University

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
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


Re: [PyMOL] Comparing B-factors of aligned residues

2009-07-12 Thread Warren DeLano
Donnie,

Please try:


load $TUT/1hpv.pdb

extract chA, chain A

extract chB, chain B

# assign some B values onto chA

from random import random

alter chACA, b=random()

# show for later comparison...

iterate chA///1-10/CA, chain,resi,b

# generate an alignment

align chACA, chBCA, object=aln

# 'refresh' forces 'aln' to become available as a selection 
# before the next command...

refresh

# now we use a Python list, iterate, and alter to copy the
# b factors using the alignment object 'aln'

stored.b = []

iterate chA and aln, stored.b.append(b)

stored.b.reverse()

alter chB and aln, b = stored.b.pop()

# confirm transfer

iterate chB///1-10/CA, chain,resi,b


Cheers,
Warren
 



From: Donnie Berkholz [mailto:dberkh...@gentoo.org]
Sent: Sun 7/12/2009 1:15 PM
To: Jason Vertrees
Cc: pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] Comparing B-factors of aligned residues



On 10:11 Sun 12 Jul , Jason Vertrees wrote:
> Donnie Berkholz wrote:
> > I'm trying to compare the B-factors in two homologous proteins I
> > aligned using 'super'. I can create an alignment object mapping
> > residue pairs together, so I think what I want to do should be
> > possible. I'd like to somehow use that to map the *difference*
> > between the two CA B's onto one of the structures, then color it by
> > B-factor and color unaligned residues gray.
> >
> > I can't even figure out how to get at the alignment object or what's
> > in it, much less how to do this. Could anyone help me?
>
>
> Donnie, you can find something similar in the interfaceResidues script
> on the PyMOLWiki:
>
>http://pymolwiki.org/index.php/InterfaceResidues
>
>
> It shows you how to load something into the B-factors and calculate the
> difference using the q field.  Don't forget you can do
>
>super protein1, protein2, object=foo
>
> and foo will be the alignment differences shown as CGO.  If you could
> extract the values of the lengths of those CGO lines you'd be done.

Yeah, that's a nice use of the occupancy field. The problem is that I
can't even figure out which subtractions to do without some way to
access the residue mapping between the two nonidentical sequences that I
know is calculated during alignment. In my original email, I mentioned
that I'd discovered how to create that alignment object, I just can't
figure out how to iterate over the residue numbers it's connecting.

I might have to do something annoying like threading one of the
sequences onto the other structure so I can hack around this
residue-mapping problem.

--
Thanks,
Donnie

Donnie Berkholz
P. Andrew Karplus lab
Oregon State University

--
Enter the BlackBerry Developer Challenge 
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/Challenge
___
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





--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
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

Re: [PyMOL] Comparing B-factors of aligned residues

2009-07-12 Thread Donnie Berkholz
On 15:51 Sun 12 Jul , Warren DeLano wrote:
> Donnie,
> 
> Please try:
> 
> 
> load $TUT/1hpv.pdb
> 
> extract chA, chain A
> 
> extract chB, chain B
> 
> # assign some B values onto chA
> 
> from random import random
> 
> alter chACA, b=random()
> 
> # show for later comparison...
> 
> iterate chA///1-10/CA, chain,resi,b
> 
> # generate an alignment
> 
> align chACA, chBCA, object=aln
> 
> # 'refresh' forces 'aln' to become available as a selection 
> # before the next command...
> 
> refresh
> 
> # now we use a Python list, iterate, and alter to copy the
> # b factors using the alignment object 'aln'
> 
> stored.b = []
> 
> iterate chA and aln, stored.b.append(b)
> 
> stored.b.reverse()
> 
> alter chB and aln, b = stored.b.pop()

Warren,

A-ma-zing. Worked perfectly! Thanks so much for your help.

The only real modification I made was changing 'b = stored.b.pop()' to a 
'-=' or '/=' because I want to compare the two B's.

For the curious, what I'm doing is mapping conservation scores into the 
B-factor field using ConSurf, then comparing two homologs to look at 
gain-of-function and loss-of-function overlaid as color on a single 
structure. Bright red or blue indicate the most interesting differences.

-- 
Thanks,
Donnie

Donnie Berkholz
P. Andrew Karplus lab
Oregon State University

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
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