> I have almost got the coloring working fast, but I have > one last problem. I am just loading a pdb, then I am wanting > to go through and set the 'q' variable for each atom to the > value I am wanting to color on. How do I get a chempy handle > on the molecule being displayed? > 'get_model' seems to return a copy of the chempy model being > displayed.
This isn't possible -- chempy models don't represent PyMOL's internal storage of molecules. Instead, they are just a purely Pythonic way of storing molecular information for input or output into PyMOL. To use them in the way you seek, you would need to set the temperature or occupancy value prior to loading the chempy model into PyMOL for display. However, you can do "round-trip" style modifications, where you get a chempy model from PyMOL, modify it, and then load it into PyMOL as a new object. mdl=cmd.get_model("old_obj") for atm in mdl.atom: atm.b = 10 cmd.load_model(mdl, "new_obj") label new_obj, b Cheers, Warren -- mailto:war...@delsci.com Warren L. DeLano, Ph.D. Principal Scientist DeLano Scientific LLC Voice (650)-346-1154 Fax (650)-593-402 > Thanks, > Charlie > > Warren DeLano wrote: > > Charles, > > > > The fastest way to color by value is to have the value in the > > temperature factor or occupany column and then use the > spectrum command. For example: > > > > spectrum b > > > > spectrum b, blue_white_red > > > > spectrum b, blue_white_red, minimum=5, maximum=50 > > > > Etc. > > > > Cheers, > > Warren > > > > > > > > -- > > mailto:war...@delsci.com > > Warren L. DeLano, Ph.D. > > Principal Scientist > > DeLano Scientific LLC > > Voice (650)-346-1154 > > Fax (650)-593-4020 > > > > > > > >>-----Original Message----- > >>From: pymol-users-ad...@lists.sourceforge.net > >>[mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf > Of Charles > >>Moad > >>Sent: Monday, August 23, 2004 5:50 AM > >>To: pymol-users@lists.sourceforge.net > >>Subject: [PyMOL] Fast Coloring > >> > >> I am working on a plugin that entails coloring residues > based on a > >>value. Right now creating a new color for each residue and setting > >>the color corresponding works, BUT it is very inefficient and takes > >>more than a tolerable amount of time to display. Is there a better > >>approach? > >> It is possible to assign a procedural color to the protein? > >> > >>Thanks, > >> Charlie > >> > >> > >>------------------------------------------------------- > >>SF.Net email is sponsored by Shop4tech.com-Lowest price on > Blank Media > >>100pk Sonic DVD-R 4x for only $29 -100pk Sonic > >>DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free > >>Shipping and Free Gift. > >>http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > >>_______________________________________________ > >>PyMOL-users mailing list > >>PyMOL-users@lists.sourceforge.net > >>https://lists.sourceforge.net/lists/listinfo/pymol-users > >> > > > > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop FREE > Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users >