Re: [PyMOL] color by element

2010-02-10 Thread Gerebtzoff, Gregori
What I personally do is:

cmd.color(grey50,all)
util.cnc(all)

So that my carbons have the color I wish (grey50), and other atoms are colored 
by element.

Best,

Greg


-Original Message-
From: David Hall [mailto:li...@cowsandmilk.net] 
Sent: Wednesday, February 10, 2010 1:45 AM
To: Ariel Talavera
Cc: pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] color by element

First of all, there is:
color atomic
which will do all the colors and for whatever reason does green for carbons

Additionally, there's a general class of util.cba? where question mark
is replaced by one letter representing the color of carbon.  I've been
told by people that these are supposed to be internal commands and I
shouldn't use them, but I do and they've been there as long as I've
used pymol.

Currently, these are:
util.cbab for slate
util.cbag for green
util.cbam for magenta
util.cbap for purple
util.cbaw for white
util.cbac for cyan
util.cbak for pink
util.cbao for orange
util.cbas for salmon
util.cbay for yellow

You can see how these are implemented in
http://pymol.svn.sourceforge.net/viewvc/pymol/trunk/pymol/modules/pymol/util.py?view=markup
if you want to make your own custom versions.

-David Hall

On Tue, Feb 9, 2010 at 5:46 PM, Ariel Talavera talav...@cim.sld.cu wrote:
 Hi Pymolers,

 How can I use the color by element (HNOS) function present in the GUI,
 in a script?

 Thanks in advanced,

 Best,
 Ariel

 --
 *
 Ariel Talavera Pérez, PhD
 Center of Molecular Immunology
 calle 216 esq. A 15, Atabey, Playa
 Havana 11600, CUBA
 tel: (53-7) 271 7933, ext. 221
 fax: (53-7) 272 0644
 email: talav...@cim.sld.cu
 *


 --
 SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
 Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
 http://p.sf.net/sfu/solaris-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




--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-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] color by element

2010-02-09 Thread Nathaniel Echols
On Tue, Feb 9, 2010 at 2:46 PM, Ariel Talavera talav...@cim.sld.cu wrote:

 How can I use the color by element (HNOS) function present in the GUI,
 in a script?


I don't think there's a single command that does this; I've always done
something like this:

color grey80, elem c
color white, elem h
color red, elem o
color blue, elem n
color orange, elem s

and so on (in python, these become 'cmd.color(grey80, elem c)', etc.).
 I just discovered that there is also a separate color name for each
element, e.g. color carbon, elem c will work, but the default coloring
scheme seems a bit wacky sometimes (carbon is green, etc.).  If there was a
convenient way to switch between available color sets (e.g. all of the
options available in the menus), that would be awesome.  Currently the
atom-name colors are hardcoded in C, unfortunately.

Nat
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-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] color by element

2010-02-09 Thread Michael Lerner
have you tried:

import util
util.cbag
util.cbay
util.rainbow

etc?

after you type import util, you can type util. followed by a tab to
see the available commands.

On Tue, Feb 9, 2010 at 6:09 PM, Nathaniel Echols nathaniel.ech...@gmail.com
 wrote:

 On Tue, Feb 9, 2010 at 2:46 PM, Ariel Talavera talav...@cim.sld.cuwrote:

 How can I use the color by element (HNOS) function present in the GUI,
 in a script?


 I don't think there's a single command that does this; I've always done
 something like this:

 color grey80, elem c
 color white, elem h
 color red, elem o
 color blue, elem n
 color orange, elem s

 and so on (in python, these become 'cmd.color(grey80, elem c)', etc.).
  I just discovered that there is also a separate color name for each
 element, e.g. color carbon, elem c will work, but the default coloring
 scheme seems a bit wacky sometimes (carbon is green, etc.).  If there was a
 convenient way to switch between available color sets (e.g. all of the
 options available in the menus), that would be awesome.  Currently the
 atom-name colors are hardcoded in C, unfortunately.

 Nat


 --
 SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
 Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
 http://p.sf.net/sfu/solaris-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




-- 
Michael Lerner, Ph.D.
IRTA Postdoctoral Fellow
Laboratory of Computational Biology NIH/NHLBI
5635 Fishers Lane, Room T909, MSC 9314
Rockville, MD 20852 (UPS/FedEx/Reality)
Bethesda MD 20892-9314 (USPS)
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-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] color by element

2010-02-09 Thread David Hall
First of all, there is:
color atomic
which will do all the colors and for whatever reason does green for carbons

Additionally, there's a general class of util.cba? where question mark
is replaced by one letter representing the color of carbon.  I've been
told by people that these are supposed to be internal commands and I
shouldn't use them, but I do and they've been there as long as I've
used pymol.

Currently, these are:
util.cbab for slate
util.cbag for green
util.cbam for magenta
util.cbap for purple
util.cbaw for white
util.cbac for cyan
util.cbak for pink
util.cbao for orange
util.cbas for salmon
util.cbay for yellow

You can see how these are implemented in
http://pymol.svn.sourceforge.net/viewvc/pymol/trunk/pymol/modules/pymol/util.py?view=markup
if you want to make your own custom versions.

-David Hall

On Tue, Feb 9, 2010 at 5:46 PM, Ariel Talavera talav...@cim.sld.cu wrote:
 Hi Pymolers,

 How can I use the color by element (HNOS) function present in the GUI,
 in a script?

 Thanks in advanced,

 Best,
 Ariel

 --
 *
 Ariel Talavera Pérez, PhD
 Center of Molecular Immunology
 calle 216 esq. A 15, Atabey, Playa
 Havana 11600, CUBA
 tel: (53-7) 271 7933, ext. 221
 fax: (53-7) 272 0644
 email: talav...@cim.sld.cu
 *


 --
 SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
 Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
 http://p.sf.net/sfu/solaris-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


--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-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