Re: [PyMOL] feature request

2019-10-17 Thread Thomas Holder
Hi Jared and Vaheh -

We've implemented two modes and pushed the change to the github repository.

set internal_gui_name_color_mode, 
set internal_gui_name_color_mode, 2

Mode 1 is color by first carbon color. We think this is the most relevant use 
case and what the user typically would expect. This only affects molecular 
objects of course, other object types will appear in the default color (white).

Mode 2 is object color. It applies to all object types.

I learned that the "C > by element > ..." menu options also update the object 
color with the same color that is applied to carbons.

A neat way to transfer atom color to object color is with this command:

  iterate (name CA), cmd.set_object_color(model, color)

Other selections are possible of course.

Cheers,
  Thomas


> On Oct 2, 2019, at 7:31 PM, Jared Sampson  wrote:
> 
> Hi Thomas - 
> 
>> When I said it's easy to implement, I was only thinking of object color. 
>> Among the various cases you describe, the "dominant color" is probably the 
>> most important one, as it might not be obvious to the user that object color 
>> can be different from atom colors.
> Indeed, I was among those for whom "it might not be obvious" that there are 
> separate object and atom colors!  I had thought all coloring was done at the 
> atom level (as you show using the selection), and didn't realize there is a 
> separate object-level color, nor did I know about the `set_object_color` 
> command.
> 
> Thanks for the explanation, Thomas!
> 
> Cheers,
> 
> Jared
> 

--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.



___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] feature request

2019-10-02 Thread Jared Sampson
Hi Thomas - 

When I said it's easy to implement, I was only thinking of object color. Among 
the various cases you describe, the "dominant color" is probably the most 
important one, as it might not be obvious to the user that object color can be 
different from atom colors.
Indeed, I was among those for whom "it might not be obvious" that there are 
separate object and atom colors!  I had thought all coloring was done at the 
atom level (as you show using the selection), and didn't realize there is a 
separate object-level color, nor did I know about the `set_object_color` 
command.

Thanks for the explanation, Thomas!

Cheers,

Jared___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] feature request

2019-10-02 Thread Thomas Holder
Hi Jared and Vaheh -

Jared, you've put way more thought into this than I did :-) When I said it's 
easy to implement, I was only thinking of object color. Among the various cases 
you describe, the "dominant color" is probably the most important one, as it 
might not be obvious to the user that object color can be different from atom 
colors.

color blue, (obj);# only changes atom colors
color blue, obj  ;# changes object and atom colors
cmd.set_object_color("obj", "blue")  ;# only changes object color

More complex situations like spectrum or per-representation colors can be 
neglected I think - I wouldn't know how to map those to a label color in a 
useful way.

As a first step, I can add internal_gui_name_color_mode=1 with object colors.

Cheers,
  Thomas


> On Oct 1, 2019, at 9:31 PM, Oganesyan, Vaheh 
>  wrote:
> 
> Thomas and Jared,
> I’m not sure what will be the best solution, but as a start, color of the 
> object name may stay white if more than one color is used. Because you both 
> found this as an interesting idea allows me to ask similar question now 
> regarding labels. What if we can get label_color match the residue color. I 
> vaguely remember something like this discussed x number of years ago, but do 
> not remember why not. Could label become property of the object and not just 
> a property of a session?
>  
> Thank you.
>  
>  
> From: Jared Sampson  
> Sent: Tuesday, October 1, 2019 2:45 PM
> To: Oganesyan, Vaheh ; Thomas Holder 
> 
> Cc: pymol-users 
> Subject: Re: [PyMOL] feature request
>  
> Hi Thomas and Vaheh - 
>  
> This is indeed an interesting idea.  I was thinking about this in terms of 
> implementation, and what the edge cases might be.  I wonder what would be the 
> mechanism for assigning the color if the object is not just a single color.  
> Would it be the color that is the dominant color of the object over all 
> (visible) representations?
>  
> What about a spectrum-colored object?  Would it be possible to color the 
> object name according to the colors in the spectrum (like the "spectrum" and 
> "rainbow" menu items already in the OpenGL menu)?
>  
> And what if there are different coloring schemes for the different 
> representations—would there be a hierarchy in terms of choosing , e.g. 
> surface > cartoon > stick > line, etc.?
>  
> I definitely like Thomas' idea of a global `internal_gui_name_color_mode` 
> setting to turn the menu object name coloring on/off.  (Perhaps different 
> modes could correspond to different ways of choosing the displayed color.)  
> It might also be useful to include object-level (or named-selection-level) 
> settings to override the global setting and specify the color or spectrum 
> directly, e.g.:
>  
> set internal_gui_name_color, red, obj1
> set internal_gui_name_spectrum, rainbow, obj1
>  
> Really interesting suggestion, Vaheh.  Looking forward to seeing how it might 
> work!
>  
> Cheers,
> Jared
>  
> On October 1, 2019 at 5:13:07 AM, Thomas Holder 
> (thomas.hol...@schrodinger.com) wrote:
> 
> Hi Vaheh,
> 
> I see that this can be useful, and it's fairly easy to implement. We can add 
> a new setting to turn this on and off, like "internal_gui_name_color_mode" 
> (or do you have a suggestion for a better name?).
> 
> Cheers,
> Thomas
> 
> 
> > On Sep 26, 2019, at 4:34 PM, Oganesyan, Vaheh 
> >  wrote:
> > 
> > Thomas and other PyMOL developers,
> > 
> > It looks as if we color the object name similar to the object color it will 
> > be easier to distinguish which structure am I manipulating now. While 
> > models can be colored, the names of the models can't.
> > Anybody else think it might be helpful?
> > 
> > Thank you.
> > Regards,
> > 
> > Vaheh Oganesyan, Ph.D.
> > Scientist, Biologic Therapeutics
> > 
> > AstraZeneca
> > R | Antibody Discovery and Protein Engineering
> > One Medimmune Way, Gaithersburg, MD 20878
> > T: 301-398-4640 M: 240-398-0046 
> > vaheh.oganes...@astrazeneca.com
> 
> --
> Thomas Holder
> PyMOL Principal Developer
> Schrödinger, Inc.
> 
> 
> 
> ___
> PyMOL-users mailing list
> Archives: 
> https://clicktime.symantec.com/3UV6BFZxvbLGNd6ZnGajdMx6H2?u=http%3A%2F%2Fwww.mail-archive.com%2Fpymol-users%40lists.sourceforge.net
> Unsubscribe: 
> https://clicktime.symantec.com/3E9dosvp4WJ7Ck38g9VwWNV6H2?u=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fpymol%2Flists%2Fpymol-users%2Funsubscribe

