Robert Campbell wrote:

Hi,

Daniel Farrell [Monday, March 07, 2005 1:23 PM] wrote:

I want to create a lot of distance objects (in the hundreds) between particular atomic pairs. Obviously I can make a script like the following, inserting the exact atomic selections that I want:

distance distobj12 = (atom1), (atom2)
distance distobj34 = (atom3), (atom4)
... etc.

However, I will end up with hundreds of distance object controls on the right side of the pymol viewer. I want to have just a SINGLE distance object that contains all of the individual distance objects combined. That way I could enable/disable the entire object with a single click, or change the color, etc. Hundreds of individual objects would be unmanageable.

Is there a way to do this?  Thanks,


* Warren L. DeLano <war...@delanoscientific.com> [2005-03-07 13:46] wrote:

This is a reasonable request, but no, it isn't possible right now -- sorry.

If it isn't necessary to be able to turn the distances on and off, then you
can name them using a preceeding underscore "_" so that they are omitted
from the object list.


But in fact one *can* still turn them on and off, with the "enable" or
"disable" command on the command line:

 enable _dist1
 disable _dist1

And it would be straightforward to put those commands within a loop:

 # turn them all off:
 for i in range(100):
   cmd.disable("_dist1%s" % i)

 # turn them all on:
 for i in range(100):
   cmd.enable("_dist1%s" % i)

Change "100" to whatever is appropriate.

Cheers,
Rob


Even though the scripting of this sort is flexible and will get you what you want, I'd still support Daniels's suggestion. Grouping multiple objects (not just distances) would be extremely useful because one can split the objects into functional or logical units and collectively manipulate their properties (e.g. color, state, graphical representation) and it would be more interactive than scripting the same functionality. I can imagine however, that incorporating object hierarchy/grouping into PyMol may not be a trivial task...

Cheers,
-Viktor

--
=============================
Viktor Hornak
Center for Structural Biology
SUNY at Stony Brook =============================



Reply via email to