<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><span class="Apple-tab-span" style="white-space:pre">   </span>I guess for completeness I wanted to say a couple of more things.  One is that with the runscript approach, you can ease your typing burden by then also defining an alias, <i class="">e.g.</i><span style="font-style: normal;" class=""> "alias uniopen runscript path-to-my-script.py", which would then allow you to type just "uniopen 1xyz" to open 1xyz via your script.</span><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>The other is that with significantly more work you can get "open" to use your script to fetch the renumbered files by writing a bundle that tells ChimeraX how to fetch the file, as described here: <a href="https://www.rbvi.ucsf.edu/chimerax/docs/devel/tutorials/introduction.html#writing-bundles-in-a-few-easy-steps" class="">https://www.rbvi.ucsf.edu/chimerax/docs/devel/tutorials/introduction.html#writing-bundles-in-a-few-easy-steps</a> -- specifically the "Bundle Example: Fetch from Network Database" section, though you would need to read the preceding sections as well.  Then you would be able to use a command like "open uninum:1xyz" to fetch the file.  This approach seems like significant overkill though.</div><div class=""><br class=""></div><div class="">--Eric<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 24, 2023, at 9:16 AM, Eric Pettersen via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" class="">chimerax-users@cgl.ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Amith,<div class=""><span class="Apple-tab-span" style="white-space:pre">     </span>If you still want to do your script thing despite the res_numbering attribute trick, you would use the "runscript" command (<a href="https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/runscript.html" class="">https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/runscript.html</a>) rather than "open".  "Open" has no ability to pass non-keyword arguments to the function opening the file.  The arguments you give to runscript will be available in the script via sys.argv.</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 class=""><br class=""><blockquote type="cite" class=""><div class="">On Jan 24, 2023, at 8:41 AM, Elaine Meng via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" class="">chimerax-users@cgl.ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hello Amith,<br class="">This does not answer your specific question, but did you know that you can switch between uniprot residue numbering and the default residue numbering for structures from the PDB?  It is done by changing the atomic-model attribute named res_numbering, such as with the "setattr" command.<br class=""><br class="">Atomic-model attributes:<br class=""><<a href="https://rbvi.ucsf.edu/chimerax/docs/user/attributes.html#model" class="">https://rbvi.ucsf.edu/chimerax/docs/user/attributes.html#model</a>><br class=""><br class="">"setattr" command:<br class=""><<a href="https://rbvi.ucsf.edu/chimerax/docs/user/commands/setattr.html" class="">https://rbvi.ucsf.edu/chimerax/docs/user/commands/setattr.html</a>><br class=""><br class="">For example, to switch from author numbering (initial default) to uniprot numbering:<br class=""><br class="">open 2gbp<br class="">setattr #1 structures res_numbering uniprot<br class=""><br class="">To go back to author numbering:<br class=""><br class="">setattr #1 structures res_numbering author<br class=""><br class="">In this example structure (2gbp) I can see by hovering the mouse that the residue numbers are different.  For example, one of the glutamate residues that is binding the Ca++ ion is 205 in author numbering but 228 in uniprot numbering.<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=""><blockquote type="cite" class="">On Jan 24, 2023, at 8:16 AM, Rangarajan, Amith via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" class="">chimerax-users@cgl.ucsf.edu</a>> wrote:<br class=""><br class="">This Message Is From an External Sender<br class="">This message came from outside your organization.<br class="">hi,<br class=""><br class="">i mostly resort to using the resource from dunbrack's lab to download structures renumbered as per uniprot numbering.<br class=""> i currently do it using a simple .py script:<br class=""><image.png><br class=""><br class="">i want to make this as a chimerax script that i can call from command line with <br class="">open {scriptname.py} { pdbid} <br class="">wondering if some one has tried to do similar things and some tips regarding which modules to use might be helpful.<br class="">thanks a lot ,<br class="">best<br class="">amith<br class=""></blockquote><br class=""><br class="">_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class=""><a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br class=""></div></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<br class=""></div></blockquote></div><br class=""></div></body></html>