Hi Tomoko, To print the residue names for each atom just type:
iterate org, print resn To get the organic small molecules names into a Python list by molecule, that requires a little effort: # start a python code block python # import stored for passing data back and forth from pymol import stored stored.a = [] # create the original selection of all organic atoms # we'll remove from this list my molecule cmd.select("allOrg", "org") # temporary selection cmd.select("temp", "none") # while our initial selection is not empty, # "pop" from it and query the atom's molecule's name while cmd.count_atoms("allOrg") != 0: # pop--peek, rather cmd.select("temp", "first allOrg") # store the residue name cmd.iterate("temp", "stored.a.append(resn)") # remove by molecule cmd.select("allOrg", "allOrg and not (bm. temp)") python end Now, the Python list, "stored.a" has your residue names so, print stored.a Cheers, -- Jason On Sun, Sep 19, 2010 at 1:15 AM, Tomoko Niwa <tomokon...@gamma.ocn.ne.jp> wrote: > Dear all > > > > I want to get resn list of a selection “organic”. > > > > For example, the list of 2VOM would be [‘HEM’, ‘KLN’, ‘HEM’, ‘KLN’, ‘HEM’, > ‘KLN’, ‘HEM’, ‘KLN’]. > > > > Any suggestions would be appreciated. > > > > Sincerely, > > Tomoko > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > 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 ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ 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