Hi Jose, you can overload pymol.menu.pick_menu with your own function. The atom "index" is the only true unique index (within the object, and it's not persistent when removing or sorting atoms).
python import pymol.menu original_pick_menu = pymol.menu.pick_menu def custom_pick_menu(cmd, sele1, sele2): sele_ids = [] cmd.iterate(sele2, 'sele_ids[:] = [ID, index]', space=locals()) sele1 += ' ID:%d index:%d' % tuple(sele_ids) return original_pick_menu(cmd, sele1, sele2) pymol.menu.pick_menu = custom_pick_menu python end Hope that helps. Cheers, Thomas On 13 Jul 2014, at 18:28, Jose Borreguero <borregu...@gmail.com> wrote: > Dear pymol users, > > When I click in an atom (mouse->selection mode->atoms) I get the > /chain_name/residue_name/atom_name info string. Is there a way to output the > atom serial or atom index? > My molecule has atoms with duplicate names within the same residue, so the > info string chain_name/residue_name/atom_name does not uniquely identify an > atom. I need to see the atom index or atom serial. > > Thanks in advance for your help! > -Jose -- Thomas Holder PyMOL Developer Schrödinger, Inc. ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ 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