[chimerax-users] downloading pdb files from another webserver
Eric Pettersen
pett at cgl.ucsf.edu
Tue Jan 24 09:36:43 PST 2023
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, e.g. "alias uniopen runscript path-to-my-script.py", which would then allow you to type just "uniopen 1xyz" to open 1xyz via your script.
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: https://www.rbvi.ucsf.edu/chimerax/docs/devel/tutorials/introduction.html#writing-bundles-in-a-few-easy-steps <https://www.rbvi.ucsf.edu/chimerax/docs/devel/tutorials/introduction.html#writing-bundles-in-a-few-easy-steps> -- 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.
--Eric
> On Jan 24, 2023, at 9:16 AM, Eric Pettersen via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>
> 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 <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 at cgl.ucsf.edu <mailto:chimerax-users at 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 <https://rbvi.ucsf.edu/chimerax/docs/user/attributes.html#model>>
>>
>> "setattr" command:
>> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/setattr.html <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 at cgl.ucsf.edu <mailto:chimerax-users at 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 at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
>> Manage subscription:
>> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
>
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20230124/fbcac9ed/attachment.html>
More information about the ChimeraX-users
mailing list