[PyMOL] stick coloring on Intel graphics card

2010-07-14 Thread Werner
Dear all,

I have the same problem like here:

http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg08034.html

If I try to draw the sticks by elements the coloring is not done by  
elements. Instead the structure is colored by clusters. The coloring  
is normal if I draw lines.

I have also Ubuntu 10.04 with an Intel graphics card.

glxinfo gives me:

glxinfo | grep -i opengl
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Q45/Q43 GEM 20091221 2009Q4  
x86/MMX/SSE2
OpenGL version string: 2.1 Mesa 7.7.1
OpenGL shading language version string: 1.20

I guess this is a bug in the stick coloring method.

Cheers,

Tim



--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
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] print out distance

2010-07-14 Thread elsa.livoti
Hello,
I used  a simple script to calculate the distance between 
two objects called chain_a and chain_c in the range of 1 
A,
graphically the script works and in the monitor is 
possible observe the distance and the residues involved,
I have some problems to print out the distance values and 
the residues involved in a .txt file.
The script that I used
is very simple, the txt file is created but inside there 
is just one distance and I don't know how insert also
the residues involved,
do you have some idea or suggestion
the script is:

# import PyMOL's command namespace
from pymol import cmd
  
# open dist.txt for writing
f=open('dist.txt','w')
  
# calculate the distance and store it in dst
dst=cmd.distance('tmp','chain_a','chain_c',1)
  
# write the formatted value of the distance (dst)
# to the output file
f.write(%8.3f\n%dst)
  
# close the output file.
f.close()

Thanks a lot
Elsa

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
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] print out distance

2010-07-14 Thread Jason Vertrees
Hi Elsa,

Good first attempt.  cmd.distance will return the distance between
two atoms or the average distance if you give it more than two.  Most
surely your chain A and chain C each have more than one atom each.
 So, you just get the average distance.

I'm not sure what exact distances you want to measure: all atoms;
alpha carbons; average chain?  If you want to measure the distances
between all M atoms in chain A and all N atoms in chain B, you get an
MxN matrix of distances by the following code:

python
from pymol import stored
stored.a, stored.b = [], []
cmd.iterate_state(1, chain A, stored.a.append(ID))
cmd.iterate_state(1, chain B, stored.b.append(ID))

outFile = open(/tmp/distances, 'w')

for a in stored.a:
  for b in stored.b:
outFile.write( distance from %s to %s is %s\n % (a, b,
cmd.distance( id %s % a, id %s % b)))
outFile.close()
python end

Now read your file, /tmp/distances.

If you want average positions between chain A and B, then you need to
compute the center of mass
(http://pymolwiki.org/index.php/Center_Of_Mass), create two
pseudoatoms (http://pymolwiki.org/index.php/Pseudoatom) at the centers
of mass, and calculate that distance.

Cheers,

-- Jason



On Wed, Jul 14, 2010 at 8:26 AM,  elsa.liv...@irb.unisi.ch wrote:
 Hello,
 I used  a simple script to calculate the distance between
 two objects called chain_a and chain_c in the range of 1
 A,
 graphically the script works and in the monitor is
 possible observe the distance and the residues involved,
 I have some problems to print out the distance values and
 the residues involved in a .txt file.
 The script that I used
 is very simple, the txt file is created but inside there
 is just one distance and I don't know how insert also
 the residues involved,
 do you have some idea or suggestion
 the script is:

 # import PyMOL's command namespace
 from pymol import cmd

 # open dist.txt for writing
 f=open('dist.txt','w')

 # calculate the distance and store it in dst
 dst=cmd.distance('tmp','chain_a','chain_c',1)

 # write the formatted value of the distance (dst)
 # to the output file
 f.write(%8.3f\n%dst)

 # close the output file.
 f.close()

 Thanks a lot
 Elsa

 --
 This SF.net email is sponsored by Sprint
 What will you do first with EVO, the first 4G phone?
 Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
 ___
 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




-- 
Jason Vertrees, PhD
PyMOL Product Manager
Schrodinger, LLC

(e) jason.vertr...@schrodinger.com
(o) +1 (603) 374-7120

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
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] print quality pictures

2010-07-14 Thread Vivek Ranjan
Hello,

Once I get a high quality picture from pymol, I want to put some labels,
combine a few of them together, add some arrows and texts, etc. Any
suggestions on what is a good way to do that so that I don't lose resolution
? I generally crop the pictures in gimp to get rid of the white space
around, then insert them in a powerpoint and resize them to fit a few
together on one slide, then add texts, labels, arrows, etc. Save the slide
in as a jpg and then crop it again. But I believe that even though I starts
with a high resolution pictures created by pymol, I end up with not so good
picture due to the procedure I described above.

-- 
Thank you and Regards,

Vivek
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
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