--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.



___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] feature request

2019-10-02 Thread Jared Sampson
Hi Vaheh - 

Fortunately, `label_color` is an atom-level setting already.  For example:

```
PyMOL>fab A, ala_pep
PyMOL>label n. CA, f"{resn} {resi}"
 Label: labelled 5 atoms.
PyMOL>color white
 Executive: Colored 50 atoms.
PyMOL>set label_color, red, resi 1
 Setting: label_color set for 10 atoms in object "pep1".
PyMOL>set label_color, orange, resi 2
 Setting: label_color set for 10 atoms in object "pep1".
PyMOL>set label_color, yellow, resi 3
 Setting: label_color set for 10 atoms in object "pep1".
PyMOL>set label_color, green, resi 4
 Setting: label_color set for 10 atoms in object "pep1".
PyMOL>set label_color, blue, resi 5
 Setting: label_color set for 10 atoms in object "pep1".
```

Hope that helps.

Cheers,
Jared


On October 1, 2019 at 3:31:54 PM, Oganesyan, Vaheh 
(vaheh.oganes...@astrazeneca.com) wrote:

Thomas and Jared,

I’m not sure what will be the best solution, but as a start, color of the 
object name may stay white if more than one color is used. Because you both 
found this as an interesting idea allows me to ask similar question now 
regarding labels. What if we can get label_color match the residue color. I 
vaguely remember something like this discussed x number of years ago, but do 
not remember why not. Could label become property of the object and not just a 
property of a session?

 

Thank you.

 

 

From: Jared Sampson   
Sent: Tuesday, October 1, 2019 2:45 PM
To: Oganesyan, Vaheh ; Thomas Holder 

Cc: pymol-users 
Subject: Re: [PyMOL] feature request

 

Hi Thomas and Vaheh - 

 

This is indeed an interesting idea.  I was thinking about this in terms of 
implementation, and what the edge cases might be.  I wonder what would be the 
mechanism for assigning the color if the object is not just a single color.  
Would it be the color that is the dominant color of the object over all 
(visible) representations?

 

What about a spectrum-colored object?  Would it be possible to color the object 
name according to the colors in the spectrum (like the "spectrum" and "rainbow" 
menu items already in the OpenGL menu)?

 

And what if there are different coloring schemes for the different 
representations—would there be a hierarchy in terms of choosing , e.g. surface 
> cartoon > stick > line, etc.?

 

I definitely like Thomas' idea of a global `internal_gui_name_color_mode` 
setting to turn the menu object name coloring on/off.  (Perhaps different modes 
could correspond to different ways of choosing the displayed color.)  It might 
also be useful to include object-level (or named-selection-level) settings to 
override the global setting and specify the color or spectrum directly, e.g.:

 

    set internal_gui_name_color, red, obj1

    set internal_gui_name_spectrum, rainbow, obj1

 

Really interesting suggestion, Vaheh.  Looking forward to seeing how it might 
work!

 

Cheers,

Jared

 

On October 1, 2019 at 5:13:07 AM, Thomas Holder (thomas.hol...@schrodinger.com) 
wrote:

Hi Vaheh,

I see that this can be useful, and it's fairly easy to implement. We can add a 
new setting to turn this on and off, like "internal_gui_name_color_mode" (or do 
you have a suggestion for a better name?).

Cheers,
Thomas


> On Sep 26, 2019, at 4:34 PM, Oganesyan, Vaheh 
>  wrote:
>  
> Thomas and other PyMOL developers,
>  
> It looks as if we color the object name similar to the object color it will 
> be easier to distinguish which structure am I manipulating now. While models 
> can be colored, the names of the models can't.
> Anybody else think it might be helpful?
>  
> Thank you.
> Regards,
>  
> Vaheh Oganesyan, Ph.D.
> Scientist, Biologic Therapeutics
> 
> AstraZeneca
> R | Antibody Discovery and Protein Engineering
> One Medimmune Way, Gaithersburg, MD 20878
> T: 301-398-4640 M: 240-398-0046  
> vaheh.oganes...@astrazeneca.com

--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.



___
PyMOL-users mailing list
Archives: 
https://clicktime.symantec.com/3UV6BFZxvbLGNd6ZnGajdMx6H2?u=http%3A%2F%2Fwww.mail-archive.com%2Fpymol-users%40lists.sourceforge.net
Unsubscribe: 
https://clicktime.symantec.com/3E9dosvp4WJ7Ck38g9VwWNV6H2?u=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fpymol%2Flists%2Fpymol-users%2Funsubscribe___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] feature request

2019-10-01 Thread Oganesyan, Vaheh
Thomas and Jared,
I’m not sure what will be the best solution, but as a start, color of the 
object name may stay white if more than one color is used. Because you both 
found this as an interesting idea allows me to ask similar question now 
regarding labels. What if we can get label_color match the residue color. I 
vaguely remember something like this discussed x number of years ago, but do 
not remember why not. Could label become property of the object and not just a 
property of a session?

Thank you.


From: Jared Sampson 
Sent: Tuesday, October 1, 2019 2:45 PM
To: Oganesyan, Vaheh ; Thomas Holder 

Cc: pymol-users 
Subject: Re: [PyMOL] feature request

Hi Thomas and Vaheh -

This is indeed an interesting idea.  I was thinking about this in terms of 
implementation, and what the edge cases might be.  I wonder what would be the 
mechanism for assigning the color if the object is not just a single color.  
Would it be the color that is the dominant color of the object over all 
(visible) representations?

What about a spectrum-colored object?  Would it be possible to color the object 
name according to the colors in the spectrum (like the "spectrum" and "rainbow" 
menu items already in the OpenGL menu)?

