Re: [PyMOL] Merge PDB files

2007-01-11 Thread DeLano Scientific
Josh,

The trick is that each otherwise identical structure in a PDB file must have
its own segment identifier in order to avoid ambiguity.  In recent version
of PyMOL, there is a "segi=1" option to symexp which will automatically
assign such an identifier to each copy.

load $TUT/1hpv.pdb
symexp sym, 1hpv, 1hpv, 5.0, segi=1
create merged, all
save merged.pdb, merged
dele all
load merged.pdb

Cheers,
Warren

--
DeLano Scientific LLC
Subscriber Support Services
mailto:del...@delsci.info
 
"Not yet a PyMOL Subscriber, but want to support the project?  Email
sa...@delsci.com to quote your lab, school, or employer.  Thank you for
sponsoring this open-source endeavor!" -WLD

-Original Message-
From: pymol-users-boun...@lists.sourceforge.net
[mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf Of Joshua
Adelman
Sent: Thursday, January 11, 2007 12:15 PM
To: pymol-users@lists.sourceforge.net
Subject: [PyMOL] Merge PDB files

I was wondering if there was a simple way to merge pdb files generated by
Pymol's 'generate symmetry mates' command? I have a dimer in the available
pdb file and want to make the full hexamer that is formed via a trimer of
dimers.

Any suggestions would be most appreciated.

Josh




--
Joshua L. Adelman
Biophysics Graduate Group  Lab: 510.643.2159
218 Wellman HallFax: 510.642.7428
University of California, Berkeley http://nature.berkeley.edu/ 
~jadelman
Berkeley, CA 94720 USA   jadel...@berkeley.edu

--



-
Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's
Techsay panel and you'll get the chance to share your opinions on IT &
business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users




[PyMOL] Merge PDB files

2007-01-11 Thread Joshua Adelman
I was wondering if there was a simple way to merge pdb files  
generated by Pymol's 'generate symmetry mates' command? I have a  
dimer in the available pdb file and want to make the full hexamer  
that is formed via a trimer of dimers.


Any suggestions would be most appreciated.

Josh



 
--

Joshua L. Adelman
Biophysics Graduate Group  Lab: 510.643.2159
218 Wellman HallFax: 510.642.7428
University of California, Berkeley http://nature.berkeley.edu/ 
~jadelman

Berkeley, CA 94720 USA   jadel...@berkeley.edu
 
--






Re: [PyMOL] Sequence view size

2007-01-11 Thread DeLano Scientific
Aaron,

Unfortunately, there is no good way to do this at present.  A very ugly hack
would be to save the current image and then measure its dimensions. 

Cheers,
Warren

--
DeLano Scientific LLC
Subscriber Support Services
mailto:del...@delsci.info
 
"Not yet a PyMOL Subscriber, but want to support the project?  
Email sa...@delsci.com to quote your lab, school, or employer.  
Thank you for sponsoring this open-source endeavor!" -WLD

-Original Message-
From: pymol-users-boun...@lists.sourceforge.net
[mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf Of aaron bryden
Sent: Thursday, January 11, 2007 11:03 AM
To: pymol-users@lists.sourceforge.net
Subject: [PyMOL] Sequence view size

Is their any way to get the size in pixels of the sequence view like their
is of the internal gui, or the size in pixels of the space actually used for
drawing? I know that glGetDouble(GL_VIEWPORT) but this doesn't take into
account the internal gui or the sequence view.
I can find a way to get the size of the internal gui but not the sequence
view.

thanks,

Aaron

-
Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's
Techsay panel and you'll get the chance to share your opinions on IT &
business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users




[PyMOL] CE Align v0,1

2007-01-11 Thread Jason Vertrees
Howdy,

I've just finished implementing the CE alignment algorithm in Python/C as a 
PyMol plugin.  The CE algorithm, is a fast/accurate structure-based alignment 
program.  (At this point, I have left out a few optimization steps; those 
will come later.)

Before I release the code to the public, I'd like to make it more reliable by 
asking for help from a couple testers.  I need about a half a dozen people 
with various computing environments.  I especially need Mac and Windows 
users, since I work solely on Linux.

If you'd like to help test the code, please let me know and I'll package it up 
and send it over.  It installs very easily and should work on all platforms 
that have access to a C-compiler and a working Python distribution with 
distutils and Numpy installed.

If you'd like to help, or have comments/questions, please contact me through 
email (see attached address).

Cheers,

-- J

-- 
Jason Vertrees
http://vertrees.org/
http://pymolwiki.org/
http://best.utmb.edu/



[PyMOL] Sequence view size

2007-01-11 Thread aaron bryden

Is their any way to get the size in pixels of the sequence view like
their is of the internal gui, or the size in pixels of the space
actually used for drawing? I know that glGetDouble(GL_VIEWPORT) but
this doesn't take into account the internal gui or the sequence view.
I can find a way to get the size of the internal gui but not the
sequence view.

thanks,

Aaron



Re: [PyMOL] distance atom-protein surface

2007-01-11 Thread Praedor Atrebates
I needed to have a measurement of the "actual" physical long dimension of a 
protein model to compare with x-ray scattering data.  I activated the surface 
mesh feature and at the extreme ends of the longest axis, right at the 
surface boundary, created a carbon atom at each position, then simply used 
the distance measurement wizard to measure the distance between the too 
points.  

praedor

On Wednesday 10 January 2007 11:29, Andreas Henschel wrote:
> Hi Giacomo,
>
> you can either create an atom at that position
> (see eg. http://www.rubor.de/bioinf/tips_python.html#chempy) and than
> use the distance command (or wizard).
[...]
> Giacomo Bastianelli wrote:
> >Dear Pymol users,
> >
> >I would like to measure the distance between an atom and
> >a specific point (not another atom) in the surface of the protein.
> >Is it possible with pymol?
> >do I need additional scripts?
> >
> >Thanks in advance,

-- 
Reichstag fire is to Hitler as 9/11 is to Bush



Re: [PyMOL] Pymol cone shape?

2007-01-11 Thread Tsjerk Wassenaar

Hi William,

Maybe the attached python script will be of some use. It contains a
function (and some helper functions) to draw a CGO arrow in PyMOL. It
contains code for drawing a cone for the head of the arrow.

Hope it helps,

Tsjerk

On 1/10/07, William Scott  wrote:

Let's ask on the pymol mailing list...

On Jan 10, 2007, at 11:02 AM, Martin.Laurberg wrote:

> Damn, I can convert my 1969 CNS base pair restraints into what they
> call
> CGO drawn lines, and thereby display enforced hydrogen bonds, but I
> wish
> to draw cones for the base pair ladder as ribbons can do it. Oh
> well, ..
>
>
>
> On Wed, 10 Jan 2007, William Scott wrote:
>
>>
>> I think it is possible, but I don't know how.
>>
>>
>>
>> On Jan 10, 2007, at 9:24 AM, Martin.Laurberg wrote:
>>
>>> Hi Bill, is it possible to draw a cone-shape in pymol?
>>>
>>


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users




--
Tsjerk A. Wassenaar, Ph.D.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623
from pymol import cmd
from pymol.cgo import *
from math import *

#
# Some functions to allow drawing arrows (vectors) in Pymol
# In need of proper documentation...
#
# Please don't distribute (parts of) this file, without credits
#
# (c)2006 Tsjerk A. Wassenaar, PhD, University of Utrecht
#
# t s j e r k w .at. g m a i l .dot. c o m
# http://nmr.chem.uu.nl/~tsjerk/
# 

def t( X ):
if not X: return X
Y = []
for i in range( len( X[0] ) ):
Y.append( [] )
for j in X:
Y[i].append( j[i] )
return Y

def v_add( a, b ):   return ( a[0]+b[0], a[1]+b[1], a[2]+b[2] )
def v_sub( a, b ):   return ( a[0]-b[0], a[1]-b[1], a[2]-b[2] )
def vecprod( a, b ): return ( a[1]*b[2]-a[2]*b[1], a[2]*b[0]-a[0]*b[2], 
a[0]*b[1]-a[1]*b[0] )
def inprod( a, b=None ):
if b: return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]
else: return a[0]*a[0] + a[1]*a[1] + a[2]*a[2]
def svmult( s, a ):  return ( s*a[0], s*a[1], s*a[2] )
def norm( a ):   return svmult( 1/sqrt(inprod( a )), a )

def mvmult( R, x ):
y = []
for i in R: y.append( inprod( i, x ) )
return tuple(y)

def mv_add( X, a ):
Y = []
for i in X:
Y.append( v_add( i, a ) )
return Y

def mmmult( R, X ):
Y = []
for i in X: Y.append( mvmult( R, i ) )
return Y

def smatrix( v ): return [[ v[0], 0, 0 ], [ 0, v[1], 0 ], [ 0, 0, v[2] ]]
def rmatrix( v ):
cosx, sinx = cos( v[0] ), sin( v[0] )
cosy, siny = cos( v[1] ), sin( v[1] )
cosz, sinz = cos( v[2] ), sin( v[2] )

return mmmult( mmmult( [[1,0,0],[0,cosx,-sinx],[0,sinx,cosx]],
  [[cosy,0,-siny],[0,1,0],[siny,0,cosy]] ),
   [[cosz,-sinz,0],[sinz,cosz,0],[0,0,1]] )

def block( i, dphi ):
ddphi = 0.25*dphi
phi0  = i*dphi
phi1  = phi0+ddphi
phi2  = phi1+ddphi
phi3  = phi2+ddphi
phi4  = phi3+ddphi
sqrt2 = sqrt(2)
return [  (-0.5*sqrt2,-0.5*sqrt2*cos(phi2),0.5*sqrt2*sin(phi2)),
  (1,0,0),
  (0,cos(phi0),-sin(phi0)),
  (0,cos(phi1),-sin(phi1)),
  (0,cos(phi2),-sin(phi2)),
  (0,cos(phi3),-sin(phi3)),
  (0,cos(phi4),-sin(phi4))
   ]

def cgo_triangle_fan( X ):
Y = []
while ( X ):
i = X.pop(0)
Y.extend( [ NORMAL, i[0], i[1], i[2], ] )
for i in range( 6 ):
i = X.pop(0)
Y.extend( [ VERTEX, i[0], i[1], i[2], ] )
return Y

def cgo_arrow1( S, E, r=0.2, hr=0.4, hl=1.0 ):
P0 = S
D  = v_sub( E, S )
DL = inprod( D, D )
P1 = v_add( S, svmult( (DL-hl)/DL, D ) )
P2 = E

# Define a vector orthogonal to P1-P0
V = v_sub( P1, P0 )
V = norm( V )
if V[2] != 0:
A = ( 1, 1, -(V[0]+V[1])/V[2] )
elif V[1] != 0:
A = ( 1, -V[0]/V[1], 0 )
else:
A = ( 0, -V[0], 0 )
A = norm( A )

B = vecprod( V, A )
print (inprod(V), inprod(B), inprod(A))
R = t([ svmult( hl,V ), svmult( hr,A ), svmult( hr,B ) ])

# Define the transformation matrix (scale and rotation)
#C = v_sub( P2, P1 )
#scale  = ( hl, hr, hr )
#rotate = ( 0, acos( C[0]/sqrt(C[0]**2+C[2]**2) ), acos( 
C[0]/sqrt(C[0]**2+C[1]**2) ) )
#R = mmmult( smatrix( scale ), rmatrix( rotate ) )
  
obj = [
  CYLINDER, S[0], S[1], S[2], P1[0], P1[1], P1[2], r, 1, 1, 1, 1, 1, 1,
  COLOR, 1, 0, 0,
  BEGIN, TRIANGLE_FAN ]

N = 10
dphi = 2*pi/N
crds = []
for i in range(N+1):

Re: [PyMOL] change the sphere size of a chosen atom ?

2007-01-11 Thread Tsjerk Wassenaar

Ni Hao Feng,

First of all, please do not include an complete daily digest in a
question (or reply) on this or any user list. If required, cut out
only that part which connects to your question or reply.

Then, in addition to Bobs comments, you can also use the terminal or a
script, using the command:

set sphere_scale, 0.3 (or another value)

This will do what it says and scale your atoms sphere radius with the
factor given. Another possibility is to assign a different atomic
radius to your atom:

alter e. s, vdw=newradius_float_argument

maybe like:

alter e. s, vdw=vdw*0.9

Note that you may have to "rebuild" your scene, if you were already
using a sphere representation.

Best,

Tsjerk
--
Tsjerk A. Wassenaar, Ph.D.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623