Werner, First, you can show your ligands as ball-and-stick, by hand: as spheres show sticks set sphere_scale, 0.25, * set stick_radius, 0.125, * then set the sphere_radius for each atom based on your values. Here's an example of fetching the b-factor value from each atom and setting the sphere_radius based on the scaled b-factor:
fetch 1hpv from pymol import stored # set the stored array equal to the b-values; or use your own values stored.bb = [] iterate *, stored.bb.append(b) # execute a python-block python # scale the b-values M = max(stored.bb) scaledBB = map( lambda x: float(x/M), stored.bb) count = 0 # set the sphere radii independently for x in scaledBB: cmd.set("sphere_scale", x, "ID %s" % count) count = count + 1 python end Last, for coloring, set your property in the b-value column (see http://www.pymolwiki.org/index.php/Color#B-Factors, the spectrum command) and color by b-factor. This is very common, and the PyMOLWiki is full of examples. If the above script collides with your b-factor coloring, you can also use the charge 'q' field. Cheers, -- Jason On Fri, Mar 26, 2010 at 8:06 PM, Werner Schroedinger <werner.schroedin...@googlemail.com> wrote: > Hi, > > I have some ligand files in mol2 format. For each one I have another > file which contains for each atom electrostatic and vdw interaction > information like: > (es) (vdw) > 1 -0.345 5.413 > 2 0.653 -0.12 > ... > > What I would like to do is the following: > > 1- load the mol2 file in pymol (this is obvious) > 2- create two copies (lig_i_es, and lig_i_vdw) in pymol of the ligand, > with line representation, and label for each atom type; C. H. C.ar, ... > 3- for lig_i_es, read for each atom the (es) column, and create a bead > around the atom, it's colour is red for negative values of (es) and blue > for positive ones. There is a gradient of colour depending on the > closeness of the value to zero. > 4- same for lig_i_vdw > > What is the best way of doing this in pymol? If I knew how to create for > each atom a bead with a concrete radius and a concrete color and > gradient, the problem would be solved for me, as I would write an > external pymol script that would prepare the pymol script. I wonder then > which are the commands for craeting this kind of spheres. I also wonder > if there is a more effective way of doing this. > > Thanks > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > 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 > -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) jason.vertr...@schrodinger.com (o) +1 (603) 374-7120 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ 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