And what if there are different coloring schemes for the different 
representations—would there be a hierarchy in terms of choosing , e.g. surface 
> cartoon > stick > line, etc.?

I definitely like Thomas' idea of a global `internal_gui_name_color_mode` 
setting to turn the menu object name coloring on/off.  (Perhaps different modes 
could correspond to different ways of choosing the displayed color.)  It might 
also be useful to include object-level (or named-selection-level) settings to 
override the global setting and specify the color or spectrum directly, e.g.:

set internal_gui_name_color, red, obj1
set internal_gui_name_spectrum, rainbow, obj1

Really interesting suggestion, Vaheh.  Looking forward to seeing how it might 
work!

Cheers,
Jared


On October 1, 2019 at 5:13:07 AM, Thomas Holder 
(thomas.hol...@schrodinger.com<mailto:thomas.hol...@schrodinger.com>) wrote:
Hi Vaheh,

I see that this can be useful, and it's fairly easy to implement. We can add a 
new setting to turn this on and off, like "internal_gui_name_color_mode" (or do 
you have a suggestion for a better name?).

Cheers,
Thomas


> On Sep 26, 2019, at 4:34 PM, Oganesyan, Vaheh 
> mailto:vaheh.oganes...@astrazeneca.com>> 
> wrote:
>
> Thomas and other PyMOL developers,
>
> It looks as if we color the object name similar to the object color it will 
> be easier to distinguish which structure am I manipulating now. While models 
> can be colored, the names of the models can't.
> Anybody else think it might be helpful?
>
> Thank you.
> Regards,
>
> Vaheh Oganesyan, Ph.D.
> Scientist, Biologic Therapeutics
> 
> AstraZeneca
> R | Antibody Discovery and Protein Engineering
> One Medimmune Way, Gaithersburg, MD 20878
> T: 301-398-4640 M: 240-398-0046
> vaheh.oganes...@astrazeneca.com<mailto:vaheh.oganes...@astrazeneca.com>

--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.



___
PyMOL-users mailing list
Archives: 
https://clicktime.symantec.com/3UV6BFZxvbLGNd6ZnGajdMx6H2?u=http%3A%2F%2Fwww.mail-archive.com%2Fpymol-users%40lists.sourceforge.net
Unsubscribe: 
https://clicktime.symantec.com/3E9dosvp4WJ7Ck38g9VwWNV6H2?u=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fpymol%2Flists%2Fpymol-users%2Funsubscribe
___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] feature request

2019-10-01 Thread Jared Sampson
Hi Thomas and Vaheh - 

This is indeed an interesting idea.  I was thinking about this in terms of 
implementation, and what the edge cases might be.  I wonder what would be the 
mechanism for assigning the color if the object is not just a single color.  
Would it be the color that is the dominant color of the object over all 
(visible) representations?

What about a spectrum-colored object?  Would it be possible to color the object 
name according to the colors in the spectrum (like the "spectrum" and "rainbow" 
menu items already in the OpenGL menu)?

And what if there are different coloring schemes for the different 
representations—would there be a hierarchy in terms of choosing , e.g. surface 
> cartoon > stick > line, etc.?

I definitely like Thomas' idea of a global `internal_gui_name_color_mode` 
setting to turn the menu object name coloring on/off.  (Perhaps different modes 
could correspond to different ways of choosing the displayed color.)  It might 
also be useful to include object-level (or named-selection-level) settings to 
override the global setting and specify the color or spectrum directly, e.g.:

    set internal_gui_name_color, red, obj1
    set internal_gui_name_spectrum, rainbow, obj1

Really interesting suggestion, Vaheh.  Looking forward to seeing how it might 
work!

Cheers,
Jared

On October 1, 2019 at 5:13:07 AM, Thomas Holder (thomas.hol...@schrodinger.com) 
wrote:

Hi Vaheh,

I see that this can be useful, and it's fairly easy to implement. We can add a 
new setting to turn this on and off, like "internal_gui_name_color_mode" (or do 
you have a suggestion for a better name?).

Cheers,
Thomas


> On Sep 26, 2019, at 4:34 PM, Oganesyan, Vaheh 
>  wrote:
>  
> Thomas and other PyMOL developers,
>  
> It looks as if we color the object name similar to the object color it will 
> be easier to distinguish which structure am I manipulating now. While models 
> can be colored, the names of the models can't.
> Anybody else think it might be helpful?
>  
> Thank you.
> Regards,
>  
> Vaheh Oganesyan, Ph.D.
> Scientist, Biologic Therapeutics
> 
> AstraZeneca
> R | Antibody Discovery and Protein Engineering
> One Medimmune Way, Gaithersburg, MD 20878
> T: 301-398-4640 M: 240-398-0046  
> vaheh.oganes...@astrazeneca.com

--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.



___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] feature request

2019-10-01 Thread Thomas Holder
Hi Vaheh,

I see that this can be useful, and it's fairly easy to implement. We can add a 
new setting to turn this on and off, like "internal_gui_name_color_mode" (or do 
you have a suggestion for a better name?).

Cheers,
  Thomas


> On Sep 26, 2019, at 4:34 PM, Oganesyan, Vaheh 
>  wrote:
> 
> Thomas and other PyMOL developers,
> 
> It looks as if we color the object name similar to the object color it will 
> be easier to distinguish which structure am I manipulating now. While models 
> can be colored, the names of the models can't.
> Anybody else think it might be helpful?
> 
> Thank you.
> Regards,
> 
> Vaheh Oganesyan, Ph.D.
> Scientist, Biologic Therapeutics
> 
> AstraZeneca
> R | Antibody Discovery and Protein Engineering
> One Medimmune Way, Gaithersburg, MD 20878
> T:  301-398-4640  M:  240-398-0046 
> vaheh.oganes...@astrazeneca.com

--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.



___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

[PyMOL] feature request

2019-09-26 Thread Oganesyan, Vaheh
Thomas and other PyMOL developers,

It looks as if we color the object name similar to the object color it will be 
easier to distinguish which structure am I manipulating now. While models can 
be colored, the names of the models can't.
Anybody else think it might be helpful?

Thank you.
Regards,

