Hi Amith,
If you still want to do your script thing despite the res_numbering attribute trick, you would use the "runscript" command (https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/runscript.html) 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.

--Eric

Eric Pettersen
UCSF Computer Graphics Lab


On Jan 24, 2023, at 8:41 AM, Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hello Amith,
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.

Atomic-model attributes:
<https://rbvi.ucsf.edu/chimerax/docs/user/attributes.html#model>

"setattr" command:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/setattr.html>

For example, to switch from author numbering (initial default) to uniprot numbering:

open 2gbp
setattr #1 structures res_numbering uniprot

To go back to author numbering:

setattr #1 structures res_numbering author

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.

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco

On Jan 24, 2023, at 8:16 AM, Rangarajan, Amith via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

This Message Is From an External Sender
This message came from outside your organization.
hi,

i mostly resort to using the resource from dunbrack's lab to download structures renumbered as per uniprot numbering.
i currently do it using a simple .py script:
<image.png>

i want to make this as a chimerax script that i can call from command line with
open {scriptname.py} { pdbid}
wondering if some one has tried to do similar things and some tips regarding which modules to use might be helpful.
thanks a lot ,
best
amith


_______________________________________________
ChimeraX-users mailing list
ChimeraX-users@cgl.ucsf.edu
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users