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 -- Robert L. Campbell, Ph.D. <r...@post.queensu.ca> Senior Research Associate phone: 613-533-6821 Dept. of Biochemistry, Queen's University, fax: 613-533-2497 Kingston, ON K7L 3N6 Canada http://adelie.biochem.queensu.ca/~rlc PGP Fingerprint: 9B49 3D3F A489 05DC B35C 8E33 F238 A8F5 F635 C0E2