Vaheh Oganesyan, Ph.D.
Scientist, Biologic Therapeutics

AstraZeneca
R | Antibody Discovery and Protein Engineering
One Medimmune Way, Gaithersburg, MD 20878
T:  301-398-4640  M:  240-398-0046 
vaheh.oganes...@astrazeneca.com



___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] feature request: supercell construction

2010-04-15 Thread Thomas Holder
Hi Nick,

 I noticed a few things:
 
 - when I run supercell 2, 1, 1 I get another cell outline along the
 a axis, but no atoms are shown in the second cell. Do I have to run
 another command for them to show up?

the script does not create symmetry mates. The symexp command can
create symmetry mates within a given radius (it will not just fill up
the cell).

 - when I run the command again with other values for a, b, or c,
 nothing changes. I would expect that running the sequence supercell
 2, 1, 1 and then supercell 2, 2, 1 would show me a 2x2x1 supercell
 at the end, but I see only the 2x1x1 supercell.

the second call will create a new state for the same object. This is not
convenient, so I changed it to replace the first state again. I put the
modified script to the PyMOLWiki:

http://www.pymolwiki.org/index.php/Supercell

Cheers,
  Thomas


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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] feature request: supercell construction

2010-04-14 Thread Thomas Holder
Hi Nick,

I recently was playing with (aka learning) the crystallographic symmetry
information in PDB files and now took your feature request as an
exercise. See attached file, hope it does what you had in mind.

Cheers,
  Thomas

On Mon, 2010-04-12 at 14:12 -0600, Nicolas Bock wrote:
 It would be great if pymol had support for constructing and displaying
 a supercell:
 
 For data files that support crystallographic information, e.g. pdb,
 pymol can already display the unit cell (show cell). It would be great
 if one could easily display multiple copies of the unit cell, along
 the lines of
 
 supercell 1,1,2
 
 where pymol would then copy the unit cell along the c-axis and display
 2 unit cells.
 
 supercell 2,2,2
 
 would display 2 copies along the a, b, and c axes, and display 8 unit
 cells in total.
 
 As a related request it would be great if pymol could construct a unit
 cell in case the crystallographic information in the input file does
 not exist. This could come in handy for instance when reading from
 xyz. Maybe a command such as
 
 construct_supercell a=10.2, b=10.2, c=15, alpha=90.0, beta=90,
 gamma=90
 
 would construct a cubic cell with dimensions axbxc.
 
 Thanks,
 
 nick

'''
(c) 2010 Thomas Holder

PyMOL python script (load with `run supercell.py`)
Usage: See help supercell
'''

from pymol import cmd, cgo
from math import cos, sin, radians, sqrt
import numpy

def cellbasis(angles, edges):
	'''
	For the unit cell with given angles and edge lengths calculate the basis
	transformation (vectors) as a 4x4 numpy.array
	'''
	rad = [radians(i) for i in angles]
	basis = numpy.identity(4)
	basis[0][1] = cos(rad[2])
	basis[1][1] = sin(rad[2])
	basis[0][2] = cos(rad[1])
	basis[1][2] = (cos(rad[0]) - basis[0][1]*basis[0][2])/basis[1][1]
	basis[2][2] = sqrt(1 - basis[0][2]**2 - basis[1][2]**2)
	edges.append(1.0)
	return basis * edges # numpy.array multiplication!

def supercell(a=1, b=1, c=1, object=None, color='blue'):
	'''
DESCRIPTION

Draw a supercell, as requested by Nicolas Bock on the pymol-users
mailing list (Subject: [PyMOL] feature request: supercell construction
Date: 04/12/2010 10:12:17 PM (Mon, 12 Apr 2010 14:12:17 -0600))

USAGE

supercell a, b, c [, object [, color]]

ARGUMENTS

a, b, c = integer: repeat cell in x,y,z direction a,b,c times
{default: 1,1,1}

object = string: name of object to take cell definition from

color = string: color of cell {default: blue}

SEE ALSO

show cell

	'''
	if object is None:
		object = cmd.get_object_list()[0]

	sym = cmd.get_symmetry(object)
	cell_edges = sym[0:3]
	cell_angles = sym[3:6]

	basis = cellbasis(cell_angles, cell_edges)
	assert isinstance(basis, numpy.ndarray)

	ts = list()
	for i in range(int(a)):
		for j in range(int(b)):
			for k in range(int(c)):
ts.append([i,j,k])

	obj = [
		cgo.BEGIN,
		cgo.LINES,
		cgo.COLOR,
	]
	obj.extend(cmd.get_color_tuple(color))
	
	for t in ts:
		shift = basis[0:3,0:3] * t
		shift = shift[:,0] + shift[:,1] + shift[:,2]
	
		for i in range(3):
			vi = basis[0:3,i]
			vj = [
numpy.array([0.,0.,0.]),
basis[0:3,(i+1)%3],
basis[0:3,(i+2)%3],
basis[0:3,(i+1)%3] + basis[0:3,(i+2)%3]
			]
			for j in range(4):
obj.append(cgo.VERTEX)
obj.extend((shift + vj[j]).tolist())
obj.append(cgo.VERTEX)
obj.extend((shift + vj[j] + vi).tolist())

	cmd.load_cgo(obj, 'supercell')

cmd.extend('supercell', supercell)
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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] feature request: supercell construction

2010-04-14 Thread Nicolas Bock
Hi Thomas,

thanks!

I noticed a few things:

- when I run supercell 2, 1, 1 I get another cell outline along the a
axis, but no atoms are shown in the second cell. Do I have to run another
command for them to show up?
- when I run the command again with other values for a, b, or c, nothing
changes. I would expect that running the sequence supercell 2, 1, 1 and
then supercell 2, 2, 1 would show me a 2x2x1 supercell at the end, but I
see only the 2x1x1 supercell.

Thanks again,

nick


