[chimerax-users] Hopefully simple plugin development question
BARRY E DEZONIA
barry.dezonia at wisc.edu
Wed Apr 19 11:54:33 PDT 2023
Thanks Tom,
How do you invoke this python shell? A quick google search turns up nothing. The command line in the chimerax app does not allow tab completion. I've tried running 'chimerax --nogui' from the command line and that gives me a shell but no tab completion is possible there either.
________________________________
From: Thomas Mulvaney <thomas.mulvaney at cssb-hamburg.de>
Sent: Wednesday, April 19, 2023 1:36 PM
To: BARRY E DEZONIA <barry.dezonia at wisc.edu>
Cc: chimerax-users at cgl.ucsf.edu <chimerax-users at cgl.ucsf.edu>
Subject: Re: [chimerax-users] Hopefully simple plugin development question
Hi Barry,
The list of current models the user is viewing is in the `session.models` variable.
Assuming the user has only one PDB file open, you can just do `session.models[0].filename` which will return the path to the PDB file they opened.
I've discovered most of the functionality I needed by poking around in the Python Shell that ships with ChimeraX and hitting tab to find out the attributes and methods that objects have.
Hope that helps,
Tom
—
Tom Mulvaney
PhD Student
Centre for Structural Systems Biology (CSSB)
Research Group of Prof. Dr. Maya Topf
c/o DESY, Building 15
Notkestraße 85, 22607 Hamburg
Germany
On 19. Apr 2023, at 20:05, BARRY E DEZONIA via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
Hello,
I am looking at writing a plugin for chimerax that takes a pdb and runs some python code that will calc some stuff hand stuff to other programs. I know how to do this. What I want to know is how to find the current model's name / associated pdb filename from my plugin. Imagine my plugin really is just a "Run" button that looks up the current model, generates the associated pdb filename, and passes that name to my python script. Can someone tell me how in a chimerax plugin I can make the call that will give me the pdb filename I want? I've read much of the developer docs and could not find what I was looking for.
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20230419/60505147/attachment-0001.html>
More information about the ChimeraX-users
mailing list