Hi Abhinav, - Object name is the "model" variable. Check this page: https://pymolwiki.org/index.php/Iterate#Exposed_Variables - Limit selection to enabled objects: "enabled" selection keyword - Limit selection to one atom per residue: "byca" will do the trick for proteins
iterate byca (rep sticks & enabled), print(model,chain,resi,resn) Cheers, Thomas > iterate rep sticks, print(cmd.get_names(enabled_only=1),chain,resi,resn) On 22 Mar 2017, at 16:43, Kumar, Abhinav <aku...@intrexon.com> wrote: > Hi Thomas, > Thanks very much. It works well. > However, can you please help me refine the print out? > I want to include the object name and print only once the residue info for > each residue. Currently it prints for all atoms of residues. > I tried the following: > iterate rep sticks, print(cmd.get_names(enabled_only=1),chain,resi,resn) > > Thanks, > Abhinav > > -----Original Message----- > From: Thomas Holder [mailto:thomas.hol...@schrodinger.com] > Sent: Wednesday, March 22, 2017 1:15 PM > To: Kumar, Abhinav > Cc: pymol-users@lists.sourceforge.net > Subject: Re: [PyMOL] selection of residues > > Hi Abhinav, > > You can select by representation, e.g.: > > iterate rep sticks, print(chain, resi) > > or directly add labels on CA atoms: > > label byca rep sticks, resi > > Hope that helps. > > Cheers, > Thomas > > On 22 Mar 2017, at 15:43, Kumar, Abhinav <aku...@intrexon.com> wrote: > >> Hi, >> Is there a way of extracting residue information from a session file in >> which a few residues are shown in sticks representation? >> I am interested in changing representation/adding labels to only those >> residues with stick representation. >> >> Thanks, >> Abhinav >> >> Abhinav Kumar, PhD >> Senior Scientist, Data Science & Computational Biology Intrexon, Inc. >> 329 Oyster Point Blvd., South San Francisco, CA 94080 >> (650) 597-4072 | aku...@intrexon.com -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ 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