On Wed, Apr 14, 2010 at 03:24, Thomas Holder tho...@thomas-holder.dewrote:

 Hi Nick,

 I recently was playing with (aka learning) the crystallographic symmetry
 information in PDB files and now took your feature request as an
 exercise. See attached file, hope it does what you had in mind.

 Cheers,
   Thomas

 On Mon, 2010-04-12 at 14:12 -0600, Nicolas Bock wrote:
  It would be great if pymol had support for constructing and displaying
  a supercell:
 
  For data files that support crystallographic information, e.g. pdb,
  pymol can already display the unit cell (show cell). It would be great
  if one could easily display multiple copies of the unit cell, along
  the lines of
 
  supercell 1,1,2
 
  where pymol would then copy the unit cell along the c-axis and display
  2 unit cells.
 
  supercell 2,2,2
 
  would display 2 copies along the a, b, and c axes, and display 8 unit
  cells in total.
 
  As a related request it would be great if pymol could construct a unit
  cell in case the crystallographic information in the input file does
  not exist. This could come in handy for instance when reading from
  xyz. Maybe a command such as
 
  construct_supercell a=10.2, b=10.2, c=15, alpha=90.0, beta=90,
  gamma=90
 
  would construct a cubic cell with dimensions axbxc.
 
  Thanks,
 
  nick

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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] feature request: supercell construction

2010-04-12 Thread Nicolas Bock
It would be great if pymol had support for constructing and displaying a
supercell:

For data files that support crystallographic information, e.g. pdb, pymol
can already display the unit cell (show cell). It would be great if one
could easily display multiple copies of the unit cell, along the lines of

supercell 1,1,2

where pymol would then copy the unit cell along the c-axis and display 2
unit cells.

supercell 2,2,2

would display 2 copies along the a, b, and c axes, and display 8 unit cells
in total.

As a related request it would be great if pymol could construct a unit cell
in case the crystallographic information in the input file does not exist.
This could come in handy for instance when reading from xyz. Maybe a command
such as

construct_supercell a=10.2, b=10.2, c=15, alpha=90.0, beta=90, gamma=90

would construct a cubic cell with dimensions axbxc.

Thanks,

nick
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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] feature request?

2010-03-12 Thread Nicolas Bock
Hello list,

what's the mechanism for submitting feature requests or bug reports? To this
list?

nick
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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] feature request?

2010-03-12 Thread Jason Vertrees
Nick,

Please email bug reports and feature suggestions to
h...@schrodinger.com.  CC the list if you like.

Cheers,

-- Jason

On Fri, Mar 12, 2010 at 11:17 AM, Nicolas Bock nicolasb...@gmail.com wrote:
 Hello list,

 what's the mechanism for submitting feature requests or bug reports? To this
 list?

 nick


 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 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

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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] feature request

2010-03-12 Thread Nicolas Bock
When I load an xyz file with several frames (for example the result of an MD
simulation) I find that pymol calculates and sets the bonds only using the
initial frame. For frames  1 the bonds are not recalculated. The only work
around I found is to load(..., multiplex=1) which loads the frames into
separate objects. But now I can not play the MD trajectory as a movie.

I would like to suggest that this feature be added to pymol so that MD
trajectories can be played with proper bonding for all frames.

Thanks

nick
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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] feature request

2010-03-12 Thread Nicolas Bock
After editing a molecule it can happen that the bonds that used to be there
don't all make sense anymore, for example, because I moved an atom pretty
far away from its original place. It would be nice if one could call a
function to force pymol at some point to recalculate the bonds in the
molecule. Unfortunately there is currently no rebond function. I would
like to suggest that it be added.

Thanks

nick
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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] feature request

2010-03-12 Thread Nicolas Bock
Please find attached an example xyz file.

nick


On Fri, Mar 12, 2010 at 11:20, Nicolas Bock nicolasb...@gmail.com wrote:

 When I load an xyz file with several frames (for example the result of an
 MD simulation) I find that pymol calculates and sets the bonds only using
 the initial frame. For frames  1 the bonds are not recalculated. The only
 work around I found is to load(..., multiplex=1) which loads the frames
 into separate objects. But now I can not play the MD trajectory as a movie.

 I would like to suggest that this feature be added to pymol so that MD
 trajectories can be played with proper bonding for all frames.

 Thanks

 nick




HCN_to_CHN.xyz
Description: Protein Databank data
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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] feature request

2010-03-12 Thread Nicolas Bock
I should mention that the first 3 columns are the cartesian coordinates in
Angstroms, and the last 3 columes the forces in eV/A.

On Fri, Mar 12, 2010 at 11:50, Nicolas Bock nicolasb...@gmail.com wrote:

 Please find attached an example xyz file.

 nick



 On Fri, Mar 12, 2010 at 11:20, Nicolas Bock nicolasb...@gmail.com wrote:

 When I load an xyz file with several frames (for example the result of an
 MD simulation) I find that pymol calculates and sets the bonds only using
 the initial frame. For frames  1 the bonds are not recalculated. The only
 work around I found is to load(..., multiplex=1) which loads the frames
 into separate objects. But now I can not play the MD trajectory as a movie.

 I would like to suggest that this feature be added to pymol so that MD
 trajectories can be played with proper bonding for all frames.

 Thanks

 nick



--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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] feature request

2010-03-12 Thread Jason Vertrees
Nicolas,

Try:

set connect_mode, 2
load yourXYZ.xyz, discrete=1

-- Jason

On Fri, Mar 12, 2010 at 1:50 PM, Nicolas Bock nicolasb...@gmail.com wrote:
 Please find attached an example xyz file.

 nick


 On Fri, Mar 12, 2010 at 11:20, Nicolas Bock nicolasb...@gmail.com wrote:

 When I load an xyz file with several frames (for example the result of an
 MD simulation) I find that pymol calculates and sets the bonds only using
 the initial frame. For frames  1 the bonds are not recalculated. The only
 work around I found is to load(..., multiplex=1) which loads the frames
 into separate objects. But now I can not play the MD trajectory as a movie.

 I would like to suggest that this feature be added to pymol so that MD
 trajectories can be played with proper bonding for all frames.

 Thanks

 nick



 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 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

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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] feature request

2010-03-12 Thread Nicolas Bock
Great, that works!

