[PyMOL] selecting multiple atoms ie oxygen

2004-02-18 Thread John Berrisford
I wish to select multiple oxygens (labelled O1, O2 etc.. within my pdb file) and
colour them red for example. Is there any easy way of doing this other than
typing out a list of all the oxygens I wish to select?

eg. color red, (5paa and (name o1+o1a+o2+o3+o4+o5+o1p+o2p+o3p))

I know in molscript its posible to use a o* label to select all oxygens, is such
a switch possible in pymol. It doesn't work, or I am using the wrong syntax if
its possible.

Any thoughts would be appreciated.

John



RE: [PyMOL] selecting multiple atoms ie oxygen

2004-02-18 Thread Warren DeLano
John,
 
   color red, 5paa and elem o

The problem with using asterices as wildcards in atom names is that some
ill-conceived PDB files actually use them in atom names. 

However, PyMOL does support the use of a terminal wildcard in some cases,
such as with the delete command...

create obj01, none
create obj02, none
delete obj*

And with residue names

color red, as*
color blue, gl*
color pink, hi*

Cheers,
Warren


 -Original Message-
 From: pymol-users-ad...@lists.sourceforge.net 
 [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of 
 John Berrisford
 Sent: Wednesday, February 18, 2004 3:42 AM
 To: pymol-users@lists.sourceforge.net
 Subject: [PyMOL] selecting multiple atoms ie oxygen
 
 I wish to select multiple oxygens (labelled O1, O2 etc.. 
 within my pdb file) and colour them red for example. Is there 
 any easy way of doing this other than typing out a list of 
 all the oxygens I wish to select?
 
 eg. color red, (5paa and (name o1+o1a+o2+o3+o4+o5+o1p+o2p+o3p))
 
 I know in molscript its posible to use a o* label to select 
 all oxygens, is such a switch possible in pymol. It doesn't 
 work, or I am using the wrong syntax if its possible.
 
 Any thoughts would be appreciated.
 
 John
 
 
 ---
 SF.Net is sponsored by: Speed Start Your Linux Apps Now.
 Build and deploy apps  Web services for Linux with a free 
 DVD software kit from IBM. Click Now!
 http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
 ___
 PyMOL-users mailing list
 PyMOL-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pymol-users
 





FW: [PyMOL] selecting multiple atoms ie oxygen

2004-02-18 Thread David A. Horita
Warren,
Personally, I'd much rather have wild-card selections in atom names and have to 
deal individually with the ill-conceived PDB files than the other way around.
Regards,
David Horita

-Original Message-
From: pymol-users-ad...@lists.sourceforge.net 
[mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of Warren DeLano
Sent: Wednesday, February 18, 2004 10:56 AM
To: 'John Berrisford'; pymol-users@lists.sourceforge.net
Subject: RE: [PyMOL] selecting multiple atoms ie oxygen


John,
 
   color red, 5paa and elem o

The problem with using asterices as wildcards in atom names is that some 
ill-conceived PDB files actually use them in atom names. 

However, PyMOL does support the use of a terminal wildcard in some cases, such 
as with the delete command...

create obj01, none
create obj02, none
delete obj*

And with residue names

color red, as*
color blue, gl*
color pink, hi*

Cheers,
Warren


 -Original Message-
 From: pymol-users-ad...@lists.sourceforge.net
 [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of 
 John Berrisford
 Sent: Wednesday, February 18, 2004 3:42 AM
 To: pymol-users@lists.sourceforge.net
 Subject: [PyMOL] selecting multiple atoms ie oxygen
 
 I wish to select multiple oxygens (labelled O1, O2 etc..
 within my pdb file) and colour them red for example. Is there 
 any easy way of doing this other than typing out a list of 
 all the oxygens I wish to select?
 
 eg. color red, (5paa and (name o1+o1a+o2+o3+o4+o5+o1p+o2p+o3p))
 
 I know in molscript its posible to use a o* label to select
 all oxygens, is such a switch possible in pymol. It doesn't 
 work, or I am using the wrong syntax if its possible.
 
 Any thoughts would be appreciated.
 
 John
 
 
 ---
 SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and 
 deploy apps  Web services for Linux with a free DVD software kit from 
 IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
 ___
 PyMOL-users mailing list
 PyMOL-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pymol-users
 




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users



RE: [PyMOL] selecting multiple atoms ie oxygen

2004-02-18 Thread Warren DeLano
 -Original Message-
 From: Charlie 
 Sent: Wednesday, February 18, 2004 8:56 AM
 To: Warren DeLano
 Subject: Re: [PyMOL] selecting multiple atoms ie oxygen
 
 Warren DeLano wrote:
  John,
   
 color red, 5paa and elem o
  
  The problem with using asterices as wildcards in atom names is that 
  some ill-conceived PDB files actually use them in atom names.
  
  However, PyMOL does support the use of a terminal wildcard in some 
  cases, such as with the delete command...
  
  create obj01, none
  create obj02, none
  delete obj*
  
  And with residue names
  
  color red, as*
  color blue, gl*
  color pink, hi*
  
  Cheers,
  Warren
 
 Hi Warren,
 I've struggled with this a couple of times.
 
 Could it be worth finding another way round, so that a 
 consistent role for * exists.
 
 Might it not be better to require users to somehow escape *'s 
 in atom names and then allow * as a wildcard. Although this 
 might be less clear for newbies, the lack of * as a wilcard 
 in atom names is currently unclear. I don't know much about 
 python, but the unix system of escaping special chars with a 
 backslash would be an option, then one could select 
 foo,(bar//A/50/*1\*) to get atoms O1* and C1* from the molecule.
 
 You've probably been through this and have a perfectly sound 
 reason for not doing it !
 

The newbie issue is what troubled me.  Unix hacks know how to edit PDB files
to replace asterisks with something more benign, and they know to escape
common wildcards -- but the ordinary person does not.  

Clearly we can't make everyone happy, so perhaps consistency should be the
guide?  But on the other hand, we are talking about a huge portion of the
PDB.  Nearly every nucleic acid structure seems to suffer from this
unfortunate naming convention (~5000 PDB entries contain C1\* according to
grep of a recent copy of the PDB).

It is true that well-established conventions already exist for handling
asterisks, but I don't believe in following conventions blindly,
particularly when so many people would be negatively affected.

I welcome further discussion on this point.  Guidance from the community
will be crucial, since I don't have a good solution in mind yet.  Some food
for thought:

1) Are atom name wildcards really needed when a more precise way of
selecting by element symbol already exists?

2) If so, then what are the proposals?

a. Escape non-wildcard asterisks with backslash? (regexp convention,
but would trip-up newbies, break current PyMOL scripts, and inconvenience a
whole field of research)

b. Escape wildcard asterisks in atom names with a backslash (that
would be very backwards from the standard convention and create further
confusion).

c. Add a configurable atom_name_wildcard toggle?

d. Support alternative wildcards for atom names?
 Would . or .* work? 

Also note that currently PyMOL doesn't have a regexp engine, and it doesn't
support full wildcards -- just terminal astericks in a few situations.  Full
regexps matching (and thus full convention adherence) would be a nice
addition in the future, but it will need to be configured somehow as well,
probably via some global setting like regexp_based_matching.

Cheers,
Warren