<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Korbin,<div><span class="Apple-tab-span" style="white-space:pre"> </span>The format of the information is controlled by your preferences settings (specifically, the "atom spec display style" preference in the "Labels" category). Therefore, I surmise that when you run through xterm you are either doing this on a different machine or using a different account than when you run it in IDLE (and therefore would have different [probably default] preferences).</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>To sidestep this issue, you can use the underlying function that str() on a Residue calls to explicitly specify the formatting. The function is named chimeraLabel and if given the keyword argument style="simple" it will use the format that includes the residue name. So the first lines of your loop would become:</div><div><br></div><div>from chimera.misc import chimeraLabel</div><div>for p in range(0,len(res_list)):<br> x= chimeraLabel(res_list[p], style="simple")</div><div><br></div><div>BTW, it probably simpler and clearer to iterate through the residues in the list, rather than through the indexes into the list. So I would change the above to:</div><div><br></div><div>from chimera.misc import chimeraLabel</div><div>for r in res_list:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>x = chimeraLabel(r, style="simple")</div><div><br></div><div>--Eric<br><div><div><br> Eric Pettersen<br> UCSF Computer Graphics Lab<br> <a href="http://www.cgl.ucsf.edu">http://www.cgl.ucsf.edu</a><br><br></div><div>On Apr 21, 2015, at 1:46 PM, Korbin West <<a href="mailto:khwest16@wabash.edu">khwest16@wabash.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: 10pt; background-color: rgb(255, 255, 255); font-family: Cambria, serif; "><div style="margin-top: 0px; margin-bottom: 0px; ">Hi all,<br></div><div style="margin-top: 0px; margin-bottom: 0px; "><br></div><div style="margin-top: 0px; margin-bottom: 0px; ">I'm trying to determine uncommon ligands in pdb files using a python code, but have run into an odd dilemma.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br></div><div style="margin-top: 0px; margin-bottom: 0px; ">In my code, I open a pdb in Chimera, select the ligand, and write out the residue list<span style="font-size: 10pt; ">. </span><span style="font-size: 10pt; ">However, the formatting of this list changes depending on how I run the program.</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="font-size: 10pt; "><br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="font-size: 10pt; ">If I run the program through xterm, it will print out only residue numbers. If I run the program though Chimera's Idle, however, I will get the residue codes and the residue numbers. </span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="font-size: 10pt; "><br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="font-size: 10pt; ">For example, I ran this with 3VKG, you can see the results in the attached files, where I show a sample code of what I'm using, the xterm results and the Chimera results.</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><br></div><div style="margin-top: 0px; margin-bottom: 0px; ">I want to do this for a large number of pdbs, so I'd like to do this --nogui through xterm, but I need the residue codes. Has anyone else ran into this problem or know of a work-around? Thanks in advance.<br></div><div style="margin-top: 0px; margin-bottom: 0px; "><br></div><div style="margin-top: 0px; margin-bottom: 0px; ">Best,<br></div><div style="margin-top: 0px; margin-bottom: 0px; "><br></div><div style="margin-top: 0px; margin-bottom: 0px; ">Korbin West<br></div><div style="margin-top: 0px; margin-bottom: 0px; ">Wabash College<br></div><span><residue_testing.py></span><span><testing_file_chimera.txt></span><span><testing_file_xterm.txt></span>_______________________________________________<br>Chimera-users mailing list<br><a href="mailto:Chimera-users@cgl.ucsf.edu">Chimera-users@cgl.ucsf.edu</a><br><a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br></div></blockquote></div><br></div><br><br></body></html>