On Fri, Mar 12, 2010 at 12:08, Jason Vertrees 
jason.vertr...@schrodinger.com wrote:

 Nicolas,

 Try:

 set connect_mode, 2
 load yourXYZ.xyz, discrete=1

 -- Jason

 On Fri, Mar 12, 2010 at 1:50 PM, Nicolas Bock nicolasb...@gmail.com
 wrote:
  Please find attached an example xyz file.
 
  nick
 
 
  On Fri, Mar 12, 2010 at 11:20, Nicolas Bock nicolasb...@gmail.com
 wrote:
 
  When I load an xyz file with several frames (for example the result of
 an
  MD simulation) I find that pymol calculates and sets the bonds only
 using
  the initial frame. For frames  1 the bonds are not recalculated. The
 only
  work around I found is to load(..., multiplex=1) which loads the
 frames
  into separate objects. But now I can not play the MD trajectory as a
 movie.
 
  I would like to suggest that this feature be added to pymol so that MD
  trajectories can be played with proper bonding for all frames.
 
  Thanks
 
  nick
 
 
 
 
 --
  Download Intel#174; Parallel Studio Eval
  Try the new software tools for yourself. Speed compiling, find bugs
  proactively, and fine-tune applications for parallel performance.
  See why Intel Parallel Studio got high marks during beta.
  http://p.sf.net/sfu/intel-sw-dev
  ___
  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

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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] feature request

2010-03-12 Thread Nicolas Bock
Could the connect_mode setting be better documented? The current
documentation doesn't say much about what that setting does.

nick


On Fri, Mar 12, 2010 at 12:08, Jason Vertrees 
jason.vertr...@schrodinger.com wrote:

 Nicolas,

 Try:

 set connect_mode, 2
 load yourXYZ.xyz, discrete=1

 -- Jason

 On Fri, Mar 12, 2010 at 1:50 PM, Nicolas Bock nicolasb...@gmail.com
 wrote:
  Please find attached an example xyz file.
 
  nick
 
 
  On Fri, Mar 12, 2010 at 11:20, Nicolas Bock nicolasb...@gmail.com
 wrote:
 
  When I load an xyz file with several frames (for example the result of
 an
  MD simulation) I find that pymol calculates and sets the bonds only
 using
  the initial frame. For frames  1 the bonds are not recalculated. The
 only
  work around I found is to load(..., multiplex=1) which loads the
 frames
  into separate objects. But now I can not play the MD trajectory as a
 movie.
 
  I would like to suggest that this feature be added to pymol so that MD
  trajectories can be played with proper bonding for all frames.
 
  Thanks
 
  nick
 
 
 
 
 --
  Download Intel#174; Parallel Studio Eval
  Try the new software tools for yourself. Speed compiling, find bugs
  proactively, and fine-tune applications for parallel performance.
  See why Intel Parallel Studio got high marks during beta.
  http://p.sf.net/sfu/intel-sw-dev
  ___
  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

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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] Feature Request/Ideas

2010-01-21 Thread David A. Horita
Hi,
I would definitely not like to see a default representation to be any
more than lines (as it is now).  Opening one of my 100,000 atom MD
trajectory frames would take far longer than it's worth.

Regarding png output, I think this is in there already (but don't
remember) - I'd like to be able to specify one dimension (usually width)
and have the other automatically calculated.  If I'm trying to frame a
molecule and adjust the size of the screen window I'll want output to
keep the same aspect ratio.

Also, I see a major slowdown when running remotely as compared to VMD,
especially with regards to using the menus (top and right).  I get an
unable to create direct context rendering message, and while I don't
expect it to perform as well as when running locally, I get very
adequate performance running VMD over the same connection.  This is
useful when checking of MD or NMR calculations on a remote cluster from
my lab machines.  The slowdown (especially the view descriptor menu on
the right side) is apparent even over a gigE lan.

I'll add another voice for a better undo function.  In my specific case
I can think of a number of times where I've highlighted a collection of
residues as spheres and then accidentally added spheres to the whole
molecule instead of the next selection.  Being able to get back from
that (even one step) would be a time-saver.

Dave

- 
David A. Horita, Ph.D.
Department of Biochemistry
Wake Forest University School of Medicine
Winston-Salem, NC 27157-1016 
Tel: 336 713-4194
Fax: 336 716-7671 
email:  dhor...@wfubmc.edu
web:  http://www1.wfubmc.edu/biochem/faculty/Horita.htm

-Original Message-
From: David Hall [mailto:dwash59_2...@yahoo.com] 
Sent: Thursday, January 21, 2010 9:20 AM
To: Jason Vertrees; pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] PyMOL on the Mac

Alright, here's a feature request that might convince people who still
don't believe, despite your first commit to pymol trunk post-acquisition
including Fixed a GL build bug on OSX (see
http://pymol.svn.sourceforge.net/viewvc/pymol?view=revrevision=3887 )

A Pymol Quicklook plugin.  My primary purpose would be for pses, but you
might as well pick up pdbs and other formats supported by pymol along
the way.
For pdb files, I wouldn't want the default pymol view of lines colored
by atom with green carbons being what I quicklook to, so either reading
.pymolrc to get a default view or some variant ( .pymolqlrc ?) would be
nice to allow users to customize their views.  Also, maybe default to a
cartoon representation colored by chains with het atoms as sticks and
metals as spheres, but that's probably just forcing the view I want on
others when I could just stick that in my personal .pymolqlrc type file.

Hopefully I'm out of ideas nows,
David




--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
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] feature request

2009-01-17 Thread H. Adam Steinberg
It is especially difficult to remember which scene is which when you 
open a pse file that you haven't looked at for a few months. Would it be 
simple or easy to just let us name the scenes like we name the objects 
and selections in the pane on the right?


Sarina Bromberg wrote:
I find it difficult to keep track of all the scenes I create in a  
PyMOL session and where they are in the stack.  Would it be possible,  
at some point, to add a feature that displays numbered thumbnails of  
scenes in another window on the desktop?

Thanks,
Sarina
Sarina Bromberg
(650) 879-1492
PO Box 12, Pescadero, CA 94060
sarina.bromb...@att.net






--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users
  




Re: [PyMOL] feature request

2009-01-17 Thread Warren DeLano
Adam,

What you seek is in the 1.2 beta -- enable buttons from the Scene menu or:

set scene_buttons

