Hi Horacio, Jason, I'd definitely go for the pseudoatom way, particularly because (pseudo)atoms are much more flexible than CGO. I also assume that you have lots of those lines. Now if you have that in a file xyze.dat, then you can "simply" (cut 'n paste ;)) do:
for i in open('xyze.dat'): (lambda x: cmd.pseudoatom(pos=x[0:3],b=x[3]))([float(j) for j in i.split()]) In a script you can better write it out, to make more clear what happens: for i in open('xyze.dat'): x = [float(j) for j in i.split()] cmd.pseudoatom(pos=x[0:3],b=x[3]) Then you can color the stuff with spectrum. Hope it helps. Cheers, Tsjerk 2010/1/14 Jason Vertrees <jason.vertr...@schrodinger.com>: > Horacio, > > If you're asking how to create spheres positioned at some specific > coordinate, and colored according to some energy, you have two ways to > accomplish this. > > (1) You can take advantage of the pseudoatom command. In PyMOL type, > "help pseudoatom" and also read the PyMOL wiki webpage on the > pseudoatom command (http://pymolwiki.org/index.php/Pseudoatom). > > # simple pseudoatom from your two data lines: > pseudoatom aa, pos=[23.4, 54.6, 12.3], b=-123.5 > pseudoatom bb, pos=[54.5, 23.1, 9.45], b=-56.7 > zoom *, 10 > spectrum b > > (2) You can create CGO (compiled graphics objects), low-level graphics > objects. See the documentation or the PyMOLWiki -- search for "CGO" > or "compiled graphics objects". This will be more difficult as you > will have to turn the energies into colors by hand. > > Hope this helps, > > -- Jason > > > 2010/1/13 Horacio Pérez-Sánchez <horacio.sanc...@kit.edu>: >> Hi, >> >> I was looking in the wiki how to convert the following information about >> beads, cartesian coordinates + energy : >> >> 23.4 54.6 12.3 -123.5 >> 54.5 23.1 9.45 -56.7 >> ....... >> >> to a draw in pymol that contains for each atom a sphere of radius R, >> centered on its coordinates, and with color, in a rainbow gradient. >> >> Thanks >> >> Horacio >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> Throughout its 18-year history, RSA Conference consistently attracts the >> world's best and brightest in the field, creating opportunities for >> Conference >> attendees to learn about information security's most important issues through >> interactions with peers, luminaries and emerging and established companies. >> http://p.sf.net/sfu/rsaconf-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 >> > > > > -- > Jason Vertrees, PhD > PyMOL Product Manager > Schrodinger, LLC > > (e) jason.vertr...@schrodinger.com > (o) +1 (603) 374-7120 > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-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 > -- Tsjerk A. Wassenaar, Ph.D. Computational Chemist Medicinal Chemist Neuropharmacologist ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-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