Send PyMOL-users mailing list submissions to
pymol-users@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/pymol-users
or, via email, send a message with subject or body 'help' to
pymol-users-requ...@lists.sourceforge.net
You can reach the person managing the list at
pymol-users-ad...@lists.sourceforge.net
When replying, please edit your Subject line so it is more specific
than "Re: Contents of PyMOL-users digest..."
Today's Topics:
1. Re: combine distance objects (Robert Campbell)
2. [Re: [PyMOL] combine distance objects] (Viktor Hornak)
3. Re: combine distance objects (Michael George Lerner)
4. RE: combine distance objects (Garcia, Tzintzuni I.)
--__--__--
Message: 1
Date: Tue, 8 Mar 2005 10:55:20 -0500
From: Robert Campbell <r...@post.queensu.ca>
To: pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] combine distance objects
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
--__--__--
Message: 2
Date: Tue, 08 Mar 2005 11:31:16 -0500
From: Viktor Hornak <hor...@csb.sunysb.edu>
To: pymol-users@lists.sourceforge.net
Subject: [Re: [PyMOL] combine distance objects]
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
=============================
--__--__--
Message: 3
Date: Tue, 8 Mar 2005 11:42:28 -0500 (EST)
From: Michael George Lerner <mler...@umich.edu>
To: Robert Campbell <r...@post.queensu.ca>
cc: pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] combine distance objects
On Tue, 8 Mar 2005, 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.
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.
I was just about to write something like this. In fact, I have tons of
files called something like x.py sprinkled around that do things like
-----------------------------------------
from pymol import cmd
num_dist = 100
def show_dist():
""" show all of my distance objects """
for i in range(num_dist):
cmd.enable('_dist%s'%i)
def hide_dist():
""" hide all of my distance objects """
for i in range(num_dist):
cmd.disable('_dist%s'%i)
cmd.extend('sd',show_dist)
cmd.extend('hd',hide_dist)
-----------------------------------------
You could also try something cute like
def show_dist():
dists = [name for name in cmd.get_names() if cmd.get_type(name) ==
'object:distance']
for name in dists: cmd.enable(name)
etc.
if you don't want to have to keep track of how many there are.
-michael
--
www.umich.edu/~mlerner | _ |Michael Lerner
This isn't a democracy;| ASCII ribbon campaign ( ) | Michigan
it's a cheer-ocracy. | - against HTML email X | Biophysics
-Torrence, Bring It On| / \ | mler...@umich
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
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real
users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users
--__--__--
Message: 4
Subject: RE: [PyMOL] combine distance objects
Date: Tue, 8 Mar 2005 14:11:39 -0600
From: "Garcia, Tzintzuni I." <tzgar...@utmb.edu>
To: <pymol-users@lists.sourceforge.net>
UmVhZGluZyB0aGlzIHRocmVhZCBnYXZlIG1lIHRoZSBpZGVhIHRoYXQgbWF5YmUgYSBnb29
kIGZl
YXR1cmUgZm9yIGFuIHVwY29taW5nIHJlbGVhc2UgbWlnaHQgYmUgdGhlIGFkZGl0aW9uIG9
mIHNv
bWV0aGluZyBsaWtlIGZvbGRlcnMgdG8gdGhlIG9iamVjdC9zZWxlY3Rpb24gYmFyIG9uIHR
oZSBy
aWdodCwgdGhpcyB3YXkgb2JqZWN0cyBhbmQgc2VsZWN0aW9ucyBjb3VsZCBiZSBncm91cGV
kIGFu
ZCBhZmZlY3RlZCBhbGwgYXQgb25jZS4gIEkgdGhpbmsgdGhpcyB3b3VsZCBiZSBleHRyZW1
lbHkg
dXNlZnVsIGZvciBtYWtpbmcgZmlndXJlcyB3aGVyZSB5b3Ugb2Z0ZW4gaGF2ZSBtdWx0aXB
sZSBv
YmplY3RzIGFuZCBzZWxlY3Rpb25zIGFsbCBjb252ZXJnaW5nIHRvIGlsbHVzdHJhdGUgb25
lIHBv
aW50LiAgUGx1cyBpdCB3b3VsZCBoZWxwIHRvIHJlZHVjZSB0aGUgY2x1dHRlciB5b3UgYnV
pbGQg
dXAgaWYgeW91IGNvdWxkIG9wZW4gYW5kIGNsb3NlIHRoZSBmb2xkZXIgdG8gc2hvdyBvciB
oaWRl
IGl0cyBjb250ZW50cyBpbiB0aGUgcmVzb3VyY2UgYmFyLg0KIA0KLVR6dW5p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bGxvY19pZD0xNDM5NiZvcD1jbGljaw0KCT4gX19fX19fX19fX19fX19fX19fX19fX19
fX19f
X19fX19fX19fX19fX19fX19fX18NCgk+IFB5TU9MLXVzZXJzIG1haWxpbmcgbGlzdA0KCT4
gUHlN
T0wtdXNlcnNAbGlzdHMuc291cmNlZm9yZ2UubmV0DQoJPiBodHRwczovL2xpc3RzLnNvdXJ
jZWZv
cmdlLm5ldC9saXN0cy9saXN0aW5mby9weW1vbC11c2Vycw0KCT4NCgk+DQoJPg0KCQ0KCQ0
KCS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0
NCglT
RiBlbWFpbCBpcyBzcG9uc29yZWQgYnkgLSBUaGUgSVQgUHJvZHVjdCBHdWlkZQ0KCVJlYWQ
gaG9u
ZXN0ICYgY2FuZGlkIHJldmlld3Mgb24gaHVuZHJlZHMgb2YgSVQgUHJvZHVjdHMgZnJvbSB
yZWFs
IHVzZXJzLg0KCURpc2NvdmVyIHdoaWNoIHByb2R1Y3RzIHRydWx5IGxpdmUgdXAgdG8gdGh
lIGh5
cGUuIFN0YXJ0IHJlYWRpbmcgbm93Lg0KCWh0dHA6Ly9hZHMub3Nkbi5jb20vP2FkX2lkPTY
1OTUm
YWxsb2NfaWQ9MTQzOTYmb3A9Y2xpY2sNCglfX19fX19fX19fX19fX19fX19fX19fX19fX19
fX19f
X19fX19fX19fX19fX19fXw0KCVB5TU9MLXVzZXJzIG1haWxpbmcgbGlzdA0KCVB5TU9MLXV
zZXJz
QGxpc3RzLnNvdXJjZWZvcmdlLm5ldA0KCWh0dHBzOi8vbGlzdHMuc291cmNlZm9yZ2UubmV
0L2xp
c3RzL2xpc3RpbmZvL3B5bW9sLXVzZXJzDQoJDQoNCg==
--__--__--
_______________________________________________
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users
End of PyMOL-users Digest