You can then drag to reorder within the stack, rename, update, and delete -- 
all with the right mouse button.  Left-click takes you to the scene you click 
on, and middle-click-and-drag allows you to sweep through all of the scenes 
present, just like with residues in the sequence viewer or objects within the 
object stack.

What I believe Sarina is referring to is the fact that only the name is shown 
in the Scene Button stack, not an actual thumb of the image.  That would make 
Scene Buttons more like PowerPoint's slide sorter pane, rather than merely 
table of names or numbers.

Cheers,
Warren

PS. We haven't made much noise about 1.2 beta yet because there are still 
enough known glitches with the new features for users to be wary.  We'll 
certainly let everyone know when it make sense for more people to try it!

-Original Message-
From: H. Adam Steinberg [mailto:a...@steinbergs.us]
Sent: Fri 1/16/2009 6:41 PM
To: Sarina Bromberg
Cc: pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] feature request
 
It is especially difficult to remember which scene is which when you 
open a pse file that you haven't looked at for a few months. Would it be 
simple or easy to just let us name the scenes like we name the objects 
and selections in the pane on the right?

Sarina Bromberg wrote:
 I find it difficult to keep track of all the scenes I create in a  
 PyMOL session and where they are in the stack.  Would it be possible,  
 at some point, to add a feature that displays numbered thumbnails of  
 scenes in another window on the desktop?
 Thanks,
 Sarina
 Sarina Bromberg
 (650) 879-1492
 PO Box 12, Pescadero, CA 94060
 sarina.bromb...@att.net






 --
 This SF.net email is sponsored by:
 SourcForge Community
 SourceForge wants to tell your story.
 http://p.sf.net/sfu/sf-spreadtheword
 ___
 PyMOL-users mailing list
 PyMOL-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pymol-users
   

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users








Re: [PyMOL] (small) Pymol feature request--filter for edit settings window

2006-04-20 Thread Jerome PANSANEL
Hello Michelle,

You can also edit the SetEditor.py file. The file is in the 
'/usr/lib/python2.3/site-packages/pmg_tk' directory on linux and add the 
feature. It can be done by adding to small portion of add-on code to the 
file. If you do so:

Keep a copy of the original file in a safe place !

Here is a part of the modified file:
###
class SetEditor:

   def __init__(self,app):

  self.app = app
  self.list = []
  for a in  pymol.setting.get_index_list():
 self.list.append(%-30s %s%(pymol.setting._get_name(a),
cmd.get_setting_text(a,'',-1)))

  self.index = {}
  c = 0
  for a in pymol.setting.get_name_list():
 self.index[a] = c
 c = c + 1
 
  self.dialog = Pmw.SelectionDialog(self.app.root,title=Settings,
  buttons = ('Edit', 'Done'),
   defaultbutton='Edit',
  scrolledlist_labelpos=N,
  label_text='Double click to edit',
  scrolledlist_items = self.list,
  command = self.command)
  self.dialog.geometry(500x400)

 # start of the add-on
  interior = self.dialog.interior()
  self.filter = Pmw.EntryField(interior,
  labelpos = 'w',
  label_text= 'Filter:',
  validate = None,
  command = self.filter_list)
  self.filter.pack()
  # end of the add-on

  self.listbox = self.dialog.component('scrolledlist')
  self.listbox.component('listbox').configure(font=app.my_fw_font)
  self.dialog.protocol('WM_DELETE_WINDOW',self.cancel)
  app.my_show(self.dialog)

  # start of the add-on
   def filter_list(self):
  self.list = []
  for a in pymol.setting.get_index_list():
  if self.filter.getvalue() in pymol.setting._get_name(a):
  self.list.append(%-30s %s%(pymol.setting._get_name(a),
   cmd.get_setting_text(a,'',-1)))
  self.dialog.setlist(self.list)
  self.dialog.update()
   # end of the add-on

   def cancel(self,event=None):
  self.command(result='Done')
###

This code works fine on my linux box. If you have some problem, don't hesitate 
to ask me !

Cheers,

Jerome Pansanel

Le Mardi 18 Avril 2006 18:02, Michelle Gill a écrit :
 While we're discussing ways to make our favorite program a little
 better, I had an idea I thought I'd throw out there...

 While making some figures the other day, I found myself scrolling
 endlessly through the edit settings menu (under Setting -- Edit All) a
 number of times, mostly to locate a relatively small number of settings
 related to ray tracing. This got me thinking about a way to improve
 access to the many wonderful features that have been added to PyMOL.

 The solution I came up with is a filter line which could be placed
 directly above the window listing all the settings. Users could then
 type a word, say ray or cartoon, and only the settings containing
 this word would be shown.

 The best example of a program containing this feature is the
 about:config window in Firefox. When you open a browser and type
 about:config instead of an address, a window containing hundreds of
 settings appears. At the top is a filter bar which you can use to pare
 down the number of settings listed below.

 I think this would be a great addition to PyMOL and would help users
 familiarize themselves with the many new settings which have been (and
 will be) implemented. :)

 Perhaps others have even better solutions to this problem. The use of a
 filter is just the first idea which came to my mind. I think it would be
 relatively easy to implement, although my python programming skills are
 somewhat limited.

 Thanks,
 Michelle Gill


 ---
 This SF.Net email is sponsored by xPML, a groundbreaking scripting language
 that extends applications into web and mobile media. Attend the live
 webcast and join the prime developer group breaking into this new coding
 territory!
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
 ___
 PyMOL-users mailing list
 PyMOL-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pymol-users




Re: [PyMOL] (small) Pymol feature request--filter for edit settings window

2006-04-20 Thread Jerome PANSANEL
Hello Michelle,

You can also edit the SetEditor.py file. The file is in the 
'/usr/lib/python2.3/site-packages/pmg_tk' directory on linux and add the 
feature. It can be done by adding to small portion of add-on code to the 
file. If you do so:

Keep a copy of the original file in a safe place !

