<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">These questions are oddly similar, and have the same answer.  To get the selected residues in Python, and how many, you:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">  </span>from chimera.selection import currentResidues</div><div class=""><span class="Apple-tab-span" style="white-space:pre">     </span>sel_residues = currentResidues()</div><div class=""><span class="Apple-tab-span" style="white-space:pre">  </span>num_sel = len(sel_residues)</div><div class=""><br class=""></div><div class=""><div class="">--Eric</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>Eric Pettersen</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>UCSF Computer Graphics Lab</div></div><div class=""><br class=""></div><blockquote type="cite" class=""><div class="">On Mar 31, 2021, at 10:03 PM, Jayashree Chittari <<a href="mailto:jayashreechittari27@gmail.com" class="">jayashreechittari27@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Respected sir/ma'am<div class=""><br class=""></div><div class="">Greetings for the day!</div><div class="">I want to use chimera commands in shell scripting or python. So, my problem is how to count the residues using Chimera? in gui we know that there is a magnifying icon at the lower right portion of the window, but while running in linux terminal I'm unable to generate the same results.</div><div class=""><br class=""></div><div class="">Here is the attached ss of inspect selection, so if I want to print this in linux terminal what steps should I follow to get to this result?</div><div class=""><br class=""></div><div class="">I'm trying my best to search in the tutorials but  unable to create a command related to inspect selection.</div><div class="">Kindly help me in this issue, it would be very grateful if you suggest the code.</div><div class=""><br class=""></div><div class="">thank you,</div><div class=""><br class=""></div><div class="">Regards</div><div class="">Chittari Jaya Shree</div></div></div></blockquote><div class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div></div></div></div><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 1, 2021, at 2:13 AM, Smit Patel <<a href="mailto:patelsmit11103@gmail.com" class="">patelsmit11103@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="">respected ma'am<div class=""><br class=""></div><div class="">greetings for the day!</div><div class=""><br class=""></div><div class="">Sorry to disturb you again. can you pls tell me the process to run this selection inspector tool using chimera --nogui option. I tried but couldn't find any. Also in the python 2.7 scripts, the inspect.py script is hard to understand. Can you pls tell me to count residues without any involvement of GUI? it would be really helpful.</div><div class=""><br class=""></div><div class="">thank you,</div><div class="">Regards</div><div class=""><br class=""></div><div class="">Smit, <a href="http://B.tech" class="">B.tech</a>(bioinformatics)</div><div class="">Amity university</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 31, 2021 at 8:52 PM Elaine Meng <<a href="mailto:meng@cgl.ucsf.edu" class="">meng@cgl.ucsf.edu</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Greetings Smit,<br class="">
You can just use the "select" command with these amino acid categories, for example:<br class="">
<br class="">
select polar<br class="">
select nonpolar<br class="">
select hydrophobic<br class="">
<br class="">
See:<br class="">
<<a href="https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/select.html" rel="noreferrer" target="_blank" class="">https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/select.html</a>><br class="">
<<a href="https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/atom_spec.html#builtin" rel="noreferrer" target="_blank" class="">https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/atom_spec.html#builtin</a>><br class="">
<<a href="https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/selection.html" rel="noreferrer" target="_blank" class="">https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/selection.html</a>><br class="">
<br class="">
.... and then the Selection Inspector says how many residues are selected.  You can open this tool from the menu (Actions... Inspect) or by clicking the magnifying-glass icon near the bottom right corner of the Chimera window, <br class="">
<<a href="https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/inspection.html" rel="noreferrer" target="_blank" class="">https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/inspection.html</a>><br class="">
<br class="">
and just keep that tool open the whole time.  Then when you use the different select commands, it will say near the top of that dialog how many residues and atoms are selected.<br class="">
<br class="">
There are beginner tutorials for starting to use commands, for example <br class="">
<<a href="https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/tutorials/getting_started.html" rel="noreferrer" target="_blank" class="">https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/tutorials/getting_started.html</a>><br class="">
<br class="">
...and the "working with commands" section in:<br class="">
<<a href="https://www.rbvi.ucsf.edu/Outreach/Tutorials/GettingStarted.html" rel="noreferrer" target="_blank" class="">https://www.rbvi.ucsf.edu/Outreach/Tutorials/GettingStarted.html</a>> <br class="">
<br class="">
I hope this helps,<br class="">
Elaine<br class="">
-----<br class="">
Elaine C. Meng, Ph.D.                       <br class="">
UCSF Chimera(X) team<br class="">
Department of Pharmaceutical Chemistry<br class="">
University of California, San Francisco<br class="">
<br class="">
> On Mar 31, 2021, at 12:29 AM, Smit Patel <<a href="mailto:patelsmit11103@gmail.com" target="_blank" class="">patelsmit11103@gmail.com</a>> wrote:<br class="">
> <br class="">
> Respected sir/ma’am,<br class="">
>  <br class="">
> Greetings for the day!<br class="">
> I’m new user of chimera tool and I don’t know many functions related to command line. So my question is how to identify and count polar, nonpolar , hydrophobic residues in a given protein using command line.<br class="">
>  <br class="">
> Like in gui I performed selectàresidueàamino acid categoryàpolar or hydrophobic. So how to covert this process into the code using command line and get the count of the residues which are selected hydrophobic/polar?<br class="">
>  <br class="">
> It would be very grateful if you could advise me how to code the command line. <br class="">
> Thank you,<br class="">
> Regards <br class="">
> Smit  <br class="">
>  <br class="">
</blockquote></div></div>
_______________________________________________<br class="">Chimera-users mailing list: <a href="mailto:Chimera-users@cgl.ucsf.edu" class="">Chimera-users@cgl.ucsf.edu</a><br class="">Manage subscription: <a href="https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" class="">https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br class=""></div></blockquote></div><br class=""></body></html>