Hi Per, you may check the "volume_esp" function here: https://github.com/speleo3/pymol-psico/blob/master/psico/electrostatics.py
As Jason said in that earlier thread, the volume API is work in progress and will probably change soon. Cheers, Thomas Per Larsson wrote, On 11/21/12 19:01: > Following up myself on this. I did some more digging on Google, and > putting together bits and pieces this is what I have currently. > It works, but does not (yet) allow me to scale the colors according to > eg. the max and min values of my density (which I do not know how to > access). > > I guess that means I have a new question about accessing details about > the density-object. > > Thanks > /Per > > load density.dx, d > cmd.volume("density","d",1.0) > > bg_color white > > from pmg_tk.skins.normal.ColorRampModel import ColorRamp > r = ColorRamp(nColors=256) > r.addColor(0,(0,0,0,0),0) > r.addColor(2,(0.39,0.67,1,0.01),0) > r.addColor(130,(0,1,0.50,0.25),0) > r.addColor(192,(1,0.0,0.0,0.25),0) > r.addColor(255,(1,0,0,0.25),0) > ramp_colors = r.getRamp() > cmd.volume_color("density",ramp_colors) > > > 21 nov 2012 kl. 17:30 skrev Per Larsson: > >> Hi pymol-users >> >> I have previously been able to make quite nice visualizations of my >> volume object, containing the time-averaged density of atoms from a >> MD-simulation. >> For making even more improvement, I'd like to be able to use a script >> (either python or pml) to control which regions of density gets which >> color. >> >> I've found this thread >> >> http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg10294.html >> >> that suggests it to be possible, but understanding how to use that for >> my case is unfortunately (yet) a bit beyond my current pymol-skills. >> Ideally I would want to have a solution that allows me to load in my >> volume-file (in .dx format), assign colors to different regions of >> density systematically (the Volume-GUI is great, but somewhat tricky >> to make quick changes with), and display the result on screen. >> >> Is such a thing possible? >> >> Thanks >> /Per -- Thomas Holder PyMOL Developer Schrödinger Contractor ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ 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