Here is a part of the modified file:
###
class SetEditor:

   def __init__(self,app):

  self.app = app
  self.list = []
  for a in  pymol.setting.get_index_list():
 self.list.append(%-30s %s%(pymol.setting._get_name(a),
cmd.get_setting_text(a,'',-1)))

  self.index = {}
  c = 0
  for a in pymol.setting.get_name_list():
 self.index[a] = c
 c = c + 1
 
  self.dialog = Pmw.SelectionDialog(self.app.root,title=Settings,
  buttons = ('Edit', 'Done'),
   defaultbutton='Edit',
  scrolledlist_labelpos=N,
  label_text='Double click to edit',
  scrolledlist_items = self.list,
  command = self.command)
  self.dialog.geometry(500x400)

 # start of the add-on
  interior = self.dialog.interior()
  self.filter = Pmw.EntryField(interior,
  labelpos = 'w',
  label_text= 'Filter:',
  validate = None,
  command = self.filter_list)
  self.filter.pack()
  # end of the add-on

  self.listbox = self.dialog.component('scrolledlist')
  self.listbox.component('listbox').configure(font=app.my_fw_font)
  self.dialog.protocol('WM_DELETE_WINDOW',self.cancel)
  app.my_show(self.dialog)

  # start of the add-on
   def filter_list(self):
  self.list = []
  for a in pymol.setting.get_index_list():
  if self.filter.getvalue() in pymol.setting._get_name(a):
  self.list.append(%-30s %s%(pymol.setting._get_name(a),
   cmd.get_setting_text(a,'',-1)))
  self.dialog.setlist(self.list)
  self.dialog.update()
   # end of the add-on

   def cancel(self,event=None):
  self.command(result='Done')
###

This code works fine on my linux box. If you have some problem, don't hesitate 
to ask me !

Cheers,

Jerome Pansanel

Le Mardi 18 Avril 2006 18:02, Michelle Gill a écrit :
 While we're discussing ways to make our favorite program a little
 better, I had an idea I thought I'd throw out there...

 While making some figures the other day, I found myself scrolling
 endlessly through the edit settings menu (under Setting -- Edit All) a
 number of times, mostly to locate a relatively small number of settings
 related to ray tracing. This got me thinking about a way to improve
 access to the many wonderful features that have been added to PyMOL.

 The solution I came up with is a filter line which could be placed
 directly above the window listing all the settings. Users could then
 type a word, say ray or cartoon, and only the settings containing
 this word would be shown.

 The best example of a program containing this feature is the
 about:config window in Firefox. When you open a browser and type
 about:config instead of an address, a window containing hundreds of
 settings appears. At the top is a filter bar which you can use to pare
 down the number of settings listed below.

 I think this would be a great addition to PyMOL and would help users
 familiarize themselves with the many new settings which have been (and
 will be) implemented. :)

 Perhaps others have even better solutions to this problem. The use of a
 filter is just the first idea which came to my mind. I think it would be
 relatively easy to implement, although my python programming skills are
 somewhat limited.

 Thanks,
 Michelle Gill


 ---
 This SF.Net email is sponsored by xPML, a groundbreaking scripting language
 that extends applications into web and mobile media. Attend the live
 webcast and join the prime developer group breaking into this new coding
 territory!
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
 ___
 PyMOL-users mailing list
 PyMOL-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pymol-users




Re: [PyMOL] (small) Pymol feature request--filter for edit settings window

2006-04-19 Thread Andreas Förster

Hey Michelle,

Ezequiel Panepucci wrote grepset, a little script that allows you to do 
exactly what you want and even more.  No need even to open the edit 
settings menu, just type 'grepset ray', and you're cruising.


Get grepset from http://www.pymolwiki.org/index.php/Grepset and put it 
into your .pymolrc file as 'run /path/to/grepset.py'.  Life is good.



Andreas


Michelle Gill wrote:
While we're discussing ways to make our favorite program a little 
better, I had an idea I thought I'd throw out there...


While making some figures the other day, I found myself scrolling 
endlessly through the edit settings menu (under Setting -- Edit All) a 
number of times, mostly to locate a relatively small number of settings 
related to ray tracing. This got me thinking about a way to improve 
access to the many wonderful features that have been added to PyMOL.


The solution I came up with is a filter line which could be placed 
directly above the window listing all the settings. Users could then 
type a word, say ray or cartoon, and only the settings containing 
this word would be shown.


The best example of a program containing this feature is the 
about:config window in Firefox. When you open a browser and type 
about:config instead of an address, a window containing hundreds of 
settings appears. At the top is a filter bar which you can use to pare 
down the number of settings listed below.


I think this would be a great addition to PyMOL and would help users 
familiarize themselves with the many new settings which have been (and 
will be) implemented. :)


Perhaps others have even better solutions to this problem. The use of a 
filter is just the first idea which came to my mind. I think it would be 
relatively easy to implement, although my python programming skills are 
somewhat limited.


Thanks,
Michelle Gill



--
   --   Andreas Förster   --
 8 rue Doudart de Lagrée, 38000 Grenoble
++33.(0)438.866201 and ++33.(0)456.452000
  www.biochem.utah.edu/~andreas
 docandreas.blogspot.com



[PyMOL] (small) Pymol feature request--filter for edit settings window

2006-04-18 Thread Michelle Gill
While we're discussing ways to make our favorite program a little 
better, I had an idea I thought I'd throw out there...


While making some figures the other day, I found myself scrolling 
endlessly through the edit settings menu (under Setting -- Edit All) a 
number of times, mostly to locate a relatively small number of settings 
related to ray tracing. This got me thinking about a way to improve 
access to the many wonderful features that have been added to PyMOL.


The solution I came up with is a filter line which could be placed 
directly above the window listing all the settings. Users could then 
type a word, say ray or cartoon, and only the settings containing 
this word would be shown.


The best example of a program containing this feature is the 
about:config window in Firefox. When you open a browser and type 
about:config instead of an address, a window containing hundreds of 
settings appears. At the top is a filter bar which you can use to pare 
down the number of settings listed below.


I think this would be a great addition to PyMOL and would help users 
familiarize themselves with the many new settings which have been (and 
will be) implemented. :)


Perhaps others have even better solutions to this problem. The use of a 
filter is just the first idea which came to my mind. I think it would be 
relatively easy to implement, although my python programming skills are 
somewhat limited.


Thanks,
Michelle Gill